diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 1fac43067..3a38eb425 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -8,7 +8,7 @@ "name": "memesh", "source": "./", "description": "MeMesh — local collaboration for AI coding agents. Share memory across sessions, exchange task messages, and preserve work context. One SQLite file; no cloud required.", - "version": "4.13.1", + "version": "4.13.2", "author": { "name": "PCIRCLE AI" }, diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 5a6aa9d2d..ec3b5d690 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -4,7 +4,7 @@ "author": { "name": "PCIRCLE AI" }, - "version": "4.13.1", + "version": "4.13.2", "mcpServers": "./.claude-plugin/mcp.json", "homepage": "https://github.com/PCIRCLE-AI/memesh", "repository": "https://github.com/PCIRCLE-AI/memesh", diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 3121a7146..d123ab42c 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "memesh", "description": "MeMesh — local collaboration for AI coding agents. Share memory across sessions and exchange task messages.", - "version": "4.13.1", + "version": "4.13.2", "mcpServers": "./.codex-plugin/mcp.json", "hooks": { "hooks": { diff --git a/CHANGELOG.md b/CHANGELOG.md index bcdc4d38e..552e98ab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,16 @@ ## [Unreleased] +## [4.13.2] — 2026-12-04 + - Recall keeps memory content visible when conflicts or relations are numerous, reports how many details fit, and limits CLI JSON and MCP recall output to 32 KiB. - Lesson guards now limit pattern matching time in Bash, Edit and Write hooks. A skipped guard leaves a diagnostic so you can identify the affected lesson. - Capture distinguishes database contention and commits made in another worktree from capture failures. Read-only databases skip write repairs. - Import reports discarded metadata and distinguishes archived imports from trusted active memories. Setup and repair prompts handle end-of-input cleanly. -- Configuration reads are size-limited. A mistyped session limit now shows the fallback used at startup. +- Work-pattern reports respect the same project scope as recall. Session briefings avoid repeating memory titles already shown. +- Message send results for Claude Code explain how to check for a read or reply after a session resumes. +- If an npm-global update fails, MeMesh verifies that the previous version was restored before reporting rollback success. Status distinguishes an installed version ahead of npm's stable release. +- Configuration reads are size-limited. An invalid session limit shows the fallback used at startup. Empty memory tags and invalid analytics windows are rejected. ## [4.13.1] diff --git a/CODEMAP.md b/CODEMAP.md index aecbbed4c..524c33518 100644 --- a/CODEMAP.md +++ b/CODEMAP.md @@ -1,6 +1,6 @@ # CODEMAP -**Version**: 4.13.1 +**Version**: 4.13.2 A navigation map for the codebase: *"I want to change X — which file?"* For the design rationale behind these modules see [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md); @@ -50,12 +50,15 @@ docs/ # ARCHITECTURE.md, api/API_REFERENCE.md ### Recall / search - Ranking / scoring weights → `src/core/scoring.ts` (`rankEntities`) - FTS5 query + access tracking → `src/knowledge-graph.ts` -- Shared transport recall operation (cross_project / namespace / include_archived) → `src/core/operations.ts` (`recallWithConflicts`, backed by `recallEnhanced`) +- Shared filters, search and conflict detection → `src/core/operations.ts` (`recallWithConflicts`, backed by `recallEnhanced`) +- MCP and CLI recall size limit, memory bodies, conflict warnings and omitted details → `src/core/recall-agent-view.ts` +- Project-scoped decision and lesson topics in work-pattern reports → `src/core/patterns.ts`, using `src/core/project-scope.ts` ### Write flows (remember / forget / learn / pin) - remember / forget / learn / **setPinned** → `src/core/operations.ts` - Structured lessons → `src/core/lesson-engine.ts` -- Hook capture and classification → deterministic rules in `scripts/hooks/` +- Commit capture, worktree checks and deferred writes → `scripts/hooks/post-commit.js`; capture outcomes → `src/core/capture-liveness.ts` +- Import metadata and archived-entry reporting → `src/core/operations.ts` (`importMemories`) ### Agent-assisted work packages + human review - Calendar-cluster or visible-transcript package preparation and strict submission → `src/core/dreamer.ts` (`executeWorkPackage`) @@ -72,12 +75,13 @@ docs/ # ARCHITECTURE.md, api/API_REFERENCE.md ### Config / self-update - Stated task state over HTTP → `GET /v1/task-state` in `src/transports/http/server.ts` → `src/core/task-state-store.ts` -- Config read/write → `src/core/config.ts` +- Config read/write → `src/core/config.ts`; bounded document reads → `src/core/config-document.ts` - Path resolution (explicit `MEMESH_DIR` / `MEMESH_DB_PATH` overrides, then HOME defaults) → `src/core/paths.ts` - `memesh doctor` health check + real probes → `src/core/doctor.ts`; bundled MCP diagnostic child → `src/transports/cli/doctor-message-probe.ts` - What every entry point says about updates (just-upgraded receipt, failed check) → `src/core/update-notice.ts`; the MCP first-call and CLI stderr notice → `src/core/update-entrypoint.ts` (build-generated as `scripts/hooks/_generated/update-notice.js` for the SessionStart / UserPromptSubmit / Stop hooks) -- npm version check / self-update → `src/core/version-check.ts`, `src/core/updater.ts`, `src/core/install-channel.ts`, `src/core/install-hooks.ts` +- npm version checks and install-channel detection → `src/core/version-check.ts`, `src/core/install-channel.ts` +- Automatic updates, npm-global installation and rollback verification → `src/core/auto-update.ts`; background entry → `scripts/hooks/auto-update-runner.mjs` ### Durable local agent messaging + active-host delivery - Message storage, audit and retention → `src/core/conversation-messages.ts` @@ -98,7 +102,7 @@ docs/ # ARCHITECTURE.md, api/API_REFERENCE.md ### Hook commands (`hooks/hooks.json`) | Command | Fires on | Does | |---|---|---| -| `session-start.js` | SessionStart | inject project memories, inbox reminders and messaging address, banner, lesson warnings, update notice (starts the background auto-update unless the setting is off) | +| `session-start.js` | SessionStart | inject project context and update notices; start background updates when enabled | | `messages.js` | SessionStart / UserPromptSubmit | register the host conversation, output pending message batches, and record delivery after output succeeds | | `pre-edit-recall.js` | PreToolUse Edit/Write | inject file-relevant memories; also evaluates accepted lesson guards on the content being written | | `guard-check.js` | PreToolUse Bash | enforce accepted lesson guards before risky repeats | @@ -127,7 +131,7 @@ automatic updates are off, and by `memesh update` when asked by hand; there is n | `src/core/agent-scope-id.ts` | Canonical form + validation of message scope ids | | `src/core/briefing.ts`, `src/core/briefing-pools.ts` | Assembled work topology for agents without hooks; shared memory selection | | `src/core/capture-liveness.ts` | Verdict on whether automatic capture has gone quiet | -| `src/core/session-handoff.ts` | The agent's last words kept per project for the next session | +| `src/core/session-handoff.ts` | Extract and render assistant replies for conversation tails | | `src/core/task-state.ts`, `src/core/task-state-store.ts` | One "where we are" per project; its storage | | `src/core/work-topology.ts` | Which memories are the work; one-line rendering | | `src/core/memory-tool.ts` | Anthropic `memory_20250818` adapter over the graph | @@ -152,7 +156,7 @@ transport (cli/http/mcp) → validate (transports/schemas.ts, Zod) → conflict detection (storage/conflicts.ts) → result ``` -The same `operations.ts` memory functions run identically from all three transports. +CLI and MCP use `recallForAgent()` for the bounded response. HTTP uses the shared search and conflict result directly. --- @@ -163,22 +167,7 @@ The same `operations.ts` memory functions run identically from all three transpo - Local live checks live in `scripts/qa/live-journey.mjs`. Use `--core-only` for isolated product journeys or `--conversation-pair` for prompt-driven Claude and Codex delivery. The full host matrix is defined in `scripts/lib/live-journey-contract.mjs`. -- Release gates, in the order a release meets them: `verify:release` (called by `qa:pre-release` - below) now ends with `npm run check:entry-points-start` - (`scripts/check-entry-points-start.mjs`), which spawns every `package.json` bin and every - `hooks/hooks.json` hook command for real and fails on any unresolved `${...}` left in - `hooks/hooks.json`. A root `.mcp.json` is scanned only when present; none ships today. - `npm run qa:pre-release` (`scripts/qa/pre-release.mjs`) runs build + `verify:artifact` + - `audit:memory` as one door and prints what it could not check; `verify:artifact` is the same - sequence `prepublishOnly` runs, named once. `scripts/smoke-packed-upgrade.mjs` derives every - upgrade path it proves from `package.json` and the registry (`scripts/lib/upgrade-matrix.mjs`) - instead of pinning a version pair. `npm run release:finish` (`scripts/finish-release.mjs`) runs - `qa:pre-release` itself and blocks on its exit code, and requires a full live-journey receipt - under `.qa/` for both Codex and Claude (separate `-report.json` files), each - `PASS`, clean-tree, and naming the exact commit being released - (`scripts/lib/release-preconditions.mjs`'s - `findUsableLiveJourneyReceipt`) — real-credential checks CI cannot run, now required rather - than merely available. After publishing, `npm run qa:post-release` - (`scripts/qa/post-release.mjs`) checks registry acceptance, a fresh install from the registry, - and whether this machine is on the release — read-only, printing fixes rather than running them. +- Platform and Node.js checks → [CI workflow](.github/workflows/ci.yml). Static release checks run once; runtime checks retain the platform matrix. [Mutation audit](.github/workflows/mutation-audit.yml) samples whether tests catch deliberately incorrect behavior. +- Packaged installation and upgrade → `scripts/smoke-packed-artifact.mjs`, `scripts/smoke-packed-upgrade.mjs`. Upgrade paths come from the registry and the candidate version via `scripts/lib/upgrade-matrix.mjs`. +- Publish and verify → `scripts/finish-release.mjs`, [npm publish workflow](.github/workflows/publish-npm.yml), `scripts/qa/post-release.mjs`. See [Cutting a Release](CONTRIBUTING.md#cutting-a-release) for the required evidence and commands. - Version anchors that must agree on a bump: `package.json`, both root entries in `package-lock.json`, `.claude-plugin/plugin.json`, `.codex-plugin/plugin.json`, `.claude-plugin/marketplace.json`, `CHANGELOG.md`, `CODEMAP.md`, `docs/ARCHITECTURE.md`, and `docs/api/API_REFERENCE.md`. Run `npm run build` after to regenerate `dist/skills-manifest.json`. diff --git a/dist/skills-manifest.json b/dist/skills-manifest.json index e73184f36..1fcfc3996 100644 --- a/dist/skills-manifest.json +++ b/dist/skills-manifest.json @@ -8,7 +8,7 @@ }, { "path": ".claude-plugin/plugin.json", - "sha256": "c118c64974a8b073a3c08d6b038e1dd9753b3e5e7635f8b0ba7c28febf84a8e6", + "sha256": "1bc2716c25c10bf33015e56123eccc0cfc4e6cc595114bde0899218028a234b9", "bytes": 587 }, { @@ -18,7 +18,7 @@ }, { "path": ".codex-plugin/plugin.json", - "sha256": "31fa1ac7ff3f795410fa1d69dd6ac42589165ecf1db3e3991246e48db3b3fa1e", + "sha256": "4cd5dfa4e0921f83f34ea66586ff51d0ac49e0c00eec01c1421f98d6e1e9ea39", "bytes": 3456 }, { diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 8684b938d..f2713c650 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -1,6 +1,6 @@ # MeMesh Plugin Architecture -**Version**: 4.13.1 +**Version**: 4.13.2 > Looking for "which file do I change for X?" — see [CODEMAP.md](../CODEMAP.md). diff --git a/docs/api/API_REFERENCE.md b/docs/api/API_REFERENCE.md index efb8d43c3..d62992e42 100644 --- a/docs/api/API_REFERENCE.md +++ b/docs/api/API_REFERENCE.md @@ -1,7 +1,7 @@ # MeMesh Plugin -- API Reference **Protocol**: Model Context Protocol (MCP) over stdio -**Version**: 4.13.1 +**Version**: 4.13.2 **Compatibility**: Claude Code, Codex, and other MCP clients that can launch the local stdio server. Hosted chat products need a separate bridge; they do not connect to this local server automatically. **Native Integrations**: Beyond MCP, MeMesh integrates as a native memory provider for Hermes Agent (Python `MemoryProvider` plugin). This path is not an HTTP bridge. See [docs/platforms/](../platforms/) for platform-specific guides. @@ -1569,13 +1569,13 @@ Manage the demo data: `seed` inserts the demo tour dataset (every entity carries ### GET /v1/analytics/pm -Returns PM-framed metrics: decision velocity, knowledge-graph connectedness, and staleness indicators. Designed fthrough the CLI PM Analytics panel. +Returns decision velocity, knowledge-graph connectedness, and staleness metrics. **Query parameters:** | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| `window` | number | 30 | Lookback window in days for velocity calculations | +| `window` | integer | 30 | Lookback window in days for velocity calculations, from 1 to 365. Invalid values return HTTP 400. | **Response:** diff --git a/package-lock.json b/package-lock.json index 0faaf309e..5da9bdd27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@pcircle/memesh", - "version": "4.13.1", + "version": "4.13.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@pcircle/memesh", - "version": "4.13.1", + "version": "4.13.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.32.2", diff --git a/package.json b/package.json index fae10b11e..8215c0852 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pcircle/memesh", - "version": "4.13.1", + "version": "4.13.2", "description": "MeMesh — local collaboration for AI coding agents. Share memory across sessions, exchange task messages, and preserve work context. Local SQLite storage; no cloud required.", "main": "dist/index.js", "type": "module",