@pcircle/memesh 4.8.5 → 4.9.0

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 (226) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/mcp.json +6 -4
  4. package/.codex-plugin/plugin.json +1 -1
  5. package/AGENTS.md +60 -14
  6. package/README.de.md +83 -556
  7. package/README.md +83 -582
  8. package/README.zh-TW.md +84 -573
  9. package/dashboard/dist/index.html +10 -10
  10. package/dist/cli/view-live.d.ts.map +1 -1
  11. package/dist/cli/view-live.js +154 -384
  12. package/dist/cli/view-live.js.map +1 -1
  13. package/dist/core/agent-router.d.ts +11 -10
  14. package/dist/core/agent-router.d.ts.map +1 -1
  15. package/dist/core/agent-router.js +29 -14
  16. package/dist/core/agent-router.js.map +1 -1
  17. package/dist/core/agent-scope-id.d.ts.map +1 -1
  18. package/dist/core/agent-scope-id.js.map +1 -1
  19. package/dist/core/analytics.d.ts.map +1 -1
  20. package/dist/core/analytics.js.map +1 -1
  21. package/dist/core/config.d.ts +4 -40
  22. package/dist/core/config.d.ts.map +1 -1
  23. package/dist/core/config.js +75 -141
  24. package/dist/core/config.js.map +1 -1
  25. package/dist/core/demo.d.ts.map +1 -1
  26. package/dist/core/demo.js +6 -6
  27. package/dist/core/demo.js.map +1 -1
  28. package/dist/core/doctor.d.ts +1 -6
  29. package/dist/core/doctor.d.ts.map +1 -1
  30. package/dist/core/doctor.js +55 -227
  31. package/dist/core/doctor.js.map +1 -1
  32. package/dist/core/dreamer.d.ts +32 -47
  33. package/dist/core/dreamer.d.ts.map +1 -1
  34. package/dist/core/dreamer.js +211 -703
  35. package/dist/core/dreamer.js.map +1 -1
  36. package/dist/core/install-channel.d.ts.map +1 -1
  37. package/dist/core/install-channel.js +4 -47
  38. package/dist/core/install-channel.js.map +1 -1
  39. package/dist/core/install-id.d.ts.map +1 -1
  40. package/dist/core/install-id.js.map +1 -1
  41. package/dist/core/kg-backfill.d.ts.map +1 -1
  42. package/dist/core/kg-backfill.js.map +1 -1
  43. package/dist/core/lesson-engine.d.ts +0 -5
  44. package/dist/core/lesson-engine.d.ts.map +1 -1
  45. package/dist/core/lesson-engine.js +0 -25
  46. package/dist/core/lesson-engine.js.map +1 -1
  47. package/dist/core/lifecycle.d.ts.map +1 -1
  48. package/dist/core/lifecycle.js +54 -48
  49. package/dist/core/lifecycle.js.map +1 -1
  50. package/dist/core/memory-tool.d.ts.map +1 -1
  51. package/dist/core/memory-tool.js +17 -17
  52. package/dist/core/memory-tool.js.map +1 -1
  53. package/dist/core/operations.d.ts +2 -26
  54. package/dist/core/operations.d.ts.map +1 -1
  55. package/dist/core/operations.js +9 -244
  56. package/dist/core/operations.js.map +1 -1
  57. package/dist/core/paths.d.ts +4 -1
  58. package/dist/core/paths.d.ts.map +1 -1
  59. package/dist/core/paths.js +88 -14
  60. package/dist/core/paths.js.map +1 -1
  61. package/dist/core/product-improvements.js +2 -2
  62. package/dist/core/product-improvements.js.map +1 -1
  63. package/dist/core/schema-export.d.ts.map +1 -1
  64. package/dist/core/schema-export.js +10 -0
  65. package/dist/core/schema-export.js.map +1 -1
  66. package/dist/core/semver.d.ts +7 -0
  67. package/dist/core/semver.d.ts.map +1 -0
  68. package/dist/core/semver.js +49 -0
  69. package/dist/core/semver.js.map +1 -0
  70. package/dist/core/serializer.d.ts.map +1 -1
  71. package/dist/core/serializer.js +69 -57
  72. package/dist/core/serializer.js.map +1 -1
  73. package/dist/core/signal-scorer.d.ts.map +1 -1
  74. package/dist/core/signal-scorer.js.map +1 -1
  75. package/dist/core/transcript-extractor.d.ts +1 -85
  76. package/dist/core/transcript-extractor.d.ts.map +1 -1
  77. package/dist/core/transcript-extractor.js +5 -364
  78. package/dist/core/transcript-extractor.js.map +1 -1
  79. package/dist/core/transcript-source.d.ts +22 -6
  80. package/dist/core/transcript-source.d.ts.map +1 -1
  81. package/dist/core/transcript-source.js +108 -69
  82. package/dist/core/transcript-source.js.map +1 -1
  83. package/dist/core/types.d.ts +1 -17
  84. package/dist/core/types.d.ts.map +1 -1
  85. package/dist/core/version-check.d.ts.map +1 -1
  86. package/dist/core/version-check.js +11 -1
  87. package/dist/core/version-check.js.map +1 -1
  88. package/dist/db.d.ts +0 -34
  89. package/dist/db.d.ts.map +1 -1
  90. package/dist/db.js +3 -287
  91. package/dist/db.js.map +1 -1
  92. package/dist/host-runtime/acp.d.ts.map +1 -1
  93. package/dist/host-runtime/acp.js +2 -2
  94. package/dist/host-runtime/acp.js.map +1 -1
  95. package/dist/host-runtime/claude.d.ts.map +1 -1
  96. package/dist/host-runtime/claude.js +9 -7
  97. package/dist/host-runtime/claude.js.map +1 -1
  98. package/dist/host-runtime/codex-session.d.ts +9 -1
  99. package/dist/host-runtime/codex-session.d.ts.map +1 -1
  100. package/dist/host-runtime/codex-session.js +474 -29
  101. package/dist/host-runtime/codex-session.js.map +1 -1
  102. package/dist/host-runtime/codex.d.ts.map +1 -1
  103. package/dist/host-runtime/codex.js +2 -2
  104. package/dist/host-runtime/codex.js.map +1 -1
  105. package/dist/host-runtime/config.d.ts +1 -0
  106. package/dist/host-runtime/config.d.ts.map +1 -1
  107. package/dist/host-runtime/config.js +4 -0
  108. package/dist/host-runtime/config.js.map +1 -1
  109. package/dist/host-runtime/router-client.d.ts.map +1 -1
  110. package/dist/host-runtime/router-client.js +62 -15
  111. package/dist/host-runtime/router-client.js.map +1 -1
  112. package/dist/host-runtime/router.js +2 -2
  113. package/dist/host-runtime/router.js.map +1 -1
  114. package/dist/knowledge-graph.d.ts.map +1 -1
  115. package/dist/knowledge-graph.js +54 -45
  116. package/dist/knowledge-graph.js.map +1 -1
  117. package/dist/mcp/THIRD_PARTY_NOTICES.txt +217 -0
  118. package/dist/mcp/server.js +30685 -38
  119. package/dist/mcp/server.js.map +6 -1
  120. package/dist/skills-manifest.json +22 -22
  121. package/dist/storage/entity-index.d.ts +0 -1
  122. package/dist/storage/entity-index.d.ts.map +1 -1
  123. package/dist/storage/entity-index.js +0 -7
  124. package/dist/storage/entity-index.js.map +1 -1
  125. package/dist/storage/fts-index.d.ts.map +1 -1
  126. package/dist/storage/fts-index.js +6 -7
  127. package/dist/storage/fts-index.js.map +1 -1
  128. package/dist/storage/graph-repairs.d.ts +0 -5
  129. package/dist/storage/graph-repairs.d.ts.map +1 -1
  130. package/dist/storage/graph-repairs.js +4 -91
  131. package/dist/storage/graph-repairs.js.map +1 -1
  132. package/dist/storage/schema.d.ts +1 -1
  133. package/dist/storage/schema.d.ts.map +1 -1
  134. package/dist/storage/schema.js +1 -2
  135. package/dist/storage/schema.js.map +1 -1
  136. package/dist/storage/sqlite.d.ts +0 -1
  137. package/dist/storage/sqlite.d.ts.map +1 -1
  138. package/dist/storage/sqlite.js.map +1 -1
  139. package/dist/transports/agent-messaging.d.ts.map +1 -1
  140. package/dist/transports/agent-messaging.js +5 -7
  141. package/dist/transports/agent-messaging.js.map +1 -1
  142. package/dist/transports/cli/cli.d.ts.map +1 -1
  143. package/dist/transports/cli/cli.js +52 -674
  144. package/dist/transports/cli/cli.js.map +1 -1
  145. package/dist/transports/http/retired-routes.js +1 -1
  146. package/dist/transports/http/retired-routes.js.map +1 -1
  147. package/dist/transports/http/server.d.ts.map +1 -1
  148. package/dist/transports/http/server.js +13 -232
  149. package/dist/transports/http/server.js.map +1 -1
  150. package/dist/transports/mcp/handlers.d.ts +127 -1
  151. package/dist/transports/mcp/handlers.d.ts.map +1 -1
  152. package/dist/transports/mcp/handlers.js +53 -4
  153. package/dist/transports/mcp/handlers.js.map +1 -1
  154. package/dist/transports/schemas.d.ts +52 -0
  155. package/dist/transports/schemas.d.ts.map +1 -1
  156. package/dist/transports/schemas.js +39 -0
  157. package/dist/transports/schemas.js.map +1 -1
  158. package/docs/platforms/README.md +5 -4
  159. package/docs/platforms/agent-messaging.md +124 -60
  160. package/hooks/hooks.json +13 -2
  161. package/llms-install.md +62 -30
  162. package/package.json +4 -5
  163. package/scripts/hooks/_generated/core-paths.js +88 -14
  164. package/scripts/hooks/_generated/fts-index.js +6 -7
  165. package/scripts/hooks/_generated/schema.js +1 -2
  166. package/scripts/hooks/_shared.js +14 -20
  167. package/scripts/hooks/session-start.js +8 -6
  168. package/scripts/hooks/session-summary.js +19 -374
  169. package/skills/memesh/SKILL.md +19 -14
  170. package/skills/memesh-review/SKILL.md +7 -6
  171. package/dist/core/auto-tagger.d.ts +0 -10
  172. package/dist/core/auto-tagger.d.ts.map +0 -1
  173. package/dist/core/auto-tagger.js +0 -63
  174. package/dist/core/auto-tagger.js.map +0 -1
  175. package/dist/core/conflict-candidates.d.ts +0 -20
  176. package/dist/core/conflict-candidates.d.ts.map +0 -1
  177. package/dist/core/conflict-candidates.js +0 -71
  178. package/dist/core/conflict-candidates.js.map +0 -1
  179. package/dist/core/conflict-judge.d.ts +0 -58
  180. package/dist/core/conflict-judge.d.ts.map +0 -1
  181. package/dist/core/conflict-judge.js +0 -189
  182. package/dist/core/conflict-judge.js.map +0 -1
  183. package/dist/core/digest-validator.d.ts +0 -18
  184. package/dist/core/digest-validator.d.ts.map +0 -1
  185. package/dist/core/digest-validator.js +0 -85
  186. package/dist/core/digest-validator.js.map +0 -1
  187. package/dist/core/embedder.d.ts +0 -20
  188. package/dist/core/embedder.d.ts.map +0 -1
  189. package/dist/core/embedder.js +0 -245
  190. package/dist/core/embedder.js.map +0 -1
  191. package/dist/core/failure-analyzer.d.ts +0 -19
  192. package/dist/core/failure-analyzer.d.ts.map +0 -1
  193. package/dist/core/failure-analyzer.js +0 -83
  194. package/dist/core/failure-analyzer.js.map +0 -1
  195. package/dist/core/json-utils.d.ts +0 -3
  196. package/dist/core/json-utils.d.ts.map +0 -1
  197. package/dist/core/json-utils.js +0 -46
  198. package/dist/core/json-utils.js.map +0 -1
  199. package/dist/core/llm-client.d.ts +0 -22
  200. package/dist/core/llm-client.d.ts.map +0 -1
  201. package/dist/core/llm-client.js +0 -203
  202. package/dist/core/llm-client.js.map +0 -1
  203. package/dist/core/llm-telemetry.d.ts +0 -47
  204. package/dist/core/llm-telemetry.d.ts.map +0 -1
  205. package/dist/core/llm-telemetry.js +0 -117
  206. package/dist/core/llm-telemetry.js.map +0 -1
  207. package/dist/core/llm-validator.d.ts +0 -20
  208. package/dist/core/llm-validator.d.ts.map +0 -1
  209. package/dist/core/llm-validator.js +0 -231
  210. package/dist/core/llm-validator.js.map +0 -1
  211. package/dist/core/ollama-host.d.ts +0 -6
  212. package/dist/core/ollama-host.d.ts.map +0 -1
  213. package/dist/core/ollama-host.js +0 -62
  214. package/dist/core/ollama-host.js.map +0 -1
  215. package/dist/core/output-language.d.ts +0 -6
  216. package/dist/core/output-language.d.ts.map +0 -1
  217. package/dist/core/output-language.js +0 -25
  218. package/dist/core/output-language.js.map +0 -1
  219. package/dist/core/prompt-safety.d.ts +0 -4
  220. package/dist/core/prompt-safety.d.ts.map +0 -1
  221. package/dist/core/prompt-safety.js +0 -20
  222. package/dist/core/prompt-safety.js.map +0 -1
  223. package/dist/storage/vector-index.d.ts +0 -3
  224. package/dist/storage/vector-index.d.ts.map +0 -1
  225. package/dist/storage/vector-index.js +0 -13
  226. package/dist/storage/vector-index.js.map +0 -1
