@memstack/cli 0.6.4 → 0.7.1
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/README.md +13 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +11723 -0
- package/dist/cli.js.map +1 -0
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @memstack/cli
|
|
2
2
|
|
|
3
|
-
CLI for MemStack — shell-based agent memory. Use from bash scripts, Claude Code shell
|
|
3
|
+
CLI for MemStack — shell-based agent memory. Use from bash scripts, opencode/Claude Code shell tools, CI pipelines, or any subprocess-capable agent.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -106,6 +106,18 @@ memstack import --actor "agent-1" --file ./backup.json
|
|
|
106
106
|
# {"imported":1500}
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
Each memory's original `createdAt` is preserved on import (round-trips exactly with `export`). Importing a snapshot with zero memories fails cleanly with a non-zero exit.
|
|
110
|
+
|
|
111
|
+
## Input validation
|
|
112
|
+
|
|
113
|
+
The CLI normalizes and validates input before storing:
|
|
114
|
+
|
|
115
|
+
- **`--importance`** is clamped to the `0.0–1.0` range (e.g. `--importance 5` stores as `1`, `--importance=-1` stores as `0`).
|
|
116
|
+
- **`--actor`** is trimmed of leading/trailing whitespace (`--actor " a "` and `--actor a` are the same actor).
|
|
117
|
+
- **`--tags`** drops empty entries from trailing/double commas (`--tags "a,,b,"` → `["a","b"]`).
|
|
118
|
+
- **`prune --type`** rejects unknown strategies with a non-zero exit instead of silently doing nothing. Valid: `byAge`, `byImportance`, `byCount`, `byType`, `custom`, `compose`.
|
|
119
|
+
- **`prune --actor`** is scoped to that actor only — it never touches other actors' memories.
|
|
120
|
+
|
|
109
121
|
## Shell agent usage
|
|
110
122
|
|
|
111
123
|
```bash
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|