@remnic/cli 9.69.88 → 9.69.90

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 +74 -15
  2. package/package.json +32 -32
package/dist/index.js CHANGED
@@ -10960,6 +10960,12 @@ Commands:
10960
10960
  report Legacy latency report generator (compatibility)
10961
10961
  procedural-ablation --out <path> [--fixture <path>]
10962
10962
  Run the procedural recall ablation harness (issue #567)
10963
+ ablate outcome-prior [--gates] [--phase <warm|pilot|main>]
10964
+ H1 outcome-prior scaffold (issue #1958). Lists frozen
10965
+ arms. --gates checks the committed CI snapshot and
10966
+ does not run an experiment. Warm, pilot, and main
10967
+ phases are refused. Any other flag or phase is
10968
+ rejected.
10963
10969
 
10964
10970
  Options:
10965
10971
  --quick Run a lightweight quick pass (maps to --lightweight --limit 1)
@@ -16214,31 +16220,66 @@ function chunkOfflineChangesetApplyBatches(changeset, namespace, maxRequestBytes
16214
16220
  if (!Number.isInteger(maxRequestBytes) || maxRequestBytes < 1) {
16215
16221
  throw new Error("offline sync apply max request bytes must be a positive integer");
16216
16222
  }
16217
- const chunks = [];
16218
- let current = [];
16219
- const requestBytesFor = (changes) => Buffer.byteLength(JSON.stringify({
16223
+ const items = [];
16224
+ const itemIndexByDir = /* @__PURE__ */ new Map();
16225
+ for (const change of changeset.changes) {
16226
+ const membership = embeddingGenerationMembership2(change.path);
16227
+ if (!membership) {
16228
+ items.push({ changes: [change], shardDir: null });
16229
+ continue;
16230
+ }
16231
+ const existing = itemIndexByDir.get(membership.shardDir);
16232
+ if (existing !== void 0) {
16233
+ items[existing].changes.push(change);
16234
+ continue;
16235
+ }
16236
+ itemIndexByDir.set(membership.shardDir, items.length);
16237
+ items.push({ changes: [change], shardDir: membership.shardDir });
16238
+ }
16239
+ const manifestFor = (dirs) => (changeset.embeddingGenerations ?? []).filter((generation) => dirs.has(generation.shardDir));
16240
+ const requestBytesFor = (changes, dirs) => Buffer.byteLength(JSON.stringify({
16220
16241
  namespace,
16221
16242
  changeset: {
16222
16243
  ...changeset,
16223
- changes
16244
+ changes,
16245
+ embeddingGenerations: manifestFor(dirs)
16224
16246
  }
16225
16247
  }), "utf-8");
16226
- for (const change of changeset.changes) {
16227
- const withChange = [...current, change];
16228
- if (current.length > 0 && requestBytesFor(withChange) > maxRequestBytes) {
16229
- chunks.push({ ...changeset, changes: current });
16230
- current = [];
16231
- }
16232
- const singleBytes = requestBytesFor([...current, change]);
16233
- if (singleBytes > maxRequestBytes) {
16248
+ const chunks = [];
16249
+ let current = [];
16250
+ const currentDirs = /* @__PURE__ */ new Set();
16251
+ const flush = () => {
16252
+ chunks.push({ ...changeset, changes: current, embeddingGenerations: manifestFor(currentDirs) });
16253
+ current = [];
16254
+ currentDirs.clear();
16255
+ };
16256
+ for (const item of items) {
16257
+ if (current.length > 0) {
16258
+ const nextDirs = /* @__PURE__ */ new Set([...currentDirs, ...item.shardDir ? [item.shardDir] : []]);
16259
+ if (requestBytesFor([...current, ...item.changes], nextDirs) > maxRequestBytes) {
16260
+ flush();
16261
+ }
16262
+ }
16263
+ const singleDirs = new Set(item.shardDir ? [item.shardDir] : []);
16264
+ if (requestBytesFor(item.changes, singleDirs) > maxRequestBytes) {
16265
+ if (item.shardDir) {
16266
+ const generationBytes = item.changes.reduce(
16267
+ (total, change) => total + (change.type === "upsert" ? change.file.bytes : 0),
16268
+ 0
16269
+ );
16270
+ throw new Error(
16271
+ `offline sync push aborted before any request: embedding generation ${item.shardDir} (${generationBytes} bytes of shards plus sync overhead) exceeds the apply request budget of ${maxRequestBytes} bytes and cannot be split without exposing a mixed generation. Oversized generations need the secure staged chunk transport (planned; chunks land in a private staging root and publish through the atomic generation swap), not final-path upload \u2014 retry after the index shrinks below the budget.`
16272
+ );
16273
+ }
16234
16274
  throw new Error(
16235
- `offline sync change for ${change.path} exceeds the apply request size budget; retry after direct-push threshold is lowered`
16275
+ `offline sync change for ${item.changes[0].path} exceeds the apply request size budget; retry after direct-push threshold is lowered`
16236
16276
  );
16237
16277
  }
16238
- current.push(change);
16278
+ current.push(...item.changes);
16279
+ if (item.shardDir) currentDirs.add(item.shardDir);
16239
16280
  }
16240
16281
  if (current.length > 0) {
16241
- chunks.push({ ...changeset, changes: current });
16282
+ flush();
16242
16283
  }
16243
16284
  return chunks;
16244
16285
  }
@@ -18078,6 +18119,20 @@ async function cmdLegacyBenchmark(action, rest, json) {
18078
18119
  process.exit(1);
18079
18120
  }
18080
18121
  }
18122
+ async function cmdBenchOutcomePrior(rest) {
18123
+ const benchModule = await loadBenchModule();
18124
+ const surface = benchModule;
18125
+ const runner = surface.runOutcomePriorGatesCli ?? surface.runOutcomePriorScaffoldCli;
18126
+ if (typeof runner !== "function") {
18127
+ console.error(
18128
+ "The installed @remnic/bench build does not expose runOutcomePriorScaffoldCli. Upgrade to a build that includes the H1 outcome-prior scaffold."
18129
+ );
18130
+ process.exit(1);
18131
+ }
18132
+ const result = await runner(rest);
18133
+ console.log(JSON.stringify(result));
18134
+ if (result.exitCode !== 0) process.exit(result.exitCode);
18135
+ }
18081
18136
  async function cmdBench(rest) {
18082
18137
  if (rest[0] === "coding") return cmdBenchCoding(rest.slice(1));
18083
18138
  if (rest[0] === "security") return cmdBenchSecurity(rest.slice(1));
@@ -18085,6 +18140,10 @@ async function cmdBench(rest) {
18085
18140
  await cmdBenchProceduralAblation(rest.slice(1));
18086
18141
  return;
18087
18142
  }
18143
+ if (rest[0] === "ablate" && rest[1] === "outcome-prior") {
18144
+ await cmdBenchOutcomePrior(rest.slice(2));
18145
+ return;
18146
+ }
18088
18147
  const benchAction = parseBenchActionArgs(rest);
18089
18148
  let parsed;
18090
18149
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/cli",
3
- "version": "9.69.88",
3
+ "version": "9.69.90",
4
4
  "description": "CLI for Remnic memory — init, query, doctor, daemon management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,26 +26,26 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "yaml": "^2.4.2",
29
- "@remnic/server": "^9.69.88",
30
- "@remnic/plugin-pi": "^9.69.88",
31
- "@remnic/core": "^9.69.88"
29
+ "@remnic/plugin-pi": "^9.69.90",
30
+ "@remnic/server": "^9.69.90",
31
+ "@remnic/core": "^9.69.90"
32
32
  },
33
33
  "peerDependencies": {
34
- "@remnic/bench": "^9.69.88",
35
- "@remnic/plugin-openclaw": "^9.69.88",
36
- "@remnic/export-weclone": "^9.69.88",
37
- "@remnic/import-weclone": "^9.69.88",
38
- "@remnic/import-chatgpt": "^9.69.88",
39
- "@remnic/import-claude": "^9.69.88",
40
- "@remnic/import-gemini": "^9.69.88",
41
- "@remnic/import-lossless-claw": "^9.69.88",
42
- "@remnic/import-mem0": "^9.69.88",
43
- "@remnic/import-supermemory": "^9.69.88",
44
- "@remnic/import-okf": "^9.69.88",
45
- "@remnic/connector-limitless": "^9.69.88",
46
- "@remnic/connector-bee": "^9.69.88",
47
- "@remnic/connector-omi": "^9.69.88",
48
- "@remnic/capture-audio": "^9.69.88"
34
+ "@remnic/bench": "^9.69.90",
35
+ "@remnic/plugin-openclaw": "^9.69.90",
36
+ "@remnic/export-weclone": "^9.69.90",
37
+ "@remnic/import-weclone": "^9.69.90",
38
+ "@remnic/import-chatgpt": "^9.69.90",
39
+ "@remnic/import-claude": "^9.69.90",
40
+ "@remnic/import-gemini": "^9.69.90",
41
+ "@remnic/import-lossless-claw": "^9.69.90",
42
+ "@remnic/import-mem0": "^9.69.90",
43
+ "@remnic/import-supermemory": "^9.69.90",
44
+ "@remnic/import-okf": "^9.69.90",
45
+ "@remnic/connector-limitless": "^9.69.90",
46
+ "@remnic/connector-bee": "^9.69.90",
47
+ "@remnic/connector-omi": "^9.69.90",
48
+ "@remnic/capture-audio": "^9.69.90"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "@remnic/bench": {
@@ -97,19 +97,19 @@
97
97
  "devDependencies": {
98
98
  "tsup": "^8.5.1",
99
99
  "typescript": "^5.9.3",
100
- "@remnic/bench": "9.69.88",
101
- "@remnic/plugin-openclaw": "9.69.88",
102
- "@remnic/export-weclone": "9.69.88",
103
- "@remnic/import-weclone": "9.69.88",
104
- "@remnic/import-gemini": "9.69.88",
105
- "@remnic/import-chatgpt": "9.69.88",
106
- "@remnic/import-lossless-claw": "9.69.88",
107
- "@remnic/import-mem0": "9.69.88",
108
- "@remnic/import-supermemory": "9.69.88",
109
- "@remnic/import-claude": "9.69.88",
110
- "@remnic/connector-bee": "9.69.88",
111
- "@remnic/connector-limitless": "9.69.88",
112
- "@remnic/connector-omi": "9.69.88"
100
+ "@remnic/plugin-openclaw": "9.69.90",
101
+ "@remnic/bench": "9.69.90",
102
+ "@remnic/export-weclone": "9.69.90",
103
+ "@remnic/import-chatgpt": "9.69.90",
104
+ "@remnic/import-weclone": "9.69.90",
105
+ "@remnic/import-claude": "9.69.90",
106
+ "@remnic/import-lossless-claw": "9.69.90",
107
+ "@remnic/import-gemini": "9.69.90",
108
+ "@remnic/import-mem0": "9.69.90",
109
+ "@remnic/import-supermemory": "9.69.90",
110
+ "@remnic/connector-limitless": "9.69.90",
111
+ "@remnic/connector-bee": "9.69.90",
112
+ "@remnic/connector-omi": "9.69.90"
113
113
  },
114
114
  "license": "MIT",
115
115
  "repository": {