@pcircle/memesh 4.10.1 → 4.10.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.
Files changed (86) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/AGENTS.md +44 -13
  5. package/README.de.md +3 -3
  6. package/README.md +3 -3
  7. package/README.zh-TW.md +3 -3
  8. package/dashboard/dist/index.html +1 -1
  9. package/dist/core/agent-message-inbox.d.ts +6 -0
  10. package/dist/core/agent-message-inbox.d.ts.map +1 -1
  11. package/dist/core/agent-message-inbox.js +28 -1
  12. package/dist/core/agent-message-inbox.js.map +1 -1
  13. package/dist/core/briefing-level.d.ts +22 -0
  14. package/dist/core/briefing-level.d.ts.map +1 -0
  15. package/dist/core/briefing-level.js +75 -0
  16. package/dist/core/briefing-level.js.map +1 -0
  17. package/dist/core/briefing.d.ts +3 -0
  18. package/dist/core/briefing.d.ts.map +1 -1
  19. package/dist/core/briefing.js +33 -11
  20. package/dist/core/briefing.js.map +1 -1
  21. package/dist/core/capture-liveness.d.ts +1 -0
  22. package/dist/core/capture-liveness.d.ts.map +1 -1
  23. package/dist/core/capture-liveness.js +1 -0
  24. package/dist/core/capture-liveness.js.map +1 -1
  25. package/dist/core/config.d.ts +1 -0
  26. package/dist/core/config.d.ts.map +1 -1
  27. package/dist/core/config.js +3 -1
  28. package/dist/core/config.js.map +1 -1
  29. package/dist/core/paths.d.ts +1 -0
  30. package/dist/core/paths.d.ts.map +1 -1
  31. package/dist/core/paths.js +4 -0
  32. package/dist/core/paths.js.map +1 -1
  33. package/dist/core/schema-export.d.ts.map +1 -1
  34. package/dist/core/schema-export.js +5 -1
  35. package/dist/core/schema-export.js.map +1 -1
  36. package/dist/core/serializer.d.ts +2 -0
  37. package/dist/core/serializer.d.ts.map +1 -1
  38. package/dist/core/serializer.js +119 -6
  39. package/dist/core/serializer.js.map +1 -1
  40. package/dist/core/task-state.d.ts +5 -0
  41. package/dist/core/task-state.d.ts.map +1 -1
  42. package/dist/core/task-state.js +70 -0
  43. package/dist/core/task-state.js.map +1 -1
  44. package/dist/core/types.d.ts +2 -0
  45. package/dist/core/types.d.ts.map +1 -1
  46. package/dist/core/work-topology.d.ts +1 -0
  47. package/dist/core/work-topology.d.ts.map +1 -1
  48. package/dist/core/work-topology.js +3 -0
  49. package/dist/core/work-topology.js.map +1 -1
  50. package/dist/mcp/THIRD_PARTY_NOTICES.txt +2 -2
  51. package/dist/mcp/server.js +448 -121
  52. package/dist/mcp/server.js.map +3 -3
  53. package/dist/skills-manifest.json +29 -24
  54. package/dist/storage/fts-index.d.ts +1 -0
  55. package/dist/storage/fts-index.d.ts.map +1 -1
  56. package/dist/storage/fts-index.js +5 -0
  57. package/dist/storage/fts-index.js.map +1 -1
  58. package/dist/transports/cli/cli.d.ts.map +1 -1
  59. package/dist/transports/cli/cli.js +348 -53
  60. package/dist/transports/cli/cli.js.map +3 -3
  61. package/dist/transports/http/server.d.ts.map +1 -1
  62. package/dist/transports/http/server.js +10 -1
  63. package/dist/transports/http/server.js.map +1 -1
  64. package/dist/transports/mcp/handlers.d.ts +7 -3
  65. package/dist/transports/mcp/handlers.d.ts.map +1 -1
  66. package/dist/transports/mcp/handlers.js +7 -3
  67. package/dist/transports/mcp/handlers.js.map +1 -1
  68. package/dist/transports/schemas.d.ts +1 -0
  69. package/dist/transports/schemas.d.ts.map +1 -1
  70. package/dist/transports/schemas.js +1 -0
  71. package/dist/transports/schemas.js.map +1 -1
  72. package/docs/platforms/agent-messaging.md +17 -3
  73. package/package.json +4 -9
  74. package/scripts/hooks/_generated/agent-message-inbox.js +28 -1
  75. package/scripts/hooks/_generated/briefing-level.js +82 -0
  76. package/scripts/hooks/_generated/capture-liveness.js +1 -0
  77. package/scripts/hooks/_generated/core-paths.js +4 -0
  78. package/scripts/hooks/_generated/fts-index.js +5 -0
  79. package/scripts/hooks/_generated/task-state.js +70 -0
  80. package/scripts/hooks/_generated/work-topology.js +3 -0
  81. package/scripts/hooks/_shared.js +623 -15
  82. package/scripts/hooks/pre-edit-recall.js +386 -65
  83. package/scripts/hooks/session-start.js +261 -77
  84. package/scripts/hooks/user-prompt-intent.js +38 -6
  85. package/scripts/upgrade-plugin.sh +3 -4
  86. package/skills/memesh/SKILL.md +26 -16
