@zosmaai/pi-llm-wiki 0.11.1 → 0.11.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  ## [Unreleased]
4
4
 
5
5
  ### Fixed
6
+ - **MCP server failed to start on `@modelcontextprotocol/server` 2.0.0** (Issue #128): `mcp/index.ts` imported `StdioServerTransport` from the package root, but SDK 2.0.0 (published 2026-07-27) moved that export to the `./stdio` subpath, so `node dist/mcp/index.js` died with `SyntaxError: The requested module '@modelcontextprotocol/server' does not provide an export named 'StdioServerTransport'` before the transport ever connected. The declared range `^2.0.0-alpha.2` is a caret range over a prerelease, so it permits `2.0.0`: every fresh consumer install resolved the stable SDK against the pre-stable import, while `pnpm-lock.yaml` pinned the `2.0.0-alpha.2` floor — so `test/mcp-package.test.ts`, which does spawn the published command and complete the stdio handshake, only ever exercised the alpha where the root export still existed. Fixed by importing `StdioServerTransport` from `@modelcontextprotocol/server/stdio` (the `./stdio` subpath does not exist in `2.0.0-alpha.2`, so the range, the lockfile and the import move together), raising the range to `^2.0.0`, and refreshing the lockfile so the existing smoke test now runs against the SDK consumers actually get.
7
+ - **Packaged MCP server was never exercised with consumer-resolved dependencies**: a new `packaged-mcp-consumer` CI job packs the tarball, installs it into a directory with **no lockfile**, prints the resolved SDK version, and runs `scripts/mcp-smoke.mjs` — the stdio handshake (`initialize` → `tools/list`) — against that install. This closes the whole class of failure behind Issue #128: a dependency range that resolves differently for consumers than for this repo's lockfile can no longer break the published server undetected.
8
+ - **README documented a standalone MCP command that ships no JavaScript** (Issue #129): all ten READMEs pointed MCP clients at `node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js`, but the published `mcp/` directory contains only TypeScript (`index.ts`, `exec.ts`, `operations.ts`), so the documented command failed with `MODULE_NOT_FOUND` — independently of any dependency-resolution problem. The runnable entry is `dist/mcp/index.js`, which the package's own `pi.mcpservers` manifest already declared correctly. Every README now documents that path and adds an `mcpServers` config block for `.mcp.json` / `claude_desktop_config.json` using **absolute** paths, because MCP clients spawn the command without a shell: a `~` in `args` or `env` is passed through literally and the server fails to start behind a generic connection error. A new `test/package-structure.test.ts` case derives the expected path from `pi.mcpservers` — the same command `test/mcp-package.test.ts` spawns and handshakes with — and asserts every documented `…/mcp/index.js` occurrence in every README resolves to it, so docs cannot drift from the runnable entry point again.
6
9
  - **Authoritative activity history**: `meta/events.jsonl` is now documented as durable append-only extension state rather than rebuildable metadata. Missing or unreadable event sources warn and preserve existing Markdown logs while unrelated projections continue rebuilding.
7
10
  - **Portable log privacy**: local-file capture events no longer duplicate caller-supplied filesystem paths into `events.jsonl` or OKF `wiki/log.md`; exact paths remain in extension-owned raw manifests.
8
11
  - **Vault layout migration safety and packaging**: `scripts/migrate-llm-wiki.js` now runs on the minimum supported Node 18 runtime, accepts absolute or relative roots regardless of flag order, reserves the destination root atomically, uses no-clobber file moves, rejects destination collisions before moving data, and ships in the npm package. A durable journal records source hashes and completed moves so an interrupted migration resumes safely; file and directory durability boundaries are flushed before completion. Black-box tests cover paths with spaces, dry-run immutability, hash-preserving apply, idempotency, preflight/raced collisions, real subprocess `SIGKILL` recovery, doubled-layout recovery, packed-artifact contents, and packed execution on Node 18.
package/README.de.md CHANGED
@@ -363,11 +363,29 @@ The package ships a standalone MCP server exposing 5 wiki tools over stdio:
363
363
  pi install npm:@zosmaai/pi-llm-wiki
364
364
 
365
365
  # Standalone with any MCP client:
366
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
366
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
367
367
  ```
368
368
 
369
369
  Set `WIKI_ROOT` to your wiki vault directory. If unset, the server auto-detects from the current working directory.
370
370
 
371
+ ### Client configuration
372
+
373
+ The same server as an entry in `.mcp.json` (Claude Code) or `claude_desktop_config.json`:
374
+
375
+ ```json
376
+ {
377
+ "mcpServers": {
378
+ "llm-wiki": {
379
+ "command": "node",
380
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
381
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ > MCP clients spawn the command **without a shell**, so `~` is never expanded. A `~/my-wiki` in `args` or `env` is passed through literally and the server fails to start, which the client reports only as a generic connection error — use absolute paths here. The shell snippet above is fine: your shell expands `~` before `node` sees it.
388
+
371
389
  ---
372
390
 
373
391
  ## Skill-Verhalten
package/README.es.md CHANGED
@@ -347,11 +347,29 @@ El paquete incluye un servidor MCP independiente que expone 5 herramientas de wi
347
347
  pi install npm:@zosmaai/pi-llm-wiki
348
348
 
349
349
  # Independiente con cualquier cliente MCP:
350
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
350
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
351
351
  ```
352
352
 
353
353
  Establece `WIKI_ROOT` en el directorio de tu vault de wiki. Si no está establecido, el servidor lo detecta automáticamente desde el directorio de trabajo actual.
354
354
 
355
+ ### Configuración del cliente
356
+
357
+ El mismo servidor como entrada en `.mcp.json` (Claude Code) o `claude_desktop_config.json`:
358
+
359
+ ```json
360
+ {
361
+ "mcpServers": {
362
+ "llm-wiki": {
363
+ "command": "node",
364
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
365
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
366
+ }
367
+ }
368
+ }
369
+ ```
370
+
371
+ > Los clientes MCP lanzan el comando **sin shell**, por lo que `~` nunca se expande. Un `~/my-wiki` en `args` o `env` se pasa literalmente y el servidor no arranca, algo que el cliente solo informa como un error de conexión genérico: usa rutas absolutas aquí. El fragmento de shell anterior sí funciona, porque tu shell expande `~` antes de que `node` lo reciba.
372
+
355
373
  ---
356
374
 
357
375
  ## Comportamiento de la Habilidad
package/README.fr.md CHANGED
@@ -363,11 +363,29 @@ The package ships a standalone MCP server exposing 5 wiki tools over stdio:
363
363
  pi install npm:@zosmaai/pi-llm-wiki
364
364
 
365
365
  # Standalone with any MCP client:
366
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
366
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
367
367
  ```
368
368
 
369
369
  Set `WIKI_ROOT` to your wiki vault directory. If unset, the server auto-detects from the current working directory.
370
370
 
371
+ ### Client configuration
372
+
373
+ The same server as an entry in `.mcp.json` (Claude Code) or `claude_desktop_config.json`:
374
+
375
+ ```json
376
+ {
377
+ "mcpServers": {
378
+ "llm-wiki": {
379
+ "command": "node",
380
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
381
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ > MCP clients spawn the command **without a shell**, so `~` is never expanded. A `~/my-wiki` in `args` or `env` is passed through literally and the server fails to start, which the client reports only as a generic connection error — use absolute paths here. The shell snippet above is fine: your shell expands `~` before `node` sees it.
388
+
371
389
  ---
372
390
 
373
391
  ## Comportement de la Compétence
package/README.hi.md CHANGED
@@ -363,11 +363,29 @@ The package ships a standalone MCP server exposing 5 wiki tools over stdio:
363
363
  pi install npm:@zosmaai/pi-llm-wiki
364
364
 
365
365
  # Standalone with any MCP client:
366
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
366
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
367
367
  ```
368
368
 
369
369
  Set `WIKI_ROOT` to your wiki vault directory. If unset, the server auto-detects from the current working directory.
370
370
 
371
+ ### Client configuration
372
+
373
+ The same server as an entry in `.mcp.json` (Claude Code) or `claude_desktop_config.json`:
374
+
375
+ ```json
376
+ {
377
+ "mcpServers": {
378
+ "llm-wiki": {
379
+ "command": "node",
380
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
381
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ > MCP clients spawn the command **without a shell**, so `~` is never expanded. A `~/my-wiki` in `args` or `env` is passed through literally and the server fails to start, which the client reports only as a generic connection error — use absolute paths here. The shell snippet above is fine: your shell expands `~` before `node` sees it.
388
+
371
389
  ---
372
390
 
373
391
  ## स्किल व्यवहार
package/README.ja.md CHANGED
@@ -363,11 +363,29 @@ The package ships a standalone MCP server exposing 5 wiki tools over stdio:
363
363
  pi install npm:@zosmaai/pi-llm-wiki
364
364
 
365
365
  # Standalone with any MCP client:
366
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
366
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
367
367
  ```
368
368
 
369
369
  Set `WIKI_ROOT` to your wiki vault directory. If unset, the server auto-detects from the current working directory.
370
370
 
371
+ ### Client configuration
372
+
373
+ The same server as an entry in `.mcp.json` (Claude Code) or `claude_desktop_config.json`:
374
+
375
+ ```json
376
+ {
377
+ "mcpServers": {
378
+ "llm-wiki": {
379
+ "command": "node",
380
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
381
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ > MCP clients spawn the command **without a shell**, so `~` is never expanded. A `~/my-wiki` in `args` or `env` is passed through literally and the server fails to start, which the client reports only as a generic connection error — use absolute paths here. The shell snippet above is fine: your shell expands `~` before `node` sees it.
388
+
371
389
  ---
372
390
 
373
391
  ## スキルの動作
package/README.ko.md CHANGED
@@ -363,11 +363,29 @@ The package ships a standalone MCP server exposing 5 wiki tools over stdio:
363
363
  pi install npm:@zosmaai/pi-llm-wiki
364
364
 
365
365
  # Standalone with any MCP client:
366
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
366
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
367
367
  ```
368
368
 
369
369
  Set `WIKI_ROOT` to your wiki vault directory. If unset, the server auto-detects from the current working directory.
370
370
 
371
+ ### Client configuration
372
+
373
+ The same server as an entry in `.mcp.json` (Claude Code) or `claude_desktop_config.json`:
374
+
375
+ ```json
376
+ {
377
+ "mcpServers": {
378
+ "llm-wiki": {
379
+ "command": "node",
380
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
381
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ > MCP clients spawn the command **without a shell**, so `~` is never expanded. A `~/my-wiki` in `args` or `env` is passed through literally and the server fails to start, which the client reports only as a generic connection error — use absolute paths here. The shell snippet above is fine: your shell expands `~` before `node` sees it.
388
+
371
389
  ---
372
390
 
373
391
  ## 스킬 동작
package/README.md CHANGED
@@ -359,11 +359,29 @@ The package ships a standalone MCP server exposing 5 wiki tools over stdio:
359
359
  pi install npm:@zosmaai/pi-llm-wiki
360
360
 
361
361
  # Standalone with any MCP client:
362
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
362
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
363
363
  ```
364
364
 
365
365
  Set `WIKI_ROOT` to your wiki vault directory. If unset, the server auto-detects from the current working directory.
366
366
 
367
+ ### Client configuration
368
+
369
+ The same server as an entry in `.mcp.json` (Claude Code) or `claude_desktop_config.json`:
370
+
371
+ ```json
372
+ {
373
+ "mcpServers": {
374
+ "llm-wiki": {
375
+ "command": "node",
376
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
377
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
378
+ }
379
+ }
380
+ }
381
+ ```
382
+
383
+ > MCP clients spawn the command **without a shell**, so `~` is never expanded. A `~/my-wiki` in `args` or `env` is passed through literally and the server fails to start, which the client reports only as a generic connection error — use absolute paths here. The shell snippet above is fine: your shell expands `~` before `node` sees it.
384
+
367
385
  ---
368
386
 
369
387
  ## Skill Behavior
@@ -483,6 +501,13 @@ Thanks to everyone who has contributed! This list is regenerated automatically b
483
501
  <sub><b>Daniel Naab</b></sub>
484
502
  </a>
485
503
  </td>
504
+ <td align="center">
505
+ <a href="https://github.com/mkuhl">
506
+ <img src="https://avatars.githubusercontent.com/u/61073?v=4" width="64;" alt="mkuhl"/>
507
+ <br />
508
+ <sub><b>Mike P. Kuhl</b></sub>
509
+ </a>
510
+ </td>
486
511
  <td align="center">
487
512
  <a href="https://github.com/deestax">
488
513
  <img src="https://avatars.githubusercontent.com/u/152369481?v=4" width="64;" alt="deestax"/>
@@ -490,6 +515,8 @@ Thanks to everyone who has contributed! This list is regenerated automatically b
490
515
  <sub><b>Superdao</b></sub>
491
516
  </a>
492
517
  </td>
518
+ </tr>
519
+ <tr>
493
520
  <td align="center">
494
521
  <a href="https://github.com/mystery4f">
495
522
  <img src="https://avatars.githubusercontent.com/u/40482524?v=4" width="64;" alt="mystery4f"/>
package/README.pt.md CHANGED
@@ -363,11 +363,29 @@ The package ships a standalone MCP server exposing 5 wiki tools over stdio:
363
363
  pi install npm:@zosmaai/pi-llm-wiki
364
364
 
365
365
  # Standalone with any MCP client:
366
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
366
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
367
367
  ```
368
368
 
369
369
  Set `WIKI_ROOT` to your wiki vault directory. If unset, the server auto-detects from the current working directory.
370
370
 
371
+ ### Client configuration
372
+
373
+ The same server as an entry in `.mcp.json` (Claude Code) or `claude_desktop_config.json`:
374
+
375
+ ```json
376
+ {
377
+ "mcpServers": {
378
+ "llm-wiki": {
379
+ "command": "node",
380
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
381
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ > MCP clients spawn the command **without a shell**, so `~` is never expanded. A `~/my-wiki` in `args` or `env` is passed through literally and the server fails to start, which the client reports only as a generic connection error — use absolute paths here. The shell snippet above is fine: your shell expands `~` before `node` sees it.
388
+
371
389
  ---
372
390
 
373
391
  ## Comportamento da Skill
package/README.ru.md CHANGED
@@ -363,11 +363,29 @@ The package ships a standalone MCP server exposing 5 wiki tools over stdio:
363
363
  pi install npm:@zosmaai/pi-llm-wiki
364
364
 
365
365
  # Standalone with any MCP client:
366
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
366
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
367
367
  ```
368
368
 
369
369
  Set `WIKI_ROOT` to your wiki vault directory. If unset, the server auto-detects from the current working directory.
370
370
 
371
+ ### Client configuration
372
+
373
+ The same server as an entry in `.mcp.json` (Claude Code) or `claude_desktop_config.json`:
374
+
375
+ ```json
376
+ {
377
+ "mcpServers": {
378
+ "llm-wiki": {
379
+ "command": "node",
380
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
381
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ > MCP clients spawn the command **without a shell**, so `~` is never expanded. A `~/my-wiki` in `args` or `env` is passed through literally and the server fails to start, which the client reports only as a generic connection error — use absolute paths here. The shell snippet above is fine: your shell expands `~` before `node` sees it.
388
+
371
389
  ---
372
390
 
373
391
  ## Поведение навыка
package/README.zh.md CHANGED
@@ -347,11 +347,29 @@ my-wiki/
347
347
  pi install npm:@zosmaai/pi-llm-wiki
348
348
 
349
349
  # 独立使用任何 MCP 客户端:
350
- WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/mcp/index.js
350
+ WIKI_ROOT=~/my-wiki node node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js
351
351
  ```
352
352
 
353
353
  设置 `WIKI_ROOT` 为您的 wiki vault 目录。如果未设置,服务器从当前工作目录自动检测。
354
354
 
355
+ ### 客户端配置
356
+
357
+ 在 `.mcp.json`(Claude Code)或 `claude_desktop_config.json` 中配置同一个服务器:
358
+
359
+ ```json
360
+ {
361
+ "mcpServers": {
362
+ "llm-wiki": {
363
+ "command": "node",
364
+ "args": ["/absolute/path/to/node_modules/@zosmaai/pi-llm-wiki/dist/mcp/index.js"],
365
+ "env": { "WIKI_ROOT": "/absolute/path/to/my-wiki" }
366
+ }
367
+ }
368
+ }
369
+ ```
370
+
371
+ > MCP 客户端在**不经过 shell** 的情况下启动该命令,因此 `~` 不会被展开。`args` 或 `env` 中的 `~/my-wiki` 会被原样传递,服务器随即启动失败,而客户端只会报告一个笼统的连接错误——这里请使用绝对路径。上面的 shell 命令没有问题:`~` 由你的 shell 在 `node` 收到之前展开。
372
+
355
373
  ---
356
374
 
357
375
  ## 技能行为
package/dist/mcp/index.js CHANGED
@@ -10,7 +10,8 @@
10
10
  */
11
11
  import { existsSync } from "node:fs";
12
12
  import { join } from "node:path";
13
- import { McpServer, StdioServerTransport } from "@modelcontextprotocol/server";
13
+ import { McpServer } from "@modelcontextprotocol/server";
14
+ import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
14
15
  import * as z from "zod/v4";
15
16
  import { resolveVaultPaths } from "../extensions/llm-wiki/lib/utils.js";
16
17
  import { createExecApi } from "./exec.js";
package/mcp/index.ts CHANGED
@@ -12,7 +12,8 @@
12
12
 
13
13
  import { existsSync } from "node:fs";
14
14
  import { join } from "node:path";
15
- import { McpServer, StdioServerTransport } from "@modelcontextprotocol/server";
15
+ import { McpServer } from "@modelcontextprotocol/server";
16
+ import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
16
17
  import * as z from "zod/v4";
17
18
  import { resolveVaultPaths } from "../extensions/llm-wiki/lib/utils.js";
18
19
  import { createExecApi } from "./exec.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zosmaai/pi-llm-wiki",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Self-maintaining LLM Wiki for Pi — Karpathy-pattern knowledge base with immutable source capture, automated ingestion, search, linting, and Obsidian-compatible vault. auto-updating personal & company wiki.",
5
5
  "keywords": [
6
6
  "pi",
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "dependencies": {
75
75
  "@cfworker/json-schema": "^4.1.1",
76
- "@modelcontextprotocol/server": "^2.0.0-alpha.2",
76
+ "@modelcontextprotocol/server": "^2.0.0",
77
77
  "mdast-util-from-markdown": "^2.0.3",
78
78
  "node-html-markdown": "^2.0.0",
79
79
  "yaml": "^2.9.0",