@memfork/cli 0.1.47 → 0.1.49
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.
package/dist/cli.js
CHANGED
|
@@ -66,6 +66,16 @@ program
|
|
|
66
66
|
.command("status")
|
|
67
67
|
.description("show current tree, network, branch, and signer")
|
|
68
68
|
.action(wrap(cmdStatus));
|
|
69
|
+
program
|
|
70
|
+
.command("namespace [branch]")
|
|
71
|
+
.description("print the MemWal namespace for a branch (use with memwal_recall namespace= arg)")
|
|
72
|
+
.action(wrap(async (branch) => {
|
|
73
|
+
const { cfg } = await import("./config.js").then((m) => ({ cfg: m.resolveConfig() }));
|
|
74
|
+
const { resolveBranch } = await import("./branch.js");
|
|
75
|
+
const { branchNamespace } = await import("@memfork/core");
|
|
76
|
+
const b = resolveBranch({ explicit: branch, configDefault: cfg.defaultBranch });
|
|
77
|
+
console.log(branchNamespace(cfg.treeId, b));
|
|
78
|
+
}));
|
|
69
79
|
program
|
|
70
80
|
.command("log")
|
|
71
81
|
.description("show recent commits on a branch")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memfork/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49",
|
|
4
4
|
"description": "MemForks CLI — init, commit, recall, merge, install plugins",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@inquirer/prompts": "^8.5.2",
|
|
38
|
-
"@memfork/core": "^0.1.
|
|
38
|
+
"@memfork/core": "^0.1.13",
|
|
39
39
|
"chalk": "^5.6.2",
|
|
40
40
|
"commander": "^15.0.0"
|
|
41
41
|
},
|
|
@@ -54,7 +54,8 @@ memfork doctor
|
|
|
54
54
|
| `memfork merge <src> <dst>` | Propose a cross-branch memory merge |
|
|
55
55
|
| `memfork status / log / proposals` | Inspect the on-chain DAG |
|
|
56
56
|
|
|
57
|
-
Memory is namespaced by Git branch
|
|
57
|
+
Memory is namespaced by Git branch in the form `memforks/<treeId>/<branch>`.
|
|
58
|
+
Run `memfork namespace` to get the exact string for the current branch.
|
|
58
59
|
|
|
59
60
|
## What gets installed
|
|
60
61
|
|
|
@@ -12,24 +12,38 @@ Do not run `memfork recall` from the shell; the MCP tool is faster and context-a
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
+
MemWal namespaces are scoped to the tree in the form `memforks/<treeId>/<branch>`.
|
|
16
|
+
Get the correct namespace first:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
memfork namespace # current branch
|
|
20
|
+
memfork namespace feat/auth # specific branch
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then recall:
|
|
24
|
+
|
|
15
25
|
```
|
|
16
26
|
memwal_recall(
|
|
17
27
|
query="<natural language — what you want to find>",
|
|
18
|
-
namespace="
|
|
28
|
+
namespace="memforks/<treeId>/<current-git-branch>",
|
|
19
29
|
limit=5
|
|
20
30
|
)
|
|
21
31
|
```
|
|
22
32
|
|
|
33
|
+
If you cannot run `memfork namespace`, omit `namespace` entirely — MemWal will search
|
|
34
|
+
the full account across all branches.
|
|
35
|
+
|
|
23
36
|
Examples:
|
|
24
37
|
```
|
|
25
|
-
memwal_recall(query="auth system design", namespace="
|
|
26
|
-
memwal_recall(query="database schema decisions", namespace="
|
|
38
|
+
memwal_recall(query="auth system design", namespace="memforks/<treeId>/main")
|
|
39
|
+
memwal_recall(query="database schema decisions", namespace="memforks/<treeId>/feature/payments")
|
|
27
40
|
memwal_recall(query="what do we know about the API rate limits?", limit=10)
|
|
28
41
|
```
|
|
29
42
|
|
|
30
43
|
## Rules
|
|
31
44
|
|
|
32
45
|
- Always scope to the current Git branch namespace unless the user asks for cross-branch context.
|
|
46
|
+
Use `memfork namespace` to get the exact string; never guess `branch/<name>`.
|
|
33
47
|
- High relevance scores = verified prior context.
|
|
34
48
|
- If recall returns nothing, tell the user memory is empty for this branch and offer to start capturing.
|
|
35
49
|
- Never fabricate facts — only use what `memwal_recall` returns.
|
|
@@ -21,11 +21,20 @@ have been discussed before, call the MCP tool:
|
|
|
21
21
|
memwal_recall(query="<natural language query>", limit=5)
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Use the namespace matching the current Git branch:
|
|
24
|
+
Use the namespace matching the current Git branch. Get the exact value from the CLI first:
|
|
25
25
|
|
|
26
|
+
```bash
|
|
27
|
+
memfork namespace # prints: memforks/<treeId>/<current-branch>
|
|
28
|
+
memfork namespace feat/auth # prints namespace for a specific branch
|
|
26
29
|
```
|
|
27
|
-
|
|
30
|
+
|
|
31
|
+
Then pass it to the MCP tool:
|
|
32
|
+
|
|
28
33
|
```
|
|
34
|
+
memwal_recall(query="auth system design decisions", namespace="memforks/<treeId>/feat/auth")
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If you cannot run the CLI, omit `namespace` — MemWal will search the full account across all branches.
|
|
29
38
|
|
|
30
39
|
Results with high relevance scores are verified context from prior sessions.
|
|
31
40
|
|
|
@@ -111,7 +120,9 @@ human governance act.
|
|
|
111
120
|
## Branch awareness
|
|
112
121
|
|
|
113
122
|
- The `memfork` CLI auto-detects the current Git branch; pass `--branch` only to override it.
|
|
114
|
-
- The `memwal_*` MCP tools have no Git context
|
|
123
|
+
- The `memwal_*` MCP tools have no Git context. MemWal namespaces are in the form
|
|
124
|
+
`memforks/<treeId>/<branch>` — get the exact value with `memfork namespace <branch>`,
|
|
125
|
+
then pass it as `namespace=` to recall. Without it, omit namespace to search all branches.
|
|
115
126
|
- When the user switches branches, recall from the new branch namespace.
|
|
116
127
|
- Use `memfork status` to see the current branch, on-chain tree state, and open merge proposals.
|
|
117
128
|
|