@@ -35,7 +35,7 @@ All examples below use CLI. MCP tools accept the same parameters as JSON objects
35
35
  | `import` | Import a JSON export with the required skip, append, or overwrite strategy |
36
36
  | `learn` | Record a structured lesson with error, fix, root cause, and prevention |
37
37
  | `task_state` | Read or update user-stated goal, next step, blocker, and finished work |
38
- | `briefing` | Assemble the current project's work topology, closing with a capped index of its durable memories |
38
+ | `briefing` | Assemble the current project's work topology, closing, by default, with a capped index of its durable memories (the `briefing` setting — `minimal` / `standard` / `full` — controls how much is assembled) |
39
39
  | `user_patterns` | Analyze work schedule, tool preferences, and focus areas |
40
40
  | `improvement` | Propose an evidence-linked product improvement or read its status; only a human may accept or reject it |
41
41
  | `message` | Discover live agents in one project, then contact one exact recipient with a bounded, untrusted payload. Native size and availability failures are distinct; acceptance, discovery, polling, and fetching do not acknowledge |
@@ -98,17 +98,22 @@ Durable audit does not mean unbounded silent growth. Owners can inspect it with
98
98
 
99
99
  **SESSION START → load the briefing (once).**
100
100
  Call the `briefing` MCP tool or run `memesh briefing`. It returns the assembled
101
- work topology: where the work was left off (goal / next / blocked / done),
102
- decisions and direction, lessons not to repeat, what is known, recent activity.
101
+ work topology: this project's decisions and direction, lessons not to repeat,
102
+ what is known, and recent activity always; where the work was left off (goal /
103
+ next / blocked / done) too at `standard`/`full` (the `briefing` setting's
104
+ default and above).
103
105
  One call is cheaper than re-exploring the repo to reconstruct the same picture.
104
106
  `memesh briefing --index` returns only the index of durable memories — what is
105
107
  known here, one line each, without the ranked sections.
106
- Generic briefing and SessionStart context do not report unread durable messages:
107
- they have no recipient identity. If you already know the exact logical
108
- recipient, pass `recipient` with `project` (MCP) or use
108
+ Generic briefing does not report unread durable messages: it has no recipient
109
+ identity. The session-start hook and each prompt do report them, but only when
110
+ the session declared who it is by starting with `MEMESH_RECIPIENT=<id>`. If you
111
+ already know the exact logical recipient, pass `recipient` with `project` (MCP) or use
109
112
  `memesh briefing --project <name> --recipient <id>`. The scoped line names the
