@pharaoh-so/mcp 0.3.10 → 0.3.11

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/inspect.js CHANGED
@@ -12,19 +12,9 @@ import { readFileSync } from "node:fs";
12
12
  import { join } from "node:path";
13
13
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
14
14
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
15
+ import { getPackageVersion } from "./version.js";
15
16
  const INSPECT_MSG = "This is Pharaoh's inspection server for directory listings. " +
16
17
  "Connect to https://mcp.pharaoh.so for actual usage.";
17
- /** Read version from package.json (single source of truth). */
18
- function getPackageVersion() {
19
- try {
20
- const pkgPath = join(import.meta.dirname, "..", "package.json");
21
- const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
22
- return pkg.version ?? "0.0.0";
23
- }
24
- catch {
25
- return "0.0.0";
26
- }
27
- }
28
18
  export async function runInspect() {
29
19
  // Load pre-generated schemas (shipped in the npm package)
30
20
  const schemasPath = join(import.meta.dirname, "..", "inspect-tools.json");
@@ -9,21 +9,12 @@ import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync
9
9
  import { homedir } from "node:os";
10
10
  import { dirname, join } from "node:path";
11
11
  import { fileURLToPath } from "node:url";
12
+ import { getPackageVersion } from "./version.js";
12
13
  const __dirname = dirname(fileURLToPath(import.meta.url));
13
14
  /** Path to the bundled package root (one level up from dist/). */
14
15
  const PKG_ROOT = join(__dirname, "..");
15
16
  /** Path to the bundled skills directory. */
16
17
  const BUNDLED_SKILLS_DIR = join(PKG_ROOT, "skills");
17
- /** Read the package version from package.json (single source of truth). */
18
- function getPackageVersion() {
19
- try {
20
- const pkg = JSON.parse(readFileSync(join(PKG_ROOT, "package.json"), "utf-8"));
21
- return pkg.version ?? "0.0.0";
22
- }
23
- catch {
24
- return "0.0.0";
25
- }
26
- }
27
18
  // ── Detection ───────────────────────────────────────────────────────
28
19
  /**
29
20
  * Detect whether Claude Code is installed by checking for ~/.claude/.
@@ -0,0 +1,2 @@
1
+ /** Read the mcp-proxy package version from package.json. */
2
+ export declare function getPackageVersion(): string;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Single source of truth for the mcp-proxy package version.
3
+ *
4
+ * Reads from packages/mcp-proxy/package.json, which is shipped with the
5
+ * published npm artifact. Returns "0.0.0" on any failure so callers can
6
+ * treat the value as a display-only string.
7
+ */
8
+ import { readFileSync } from "node:fs";
9
+ import { dirname, join } from "node:path";
10
+ import { fileURLToPath } from "node:url";
11
+ const __dirname = dirname(fileURLToPath(import.meta.url));
12
+ /** Path to the bundled package root (one level up from dist/). */
13
+ const PKG_ROOT = join(__dirname, "..");
14
+ /** Read the mcp-proxy package version from package.json. */
15
+ export function getPackageVersion() {
16
+ try {
17
+ const pkg = JSON.parse(readFileSync(join(PKG_ROOT, "package.json"), "utf-8"));
18
+ return pkg.version ?? "0.0.0";
19
+ }
20
+ catch {
21
+ return "0.0.0";
22
+ }
23
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pharaoh-so/mcp",
3
3
  "mcpName": "so.pharaoh/pharaoh",
4
- "version": "0.3.10",
4
+ "version": "0.3.11",
5
5
  "description": "MCP proxy for Pharaoh — maps codebases into queryable knowledge graphs for AI agents. Enables Claude Code in headless environments (VPS, SSH, CI) via device flow auth.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",