@gamaze/hicortex 0.11.0 → 0.11.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.
package/assets/viz.html CHANGED
@@ -509,7 +509,9 @@
509
509
  if (selType.value) qs.set("type", selType.value);
510
510
  if (parseFloat(rngStrength.value) > 0) qs.set("minStrength", rngStrength.value);
511
511
  var lim = parseInt(inpLimit.value, 10);
512
- if (lim > 0) qs.set("limit", String(Math.min(lim, 2000)));
512
+ // No client-side cap the server clamps to EXPORT_MAX_LIMIT and is the
513
+ // single authority (a hand-synced cap here is how the 2000 bug happened).
514
+ if (lim > 0) qs.set("limit", String(lim));
513
515
 
514
516
  var headers = {};
515
517
  if (token) headers["Authorization"] = "Bearer " + token;
@@ -822,7 +822,9 @@ async function startServer(options = {}) {
822
822
  return;
823
823
  }
824
824
  const rawLimit = req.query.limit ? Number(req.query.limit) : undefined;
825
- const resultLimit = rawLimit && Number.isFinite(rawLimit) ? rawLimit : 10;
825
+ // Floor + minimum 1: negative/fractional values would otherwise reach SQL
826
+ // LIMIT (negative = unlimited in SQLite; fractional = binding error).
827
+ const resultLimit = rawLimit && Number.isFinite(rawLimit) && rawLimit >= 1 ? Math.floor(rawLimit) : 10;
826
828
  const filterDomain = typeof req.query.domain === "string" && req.query.domain ? req.query.domain : undefined;
827
829
  const filterRelationship = typeof req.query.relationship === "string" && req.query.relationship ? req.query.relationship : undefined;
828
830
  try {
@@ -878,8 +880,9 @@ async function startServer(options = {}) {
878
880
  }
879
881
  minStrength = v;
880
882
  }
881
- // Export has its own default (500) — the shared resultLimit default of
882
- // 10 is for neighbors/hubs. exportGraph clamps to the hard max (2000).
883
+ // Export has its own default (EXPORT_DEFAULT_LIMIT) — the shared
884
+ // resultLimit default of 10 is for neighbors/hubs. exportGraph clamps
885
+ // to EXPORT_MAX_LIMIT.
883
886
  const exportLimit = rawLimit && Number.isFinite(rawLimit) ? rawLimit : graph_js_1.EXPORT_DEFAULT_LIMIT;
884
887
  res.json((0, graph_js_1.exportGraph)(db, {
885
888
  domain: filterDomain,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamaze/hicortex",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Self-learning memory for AI agents — experience captured automatically, distilled into lessons overnight, shared across your whole fleet. Works with Hermes, OpenClaw, Claude Code, and Pi.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {