@remnic/cli 9.52.1 → 9.53.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.
Files changed (2) hide show
  1. package/dist/index.js +37 -9
  2. package/package.json +31 -31
package/dist/index.js CHANGED
@@ -1212,6 +1212,7 @@ async function computeConvergePlan(options = {}) {
1212
1212
  const manifest = await buildReconcileManifest({
1213
1213
  files,
1214
1214
  parseMemory: parseFrontmatter,
1215
+ citationTemplate: config.inlineSourceAttributionFormat,
1215
1216
  readFile: async (file) => {
1216
1217
  const readFile3 = io.readFile;
1217
1218
  if (!readFile3) {
@@ -1273,6 +1274,7 @@ async function computeConvergePlan(options = {}) {
1273
1274
  peerManifest = await buildReconcileManifest({
1274
1275
  files: peerFiles,
1275
1276
  parseMemory: parseFrontmatter,
1277
+ citationTemplate: config?.inlineSourceAttributionFormat,
1276
1278
  cachedFiles: localManifests.get(ns)?.files,
1277
1279
  readFile: async (file) => {
1278
1280
  let remote;
@@ -2731,6 +2733,9 @@ var RUN_VALUE_FLAGS = Object.freeze([
2731
2733
  "--calibration-dir",
2732
2734
  "--calibration-local-config-sha256",
2733
2735
  "--calibration-frontier-config-sha256",
2736
+ "--source-result-id",
2737
+ "--expected-answer-set-sha256",
2738
+ "--expected-question-id-list-sha256",
2734
2739
  "--task-ids-file",
2735
2740
  "--expected-task-id-list-sha256",
2736
2741
  "--drain-timeout",
@@ -3852,6 +3857,25 @@ function parseBenchArgs(argv) {
3852
3857
  };
3853
3858
  }
3854
3859
 
3860
+ // src/bench-calibration-binding.ts
3861
+ function validateCalibrationProvenancePinSet(binding, hasBothConfigPins) {
3862
+ const pins = [binding.sourceResultId, binding.expectedAnswerSetSha256, binding.expectedQuestionIdListSha256];
3863
+ const hasAny = pins.some((pin) => pin !== void 0);
3864
+ if (hasAny && (!pins.every((pin) => pin !== void 0) || !hasBothConfigPins)) {
3865
+ throw new Error(
3866
+ "--source-result-id, --expected-answer-set-sha256, and --expected-question-id-list-sha256 must be supplied together with both calibration configuration pins."
3867
+ );
3868
+ }
3869
+ return hasAny;
3870
+ }
3871
+ function assertCalibrationProvenanceMatches(binding, state, benchmarkId) {
3872
+ if (binding.sourceResultId !== void 0 && (binding.sourceResultId !== state.sourceResultId || binding.expectedAnswerSetSha256 !== state.answerSetHash || binding.expectedQuestionIdListSha256 !== state.orderedQuestionIdsHash)) {
3873
+ throw new Error(
3874
+ `Calibration provenance mismatch for ${benchmarkId}; refusing to attach calibration state from an unpinned source.`
3875
+ );
3876
+ }
3877
+ }
3878
+
3855
3879
  // src/bench-status.ts
3856
3880
  import { mkdir, readFile, readdir as readdir2, rename, writeFile } from "fs/promises";
3857
3881
  import path8 from "path";
@@ -6586,11 +6610,12 @@ Options:
6586
6610
  Calibration-only timeout for each frontier judge call
6587
6611
  --max-429-wait <ms> Maximum cumulative 429 retry wait for provider calls
6588
6612
  --disable-thinking Disable thinking for supported provider-backed models
6589
- --source-result-id <id> Exact full stored result used by judge-calibrate
6613
+ --source-result-id <id> Exact stored result used by or expected for calibration
6590
6614
  --expected-answer-set-sha256 <sha256>
6591
- Expected deterministic calibration-slice payload hash
6615
+ Expected deterministic calibration answer-set hash
6592
6616
  --expected-question-id-list-sha256 <sha256>
6593
- Expected ordered source task-ID list hash
6617
+ Expected ordered source task-ID list hash; later runs may
6618
+ pass all three source pins with both config pins
6594
6619
  --calibration-dir <path> Private final-state and resumable-checkpoint directory
6595
6620
  --calibration-local-config-sha256 <sha256>
6596
6621
  Required on later runs that attach calibration state
@@ -7931,10 +7956,10 @@ async function calibrateBenchJudges(parsed, rawArgs) {
7931
7956
  result,
7932
7957
  calibrationDir,
7933
7958
  calibrationIdentities,
7934
- { sourceResultId: loaded.meta.id, localJudgeConfigHash, frontierJudgeConfigHash }
7959
+ { sourceResultId: loaded.meta.id, orderedQuestionIdsHash, localJudgeConfigHash, frontierJudgeConfigHash }
7935
7960
  );
7936
7961
  const persisted = await bench.loadJudgeCalibrationState(benchmarkId, calibrationDir);
7937
- if (!persisted || persisted.kappa !== result.kappa || persisted.warning !== result.warning || persisted.localJudgeConfigHash !== localJudgeConfigHash || persisted.frontierJudgeConfigHash !== frontierJudgeConfigHash) {
7962
+ if (!persisted || persisted.kappa !== result.kappa || persisted.warning !== result.warning || persisted.localJudgeConfigHash !== localJudgeConfigHash || persisted.orderedQuestionIdsHash !== orderedQuestionIdsHash || persisted.frontierJudgeConfigHash !== frontierJudgeConfigHash) {
7938
7963
  console.error(
7939
7964
  `ERROR: calibration state round-trip failed for ${benchmarkId} (wrote kappa ${result.kappa}, read back ${persisted ? persisted.kappa : "nothing"}). Re-run judge-calibrate.`
7940
7965
  );
@@ -8658,8 +8683,10 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8658
8683
  const hasFrontierPin = Boolean(calibrationBinding.calibrationFrontierConfigSha256);
8659
8684
  const hasAnyPin = hasLocalPin || hasFrontierPin;
8660
8685
  const hasBothPins = hasLocalPin && hasFrontierPin;
8686
+ const hasAnyProvenancePin = validateCalibrationProvenancePinSet(calibrationBinding, hasBothPins);
8687
+ const hasAnyBindingPin = hasAnyPin || hasAnyProvenancePin;
8661
8688
  if (benchmarkId === "ama-bench" && calibrationBinding.amaBenchJudgeProtocol === "recommended") {
8662
- if (hasAnyPin) {
8689
+ if (hasAnyBindingPin) {
8663
8690
  throw new Error(
8664
8691
  "AMA-Bench recommended-protocol runs cannot attach default-protocol judge calibration; remove both calibration pins or calibrate the recommended prompt contract separately."
8665
8692
  );
@@ -8676,7 +8703,7 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8676
8703
  );
8677
8704
  const state = await benchModule.loadJudgeCalibrationState?.(benchmarkId, calibrationDir);
8678
8705
  if (!state) {
8679
- if (hasAnyPin) {
8706
+ if (hasAnyBindingPin) {
8680
8707
  throw new Error(
8681
8708
  `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
8709
  );
@@ -8686,7 +8713,7 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8686
8713
  if (state.localJudgeProvider !== void 0 && state.localJudgeModel !== void 0) {
8687
8714
  const matchesLocal = runJudgeProvider?.provider === state.localJudgeProvider && runJudgeProvider.model === state.localJudgeModel;
8688
8715
  if (!matchesLocal) {
8689
- if (hasBothPins) {
8716
+ if (hasAnyBindingPin) {
8690
8717
  throw new Error(
8691
8718
  `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
8719
  );
@@ -8702,7 +8729,7 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8702
8729
  const resolvedRunJudgeConfigHash = hashCalibrationProviderConfig(runJudgeProvider);
8703
8730
  const hasCompleteLocalIdentity = state.localJudgeProvider !== void 0 && state.localJudgeModel !== void 0;
8704
8731
  if (!hasCompleteLocalIdentity && resolvedRunJudgeConfigHash !== state.localJudgeConfigHash) {
8705
- if (hasBothPins) {
8732
+ if (hasAnyBindingPin) {
8706
8733
  throw new Error(
8707
8734
  `Calibration binding pins for ${benchmarkId} do not match the resolved run judge configuration; refusing to ignore explicit pins.`
8708
8735
  );
@@ -8717,6 +8744,7 @@ async function preparePersistedJudgeCalibrationAttachment(benchModule, benchmark
8717
8744
  if (calibrationBinding.calibrationLocalConfigSha256 !== state.localJudgeConfigHash || calibrationBinding.calibrationFrontierConfigSha256 !== state.frontierJudgeConfigHash) {
8718
8745
  throw new Error(`Calibration configuration hash mismatch for ${benchmarkId}; refusing to attach stale kappa.`);
8719
8746
  }
8747
+ assertCalibrationProvenanceMatches(calibrationBinding, state, benchmarkId);
8720
8748
  if (resolvedRunJudgeConfigHash !== state.localJudgeConfigHash) {
8721
8749
  throw new Error(
8722
8750
  `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.53.0",
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/plugin-pi": "^9.53.0",
30
+ "@remnic/server": "^9.53.0",
31
+ "@remnic/core": "^9.53.0"
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.53.0",
35
+ "@remnic/plugin-openclaw": "^9.53.0",
36
+ "@remnic/export-weclone": "^9.53.0",
37
+ "@remnic/import-weclone": "^9.53.0",
38
+ "@remnic/import-chatgpt": "^9.53.0",
39
+ "@remnic/import-claude": "^9.53.0",
40
+ "@remnic/import-gemini": "^9.53.0",
41
+ "@remnic/import-lossless-claw": "^9.53.0",
42
+ "@remnic/import-mem0": "^9.53.0",
43
+ "@remnic/import-supermemory": "^9.53.0",
44
+ "@remnic/connector-limitless": "^9.53.0",
45
+ "@remnic/connector-bee": "^9.53.0",
46
+ "@remnic/connector-omi": "^9.53.0",
47
+ "@remnic/capture-audio": "^9.53.0"
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.53.0",
97
+ "@remnic/bench": "9.53.0",
98
+ "@remnic/export-weclone": "9.53.0",
99
+ "@remnic/import-weclone": "9.53.0",
100
+ "@remnic/import-chatgpt": "9.53.0",
101
+ "@remnic/import-claude": "9.53.0",
102
+ "@remnic/import-lossless-claw": "9.53.0",
103
+ "@remnic/import-gemini": "9.53.0",
104
+ "@remnic/import-supermemory": "9.53.0",
105
+ "@remnic/import-mem0": "9.53.0",
106
+ "@remnic/connector-limitless": "9.53.0",
107
+ "@remnic/connector-bee": "9.53.0",
108
+ "@remnic/connector-omi": "9.53.0"
109
109
  },
110
110
  "license": "MIT",
111
111
  "repository": {