@memstack/cli 0.5.0 → 0.7.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.
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 tool, CI pipelines, or any subprocess-capable agent.
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
 
@@ -25,6 +25,7 @@ All via environment variables. Same scheme as @memstack/mcp.
25
25
  | `ANTHROPIC_API_KEY` | Anthropic LLM (summarization) | — |
26
26
  | `MEMSTACK_OPENAI_BASE_URL` | Custom API endpoint (DeepSeek, etc.) | `https://api.openai.com/v1` |
27
27
  | `MEMSTACK_LLM_MODEL` | Model override | `gpt-4o-mini` |
28
+ | `MEMSTACK_EMBED_ON_STORE` | Auto-embed on store | `true` |
28
29
 
29
30
  ## Commands
30
31
 
@@ -105,6 +106,18 @@ memstack import --actor "agent-1" --file ./backup.json
105
106
  # {"imported":1500}
106
107
  ```
107
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
+
108
121
  ## Shell agent usage
109
122
 
110
123
  ```bash