@remnic/cli 9.52.1 → 9.52.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 +35 -9
  2. package/package.json +31 -31
package/dist/index.js CHANGED
@@ -2731,6 +2731,9 @@ var RUN_VALUE_FLAGS = Object.freeze([
2731
2731
  "--calibration-dir",
2732
2732
  "--calibration-local-config-sha256",
2733
2733
  "--calibration-frontier-config-sha256",
2734
+ "--source-result-id",
2735
+ "--expected-answer-set-sha256",
2736
+ "--expected-question-id-list-sha256",
2734
2737
  "--task-ids-file",
2735
2738
  "--expected-task-id-list-sha256",
2736
2739
  "--drain-timeout",
@@ -3852,6 +3855,25 @@ function parseBenchArgs(argv) {
3852
3855
  };
3853
3856
  }
3854
3857
 
3858
+ // src/bench-calibration-binding.ts
3859
+ function validateCalibrationProvenancePinSet(binding, hasBothConfigPins) {
3860
+ const pins = [binding.sourceResultId, binding.expectedAnswerSetSha256, binding.expectedQuestionIdListSha256];
3861
+ const hasAny = pins.some((pin) => pin !== void 0);
3862
+ if (hasAny && (!pins.every((pin) => pin !== void 0) || !hasBothConfigPins)) {
3863
+ throw new Error(
3864
+ "--source-result-id, --expected-answer-set-sha256, and --expected-question-id-list-sha256 must be supplied together with both calibration configuration pins."
3865
+ );
3866
+ }
3867
+ return hasAny;
3868
+ }
3869
+ function assertCalibrationProvenanceMatches(binding, state, benchmarkId) {
3870
+ if (binding.sourceResultId !== void 0 && (binding.sourceResultId !== state.sourceResultId || binding.expectedAnswerSetSha256 !== state.answerSetHash || binding.expectedQuestionIdListSha256 !== state.orderedQuestionIdsHash)) {
3871
+ throw new Error(
3872
+ `Calibration provenance mismatch for ${benchmarkId}; refusing to attach calibration state from an unpinned source.`
3873
+ );
3874
+ }
3875
+ }
3876
+
3855
3877
  // src/bench-status.ts
3856
3878
  import { mkdir, readFile, readdir as readdir2, rename, writeFile } from "fs/promises";
3857
3879
  import path8 from "path";
@@ -6586,11 +6608,12 @@ Options:
6586
6608
  Calibration-only timeout for each frontier judge call
6587
6609
  --max-429-wait <ms> Maximum cumulative 429 retry wait for provider calls
6588
6610
  --disable-thinking Disable thinking for supported provider-backed models
6589
- --source-result-id <id> Exact full stored result used by judge-calibrate
6611
+ --source-result-id <id> Exact stored result used by or expected for calibration
6590
6612
  --expected-answer-set-sha256 <sha256>
6591
- Expected deterministic calibration-slice payload hash
6613
+ Expected deterministic calibration answer-set hash
6592
6614
  --expected-question-id-list-sha256 <sha256>
6593
- Expected ordered source task-ID list hash
6615
+ Expected ordered source task-ID list hash; later runs may
6616
+ pass all three source pins with both config pins
6594
6617
  --calibration-dir <path> Private final-state and resumable-checkpoint directory
6595
6618
  --calibration-local-config-sha256 <sha256>
6596
6619
  Required on later runs that attach calibration state
@@ -7931,10 +7954,10 @@ async function calibrateBenchJudges(parsed, rawArgs) {
7931
7954
  result,
7932
7955
  calibrationDir,
7933
7956
  calibrationIdentities,
7934
- { sourceResultId: loaded.meta.id, localJudgeConfigHash, frontierJudgeConfigHash }
7957
+ { sourceResultId: loaded.meta.id, orderedQuestionIdsHash, localJudgeConfigHash, frontierJudgeConfigHash }
7935
7958
  );
7936
7959
  const persisted = await bench.loadJudgeCalibrationState(benchmarkId, calibrationDir);
7937
- if (!persisted || persisted.kappa !== result.kappa || persisted.warning !== result.warning || persisted.localJudgeConfigHash !== localJudgeConfigHash || persisted.frontierJudgeConfigHash !== frontierJudgeConfigHash) {
7960
+ if (!persisted || persisted.kappa !== result.kappa || persisted.warning !== result.warning || persisted.localJudgeConfigHash !== localJudgeConfigHash || persisted.orderedQuestionIdsHash !== orderedQuestionIdsHash || persisted.frontierJudgeConfigHash !== frontierJudgeConfigHash) {
7938
7961
  console.error(
7939
7962
  `ERROR: calibration state round-trip failed for ${benchmarkId} (wrote kappa ${result.kappa}, read back ${persisted ? persisted.kappa : "nothing"}). Re-run judge-calibrate.`
7940
7963
  );
@@ -8658,8 +8681,10 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8658
8681
  const hasFrontierPin = Boolean(calibrationBinding.calibrationFrontierConfigSha256);
8659
8682
  const hasAnyPin = hasLocalPin || hasFrontierPin;
8660
8683
  const hasBothPins = hasLocalPin && hasFrontierPin;
8684
+ const hasAnyProvenancePin = validateCalibrationProvenancePinSet(calibrationBinding, hasBothPins);
8685
+ const hasAnyBindingPin = hasAnyPin || hasAnyProvenancePin;
8661
8686
  if (benchmarkId === "ama-bench" && calibrationBinding.amaBenchJudgeProtocol === "recommended") {
8662
- if (hasAnyPin) {
8687
+ if (hasAnyBindingPin) {
8663
8688
  throw new Error(
8664
8689
  "AMA-Bench recommended-protocol runs cannot attach default-protocol judge calibration; remove both calibration pins or calibrate the recommended prompt contract separately."
8665
8690
  );
@@ -8676,7 +8701,7 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8676
8701
  );
8677
8702
  const state = await benchModule.loadJudgeCalibrationState?.(benchmarkId, calibrationDir);
8678
8703
  if (!state) {
8679
- if (hasAnyPin) {
8704
+ if (hasAnyBindingPin) {
8680
8705
  throw new Error(
8681
8706
  `Calibration binding pins were supplied for ${benchmarkId}, but no valid calibration state could be loaded from ${calibrationDir}; rerun judge-calibrate or remove both pins.`
8682
8707
  );
@@ -8686,7 +8711,7 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8686
8711
  if (state.localJudgeProvider !== void 0 && state.localJudgeModel !== void 0) {
8687
8712
  const matchesLocal = runJudgeProvider?.provider === state.localJudgeProvider && runJudgeProvider.model === state.localJudgeModel;
8688
8713
  if (!matchesLocal) {
8689
- if (hasBothPins) {
8714
+ if (hasAnyBindingPin) {
8690
8715
  throw new Error(
8691
8716
  `Calibration binding pins for ${benchmarkId} target the calibrated local judge ${state.localJudgeProvider}/${state.localJudgeModel}, but the run judge is ${runJudgeProvider?.provider ?? "unset"}/${runJudgeProvider?.model ?? "unset"}; refusing to ignore explicit pins.`
8692
8717
  );
@@ -8702,7 +8727,7 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8702
8727
  const resolvedRunJudgeConfigHash = hashCalibrationProviderConfig(runJudgeProvider);
8703
8728
  const hasCompleteLocalIdentity = state.localJudgeProvider !== void 0 && state.localJudgeModel !== void 0;
8704
8729
  if (!hasCompleteLocalIdentity && resolvedRunJudgeConfigHash !== state.localJudgeConfigHash) {
8705
- if (hasBothPins) {
8730
+ if (hasAnyBindingPin) {
8706
8731
  throw new Error(
8707
8732
  `Calibration binding pins for ${benchmarkId} do not match the resolved run judge configuration; refusing to ignore explicit pins.`
8708
8733
  );
@@ -8717,6 +8742,7 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8717
8742
  if (calibrationBinding.calibrationLocalConfigSha256 !== state.localJudgeConfigHash || calibrationBinding.calibrationFrontierConfigSha256 !== state.frontierJudgeConfigHash) {
8718
8743
  throw new Error(`Calibration configuration hash mismatch for ${benchmarkId}; refusing to attach stale kappa.`);
8719
8744
  }
8745
+ assertCalibrationProvenanceMatches(calibrationBinding, state, benchmarkId);
8720
8746
  if (resolvedRunJudgeConfigHash !== state.localJudgeConfigHash) {
8721
8747
  throw new Error(
8722
8748
  `Resolved run judge configuration hash mismatch for ${benchmarkId}; expected sha256:${state.localJudgeConfigHash}, got sha256:${resolvedRunJudgeConfigHash}. Refusing to attach stale kappa before benchmark dispatch.`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/cli",
3
- "version": "9.52.1",
3
+ "version": "9.52.2",
4
4
  "description": "CLI for Remnic memory — init, query, doctor, daemon management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,25 +26,25 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "yaml": "^2.4.2",
29
- "@remnic/plugin-pi": "^9.52.1",
30
- "@remnic/server": "^9.52.1",
31
- "@remnic/core": "^9.52.1"
29
+ "@remnic/server": "^9.52.2",
30
+ "@remnic/core": "^9.52.2",
31
+ "@remnic/plugin-pi": "^9.52.2"
32
32
  },
33
33
  "peerDependencies": {
34
- "@remnic/bench": "^9.52.1",
35
- "@remnic/plugin-openclaw": "^9.52.1",
36
- "@remnic/export-weclone": "^9.52.1",
37
- "@remnic/import-weclone": "^9.52.1",
38
- "@remnic/import-chatgpt": "^9.52.1",
39
- "@remnic/import-claude": "^9.52.1",
40
- "@remnic/import-gemini": "^9.52.1",
41
- "@remnic/import-lossless-claw": "^9.52.1",
42
- "@remnic/import-mem0": "^9.52.1",
43
- "@remnic/import-supermemory": "^9.52.1",
44
- "@remnic/connector-limitless": "^9.52.1",
45
- "@remnic/connector-bee": "^9.52.1",
46
- "@remnic/connector-omi": "^9.52.1",
47
- "@remnic/capture-audio": "^9.52.1"
34
+ "@remnic/bench": "^9.52.2",
35
+ "@remnic/plugin-openclaw": "^9.52.2",
36
+ "@remnic/export-weclone": "^9.52.2",
37
+ "@remnic/import-weclone": "^9.52.2",
38
+ "@remnic/import-chatgpt": "^9.52.2",
39
+ "@remnic/import-claude": "^9.52.2",
40
+ "@remnic/import-gemini": "^9.52.2",
41
+ "@remnic/import-lossless-claw": "^9.52.2",
42
+ "@remnic/import-mem0": "^9.52.2",
43
+ "@remnic/import-supermemory": "^9.52.2",
44
+ "@remnic/connector-limitless": "^9.52.2",
45
+ "@remnic/connector-bee": "^9.52.2",
46
+ "@remnic/connector-omi": "^9.52.2",
47
+ "@remnic/capture-audio": "^9.52.2"
48
48
  },
49
49
  "peerDependenciesMeta": {
50
50
  "@remnic/bench": {
@@ -93,19 +93,19 @@
93
93
  "devDependencies": {
94
94
  "tsup": "^8.5.1",
95
95
  "typescript": "^5.9.3",
96
- "@remnic/bench": "9.52.1",
97
- "@remnic/plugin-openclaw": "9.52.1",
98
- "@remnic/import-weclone": "9.52.1",
99
- "@remnic/import-chatgpt": "9.52.1",
100
- "@remnic/export-weclone": "9.52.1",
101
- "@remnic/import-gemini": "9.52.1",
102
- "@remnic/import-lossless-claw": "9.52.1",
103
- "@remnic/import-mem0": "9.52.1",
104
- "@remnic/import-supermemory": "9.52.1",
105
- "@remnic/import-claude": "9.52.1",
106
- "@remnic/connector-limitless": "9.52.1",
107
- "@remnic/connector-bee": "9.52.1",
108
- "@remnic/connector-omi": "9.52.1"
96
+ "@remnic/plugin-openclaw": "9.52.2",
97
+ "@remnic/bench": "9.52.2",
98
+ "@remnic/export-weclone": "9.52.2",
99
+ "@remnic/import-chatgpt": "9.52.2",
100
+ "@remnic/import-lossless-claw": "9.52.2",
101
+ "@remnic/import-claude": "9.52.2",
102
+ "@remnic/import-weclone": "9.52.2",
103
+ "@remnic/import-mem0": "9.52.2",
104
+ "@remnic/import-supermemory": "9.52.2",
105
+ "@remnic/import-gemini": "9.52.2",
106
+ "@remnic/connector-limitless": "9.52.2",
107
+ "@remnic/connector-omi": "9.52.2",
108
+ "@remnic/connector-bee": "9.52.2"
109
109
  },
110
110
  "license": "MIT",
111
111
  "repository": {