@neat.is/core 0.3.2 → 0.3.4

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/dist/index.d.cts CHANGED
@@ -7,14 +7,41 @@ type NeatGraph = MultiDirectedGraph<GraphNode, GraphEdge>;
7
7
  declare function getGraph(project?: string): NeatGraph;
8
8
  declare function resetGraph(project?: string): void;
9
9
 
10
+ interface ExtractionError {
11
+ producer: string;
12
+ file: string;
13
+ error: string;
14
+ stack?: string;
15
+ ts: string;
16
+ source: 'extract';
17
+ }
18
+ interface DroppedExtractedEdge {
19
+ source: string;
20
+ target: string;
21
+ type: string;
22
+ confidence: number;
23
+ confidenceKind: string;
24
+ evidence: {
25
+ file: string;
26
+ line?: number;
27
+ snippet?: string;
28
+ };
29
+ }
30
+
10
31
  interface ExtractResult {
11
32
  nodesAdded: number;
12
33
  edgesAdded: number;
13
34
  frontiersPromoted: number;
35
+ extractionErrors: number;
36
+ errorEntries: ExtractionError[];
37
+ ghostsRetired: number;
38
+ extractedDropped: number;
39
+ droppedEntries: DroppedExtractedEdge[];
14
40
  }
15
41
  interface ExtractOptions {
16
42
  onPolicyTrigger?: (graph: NeatGraph) => Promise<void> | void;
17
43
  project?: string;
44
+ errorsPath?: string;
18
45
  }
19
46
  declare function extractFromDirectory(graph: NeatGraph, scanPath: string, opts?: ExtractOptions): Promise<ExtractResult>;
20
47
 
package/dist/index.d.ts CHANGED
@@ -7,14 +7,41 @@ type NeatGraph = MultiDirectedGraph<GraphNode, GraphEdge>;
7
7
  declare function getGraph(project?: string): NeatGraph;
8
8
  declare function resetGraph(project?: string): void;
9
9
 
10
+ interface ExtractionError {
11
+ producer: string;
12
+ file: string;
13
+ error: string;
14
+ stack?: string;
15
+ ts: string;
16
+ source: 'extract';
17
+ }
18
+ interface DroppedExtractedEdge {
19
+ source: string;
20
+ target: string;
21
+ type: string;
22
+ confidence: number;
23
+ confidenceKind: string;
24
+ evidence: {
25
+ file: string;
26
+ line?: number;
27
+ snippet?: string;
28
+ };
29
+ }
30
+
10
31
  interface ExtractResult {
11
32
  nodesAdded: number;
12
33
  edgesAdded: number;
13
34
  frontiersPromoted: number;
35
+ extractionErrors: number;
36
+ errorEntries: ExtractionError[];
37
+ ghostsRetired: number;
38
+ extractedDropped: number;
39
+ droppedEntries: DroppedExtractedEdge[];
14
40
  }
15
41
  interface ExtractOptions {
16
42
  onPolicyTrigger?: (graph: NeatGraph) => Promise<void> | void;
17
43
  project?: string;
44
+ errorsPath?: string;
18
45
  }
19
46
  declare function extractFromDirectory(graph: NeatGraph, scanPath: string, opts?: ExtractOptions): Promise<ExtractResult>;
20
47
 
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  routeSpanToProject,
3
3
  startDaemon
4
- } from "./chunk-66Z5IEFY.js";
4
+ } from "./chunk-T3A2GK3X.js";
5
5
  import {
6
6
  ProjectNameCollisionError,
7
7
  addProject,
@@ -37,7 +37,7 @@ import {
37
37
  thresholdForEdgeType,
38
38
  touchLastSeen,
39
39
  writeAtomically
40
- } from "./chunk-FIXKIYNF.js";
40
+ } from "./chunk-33ZZ2ZID.js";
41
41
  import {
42
42
  startOtelGrpcReceiver
43
43
  } from "./chunk-G3PDTGOW.js";