@remnic/cli 9.7.0 → 9.7.2

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.
Files changed (2) hide show
  1. package/dist/index.js +147 -10
  2. package/package.json +28 -28
package/dist/index.js CHANGED
@@ -790,6 +790,8 @@ var BENCH_VALUE_FLAGS = Object.freeze([
790
790
  "--source-result-id",
791
791
  "--expected-answer-set-sha256",
792
792
  "--expected-question-id-list-sha256",
793
+ "--task-ids-file",
794
+ "--expected-task-id-list-sha256",
793
795
  "--drain-timeout",
794
796
  "--max-429-wait",
795
797
  "--ama-bench-judge-protocol",
@@ -873,6 +875,8 @@ var RUN_VALUE_FLAGS = Object.freeze([
873
875
  "--calibration-dir",
874
876
  "--calibration-local-config-sha256",
875
877
  "--calibration-frontier-config-sha256",
878
+ "--task-ids-file",
879
+ "--expected-task-id-list-sha256",
876
880
  "--drain-timeout",
877
881
  "--max-429-wait",
878
882
  "--ama-bench-judge-protocol",
@@ -1147,6 +1151,8 @@ function parseBenchArgs(argv) {
1147
1151
  const sourceResultId = readBenchOptionValue(args, "--source-result-id");
1148
1152
  const expectedAnswerSetSha256 = readBenchOptionValue(args, "--expected-answer-set-sha256");
1149
1153
  const expectedQuestionIdListSha256 = readBenchOptionValue(args, "--expected-question-id-list-sha256");
1154
+ const taskIdsFileRaw = readBenchOptionValue(args, "--task-ids-file");
1155
+ const expectedTaskIdListSha256 = readBenchOptionValue(args, "--expected-task-id-list-sha256");
1150
1156
  const drainTimeoutRaw = readBenchOptionValue(args, "--drain-timeout");
1151
1157
  const judgeCacheDirRaw = readBenchOptionValue(args, "--judge-cache-dir");
1152
1158
  const localLabManifestRaw = readBenchOptionValue(args, "--local-lab-manifest");
@@ -1335,6 +1341,7 @@ function parseBenchArgs(argv) {
1335
1341
  for (const [flag, digest] of [
1336
1342
  ["--expected-answer-set-sha256", expectedAnswerSetSha256],
1337
1343
  ["--expected-question-id-list-sha256", expectedQuestionIdListSha256],
1344
+ ["--expected-task-id-list-sha256", expectedTaskIdListSha256],
1338
1345
  ["--calibration-local-config-sha256", calibrationLocalConfigSha256],
1339
1346
  ["--calibration-frontier-config-sha256", calibrationFrontierConfigSha256]
1340
1347
  ]) {
@@ -1450,6 +1457,29 @@ function parseBenchArgs(argv) {
1450
1457
  if (publishedTrialLimit !== void 0 && !trialLimitTargetsSupportedBenchmark) {
1451
1458
  throw new Error("ERROR: --trial-limit is currently supported only for LoCoMo and MemoryAgentBench.");
1452
1459
  }
1460
+ const hasTaskIdsFile = taskIdsFileRaw !== void 0;
1461
+ const hasExpectedTaskIdListSha256 = expectedTaskIdListSha256 !== void 0;
1462
+ if (hasTaskIdsFile !== hasExpectedTaskIdListSha256) {
1463
+ throw new Error(
1464
+ "ERROR: --task-ids-file and --expected-task-id-list-sha256 must be supplied together."
1465
+ );
1466
+ }
1467
+ if (hasTaskIdsFile) {
1468
+ const targetsSingleLoCoMo = action === "published" ? publishedName === "locomo" && benchmarks.length === 0 : action === "run" && !args.includes("--all") && benchmarks.length === 1 && benchmarks[0] === "locomo";
1469
+ if (!targetsSingleLoCoMo) {
1470
+ throw new Error(
1471
+ "ERROR: --task-ids-file is supported only for a single LoCoMo run."
1472
+ );
1473
+ }
1474
+ if (args.includes("--quick")) {
1475
+ throw new Error("ERROR: --task-ids-file requires a full LoCoMo run; remove --quick.");
1476
+ }
1477
+ if (publishedLimit !== void 0 || publishedTrialLimit !== void 0) {
1478
+ throw new Error(
1479
+ "ERROR: --task-ids-file cannot be combined with --limit or --trial-limit."
1480
+ );
1481
+ }
1482
+ }
1453
1483
  let publishedTrialConcurrency;
1454
1484
  if (publishedTrialConcurrencyRaw !== void 0) {
1455
1485
  const parsed = Number(publishedTrialConcurrencyRaw);
@@ -1658,6 +1688,8 @@ function parseBenchArgs(argv) {
1658
1688
  sourceResultId,
1659
1689
  expectedAnswerSetSha256,
1660
1690
  expectedQuestionIdListSha256,
1691
+ taskIdsFile: taskIdsFileRaw ? path4.resolve(expandTilde(taskIdsFileRaw)) : void 0,
1692
+ expectedTaskIdListSha256,
1661
1693
  drainTimeout,
1662
1694
  // Issue #1573 PR1: surface judge-cache flags into the runner options.
1663
1695
  noJudgeCache: args.includes("--no-judge-cache"),
@@ -3601,6 +3633,9 @@ Options:
3601
3633
  Path to a local-lab manifest JSON file (required for --runtime-profile local-lab)
3602
3634
  --threshold <value> Regression threshold for compare (default: 0.05)
3603
3635
  --trial-limit <n> Cap scored LoCoMo or MemoryAgentBench QA trials for staged published runs
3636
+ --task-ids-file <path> Select an explicit JSON array of LoCoMo task IDs
3637
+ --expected-task-id-list-sha256 <sha256>
3638
+ Pin the selected LoCoMo task-ID list
3604
3639
  --task-filter <pattern> BEAM diagnostic filter; match task id, ability, or question text
3605
3640
  --detail Include per-task details for bench results
3606
3641
  --format <json|csv|html> Output format for bench export
@@ -3773,6 +3808,11 @@ async function resolveKnownBenchmarkIds() {
3773
3808
  return knownIds;
3774
3809
  }
3775
3810
  async function runBenchViaFallback(parsed, benchmarkId, runtimeProfile) {
3811
+ if (parsed.taskIdsFile) {
3812
+ throw new Error(
3813
+ "Fallback benchmark runner does not support hash-pinned LoCoMo task selection. Build/install @remnic/bench to use --task-ids-file."
3814
+ );
3815
+ }
3776
3816
  if (runtimeProfile === "real" && parsed.remnicConfigPath) {
3777
3817
  resolveExistingBenchRemnicConfigPath(parsed.remnicConfigPath);
3778
3818
  }
@@ -4270,9 +4310,11 @@ var __benchDatasetTestHooks = {
4270
4310
  isDatasetDownloaded,
4271
4311
  resolveBenchDatasetDir,
4272
4312
  resolveDownloadedBenchDatasetDir,
4273
- buildPublishedBenchmarkOptionsForTest(benchmarkId, args) {
4274
- return buildPublishedBenchmarkOptions(benchmarkId, args);
4313
+ buildPublishedBenchmarkOptionsForTest(benchmarkId, args, taskSelector) {
4314
+ return buildPublishedBenchmarkOptions(benchmarkId, args, taskSelector);
4275
4315
  },
4316
+ loadPinnedLoCoMoTaskSelectorForTest: loadPinnedLoCoMoTaskSelector,
4317
+ redactBenchTaskIdsFilePathForTest: redactBenchTaskIdsFilePath,
4276
4318
  validateRunnerManagedPublishedDryRunDatasetForTest,
4277
4319
  validateRunnerManagedPublishedDryRunDatasetWithModuleForTest(benchModule, benchmarkId, mode, datasetDir, limit, seed, benchmarkOptions) {
4278
4320
  return validateRunnerManagedPublishedDryRunDataset(
@@ -4285,6 +4327,17 @@ var __benchDatasetTestHooks = {
4285
4327
  benchmarkOptions
4286
4328
  );
4287
4329
  },
4330
+ validatePinnedLoCoMoPublishedDryRunSelectorWithModuleForTest(benchModule, mode, datasetDir, limit, seed, benchmarkOptions, taskSelector) {
4331
+ return validatePinnedLoCoMoPublishedDryRunSelector(
4332
+ benchModule,
4333
+ mode,
4334
+ datasetDir,
4335
+ limit,
4336
+ seed,
4337
+ benchmarkOptions,
4338
+ taskSelector
4339
+ );
4340
+ },
4288
4341
  printBenchStatusLineForTest: printBenchStatusLine
4289
4342
  };
4290
4343
  function printBenchPackageSummary(result, outputPath, outputLabel = "Results saved") {
@@ -4997,6 +5050,7 @@ async function runBenchPublished(parsed) {
4997
5050
  );
4998
5051
  process.exit(1);
4999
5052
  }
5053
+ const taskSelector = loadPinnedLoCoMoTaskSelector(parsed);
5000
5054
  if (parsed.publishedDryRun) {
5001
5055
  const loaded = await tryLoadBenchModule();
5002
5056
  if (!loaded) {
@@ -5012,7 +5066,8 @@ async function runBenchPublished(parsed) {
5012
5066
  const effectiveLimit = parsed.publishedLimit ?? (parsed.quick ? 1 : void 0);
5013
5067
  const benchmarkOptions = buildPublishedBenchmarkOptions(
5014
5068
  benchmarkId2,
5015
- parsed
5069
+ parsed,
5070
+ taskSelector
5016
5071
  );
5017
5072
  let itemCount;
5018
5073
  let loadResult;
@@ -5092,6 +5147,24 @@ async function runBenchPublished(parsed) {
5092
5147
  );
5093
5148
  process.exit(1);
5094
5149
  }
5150
+ if (benchmarkId2 === "locomo") {
5151
+ try {
5152
+ await validatePinnedLoCoMoPublishedDryRunSelector(
5153
+ benchModule,
5154
+ mode,
5155
+ parsed.datasetDir,
5156
+ effectiveLimit,
5157
+ parsed.publishedSeed,
5158
+ benchmarkOptions,
5159
+ taskSelector
5160
+ );
5161
+ } catch (error) {
5162
+ console.error(
5163
+ `ERROR: [dry-run] ${benchmarkId2}: ${error instanceof Error ? error.message : String(error)}`
5164
+ );
5165
+ process.exit(1);
5166
+ }
5167
+ }
5095
5168
  return;
5096
5169
  }
5097
5170
  const runtimeProfiles = resolveBenchRunProfiles(parsed);
@@ -5101,7 +5174,9 @@ async function runBenchPublished(parsed) {
5101
5174
  const result = await runBenchViaPackage(
5102
5175
  parsed,
5103
5176
  benchmarkId,
5104
- runtimeProfile
5177
+ runtimeProfile,
5178
+ void 0,
5179
+ taskSelector
5105
5180
  );
5106
5181
  if (!result.ok) {
5107
5182
  console.error(
@@ -5157,14 +5232,15 @@ function createDryRunDatasetValidationAdapter(benchmarkId) {
5157
5232
  }
5158
5233
  };
5159
5234
  }
5160
- function buildPublishedBenchmarkOptions(benchmarkId, args) {
5235
+ function buildPublishedBenchmarkOptions(benchmarkId, args, taskSelector) {
5161
5236
  const trialLimitOptions = args.publishedTrialLimit !== void 0 ? { trialLimit: args.publishedTrialLimit } : void 0;
5162
5237
  const trialConcurrencyOptions = args.publishedTrialConcurrency !== void 0 ? { trialConcurrency: args.publishedTrialConcurrency } : void 0;
5163
5238
  if (benchmarkId === "locomo") {
5164
5239
  return {
5165
5240
  ...trialLimitOptions ?? {},
5166
5241
  ...trialConcurrencyOptions ?? {},
5167
- replayExtractionMode: "skip"
5242
+ replayExtractionMode: "skip",
5243
+ ...taskSelector ? { taskSelector } : {}
5168
5244
  };
5169
5245
  }
5170
5246
  if (benchmarkId === "ama-bench") {
@@ -5181,6 +5257,47 @@ function buildPublishedBenchmarkOptions(benchmarkId, args) {
5181
5257
  }
5182
5258
  return void 0;
5183
5259
  }
5260
+ function loadPinnedLoCoMoTaskSelector(parsed) {
5261
+ if (!parsed.taskIdsFile) return void 0;
5262
+ if (!parsed.expectedTaskIdListSha256) {
5263
+ throw new Error(
5264
+ "--task-ids-file requires --expected-task-id-list-sha256."
5265
+ );
5266
+ }
5267
+ let decoded;
5268
+ try {
5269
+ decoded = JSON.parse(fs7.readFileSync(parsed.taskIdsFile, "utf8"));
5270
+ } catch (error) {
5271
+ throw new Error(
5272
+ `Unable to read --task-ids-file ${parsed.taskIdsFile}: ${error instanceof Error ? error.message : String(error)}`
5273
+ );
5274
+ }
5275
+ if (!Array.isArray(decoded) || decoded.length === 0) {
5276
+ throw new Error("--task-ids-file JSON must be a non-empty array of strings.");
5277
+ }
5278
+ if (decoded.some((taskId) => typeof taskId !== "string" || taskId.length === 0)) {
5279
+ throw new Error("--task-ids-file JSON must contain only non-empty strings.");
5280
+ }
5281
+ const taskIds = decoded;
5282
+ if (new Set(taskIds).size !== taskIds.length) {
5283
+ throw new Error("--task-ids-file must not contain duplicate task IDs.");
5284
+ }
5285
+ return {
5286
+ kind: "explicit-task-ids",
5287
+ taskIds,
5288
+ expectedSelectedTaskIdsSha256: parsed.expectedTaskIdListSha256
5289
+ };
5290
+ }
5291
+ function redactBenchTaskIdsFilePath(argv) {
5292
+ const redacted = [...argv];
5293
+ for (let index = 0; index < redacted.length; index += 1) {
5294
+ if (redacted[index] === "--task-ids-file" && index + 1 < redacted.length) {
5295
+ redacted[index + 1] = "<task-ids-file>";
5296
+ index += 1;
5297
+ }
5298
+ }
5299
+ return redacted;
5300
+ }
5184
5301
  async function validateRunnerManagedPublishedDryRunDataset(benchModule, benchmarkId, mode, datasetDir, limit, seed, benchmarkOptions) {
5185
5302
  if (!benchModule.runBenchmark) {
5186
5303
  throw new Error(
@@ -5212,6 +5329,20 @@ async function validateRunnerManagedPublishedDryRunDataset(benchModule, benchmar
5212
5329
  throw error;
5213
5330
  }
5214
5331
  }
5332
+ async function validatePinnedLoCoMoPublishedDryRunSelector(benchModule, mode, datasetDir, limit, seed, benchmarkOptions, taskSelector) {
5333
+ if (taskSelector === void 0) {
5334
+ return;
5335
+ }
5336
+ await validateRunnerManagedPublishedDryRunDataset(
5337
+ benchModule,
5338
+ "locomo",
5339
+ mode,
5340
+ datasetDir,
5341
+ limit,
5342
+ seed,
5343
+ benchmarkOptions
5344
+ );
5345
+ }
5215
5346
  async function validateRunnerManagedPublishedDryRunDatasetForTest(benchmarkId, mode, datasetDir, limit, benchmarkOptions) {
5216
5347
  const benchModule = await tryLoadBenchModule();
5217
5348
  if (!benchModule) {
@@ -5300,7 +5431,7 @@ async function preflightLocalLabEndpointsIfNeeded(benchModule, plan) {
5300
5431
  );
5301
5432
  }
5302
5433
  }
5303
- async function runBenchViaPackage(parsed, benchmarkId, runtimeProfile, benchStatusPath) {
5434
+ async function runBenchViaPackage(parsed, benchmarkId, runtimeProfile, benchStatusPath, taskSelector) {
5304
5435
  const loaded = await tryLoadBenchModule();
5305
5436
  if (!loaded) return { ok: false };
5306
5437
  assertBenchModuleFreshForDevelopment();
@@ -5350,7 +5481,11 @@ async function runBenchViaPackage(parsed, benchmarkId, runtimeProfile, benchStat
5350
5481
  }
5351
5482
  const effectiveLimit = parsed.publishedLimit ?? (parsed.quick ? 1 : void 0);
5352
5483
  const effectiveSeed = parsed.publishedSeed;
5353
- let benchmarkOptions = buildPublishedBenchmarkOptions(benchmarkId, parsed);
5484
+ let benchmarkOptions = buildPublishedBenchmarkOptions(
5485
+ benchmarkId,
5486
+ parsed,
5487
+ taskSelector
5488
+ );
5354
5489
  try {
5355
5490
  const amaBenchProtocol = buildAmaBenchProtocolOptions(
5356
5491
  benchModule,
@@ -5802,7 +5937,7 @@ async function writeBenchReproManifestForPackageRun(args) {
5802
5937
  datasetDirs: resolveBenchReproDatasetDirs(args.parsed, args.benchmarkIds),
5803
5938
  command: {
5804
5939
  cwd: process.cwd(),
5805
- argv: process.argv.slice(2),
5940
+ argv: redactBenchTaskIdsFilePath(process.argv.slice(2)),
5806
5941
  env: process.env,
5807
5942
  envKeys: resolveBenchReproEnvKeys()
5808
5943
  },
@@ -10897,6 +11032,7 @@ async function cmdBench(rest) {
10897
11032
  );
10898
11033
  process.exit(1);
10899
11034
  }
11035
+ const taskSelector = loadPinnedLoCoMoTaskSelector(parsed);
10900
11036
  const runtimeProfiles = resolveBenchRunProfiles(parsed);
10901
11037
  let selectedWorkItems = createBenchWorkItems(selectedBenchmarks, runtimeProfiles);
10902
11038
  const knownBenchmarkIds = await resolveKnownBenchmarkIds();
@@ -10981,7 +11117,8 @@ async function cmdBench(rest) {
10981
11117
  parsed,
10982
11118
  benchmarkId,
10983
11119
  runtimeProfile,
10984
- benchStatusPath
11120
+ benchStatusPath,
11121
+ taskSelector
10985
11122
  );
10986
11123
  if (handledByPackage.ok) {
10987
11124
  if (handledByPackage.writtenPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/cli",
3
- "version": "9.7.0",
3
+ "version": "9.7.2",
4
4
  "description": "CLI for Remnic memory — init, query, doctor, daemon management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,23 +26,23 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "yaml": "^2.4.2",
29
- "@remnic/plugin-pi": "^9.7.0",
30
- "@remnic/core": "^9.7.0",
31
- "@remnic/server": "^9.7.0"
29
+ "@remnic/plugin-pi": "^9.7.2",
30
+ "@remnic/server": "^9.7.2",
31
+ "@remnic/core": "^9.7.2"
32
32
  },
33
33
  "peerDependencies": {
34
- "@remnic/bench": "^9.7.0",
35
- "@remnic/export-weclone": "^9.7.0",
36
- "@remnic/import-weclone": "^9.7.0",
37
- "@remnic/import-chatgpt": "^9.7.0",
38
- "@remnic/import-claude": "^9.7.0",
39
- "@remnic/import-gemini": "^9.7.0",
40
- "@remnic/import-lossless-claw": "^9.7.0",
41
- "@remnic/import-mem0": "^9.7.0",
42
- "@remnic/import-supermemory": "^9.7.0",
43
- "@remnic/connector-limitless": "^9.7.0",
44
- "@remnic/connector-bee": "^9.7.0",
45
- "@remnic/connector-omi": "^9.7.0"
34
+ "@remnic/bench": "^9.7.2",
35
+ "@remnic/export-weclone": "^9.7.2",
36
+ "@remnic/import-weclone": "^9.7.2",
37
+ "@remnic/import-chatgpt": "^9.7.2",
38
+ "@remnic/import-claude": "^9.7.2",
39
+ "@remnic/import-gemini": "^9.7.2",
40
+ "@remnic/import-lossless-claw": "^9.7.2",
41
+ "@remnic/import-mem0": "^9.7.2",
42
+ "@remnic/import-supermemory": "^9.7.2",
43
+ "@remnic/connector-limitless": "^9.7.2",
44
+ "@remnic/connector-bee": "^9.7.2",
45
+ "@remnic/connector-omi": "^9.7.2"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "@remnic/bench": {
@@ -85,18 +85,18 @@
85
85
  "devDependencies": {
86
86
  "tsup": "^8.5.1",
87
87
  "typescript": "^5.9.3",
88
- "@remnic/export-weclone": "9.7.0",
89
- "@remnic/bench": "9.7.0",
90
- "@remnic/import-weclone": "9.7.0",
91
- "@remnic/import-chatgpt": "9.7.0",
92
- "@remnic/import-claude": "9.7.0",
93
- "@remnic/import-gemini": "9.7.0",
94
- "@remnic/import-lossless-claw": "9.7.0",
95
- "@remnic/import-mem0": "9.7.0",
96
- "@remnic/import-supermemory": "9.7.0",
97
- "@remnic/connector-bee": "9.7.0",
98
- "@remnic/connector-limitless": "9.7.0",
99
- "@remnic/connector-omi": "9.7.0"
88
+ "@remnic/bench": "9.7.2",
89
+ "@remnic/export-weclone": "9.7.2",
90
+ "@remnic/import-weclone": "9.7.2",
91
+ "@remnic/import-chatgpt": "9.7.2",
92
+ "@remnic/import-gemini": "9.7.2",
93
+ "@remnic/import-lossless-claw": "9.7.2",
94
+ "@remnic/import-mem0": "9.7.2",
95
+ "@remnic/connector-limitless": "9.7.2",
96
+ "@remnic/import-claude": "9.7.2",
97
+ "@remnic/import-supermemory": "9.7.2",
98
+ "@remnic/connector-bee": "9.7.2",
99
+ "@remnic/connector-omi": "9.7.2"
100
100
  },
101
101
  "license": "MIT",
102
102
  "repository": {