@@ -8,7 +8,7 @@
8
8
  "name": "memesh",
9
9
  "source": "./",
10
10
  "description": "MeMesh \u2014 agentic memory for coding agents. Captured from the agent's real work via hooks, recalled when it acts. One SQLite file, zero cloud required.",
11
- "version": "4.8.5",
11
+ "version": "4.9.0",
12
12
  "author": {
13
13
  "name": "PCIRCLE AI"
14
14
  },
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "PCIRCLE AI"
6
6
  },
7
- "version": "4.8.5",
7
+ "version": "4.9.0",
8
8
  "mcpServers": "./.claude-plugin/mcp.json",
9
9
  "homepage": "https://github.com/PCIRCLE-AI/memesh",
10
10
  "repository": "https://github.com/PCIRCLE-AI/memesh",
@@ -1,7 +1,9 @@
1
1
  {
2
- "memesh": {
3
- "command": "node",
4
- "args": ["./dist/mcp/server.js"],
5
- "cwd": "."
2
+ "mcpServers": {
3
+ "memesh": {
4
+ "command": "node",
5
+ "args": ["./dist/mcp/server.js"],
6
+ "cwd": "."
7
+ }
6
8
  }
7
9
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memesh",
3
3
  "description": "MeMesh — agentic memory for coding agents.",
4
- "version": "4.8.5",
4
+ "version": "4.9.0",
5
5
  "mcpServers": "./.codex-plugin/mcp.json"
6
6
  }
package/AGENTS.md CHANGED
@@ -23,7 +23,18 @@ host is recallable from all of them. Not installed yet? Follow
23
23
  field out if it was not said.
24
24
  3. **"What do you remember?"** — call `briefing` and relay its content. Do
25
25
  not answer from your own conversation context.
26
- 4. **When you need another agent** to hand off, to ask, to report back
26
+ 4. **When memory could be condensed from a calendar cluster or a recent Claude Code session**
27
+ when the host supports interactive prompts, offer concise choices in the
28
+ user's conversation language, such as **Dispatch agent task**, **Later**, or
29
+ **Don't suggest again this session**.
30
+ The last choice suppresses only this session's prompt; it does not create a
31
+ durable opt-out. Dispatch means
32
+ using `work_package` in this already-running agent session; it does not mean
33
+ the Dashboard can start or wake an agent. Prepare either one calendar-selected
34
+ digest package or, when the MCP client supplies one unambiguous matching
35
+ workspace root, one package from its newest Claude Code session's visible
36
+ turns. Submit one bounded result for human review or defer without writing.
37
+ 5. **When you need another agent** — to hand off, to ask, to report back —
27
38
  first use `message discover` with the exact project when you do not already
28
39
  know the recipient. It lists only live registrations and their routing IDs,
29
40
  host kind, declared model/current work, generation, and lease; missing
@@ -35,10 +46,11 @@ host is recallable from all of them. Not installed yet? Follow
35
46
  `recipient`; poll first, then fetch each returned `message_id`. Fetching
36
47
  does not acknowledge.
37
48
 
38
- ## All 11 MCP tools
49
+ ## All 12 MCP tools
39
50
 
40
51
  | Tool | Purpose |
41
52
  |---|---|
53
+ | `work_package` | Prepare one bounded untrusted digest (calendar-selected) or transcript package from the newest Claude Code session under the client's single matching MCP workspace root; submit one strictly validated result for pending human review or defer without durable change. Submission retains bounded redacted source turns for comparison; agents cannot apply or reject, and hashes identify freshness and workspace scope rather than authentication. |
42
54
  | `remember` | Store knowledge as an entity with observations, tags, and relations |
43
55
  | `recall` | Search stored knowledge (words are OR-ed, ranked by relevance); empty query lists recent |
44
56
  | `forget` | Archive an entity (soft-delete), or remove one observation via the `observation` parameter |
@@ -78,9 +90,8 @@ host is recallable from all of them. Not installed yet? Follow
78
90
  before concluding anything.
79
91
  - Every recall answer carries a `retrieval` block that says how it was
80
92
  produced — read it instead of guessing: `truncated: true` means the
81
- window filled and more may exist; `degraded: true` means semantic search
82
- is configured but could not run, so you are seeing keyword-only results
83
- right now (worth telling the user, and `memesh doctor` explains why).
93
+ window filled and more may exist. Recall is local FTS5 search; do not
94
+ describe results as semantic, vector-ranked, or model-generated.
84
95
 
85
96
  ## What Claude Code already does — do not double-write
86
97
 
@@ -94,7 +105,7 @@ Under Claude Code with the MeMesh plugin, hooks capture automatically:
94
105
  - **PostToolUse (ExitPlanMode|AskUserQuestion)** reminds you to `remember` a
95
106
  decision just made — once per tool per session. It only reminds; unlike
96
107
  the hooks above, it writes nothing to the graph itself.
97
- - **Stop** captures session knowledge and turns failures into lessons.
108
+ - **Stop** captures bounded session evidence, including observed error/fix signals.
98
109
  - **PreCompact** saves important knowledge before history is compressed.
99
110
  - **UserPromptSubmit** detects "remember this" intent in the prompt.
100
111
  - **PreToolUse (Bash)** fires accepted lesson-guards: a fenced warning
@@ -112,18 +123,23 @@ actually get stored.
112
123
  On a host with no hooks (Gemini CLI, Cursor, an MCP-only setup, …) the loop is
113
124
  fully manual, and it is worth running.
114
125
 
115
- Codex CLI can be either. Wired as an MCP server it has no hooks, like the
116
- above. Installed as a plugin (`codex plugin add memesh@pcircle-memesh`) it
117
- reads the same `hooks/hooks.json` manifest Claude Code does and runs the same
118
- hook scripts, so the topology is injected for you there too. If you are unsure
119
- which one you are in, `memesh doctor` names it: the "Hooks wired into Claude
120
- Code" row says which plugin runtime it found.
126
+ Codex CLI can be either. Wired only as an MCP server it has no hooks, so call
127
+ `briefing` yourself. Installed as a plugin
128
+ (`codex plugin add memesh@pcircle-memesh`) it wires the MCP server and the
129
+ separate SessionStart companion. On macOS or Linux, an eligible ordinary Codex
130
+ CLI startup or resume registers that exact active thread for native delivery.
131
+ The companion does not run Claude Code's eight capture/recall hooks or prove
132
+ that topology was injected. Do not assume Codex Desktop or an unattached task
133
+ registered; confirm the exact live session with `message discover`.
134
+ `memesh doctor` reports installation and local integration health, but it does
135
+ not prove host acceptance or model-visible delivery.
121
136
 
122
137
  ## Working on this repository (contributing agents)
123
138
 
124
139
  The sections above are for agents whose user installed memesh. If you are an
125
- agent making changes to this codebase, [CLAUDE.md](CLAUDE.md) is the entry
126
- point; the policy it carries, compressed:
140
+ agent making changes to this codebase, read [CLAUDE.md](CLAUDE.md) as the
141
+ contributor entry point and apply the working and delegation requirements
142
+ below with it:
127
143
 
128
144
  - **Blast radius picks the process.** One module, no security surface, no
129
145
  cross-surface behaviour → implement, run the affected tests + typecheck,
@@ -137,5 +153,35 @@ point; the policy it carries, compressed:
137
153
  - **Delegation is disjoint.** Two writers never touch one file; file-editing
138
154
  subagents work in isolated worktrees and never commit or push — the
139
155
  orchestrator reads every diff before it lands.
156
+ - **Delegate the smallest verifiable slice.** Give each agent one coherent
157
+ outcome that can be implemented and falsified independently. Do not hand a
158
+ broad implementation or cleanup to one worker when it can be split at
159
+ file-disjoint boundaries. Read-only analysis may be divided further by
160
+ symbol, test, UI, documentation, or runtime question. A formal independent
161
+ reviewer still receives the same complete diff; specialist scope narrows
162
+ the questions, never the changed files. Delegation must reduce uncertainty
163
+ or work, not merely add an agent.
164
+ - **Use an explicit task card.** Every delegated task states: observable
165
+ outcome; owned paths and forbidden paths; frozen repository input (branch,
166
+ commit and, when relevant, tree or artifact digest); required invariants and
167
+ failure paths; exact checks and readbacks; non-goals and mutation authority;
168
+ and the required findings/evidence return format. Unknowns must be reported,
169
+ not guessed. A task without a falsifiable acceptance check is not ready to
170
+ delegate.
171
+ - **Treat DeepSeek as a bounded team worker.** Prefer the local DeepSeek worker
172
+ for small source inventories, candidate patches, test ideas, failure-log
173
+ analysis, mechanical classifications, and documentation comparisons when
174
+ its result can be checked cheaply. Give it only the minimum secret-free
175
+ context and least-privilege tools. It never receives credentials, MeMesh
176
+ database access, external mutation authority, architecture ownership,
177
+ formal independent-review authority, or completion authority. Its output is
178
+ an untrusted candidate until the orchestrator verifies it against the frozen
179
+ source and executable evidence.
180
+ - **Keep roles and evidence separate.** The orchestrator owns architecture,
181
+ integration, claim coverage, authorization boundaries, and the final status.
182
+ Implementers return a candidate, never `PASS`. A fresh read-only reviewer
183
+ who authored none of the changed paths replays every claim on the exact
184
+ immutable candidate. Any source change invalidates earlier test and review
185
+ evidence for that candidate.
140
186
  - **Internal notes stay local.** Plans and scratch analyses are never
141
187
  committed and never appear in commit messages or release notes.