@harness-engineering/graph 0.3.2 → 0.3.3

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.mts CHANGED
@@ -244,6 +244,9 @@ declare class ContextQL {
244
244
  private readonly store;
245
245
  constructor(store: GraphStore);
246
246
  execute(params: ContextQLParams): ContextQLResult;
247
+ private seedRootNodes;
248
+ private runBFS;
249
+ private gatherEdges;
247
250
  }
248
251
 
249
252
  declare function project(nodes: readonly GraphNode[], spec: ProjectionSpec | undefined): Partial<GraphNode>[];
@@ -270,8 +273,17 @@ declare class CodeIngestor {
270
273
  private readonly store;
271
274
  constructor(store: GraphStore);
272
275
  ingest(rootDir: string): Promise<IngestResult>;
276
+ private processFile;
277
+ private trackCallable;
273
278
  private findSourceFiles;
274
279
  private extractSymbols;
280
+ private tryExtractFunction;
281
+ private tryExtractClass;
282
+ private tryExtractInterface;
283
+ /** Update brace tracking; returns true when line is consumed (class ended or tracked). */
284
+ private updateClassContext;
285
+ private tryExtractMethod;
286
+ private tryExtractVariable;
275
287
  /**
276
288
  * Find the closing brace for a construct starting at the given line.
277
289
  * Uses a simple brace-counting heuristic. Returns 1-indexed line number.
@@ -385,6 +397,7 @@ declare class JiraConnector implements GraphConnector {
385
397
  private readonly httpClient;
386
398
  constructor(httpClient?: HttpClient);
387
399
  ingest(store: GraphStore, config: ConnectorConfig): Promise<IngestResult>;
400
+ private processIssue;
388
401
  }
389
402
 
390
403
  declare class SlackConnector implements GraphConnector {
@@ -393,6 +406,7 @@ declare class SlackConnector implements GraphConnector {
393
406
  private readonly httpClient;
394
407
  constructor(httpClient?: HttpClient);
395
408
  ingest(store: GraphStore, config: ConnectorConfig): Promise<IngestResult>;
409
+ private processChannel;
396
410
  }
397
411
 
398
412
  declare class ConfluenceConnector implements GraphConnector {
@@ -401,6 +415,8 @@ declare class ConfluenceConnector implements GraphConnector {
401
415
  private readonly httpClient;
402
416
  constructor(httpClient?: HttpClient);
403
417
  ingest(store: GraphStore, config: ConnectorConfig): Promise<IngestResult>;
418
+ private fetchAllPages;
419
+ private processPage;
404
420
  }
405
421
 
406
422
  declare class CIConnector implements GraphConnector {
@@ -479,6 +495,10 @@ declare class GraphEntropyAdapter {
479
495
  * 3. Unreachable = code nodes NOT in visited set
480
496
  */
481
497
  computeDeadCodeData(): GraphDeadCodeData;
498
+ private findEntryPoints;
499
+ private bfsFromEntryPoints;
500
+ private enqueueOutboundEdges;
501
+ private collectUnreachableNodes;
482
502
  /**
483
503
  * Count all nodes and edges by type.
484
504
  */
@@ -509,6 +529,13 @@ declare class GraphComplexityAdapter {
509
529
  * 5. Compute 95th percentile
510
530
  */
511
531
  computeComplexityHotspots(): GraphComplexityResult;
532
+ /**
533
+ * Walk the 'contains' edges to find the file node that contains a given function/method.
534
+ * For methods, walks through the intermediate class node.
535
+ */
536
+ private findContainingFileId;
537
+ private findParentFileOfClass;
538
+ private getChangeFrequency;
512
539
  private computePercentile;
513
540
  }
514
541
 
@@ -669,19 +696,6 @@ declare class IntentClassifier {
669
696
  private combineSignals;
670
697
  }
671
698
 
672
- /**
673
- * Pattern-based entity extractor.
674
- *
675
- * Extracts candidate entity mentions from natural language queries using
676
- * four strategies in priority order:
677
- * 1. Quoted strings
678
- * 2. PascalCase/camelCase tokens
679
- * 3. File paths
680
- * 4. Remaining significant nouns (after stop-word and intent-keyword removal)
681
- *
682
- * Returns deduplicated raw strings. These are NOT resolved to graph nodes --
683
- * that is the responsibility of EntityResolver (Phase 4).
684
- */
685
699
  declare class EntityExtractor {
686
700
  /**
687
701
  * Extract candidate entity mentions from a natural language query.
@@ -775,6 +789,8 @@ declare class Assembler {
775
789
  * Assemble context relevant to an intent string within a token budget.
776
790
  */
777
791
  assembleContext(intent: string, tokenBudget?: number): AssembledContext;
792
+ private expandSearchResults;
793
+ private truncateToFit;
778
794
  /**
779
795
  * Compute a token budget allocation across node types.
780
796
  */
package/dist/index.d.ts CHANGED
@@ -244,6 +244,9 @@ declare class ContextQL {
244
244
  private readonly store;
245
245
  constructor(store: GraphStore);
246
246
  execute(params: ContextQLParams): ContextQLResult;
247
+ private seedRootNodes;
248
+ private runBFS;
249
+ private gatherEdges;
247
250
  }
248
251
 
249
252
  declare function project(nodes: readonly GraphNode[], spec: ProjectionSpec | undefined): Partial<GraphNode>[];
@@ -270,8 +273,17 @@ declare class CodeIngestor {
270
273
  private readonly store;
271
274
  constructor(store: GraphStore);
272
275
  ingest(rootDir: string): Promise<IngestResult>;
276
+ private processFile;
277
+ private trackCallable;
273
278
  private findSourceFiles;
274
279
  private extractSymbols;
280
+ private tryExtractFunction;
281
+ private tryExtractClass;
282
+ private tryExtractInterface;
283
+ /** Update brace tracking; returns true when line is consumed (class ended or tracked). */
284
+ private updateClassContext;
285
+ private tryExtractMethod;
286
+ private tryExtractVariable;
275
287
  /**
276
288
  * Find the closing brace for a construct starting at the given line.
277
289
  * Uses a simple brace-counting heuristic. Returns 1-indexed line number.
@@ -385,6 +397,7 @@ declare class JiraConnector implements GraphConnector {
385
397
  private readonly httpClient;
386
398
  constructor(httpClient?: HttpClient);
387
399
  ingest(store: GraphStore, config: ConnectorConfig): Promise<IngestResult>;
400
+ private processIssue;
388
401
  }
389
402
 
390
403
  declare class SlackConnector implements GraphConnector {
@@ -393,6 +406,7 @@ declare class SlackConnector implements GraphConnector {
393
406
  private readonly httpClient;
394
407
  constructor(httpClient?: HttpClient);
395
408
  ingest(store: GraphStore, config: ConnectorConfig): Promise<IngestResult>;
409
+ private processChannel;
396
410
  }
397
411
 
398
412
  declare class ConfluenceConnector implements GraphConnector {
@@ -401,6 +415,8 @@ declare class ConfluenceConnector implements GraphConnector {
401
415
  private readonly httpClient;
402
416
  constructor(httpClient?: HttpClient);
403
417
  ingest(store: GraphStore, config: ConnectorConfig): Promise<IngestResult>;
418
+ private fetchAllPages;
419
+ private processPage;
404
420
  }
405
421
 
406
422
  declare class CIConnector implements GraphConnector {
@@ -479,6 +495,10 @@ declare class GraphEntropyAdapter {
479
495
  * 3. Unreachable = code nodes NOT in visited set
480
496
  */
481
497
  computeDeadCodeData(): GraphDeadCodeData;
498
+ private findEntryPoints;
499
+ private bfsFromEntryPoints;
500
+ private enqueueOutboundEdges;
501
+ private collectUnreachableNodes;
482
502
  /**
483
503
  * Count all nodes and edges by type.
484
504
  */
@@ -509,6 +529,13 @@ declare class GraphComplexityAdapter {
509
529
  * 5. Compute 95th percentile
510
530
  */
511
531
  computeComplexityHotspots(): GraphComplexityResult;
532
+ /**
533
+ * Walk the 'contains' edges to find the file node that contains a given function/method.
534
+ * For methods, walks through the intermediate class node.
535
+ */
536
+ private findContainingFileId;
537
+ private findParentFileOfClass;
538
+ private getChangeFrequency;
512
539
  private computePercentile;
513
540
  }
514
541
 
@@ -669,19 +696,6 @@ declare class IntentClassifier {
669
696
  private combineSignals;
670
697
  }
671
698
 
672
- /**
673
- * Pattern-based entity extractor.
674
- *
675
- * Extracts candidate entity mentions from natural language queries using
676
- * four strategies in priority order:
677
- * 1. Quoted strings
678
- * 2. PascalCase/camelCase tokens
679
- * 3. File paths
680
- * 4. Remaining significant nouns (after stop-word and intent-keyword removal)
681
- *
682
- * Returns deduplicated raw strings. These are NOT resolved to graph nodes --
683
- * that is the responsibility of EntityResolver (Phase 4).
684
- */
685
699
  declare class EntityExtractor {
686
700
  /**
687
701
  * Extract candidate entity mentions from a natural language query.
@@ -775,6 +789,8 @@ declare class Assembler {
775
789
  * Assemble context relevant to an intent string within a token budget.
776
790
  */
777
791
  assembleContext(intent: string, tokenBudget?: number): AssembledContext;
792
+ private expandSearchResults;
793
+ private truncateToFit;
778
794
  /**
779
795
  * Compute a token budget allocation across node types.
780
796
  */