@memfork/cli 0.1.50 → 0.1.52

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.
@@ -200,9 +200,12 @@ network_access = true
200
200
  // ── Summary (Codex) ────────────────────────────────────────────────────────
201
201
  console.log("");
202
202
  console.log(tip("The agent now has:"));
203
- console.log(dim(" memwal_recall / memwal_remember — memory storage via MemWal MCP"));
204
- console.log(dim(" memwal_analyze extract facts from conversation"));
205
- console.log(dim(" memfork commit / merge — on-chain DAG anchoring"));
203
+ console.log(dim(" memwal_recall semantic memory recall via MemWal MCP"));
204
+ console.log(dim(" memfork commit / merge the only write path: MemWal + on-chain anchor"));
205
+ console.log("");
206
+ console.log(dim(" Raw MemWal writes (remember / remember_bulk / analyze) are disabled"));
207
+ console.log(dim(" so every saved memory is anchored on Sui. Want raw, unanchored notes?"));
208
+ console.log(dim(" Install the standalone MemWal plugin alongside MemForks."));
206
209
  console.log("");
207
210
  console.log(tip("memfork doctor — verify the full setup"));
208
211
  console.log("");
@@ -216,14 +219,23 @@ function upsertCodexMcp(tomlPath, creds) {
216
219
  if (fs.existsSync(tomlPath)) {
217
220
  existing = fs.readFileSync(tomlPath, "utf8");
218
221
  }
222
+ // `disabled_tools` denies the raw MemWal write tools so the agent cannot
223
+ // bypass the on-chain DAG. All persistence is forced through `memfork commit`
224
+ // (which writes MemWal *and* anchors on Sui). Recall + health + restore stay
225
+ // enabled. Users who want raw, unanchored memory can install the standalone
226
+ // MemWal plugin instead.
219
227
  const block = `
220
228
  [mcp_servers.memwal]
221
229
  url = "${creds.relayerUrl}"
222
230
  http_headers = { Authorization = "Bearer ${creds.delegateKey}", x-memwal-account-id = "${creds.accountId}" }
231
+ disabled_tools = ["memwal_remember", "memwal_remember_bulk", "memwal_analyze"]
223
232
  `;
224
233
  if (existing.includes("[mcp_servers.memwal]")) {
225
- // Replace the existing block — find from the header to the next blank line / EOF.
226
- existing = existing.replace(/\[mcp_servers\.memwal\][^\[]*/s, block.trimStart());
234
+ // Replace the existing block — from the header through every following line
235
+ // that is NOT a new TOML table header (`[...]` at line start). This keeps
236
+ // inline arrays like `disabled_tools = [...]` intact instead of truncating
237
+ // at the first `[`.
238
+ existing = existing.replace(/^\[mcp_servers\.memwal\]\n(?:(?!\[)[^\n]*\n?)*/m, block.trimStart());
227
239
  }
228
240
  else {
229
241
  existing = existing.trimEnd() + "\n" + block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memfork/cli",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "description": "MemForks CLI — init, commit, recall, merge, install plugins",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,9 +17,11 @@ finding — **always use `memfork commit --facts`**, not `memwal_remember`.
17
17
  1. Indexes the facts in MemWal for semantic recall (same as `memwal_remember`)
18
18
  2. Anchors them on-chain on Sui, tagged to the current Git branch
19
19
 
20
- `memwal_remember` alone does only step 1. It saves to `namespace=default`
21
- with no branch scoping and no on-chain anchor. Use it only for transient,
22
- throwaway notes that don't warrant a permanent record.
20
+ The raw MemWal write tools (`memwal_remember`, `memwal_remember_bulk`,
21
+ `memwal_analyze`) are **disabled** under MemForks they save to
22
+ `namespace=default` with no branch scoping and no on-chain anchor, which
23
+ defeats the purpose of a version-controlled memory DAG. `memfork commit` is
24
+ the only write path, so every saved memory is provably anchored on Sui.
23
25
 
24
26
  ## Procedure
25
27
 
@@ -63,7 +65,8 @@ Do not print the full CLI output. One line is enough.
63
65
 
64
66
  ## Rules
65
67
 
66
- - Never use `memwal_remember` for facts the user explicitly asks to save.
68
+ - The raw `memwal_remember*` / `memwal_analyze` tools are disabled `memfork
69
+ commit` is the only way to persist memory. Never look for a workaround.
67
70
  - Never commit task state, in-progress work, or temporary findings.
68
71
  - If `memfork commit` fails (e.g. no tree initialised), tell the user to
69
72
  run `memfork init` first and offer to retry.
@@ -55,8 +55,10 @@ a different branch.
55
55
  Use this after any significant turn: architectural decisions, resolved problems,
56
56
  project conventions, key constraints.
57
57
 
58
- Only use `memwal_remember` directly for a quick lightweight note that does **not**
59
- warrant an on-chain entry (e.g. a transient preference noted mid-task).
58
+ Always persist memory with `memfork commit` never `memwal_remember`. The raw
59
+ MemWal write tools save to `namespace=default` with no branch scoping and no
60
+ on-chain anchor, which bypasses the DAG. `memfork commit` indexes the same
61
+ facts in MemWal *and* anchors them on Sui, so every memory is verifiable.
60
62
 
61
63
  Do **not** save: current task state, in-progress work, temporary findings.
62
64