Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "memesh",
"source": "./",
"description": "MeMesh — Local memory for Claude Code and MCP coding agents. One SQLite file, zero cloud required.",
"version": "4.2.6",
"version": "4.2.7",
"author": {
"name": "PCIRCLE AI"
},
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": {
"name": "PCIRCLE AI"
},
"version": "4.2.6",
"version": "4.2.7",
"homepage": "https://pcircle.ai/memesh-llm-memory",
"repository": "https://github.com/PCIRCLE-AI/memesh-llm-memory",
"license": "MIT",
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

All notable changes to MeMesh are documented here.

## [4.2.7] — 2026-05-13

### Added
- **`memesh doctor` Shell CLI check** (`src/core/doctor.ts`) — new check `Shell CLI on PATH` resolves `memesh` via the user's shell PATH (`which` / `where`) and detects the most common plugin-marketplace gotcha: plugin is installed (MCP + hooks + `/memesh` skill work) but `memesh` is NOT on the shell PATH, so typing `memesh reindex` in a terminal yields `command not found`. WARN on plugin-marketplace installs without a separate shell-PATH `memesh`, with the exact fix command (`npm install -g @pcircle/memesh`) and the clarification that both paths coexist and share the same DB. Informational PASS on `npm-global` (running from the install itself), `source-checkout` (informational only), and any plugin-marketplace install that already has a separate shell-PATH `memesh`. Mirrors the new "Install paths at a glance" section landed in v4.2.6 docs — users who hit the gotcha now get told by doctor instead of having to re-read the README.
- **`memesh export -o <file>` flag** (`src/transports/cli/cli.ts`) — `memesh export` now accepts an `-o, --out <file>` flag that writes the JSON snapshot directly to a file. Previously the only path was stdout redirect (`memesh export > backup.json`) which wasn't documented in `--help`, so users coming from CLI conventions of every other tool tried `-o backup.json` first and saw `error: unknown option '-o'`. Stdout mode is preserved as the default (pipe-friendly). The file mode also prints a one-line confirmation to stderr so the user knows it landed.

### Changed
- **`memesh forget --confirm` is now accepted as a no-op** (`src/transports/cli/cli.ts`) — `memesh forget` is a soft archive, no confirmation gate is needed, but rejecting the flag outright as `unknown option` was hostile to users coming from `rm -i` / `git branch -D` conventions. Adding the flag as a documented no-op (marked `[deprecated, no-op]` in `--help`) closes the surprise without changing semantics.
- **`memesh install-hooks` refuses to double-wire over an active plugin install** (`src/core/install-hooks.ts`) — when Claude Code's plugin runtime is already loading memesh's hooks (via `/plugin install memesh@pcircle-memesh`), writing the same hooks into `~/.claude/settings.json` would cause every event (session-start, Stop, PreToolUse, etc.) to fire memesh's hook scripts **twice** — duplicate `session-insight` entities, duplicate recall injections, duplicate orchestration nudges. `installHooks()` now detects the plugin install via `~/.claude/plugins/installed_plugins.json` and bails with a clear message naming the install path + version, leaving the user with a `--force-over-plugin` escape hatch for the rare case where double-firing is intentional. CLI surface (`memesh install-hooks`) surfaces the new state directly so the message is visible without a JSON return inspection.
- **`memesh install-hooks --dry-run` wording is now future-tense** — was "Added 7 hook entries, skipped 0" (past-tense in dry-run mode is misleading); now "Would add 7 / would skip 0".

### Fixed
- **HTTP server: unknown routes return JSON 404** (`src/transports/http/server.ts`) — previously the server fell through to Express's default `text/html` 404 page (`<!DOCTYPE html>...Cannot GET /v1/whatever`). Every other route returns `{success, data}` JSON, so a typo'd path broke clients piping through `JSON.parse`. A catch-all JSON 404 middleware now sits at the end of the router and returns `{success: false, code: "NOT_FOUND", error: "No route for <METHOD> <path>"}`.

