@polycode-projects/seonix 0.7.0 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polycode-projects/seonix",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "SEONIX — a deterministic, offline, $0 code-graph tool that makes a cheap coding agent edit like an expensive one. Indexes a repo with Python ast + git (zero model calls) and renders a bounded edit-digest.",
package/src/ask.mjs CHANGED
@@ -62,7 +62,9 @@ import { nlpAdapter } from "./ask-nlp.mjs";
62
62
  * classification, so they cannot drift in meaning). */
63
63
  function edgesOfKind(graph, kind) {
64
64
  const out = [];
65
- for (const g of graph.relations) if (relationKind(g) === kind) out.push(...g.edges);
65
+ // Append iteratively: `out.push(...g.edges)` spreads the group's edges as function arguments,
66
+ // overflowing the call stack on a large estate graph (mirrors the codegraph.mjs edgesOfKind fix).
67
+ for (const g of graph.relations) if (relationKind(g) === kind) for (const e of g.edges) out.push(e);
66
68
  return out;
67
69
  }
68
70
 
package/src/codegraph.mjs CHANGED
@@ -1180,7 +1180,10 @@ export function renderSearch(graph, query, { limit = SEARCH_LIMIT, kind = "", de
1180
1180
  * mechanical NL-query engine (PLAN_MECHANICAL_CHAT.md) to orchestrate rather than duplicate. */
1181
1181
  export function edgesOfKind(graph, kind) {
1182
1182
  const out = [];
1183
- for (const g of graph.relations) if (relationKind(g) === kind) out.push(...g.edges);
1183
+ // NB: append iteratively `out.push(...g.edges)` spreads the group's edges as function
1184
+ // arguments, which overflows the call stack on a large estate graph (e.g. `defines` with
1185
+ // 176k edges → "Maximum call stack size exceeded"). A plain loop has no argument-count limit.
1186
+ for (const g of graph.relations) if (relationKind(g) === kind) for (const e of g.edges) out.push(e);
1184
1187
  return out;
1185
1188
  }
1186
1189