110
113
  project and recipient and directs you to `message poll` first, then `message
111
- fetch` each returned `message_id`; fetching does not acknowledge. At zero
114
+ fetch` each returned `message_id`, then record `intake` for it (the session-start
115
+ and prompt reminders repeat until you do; fetching alone does not acknowledge).
116
+ At zero
112
117
  unread it also says so explicitly if that exact recipient id has never been
113
118
  seen in this project at all — treat that as a probable typo in `--recipient`,
114
119
  not as an empty, healthy inbox.
@@ -122,15 +127,18 @@ memesh task --blocked "Waiting on the Windows runner"
122
127
  memesh task --blocked "" # blocker resolved — empty string clears the field
123
128
  ```
124
129
  Fields: `--goal` `--next` `--blocked` `--done` (MCP tool: `task_state`).
125
- Record ONLY what the user actually said. This state is injected at the top of
126
- the next session and read as fact a goal you guessed from which files were
127
- edited reaches that session with nothing to correct it. If it was not said,
128
- leave the field out.
130
+ Record ONLY what the user actually said. Fresh state is injected at the top
131
+ of the next session at `standard`/`full` (default and above) and read as
132
+ fact a goal you guessed from which files were edited reaches that session
133
+ with nothing to correct it; `minimal` never shows a fresh state, but a
134
+ stale or unknown-age one still gets a one-line flag at every level. If it
135
+ was not said, leave the field out.
129
136
 
130
137
  **SESSION END or milestone → make the task state match reality.**
131
- `memesh task` (no flags) shows exactly what the next session will be told.
132
- If "next" is now done, record what is actually next; if the blocker cleared,
133
- clear it.
138
+ `memesh task` (no flags) always shows the complete stored state not
139
+ necessarily what the next session will be told, which depends on freshness
140
+ and the `briefing` level. If "next" is now done, record what is actually
141
+ next; if the blocker cleared, clear it.
134
142
 
135
143
  **USER ASKS "what do you remember / where were we" → briefing, then relay.**
136
144
  Run `memesh briefing` (or `--project <name>`) and answer from it. For specific
@@ -151,7 +159,7 @@ With the Claude Code plugin, the first eight rows happen **without any action fr
151
159
 
152
160
  | Hook | When | What it does |
153
161
  |------|------|-------------|
154
- | **SessionStart** | Every session begins | Injects the briefing: task state lessons project memories recent activity |
162
+ | **SessionStart** | Every session begins | Injects the briefing when the configured level has something to show (an empty project at `minimal` injects nothing) — decisions, lessons and recent activity always; task state and the durable-memory index too at `standard`/`full` (default and above) |
155
163
  | **PreToolUse (Edit/Write)** | Before editing files | Injects memories related to the file or project |
156
164
  | **UserPromptSubmit** | When you submit a prompt | Detects "remember this" intent (5 languages) and reminds Claude to use memesh |
157
165
  | **PostToolUse (Bash)** | After `git commit` | Auto-tracks the commit with diff stats as a memory entity |
@@ -162,7 +170,8 @@ With the Claude Code plugin, the first eight rows happen **without any action fr
162
170
  | **SessionStart/SessionEnd (Codex)** | An ordinary Codex CLI plugin session starts, resumes, or ends | Launches the detached exact-thread companion, replaces its generation on resume, and retires it after the bounded idle queue window; a matching owner-private config may override its project/principal |
163
171
 
164
172
  Because of the SessionStart hook: **in Claude Code, do NOT call `briefing` at
165
- session start — it is already in your context.** Call it only mid-session
173
+ session start — whatever the configured level has to show is already in your
174
+ context.** Call it only mid-session
166
175
  (context was compacted, or the user asks what you remember) or on hosts
167
176
  without these hooks (other MCP clients, shell-only agents). Double-injection
168
177
  spends the very tokens this system exists to save.
@@ -248,6 +257,7 @@ human review. Do not hand-compress memories yourself.
248
257
  ```bash
249
258
  memesh export --tag "project:myapp" > memories.json
250
259
  memesh import memories.json --merge skip # skip | overwrite | append
260
+ # append/overwrite leave a memory you archived (forgot) alone; --merge append|overwrite --restore-archived brings it back
251
261
  memesh status # version, install channel, update state
252
262
  memesh reindex --fts # rebuild the local keyword index
253
263
  ```