@echomem/mcp 1.4.7 → 1.4.9

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.
Files changed (46) hide show
  1. package/README.md +35 -9
  2. package/assets/canonical-scorer/README.md +18 -0
  3. package/assets/canonical-scorer/analyze-10-problems.mjs +857 -0
  4. package/assets/canonical-scorer/build-session-waste-dashboard.mjs +1628 -0
  5. package/assets/canonical-scorer/golden_anchors.mjs +83 -0
  6. package/assets/canonical-scorer/optimizable_detail.mjs +633 -0
  7. package/assets/hud/claude.svg +1 -0
  8. package/assets/hud/codex.svg +1 -0
  9. package/assets/hud/session-viewer.html +35 -0
  10. package/dist/city/chaos-to-clarity-pencil.html +582 -0
  11. package/dist/city/echo-ai-city-only.html +1126 -109
  12. package/dist/city/echo-ai-city-only.template.html +1126 -109
  13. package/dist/city/echo-face-cutout.png +0 -0
  14. package/dist/city/pencil-pie-generator.html +883 -0
  15. package/dist/city/pencil-webgl-landscape.html +1239 -0
  16. package/dist/city/spatial-fan-story.html +479 -0
  17. package/dist/codex-session-files.js +283 -0
  18. package/dist/codex-sync.js +7 -2
  19. package/dist/context-analysis/canonical-golden.js +47 -0
  20. package/dist/context-analysis/claude-native-canonical.js +1193 -0
  21. package/dist/context-analysis/vendored-canonical.js +793 -0
  22. package/dist/context-analysis/workspace-report.js +1838 -0
  23. package/dist/context-metrics/calculate.js +56 -0
  24. package/dist/context-metrics/model-limits.js +26 -0
  25. package/dist/context-metrics/types.js +1 -0
  26. package/dist/forensics-10-problems.js +7 -6
  27. package/dist/forensics.js +863 -132
  28. package/dist/hud/adapters.js +8 -4
  29. package/dist/hud/autostart.js +66 -0
  30. package/dist/hud/cli.js +31 -0
  31. package/dist/hud/electron-main.js +182 -19
  32. package/dist/hud/metric.js +13 -4
  33. package/dist/hud/monitor.js +171 -84
  34. package/dist/hud/preload.cjs +3 -0
  35. package/dist/hud/server.js +321 -4
  36. package/dist/hud/web.js +880 -270
  37. package/dist/index.js +122 -24
  38. package/dist/local-data-paths.js +87 -0
  39. package/dist/migrate.js +55 -29
  40. package/dist/report.js +101 -40
  41. package/dist/setup-page.js +4257 -245
  42. package/dist/setup-preview.js +245 -0
  43. package/dist/setup.js +786 -75
  44. package/dist/v1-contract.js +20 -2
  45. package/package.json +6 -4
  46. package/templates/echomem-recall.md +2 -2
@@ -16,6 +16,7 @@ export const canonicalToolNames = {
16
16
  recompose: "echo_recompose",
17
17
  delete: "delete_memory",
18
18
  getByContext: "get_memories_by_context",
19
+ checkpointByContext: "get_checkpoint_by_context",
19
20
  };
