From abcea014a1b139af6745192026cf69d633776696 Mon Sep 17 00:00:00 2001 From: Tolga Ergin Date: Sun, 8 Nov 2026 07:39:20 +0000 Subject: [PATCH] Release 0.3.0 The keychain, CLI report and executable discovery changes since 0.2.0 are released as 0.3.0. The server now reports the version in package.json to MCP clients instead of a fixed string that release bumps left behind. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 15 +++++++++++++++ lib/__tests__/server-contract.test.js | 22 ++++++++++++++++++++++ lib/server.js | 5 ++++- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae52fc..24353ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to this project will be documented in this file. +## [0.3.0] - 2026-11-08 + +### Changed + +- **Keychain lookup matches LPM CLI** — The token is read from the registry-scoped account LPM CLI writes, `auth-token:<16 hex>` from SHA-256 of the registry URL without trailing slashes, then from the account earlier CLI releases used for a login made with a trailing slash. `LPM_TOKEN` still comes first. The unscoped `auth-token` account is no longer read, so sign in again with a current LPM CLI if the server finds no token +- **Agent tools pass complete CLI reports through** — Reports keep every field the CLI returns, process failures come back with their output, and `lpm_audit` honors its project path +- **The CLI decides access** — Tools no longer refuse anonymous calls before the CLI applies its own access rules +- **Search takes filters alone** — `lpm_search` accepts the Free distribution and filter-only requests without a query +- The server reports its package version to MCP clients instead of a fixed one + +### Fixed + +- **Executable discovery** — Absolute paths outside the project are scanned, the Windows npm native package resolves without a shell, and relative overrides are refused, including Windows paths without a drive or UNC share +- A missing optional `keytar` module returns no token instead of failing, and keychain read errors give an actionable message without the token + ## [0.2.0] - 2026-03-25 ### Added diff --git a/lib/__tests__/server-contract.test.js b/lib/__tests__/server-contract.test.js index b28f788..92acbf1 100644 --- a/lib/__tests__/server-contract.test.js +++ b/lib/__tests__/server-contract.test.js @@ -1,3 +1,4 @@ +import { readFileSync } from "node:fs" import { Client } from "@modelcontextprotocol/sdk/client/index.js" import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js" import { afterEach, expect, it, vi } from "vitest" @@ -14,6 +15,27 @@ afterEach(() => vi.unstubAllEnvs()) import { createServer } from "../server.js" +it("tells clients the version it was published as", async () => { + const { version } = JSON.parse( + readFileSync(new URL("../../package.json", import.meta.url), "utf8"), + ) + const server = createServer() + const client = new Client({ name: "test", version: "1.0.0" }) + const [clientTransport, serverTransport] = + InMemoryTransport.createLinkedPair() + try { + await server.connect(serverTransport) + await client.connect(clientTransport) + expect(client.getServerVersion()).toMatchObject({ + name: "lpm-registry", + version, + }) + } finally { + await client.close() + await server.close() + } +}) + it("offers Free as a registry distribution filter", async () => { const server = createServer() const client = new Client({ name: "test", version: "1.0.0" }) diff --git a/lib/server.js b/lib/server.js index ee2b3f6..20d9801 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1,3 +1,4 @@ +import { createRequire } from "node:module" import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js" import { z } from "zod" import { getBaseUrl, getToken } from "./auth.js" @@ -20,6 +21,8 @@ import { search } from "./tools/search.js" import { searchOwners } from "./tools/search-owners.js" import { userInfo } from "./tools/user-info.js" +const { version } = createRequire(import.meta.url)("../package.json") + /** * Create and configure the MCP server with all LPM tools. * @returns {import('@modelcontextprotocol/sdk/server/mcp.js').McpServer} @@ -27,7 +30,7 @@ import { userInfo } from "./tools/user-info.js" export function createServer() { const server = new McpServer({ name: "lpm-registry", - version: "0.2.0", + version, }) const cache = new MemoryCache() diff --git a/package-lock.json b/package-lock.json index 8a4ec3d..16a27af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lpm-registry/mcp-server", - "version": "0.1.0", + "version": "0.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@lpm-registry/mcp-server", - "version": "0.1.0", + "version": "0.3.0", "license": "ISC", "dependencies": { "@modelcontextprotocol/sdk": "^1.12.0", diff --git a/package.json b/package.json index a3c8036..eeb678f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lpm-registry/mcp-server", - "version": "0.2.0", + "version": "0.3.0", "description": "MCP server for the LPM package registry — exposes package info, quality reports, name checks, pool stats, and marketplace search as AI tools", "author": "LPM (https://lpm.dev)", "repository": {