mirror of
https://github.com/giancarloerra/socraticode.git
synced 2026-07-03 14:05:21 +02:00
fix: add mcpName and read version dynamically from package.json
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "socraticode",
|
||||
"mcpName": "io.github.giancarloerra/socraticode",
|
||||
"version": "1.0.0",
|
||||
"description": "SocratiCode — MCP server for local codebase indexing, semantic search, and code dependency graphs. All private, all local via Docker.",
|
||||
"type": "module",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
// Copyright (C) 2026 Giancarlo Erra - Altaire Limited
|
||||
|
||||
import { createRequire } from "node:module";
|
||||
|
||||
// ── Package metadata ─────────────────────────────────────────────────────
|
||||
const esmRequire = createRequire(import.meta.url);
|
||||
const pkg = esmRequire("../package.json") as { version: string };
|
||||
export const SOCRATICODE_VERSION: string = pkg.version;
|
||||
|
||||
// ── Embedding configuration ──────────────────────────────────────────────
|
||||
// Embedding model and dimensions are now configured via environment variables.
|
||||
// See src/services/embedding-config.ts for OLLAMA_MODE, OLLAMA_URL,
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
||||
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
||||
import { z } from "zod";
|
||||
import { SOCRATICODE_VERSION } from "./constants.js";
|
||||
import { logger, setMcpLogSender } from "./services/logger.js";
|
||||
import { autoResumeIndexedProjects, gracefulShutdown } from "./services/startup.js";
|
||||
import { handleContextTool } from "./tools/context-tools.js";
|
||||
@@ -16,7 +17,7 @@ import { handleQueryTool } from "./tools/query-tools.js";
|
||||
const server = new McpServer(
|
||||
{
|
||||
name: "socraticode",
|
||||
version: "1.0.0",
|
||||
version: SOCRATICODE_VERSION,
|
||||
},
|
||||
{
|
||||
capabilities: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
// Copyright (C) 2026 Giancarlo Erra - Altaire Limited
|
||||
|
||||
import { QDRANT_HOST, QDRANT_MODE, QDRANT_PORT, QDRANT_URL } from "../constants.js";
|
||||
import { QDRANT_HOST, QDRANT_MODE, QDRANT_PORT, QDRANT_URL, SOCRATICODE_VERSION } from "../constants.js";
|
||||
import { getArtifactStatusSummary } from "../services/context-artifacts.js";
|
||||
import { isDockerAvailable, isQdrantImagePresent, isQdrantRunning } from "../services/docker.js";
|
||||
import { getEmbeddingConfig } from "../services/embedding-config.js";
|
||||
@@ -235,7 +235,7 @@ export async function handleManageTool(
|
||||
"3. codebase_graph_query to explore dependencies.",
|
||||
"4. codebase_context_search for schemas, API specs, configs.",
|
||||
"",
|
||||
"v1.0.0 · © 2026 Giancarlo Erra — Altaire Limited · AGPL-3.0",
|
||||
`v${SOCRATICODE_VERSION} · © 2026 Giancarlo Erra — Altaire Limited · AGPL-3.0`,
|
||||
"https://github.com/giancarloerra/socraticode",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user