@remnic/cli 1.0.3 → 1.0.5

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Joshua Warren
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -36,10 +36,54 @@ remnic query "hello" --explain # Test query with tier breakdown
36
36
  | `remnic dedup` | Find and merge duplicate memories |
37
37
  | `remnic sync` | Diff-aware sync with external sources |
38
38
  | `remnic spaces` | Manage memory namespaces |
39
- | `remnic bench` | Run memory retrieval benchmarks |
39
+ | `remnic bench list` | List published benchmark packs |
40
+ | `remnic bench datasets status/download` | Check or download local benchmark datasets |
41
+ | `remnic bench runs list/show/delete` | Manage stored benchmark result files |
42
+ | `remnic bench run` | Run one or more published benchmark packs |
43
+ | `remnic bench compare` | Compare two stored benchmark results |
44
+ | `remnic bench baseline` | Save or list named benchmark baselines |
45
+ | `remnic bench export` | Export a stored benchmark result as JSON, CSV, or HTML |
46
+ | `remnic bench providers discover` | Auto-detect local provider backends |
47
+ | `remnic bench publish --target remnic-ai` | Build the Remnic.ai benchmark feed from stored results |
40
48
 
41
49
  Run `remnic --help` for the full command list.
42
50
 
51
+ ## Benchmarks
52
+
53
+ The phase-1 benchmark surface is exposed through `remnic bench`, with `remnic benchmark`
54
+ kept as a compatibility alias.
55
+
56
+ ```bash
57
+ remnic bench list
58
+ remnic bench datasets status
59
+ remnic bench datasets download longmemeval
60
+ remnic bench datasets download --all
61
+ remnic bench runs list
62
+ remnic bench runs show candidate-run --detail
63
+ remnic bench runs delete candidate-run
64
+ remnic bench run --quick longmemeval
65
+ remnic bench run longmemeval --dataset-dir ~/datasets/longmemeval
66
+ remnic bench compare base-run candidate-run
67
+ remnic bench baseline save main candidate-run
68
+ remnic bench baseline list
69
+ remnic bench export candidate-run --format csv --output ./candidate.csv
70
+ remnic bench export candidate-run --format html --output ./report.html
71
+ remnic bench providers discover
72
+ remnic bench publish --target remnic-ai
73
+ remnic benchmark run --quick longmemeval
74
+ ```
75
+
76
+ `--quick` uses the lightweight benchmark path with a single-item limit so you can
77
+ smoke-test the harness without running a full benchmark pass. When a benchmark
78
+ ships a bundled smoke fixture, `--quick` uses that tracked fixture by default;
79
+ full runs need a real benchmark dataset. In a repo checkout the CLI will use
80
+ `evals/datasets/<benchmark>` automatically; in packaged installs pass
81
+ `--dataset-dir <path>` explicitly.
82
+
83
+ `remnic bench datasets download` currently manages the script-backed published
84
+ datasets for `ama-bench`, `memory-arena`, `amemgym`, `longmemeval`, and `locomo`.
85
+ Other benchmark fixtures remain repo-managed or need manual dataset wiring.
86
+
43
87
  ## Connecting agents
44
88
 
45
89
  Once the daemon is running, connect any supported agent:
package/bin/remnic.cjs CHANGED
File without changes
@@ -0,0 +1,182 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5
+ # Honor an explicit DATASETS_DIR from the environment so packaged CLI
6
+ # installs can route downloads to a user-writable location (e.g.
7
+ # ~/.remnic/bench/datasets) instead of a sibling of the script dir.
8
+ DATASETS_DIR="${DATASETS_DIR:-$(cd "$SCRIPT_DIR/.." && pwd)/datasets}"
9
+
10
+ usage() {
11
+ echo "Usage: $0 [--benchmark <name>]"
12
+ echo ""
13
+ echo "Downloads benchmark datasets for the Engram eval suite."
14
+ echo ""
15
+ echo "Benchmarks: ama-bench, longmemeval, amemgym, locomo, memory-arena, all"
16
+ echo ""
17
+ echo "Options:"
18
+ echo " --benchmark <name> Download only the specified benchmark (default: all)"
19
+ echo " --help Show this help"
20
+ exit 0
21
+ }
22
+
23
+ BENCHMARK="all"
24
+ while [[ $# -gt 0 ]]; do
25
+ case $1 in
26
+ --benchmark) BENCHMARK="$2"; shift 2 ;;
27
+ --help) usage ;;
28
+ *) echo "Unknown option: $1"; usage ;;
29
+ esac
30
+ done
31
+
32
+ check_deps() {
33
+ for cmd in git curl; do
34
+ if ! command -v "$cmd" &>/dev/null; then
35
+ echo "ERROR: $cmd is required but not found"
36
+ exit 1
37
+ fi
38
+ done
39
+ }
40
+
41
+ download_ama_bench() {
42
+ local dir="$DATASETS_DIR/ama-bench"
43
+ if [[ -f "$dir/open_end_qa_set.jsonl" ]]; then
44
+ echo "[ama-bench] Already downloaded at $dir"
45
+ return
46
+ fi
47
+ echo "[ama-bench] Downloading from HuggingFace (AMA-bench/AMA-bench)..."
48
+ mkdir -p "$dir"
49
+ local tmpdir
50
+ tmpdir=$(mktemp -d)
51
+ git clone --depth 1 https://huggingface.co/datasets/AMA-bench/AMA-bench "$tmpdir/repo" 2>/dev/null || {
52
+ echo "[ama-bench] ERROR: Could not clone. Try manually:"
53
+ echo " git clone --depth 1 https://huggingface.co/datasets/AMA-bench/AMA-bench /tmp/amabench"
54
+ echo " cp /tmp/amabench/test/open_end_qa_set.jsonl $dir/"
55
+ rm -rf "$tmpdir"
56
+ return 1
57
+ }
58
+ cp "$tmpdir/repo/test/open_end_qa_set.jsonl" "$dir/" 2>/dev/null || true
59
+ rm -rf "$tmpdir"
60
+ echo "[ama-bench] Downloaded to $dir ($(wc -l < "$dir/open_end_qa_set.jsonl") episodes)"
61
+ }
62
+
63
+ download_longmemeval() {
64
+ local dir="$DATASETS_DIR/longmemeval"
65
+ if [[ -f "$dir/longmemeval_oracle.json" ]]; then
66
+ echo "[longmemeval] Already downloaded at $dir"
67
+ return
68
+ fi
69
+ echo "[longmemeval] Downloading from HuggingFace (xiaowu0162/longmemeval-cleaned)..."
70
+ mkdir -p "$dir"
71
+ curl -sL "https://huggingface.co/datasets/xiaowu0162/longmemeval-cleaned/resolve/main/longmemeval_oracle.json" \
72
+ -o "$dir/longmemeval_oracle.json"
73
+ if [[ ! -s "$dir/longmemeval_oracle.json" ]]; then
74
+ echo "[longmemeval] ERROR: Download failed. Try manually:"
75
+ echo " curl -sL https://huggingface.co/datasets/xiaowu0162/longmemeval-cleaned/resolve/main/longmemeval_oracle.json -o $dir/longmemeval_oracle.json"
76
+ rm -f "$dir/longmemeval_oracle.json"
77
+ return 1
78
+ fi
79
+ echo "[longmemeval] Downloaded to $dir ($(du -h "$dir/longmemeval_oracle.json" | cut -f1))"
80
+ }
81
+
82
+ download_amemgym() {
83
+ local dir="$DATASETS_DIR/amemgym"
84
+ if [[ -f "$dir/amemgym-v1-base.json" ]]; then
85
+ echo "[amemgym] Already downloaded at $dir"
86
+ return
87
+ fi
88
+ echo "[amemgym] Downloading from HuggingFace (AGI-Eval/AMemGym)..."
89
+ mkdir -p "$dir"
90
+ local tmpdir
91
+ tmpdir=$(mktemp -d)
92
+ git clone --depth 1 https://huggingface.co/datasets/AGI-Eval/AMemGym "$tmpdir/repo" 2>/dev/null || {
93
+ echo "[amemgym] ERROR: Could not clone. Try manually:"
94
+ echo " git clone --depth 1 https://huggingface.co/datasets/AGI-Eval/AMemGym /tmp/amemgym"
95
+ echo " cp /tmp/amemgym/v1.base/data.json $dir/amemgym-v1-base.json"
96
+ rm -rf "$tmpdir"
97
+ return 1
98
+ }
99
+ cp "$tmpdir/repo/v1.base/data.json" "$dir/amemgym-v1-base.json" 2>/dev/null || true
100
+ rm -rf "$tmpdir"
101
+ echo "[amemgym] Downloaded to $dir"
102
+ }
103
+
104
+ download_locomo() {
105
+ local dir="$DATASETS_DIR/locomo"
106
+ if [[ -f "$dir/locomo10.json" ]]; then
107
+ echo "[locomo] Already downloaded at $dir"
108
+ return
109
+ fi
110
+ echo "[locomo] Downloading from GitHub (snap-research/locomo)..."
111
+ mkdir -p "$dir"
112
+ local tmpdir
113
+ tmpdir=$(mktemp -d)
114
+ git clone --depth 1 https://github.com/snap-research/locomo.git "$tmpdir/repo" 2>/dev/null || {
115
+ echo "[locomo] ERROR: Could not clone. Try manually:"
116
+ echo " git clone --depth 1 https://github.com/snap-research/locomo.git /tmp/locomo"
117
+ echo " cp /tmp/locomo/data/locomo10.json $dir/"
118
+ rm -rf "$tmpdir"
119
+ return 1
120
+ }
121
+ cp "$tmpdir/repo/data/locomo10.json" "$dir/" 2>/dev/null || true
122
+ rm -rf "$tmpdir"
123
+ echo "[locomo] Downloaded to $dir ($(du -h "$dir/locomo10.json" | cut -f1))"
124
+ }
125
+
126
+ download_memory_arena() {
127
+ local dir="$DATASETS_DIR/memory-arena"
128
+ if [[ -d "$dir" ]] && ls "$dir"/*.jsonl &>/dev/null; then
129
+ echo "[memory-arena] Already downloaded at $dir"
130
+ return
131
+ fi
132
+ echo "[memory-arena] Downloading from HuggingFace (ZexueHe/memoryarena)..."
133
+ mkdir -p "$dir"
134
+ local tmpdir
135
+ tmpdir=$(mktemp -d)
136
+ git clone --depth 1 https://huggingface.co/datasets/ZexueHe/memoryarena "$tmpdir/repo" 2>/dev/null || {
137
+ echo "[memory-arena] ERROR: Could not clone. Try manually:"
138
+ echo " git clone --depth 1 https://huggingface.co/datasets/ZexueHe/memoryarena /tmp/memoryarena"
139
+ echo " for d in /tmp/memoryarena/*/; do cp \"\$d/data.jsonl\" \"$dir/\$(basename \$d).jsonl\"; done"
140
+ rm -rf "$tmpdir"
141
+ return 1
142
+ }
143
+ for d in "$tmpdir/repo"/*/; do
144
+ local name
145
+ name=$(basename "$d")
146
+ if [[ -f "$d/data.jsonl" ]]; then
147
+ cp "$d/data.jsonl" "$dir/${name}.jsonl"
148
+ fi
149
+ done
150
+ rm -rf "$tmpdir"
151
+ local count
152
+ count=$(ls "$dir"/*.jsonl 2>/dev/null | wc -l | tr -d ' ')
153
+ echo "[memory-arena] Downloaded to $dir ($count domains)"
154
+ }
155
+
156
+ # ── Main ──
157
+
158
+ check_deps
159
+ mkdir -p "$DATASETS_DIR"
160
+
161
+ case "$BENCHMARK" in
162
+ ama-bench) download_ama_bench ;;
163
+ longmemeval) download_longmemeval ;;
164
+ amemgym) download_amemgym ;;
165
+ locomo) download_locomo ;;
166
+ memory-arena) download_memory_arena ;;
167
+ all)
168
+ download_ama_bench
169
+ download_longmemeval
170
+ download_amemgym
171
+ download_locomo
172
+ download_memory_arena
173
+ ;;
174
+ *)
175
+ echo "Unknown benchmark: $BENCHMARK"
176
+ echo "Available: ama-bench, longmemeval, amemgym, locomo, memory-arena, all"
177
+ exit 1
178
+ ;;
179
+ esac
180
+
181
+ echo ""
182
+ echo "Done. Datasets at: $DATASETS_DIR"