@merittdev/horus 0.14.0 → 0.14.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.
Files changed (2) hide show
  1. package/dist/index.cjs +17 -12
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -65880,7 +65880,7 @@ init_cjs_shims();
65880
65880
 
65881
65881
  // ../../packages/core/src/version.ts
65882
65882
  init_cjs_shims();
65883
- var HORUS_VERSION = true ? "0.14.0" : "dev";
65883
+ var HORUS_VERSION = true ? "0.14.1" : "dev";
65884
65884
  var PINNED_SOURCE_VERSION = "2.0.2";
65885
65885
 
65886
65886
  // ../../packages/core/src/evidence.ts
@@ -70856,6 +70856,9 @@ init_cjs_shims();
70856
70856
 
70857
70857
  // ../../packages/connectors/src/source/client.ts
70858
70858
  init_cjs_shims();
70859
+ function encodeNodePath(nodeId) {
70860
+ return encodeURI(nodeId).replace(/#/g, "%23").replace(/\?/g, "%3F");
70861
+ }
70859
70862
  var SourceHttpError = class extends Error {
70860
70863
  status;
70861
70864
  body;
@@ -70982,7 +70985,7 @@ var SourceHttpClient = class {
70982
70985
  impact(nodeId, depth = 3) {
70983
70986
  return this.request(
70984
70987
  "GET",
70985
- `/api/impact/${encodeURI(nodeId)}?depth=${depth}`
70988
+ `/api/impact/${encodeNodePath(nodeId)}?depth=${depth}`
70986
70989
  );
70987
70990
  }
70988
70991
  diff(base2, compare) {
@@ -71032,7 +71035,7 @@ var SourceHttpClient = class {
71032
71035
  }
71033
71036
  /** Process flows a symbol participates in, with each flow's named ordered steps. */
71034
71037
  flows(nodeId) {
71035
- return this.request("GET", `/api/flows/${encodeURI(nodeId)}`);
71038
+ return this.request("GET", `/api/flows/${encodeNodePath(nodeId)}`);
71036
71039
  }
71037
71040
  /** Method symbols of `className` defined in `file`, ordered by start line. */
71038
71041
  async classMethods(file, className) {
@@ -71044,7 +71047,7 @@ var SourceHttpClient = class {
71044
71047
  }
71045
71048
  /** Extended node detail — node + content + callers/callees/typeRefs + imports + coupling + communities. */
71046
71049
  node(nodeId) {
71047
- return this.request("GET", `/api/node/${encodeURI(nodeId)}`);
71050
+ return this.request("GET", `/api/node/${encodeNodePath(nodeId)}`);
71048
71051
  }
71049
71052
  /** Community clusters with their member nodes (source-graph extraction). */
71050
71053
  async communities() {
@@ -96501,8 +96504,8 @@ async function investigate(input, deps) {
96501
96504
  label = top.name === "constructor" ? `${(top.id.split(":").pop() ?? "").replace(/\.constructor$/, "") || top.name} (constructor)` : top.name;
96502
96505
  [ctx, impact, flows] = await Promise.all([
96503
96506
  code.context(top.id),
96504
- code.impact(top.id, 2),
96505
- code.flowsFor(top.id)
96507
+ code.impact(top.id, 2).catch(() => null),
96508
+ code.flowsFor(top.id).catch(() => [])
96506
96509
  ]);
96507
96510
  let edges = [];
96508
96511
  try {
@@ -96560,12 +96563,14 @@ async function investigate(input, deps) {
96560
96563
  );
96561
96564
  flowEvIds.push(ev.id);
96562
96565
  }
96563
- impactEv = mkEv(
96564
- "impact",
96565
- `Impact of ${top.name}: ${impact.affected} affected symbol(s)`,
96566
- { affected: impact.affected },
96567
- { symbolId: top.id, file: top.filePath }
96568
- );
96566
+ if (impact) {
96567
+ impactEv = mkEv(
96568
+ "impact",
96569
+ `Impact of ${top.name}: ${impact.affected} affected symbol(s)`,
96570
+ { affected: impact.affected },
96571
+ { symbolId: top.id, file: top.filePath }
96572
+ );
96573
+ }
96569
96574
  for (const edge of queueHits) {
96570
96575
  const producer = edge.producerSymbol ?? "unknown-producer";
96571
96576
  const worker = edge.workerSymbol ?? "unknown-worker";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merittdev/horus",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Local-first, source-aware production-incident investigation engine",
5
5
  "type": "module",
6
6
  "bin": {