@cerefox/memory 1.0.0-beta.4 → 1.0.0-rc.1

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.
@@ -7184,7 +7184,7 @@ var exports_meta = {};
7184
7184
  __export(exports_meta, {
7185
7185
  PKG_VERSION: () => PKG_VERSION
7186
7186
  });
7187
- var PKG_VERSION = "1.0.0-beta.4";
7187
+ var PKG_VERSION = "1.0.0-rc.1";
7188
7188
  var init_meta = () => {};
7189
7189
 
7190
7190
  // ../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js
@@ -25244,15 +25244,51 @@ var init_bundled_docs = __esm(() => {
25244
25244
 
25245
25245
  // ../../_shared/compatibility/index.ts
25246
25246
  function compareSemver(a, b2) {
25247
- const norm = (v) => v.split(/[.-]/).slice(0, 3).map((p) => Number.parseInt(p, 10)).map((n) => Number.isFinite(n) ? n : 0);
25248
- const pa = norm(a);
25249
- const pb = norm(b2);
25247
+ const split = (v) => {
25248
+ const [core, ...preParts] = v.split("-");
25249
+ return {
25250
+ core: core.split(".").slice(0, 3).map((p) => {
25251
+ const n = Number.parseInt(p, 10);
25252
+ return Number.isFinite(n) ? n : 0;
25253
+ }),
25254
+ pre: preParts.length ? preParts.join("-").split(".") : []
25255
+ };
25256
+ };
25257
+ const pa = split(a);
25258
+ const pb = split(b2);
25250
25259
  for (let i = 0;i < 3; i++) {
25251
- const x = pa[i] ?? 0;
25252
- const y = pb[i] ?? 0;
25260
+ const x = pa.core[i] ?? 0;
25261
+ const y = pb.core[i] ?? 0;
25253
25262
  if (x !== y)
25254
25263
  return x < y ? -1 : 1;
25255
25264
  }
25265
+ if (pa.pre.length === 0 && pb.pre.length === 0)
25266
+ return 0;
25267
+ if (pa.pre.length === 0)
25268
+ return 1;
25269
+ if (pb.pre.length === 0)
25270
+ return -1;
25271
+ const len = Math.max(pa.pre.length, pb.pre.length);
25272
+ for (let i = 0;i < len; i++) {
25273
+ const x = pa.pre[i];
25274
+ const y = pb.pre[i];
25275
+ if (x === undefined)
25276
+ return -1;
25277
+ if (y === undefined)
25278
+ return 1;
25279
+ const xn = /^\d+$/.test(x) ? Number.parseInt(x, 10) : null;
25280
+ const yn = /^\d+$/.test(y) ? Number.parseInt(y, 10) : null;
25281
+ if (xn !== null && yn !== null) {
25282
+ if (xn !== yn)
25283
+ return xn < yn ? -1 : 1;
25284
+ } else if (xn !== null) {
25285
+ return -1;
25286
+ } else if (yn !== null) {
25287
+ return 1;
25288
+ } else if (x !== y) {
25289
+ return x < y ? -1 : 1;
25290
+ }
25291
+ }
25256
25292
  return 0;
25257
25293
  }
25258
25294
  function classifyCompat(deployed, min, bundled) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerefox/memory",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-rc.1",
4
4
  "description": "Cerefox — user-owned shared memory for AI agents. The local TypeScript runtime: stdio MCP server in v0.4; CLI binary added in v0.5; in-process web server in v0.6; ingestion pipeline in v0.7.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/fstamatelopoulos/cerefox",