20
21
  export const legacyAliasToCanonical = {
21
22
  search_memories_by_description_semantic: canonicalToolNames.search,
@@ -114,7 +115,7 @@ export function listToolSpecs(opts = {}) {
114
115
  return [
115
116
  {
116
117
  name: canonicalToolNames.search,
117
- description: withMcpVersion(`Recall the user's prior decisions, preferences, constraints, and project context from EchoMem — their long-term memory across ALL their AI tools (Claude.ai, ChatGPT, other agents), not just this session.${mapSection}\nCall this when the task plausibly relates to that remembered context — a topic above, or when the user refers to past work ("what did we decide", "like before", "the usual") — so you don't re-derive or re-ask what they already settled. Skip it for self-contained tasks with no link to their history (e.g. a generic algorithm question). By default this returns only the ranked memories retrieved for recall and skips EchoMem answer generation; set includeAnswer=true only when you explicitly need EchoMem's legacy synthesized recall. Current time: ${currentTime}.${updateSection}`),
118
+ description: withMcpVersion(`Recall the user's prior decisions, preferences, and project context from EchoMem — their long-term memory across ALL their AI tools, not just this session. Use it instead of re-deriving or re-asking what the user already settled.${mapSection}\nReturns the ranked memories; set includeAnswer=true only if you need the legacy synthesized answer. Current time: ${currentTime}.${updateSection}`),
118
119
  inputSchema: {
119
120
  type: "object",
120
121
  properties: {
@@ -160,7 +161,7 @@ export function listToolSpecs(opts = {}) {
160
161
  },
161
162
  {
162
163
  name: canonicalToolNames.save,
163
- description: "Save conversation into EchoMem for future retrieval. Set passthrough=true to store the text verbatim as a session capsule (no LLM extraction, no embeddings) use this for warm-up capsules that a fresh session will reload via get_memories_by_context.",
164
+ description: "Save this conversation into EchoMem as long-term memory (durable memories are extracted automatically). passthrough=true stores the text verbatim as a session capsule insteadreload it later via get_memories_by_context.",
164
165
  inputSchema: {
165
166
  type: "object",
166
167
  properties: {
@@ -383,6 +384,23 @@ export function listToolSpecs(opts = {}) {
383
384
  required: ["contextId"],
384
385
  },
385
386
  },
387
+ {
388
+ name: canonicalToolNames.checkpointByContext,
389
+ description: withMcpVersion(`Rebuild a clean-context checkpoint / decision log from one EchoMem contextId. Use this when the user or EchoMem HUD gives you a contextId for a renewed coding session and you need the session handoff, not a raw memory dump. It deterministically fetches that context and formats it as orientation state: decisions, carryover, constraints, and checkpoints. Current time: ${currentTime}.`),
390
+ inputSchema: {
391
+ type: "object",
392
+ properties: {
393
+ contextId: { type: "string", description: "The EchoMem contextId shown by the HUD or returned by save_conversation / Renew session." },
394
+ limit: { type: "number", default: 100 },
395
+ triggerMessage: {
396
+ type: "string",
397
+ description: "Optional: the user's message that caused this lookup. EchoMem stores only a redacted analytics preview and hash.",
398
+ },
399
+ triggerMessageRole: { type: "string", default: "user" },
400
+ },
401
+ required: ["contextId"],
402
+ },
403
+ },
386
404
  {
387
405
  name: canonicalToolNames.report,
388
406
  description: "Show the user a one-screen audit of THEIR OWN AI coding usage — computed locally from their Codex/Claude Code logs ($0, nothing uploaded): how many tokens their agents spent, how much was re-reading context, reads vs memory recalls, and what changes with EchoMem. Call this when the user asks about their usage, token spend, cost, how much they're wasting, or wants a summary of their agent activity — and you may offer it once right after EchoMem is first connected. Returns formatted text to show the user verbatim. Needs no login.",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@echomem/mcp",
3
- "version": "1.4.7",
4
- "description": "EchoMem Cloud-First MCP Server",
3
+ "version": "1.4.9",
4
+ "description": "EchoMem MCP bridge: cloud-first memory tools, local context HUD, and the Agent Doctor workspace forensics report (cost ledger + 3D repo city)",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
7
7
  "bin": {
@@ -18,9 +18,11 @@
18
18
  "scripts": {
19
19
  "build": "tsc",
20
20
  "start": "node dist/index.js",
21
- "dev": "tsx src/index.ts",
21
+ "predev": "npm run build",
22
+ "dev": "node dist/index.js",
22
23
  "smoke": "node smoke.mjs",
23
- "test": "npm run build && node test/crypto.test.mjs && node test/integration.test.mjs && node test/no-restart.test.mjs && node test/report.test.mjs && node test/tools.test.mjs && node test/update-check.test.mjs && node test/delete.test.mjs && node test/migrate.test.mjs && node test/hud.test.mjs",
24
+ "preview:extraction": "npm run build && node scripts/preview-extraction.mjs",
25
+ "test": "npm run build && node test/local-data-paths.test.mjs && node test/crypto.test.mjs && node test/integration.test.mjs && node test/no-restart.test.mjs && node test/report.test.mjs && node test/forensics.test.mjs && node test/canonical-golden.test.mjs && node test/tools.test.mjs && node test/update-check.test.mjs && node test/delete.test.mjs && node test/low-touch-tools.test.mjs && node test/migrate.test.mjs && node test/hud.test.mjs",
24
26
  "prepack": "npm run build && node scripts/bundle-city.mjs"
25
27
  },
26
28
  "dependencies": {
@@ -1,5 +1,5 @@
1
- <!-- echomem:recall-rule v1 — installed by `npx @echomem/mcp setup` into the client's
2
- project rules (CLAUDE.md / .cursor/rules / AGENTS.md). This is the second half of the
1
+ <!-- echomem:recall-rule v1 — installed by `echomem-mcp init` / `echomem-mcp setup` into the client's
2
+ global agent guidance (CLAUDE.md / AGENTS.md). This is the second half of the
3
3
  nudged-triggering design (spec §9): the tool description nudges, this rule reinforces. -->
4
4
 
5
5
  ## EchoMem memory