### Docs
- **README (English + Thai) upgrade-plugin.sh instruction now covers pre-v4.2.5 users** (`README.md`, `README.th.md`) — the v4.2.6 release notes told users to run `bash ~/.claude/plugins/cache/pcircle-memesh/memesh/<v>/scripts/upgrade-plugin.sh`, but plugin installs created before v4.2.5 don't contain this file (it was added in v4.2.5). Existing v4.2.3 / v4.2.4 users have no way to bootstrap the upgrade from inside their plugin install. Added a fallback line pointing at the npm-global copy (`$(npm prefix -g)/lib/node_modules/@pcircle/memesh/scripts/upgrade-plugin.sh`), which works the moment the user runs `npm install -g @pcircle/memesh` (which they already need for shell CLI access — see the "Install paths at a glance" section). Other 9 locale READMEs still need a full `## Upgrading` section to host this note; will follow up.

## [4.2.6] — 2026-05-13

### Fixed
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,16 @@ Claude Code's plugin marketplace pins versions at install time and does **not**
**Option B — one-line script** (no UI clicking, idempotent):

```bash
# If your plugin install is v4.2.5 or newer, the script ships inside it:
bash ~/.claude/plugins/cache/pcircle-memesh/memesh/<current-version>/scripts/upgrade-plugin.sh

# If you installed before v4.2.5 (i.e. you're on v4.2.4 or v4.2.3),
# the script isn't in your plugin yet. Use the npm-global copy instead:
bash "$(npm prefix -g)/lib/node_modules/@pcircle/memesh/scripts/upgrade-plugin.sh"

# (That assumes you've also run `npm install -g @pcircle/memesh`. If you
# haven't, this is also a good moment to — see the "Install paths at a
# glance" section above for why most users want both paths.)
```

The script fast-forwards the marketplace cache, stages the new version under `~/.claude/plugins/cache/`, installs runtime deps, and re-points `installed_plugins.json`. Restart Claude Code afterwards so the MCP server reconnects.
Expand Down
8 changes: 8 additions & 0 deletions README.th.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,15 @@ Claude Code plugin marketplace ปักหมุดเวอร์ชันต
**ตัวเลือก B — สคริปต์บรรทัดเดียว** (ไม่ต้องคลิก UI, idempotent):

```bash
# ถ้า plugin ของคุณเป็น v4.2.5 ขึ้นไป สคริปต์อยู่ในนั้นแล้ว:
bash ~/.claude/plugins/cache/pcircle-memesh/memesh/<current-version>/scripts/upgrade-plugin.sh

# ถ้าคุณติดตั้งก่อน v4.2.5 (คือ v4.2.4 หรือ v4.2.3)
# สคริปต์ยังไม่อยู่ใน plugin ของคุณ ใช้สำเนา npm-global แทน:
bash "$(npm prefix -g)/lib/node_modules/@pcircle/memesh/scripts/upgrade-plugin.sh"

# (สมมติว่าคุณรัน `npm install -g @pcircle/memesh` แล้ว ถ้ายังก็ทำตอนนี้เลย —
# ผู้ใช้ส่วนใหญ่ต้องการทั้งสองเส้นทาง ดู "ภาพรวมเส้นทางการติดตั้ง" ด้านบน)
```

สคริปต์จะ fast-forward marketplace cache, ติดตั้งเวอร์ชันใหม่ใน `~/.claude/plugins/cache/`, ลง runtime deps และชี้ `installed_plugins.json` ไปยังเวอร์ชันใหม่ รีสตาร์ท Claude Code เพื่อให้ MCP server reconnect
Expand Down
1 change: 1 addition & 0 deletions dist/core/doctor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface DoctorOptions {
ok: false;
message: string;
};
resolveShellMemeshImpl?: () => string | null;
}
export declare function runDoctor(options: DoctorOptions): Promise<DoctorResult>;
export declare function formatDoctorReport(result: DoctorResult, packageVersion: string): string[];
Expand Down
2 changes: 1 addition & 1 deletion dist/core/doctor.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 35 additions & 1 deletion dist/core/doctor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/core/doctor.js.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions dist/core/install-hooks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export interface InstallOptions {
scope: 'user' | 'project';
cwd?: string;
dryRun?: boolean;
forceOverPlugin?: boolean;
installedPluginsPathImpl?: string;
}
export interface InstallResult {
settingsPath: string;
Expand All @@ -17,6 +19,10 @@ export interface InstallResult {
existingCount: number;
}>;
markerPath: string;
pluginRuntimeDetected?: {
installPath: string;
version: string;
} | null;
}
export interface UninstallResult {
settingsPath: string;
Expand Down
2 changes: 1 addition & 1 deletion dist/core/install-hooks.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading