@harness-engineering/graph 0.11.2 → 0.11.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 +46 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.js +534 -420
- package/dist/index.mjs +534 -420
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -743,6 +743,17 @@ interface DriftDetector {
|
|
|
743
743
|
}
|
|
744
744
|
declare class StructuralDriftDetector implements DriftDetector {
|
|
745
745
|
detect(current: KnowledgeSnapshot, fresh: KnowledgeSnapshot): DriftResult;
|
|
746
|
+
/** 1. NEW: entries in fresh but not in current */
|
|
747
|
+
private findNew;
|
|
748
|
+
/** 2. STALE: entries in current but not in fresh */
|
|
749
|
+
private findStale;
|
|
750
|
+
/** 3. DRIFTED: entries in both but contentHash differs */
|
|
751
|
+
private findDrifted;
|
|
752
|
+
/** 4. CONTRADICTING: same entity name from different sources with different content */
|
|
753
|
+
private findContradicting;
|
|
754
|
+
private groupByName;
|
|
755
|
+
private contradictionForGroup;
|
|
756
|
+
private summarize;
|
|
746
757
|
}
|
|
747
758
|
|
|
748
759
|
/**
|
|
@@ -793,6 +804,20 @@ declare class KnowledgeStagingAggregator {
|
|
|
793
804
|
aggregate(extractorResults: readonly StagedEntry[], linkerResults: readonly StagedEntry[], diagramResults: readonly StagedEntry[]): Promise<AggregateResult>;
|
|
794
805
|
private extractDocName;
|
|
795
806
|
generateGapReport(knowledgeDir: string, store?: GraphStore): Promise<GapReport>;
|
|
807
|
+
/** Step 1-2: count `.md` entries per domain, capturing normalized names when a store is present. */
|
|
808
|
+
private collectDocumentedEntries;
|
|
809
|
+
/** Extract and normalize the documented title from each markdown file in a domain. */
|
|
810
|
+
private extractDocNames;
|
|
811
|
+
/** Step 3: backward-compatible report when no store is available. */
|
|
812
|
+
private buildEntryOnlyReport;
|
|
813
|
+
/** Step 4: query store for all business nodes, group by domain, deduplicate by name. */
|
|
814
|
+
private collectExtractedByDomain;
|
|
815
|
+
/** Keep the first occurrence of each normalized name, preserving order. */
|
|
816
|
+
private dedupeByName;
|
|
817
|
+
/** Step 5: build per-domain coverage with gap analysis and roll up totals. */
|
|
818
|
+
private buildDomainCoverage;
|
|
819
|
+
/** Collect extracted nodes that have no matching documented name. */
|
|
820
|
+
private computeGapEntries;
|
|
796
821
|
writeGapReport(report: GapReport): Promise<void>;
|
|
797
822
|
}
|
|
798
823
|
|
|
@@ -1747,10 +1772,20 @@ declare class TestDescriptionExtractor implements SignalExtractor {
|
|
|
1747
1772
|
readonly supportedExtensions: string[];
|
|
1748
1773
|
extract(content: string, filePath: string, language: Language): ExtractionRecord[];
|
|
1749
1774
|
private extractJsTs;
|
|
1775
|
+
private scanJsTsLine;
|
|
1776
|
+
private buildJsTsRecord;
|
|
1750
1777
|
private extractPython;
|
|
1778
|
+
private isPythonClassReset;
|
|
1779
|
+
private findPythonDocstring;
|
|
1780
|
+
private buildPythonRecord;
|
|
1751
1781
|
private extractGo;
|
|
1752
1782
|
private extractRust;
|
|
1783
|
+
private buildRustRecord;
|
|
1784
|
+
private findRustDocComment;
|
|
1753
1785
|
private extractJava;
|
|
1786
|
+
private buildJavaRecord;
|
|
1787
|
+
private findJavaDisplayNameBefore;
|
|
1788
|
+
private buildJavaRecordFromMethod;
|
|
1754
1789
|
}
|
|
1755
1790
|
|
|
1756
1791
|
/**
|
|
@@ -1763,9 +1798,20 @@ declare class EnumConstantExtractor implements SignalExtractor {
|
|
|
1763
1798
|
readonly supportedExtensions: string[];
|
|
1764
1799
|
extract(content: string, filePath: string, language: Language): ExtractionRecord[];
|
|
1765
1800
|
private extractTypeScript;
|
|
1801
|
+
private matchTsEnum;
|
|
1802
|
+
private matchTsAsConst;
|
|
1803
|
+
private matchTsUnion;
|
|
1766
1804
|
private extractJavaScript;
|
|
1805
|
+
private buildJsFreezeRecord;
|
|
1806
|
+
private matchJsConstObject;
|
|
1767
1807
|
private extractPython;
|
|
1808
|
+
private matchPythonEnum;
|
|
1809
|
+
private matchPythonLiteral;
|
|
1768
1810
|
private extractGo;
|
|
1811
|
+
private buildGoConstBlockRecord;
|
|
1812
|
+
private collectGoConsts;
|
|
1813
|
+
private parseGoConstLine;
|
|
1814
|
+
private resolveGoTypeName;
|
|
1769
1815
|
private extractRust;
|
|
1770
1816
|
private extractJava;
|
|
1771
1817
|
private collectEnumMembers;
|
package/dist/index.d.ts
CHANGED
|
@@ -743,6 +743,17 @@ interface DriftDetector {
|
|
|
743
743
|
}
|
|
744
744
|
declare class StructuralDriftDetector implements DriftDetector {
|
|
745
745
|
detect(current: KnowledgeSnapshot, fresh: KnowledgeSnapshot): DriftResult;
|
|
746
|
+
/** 1. NEW: entries in fresh but not in current */
|
|
747
|
+
private findNew;
|
|
748
|
+
/** 2. STALE: entries in current but not in fresh */
|
|
749
|
+
private findStale;
|
|
750
|
+
/** 3. DRIFTED: entries in both but contentHash differs */
|
|
751
|
+
private findDrifted;
|
|
752
|
+
/** 4. CONTRADICTING: same entity name from different sources with different content */
|
|
753
|
+
private findContradicting;
|
|
754
|
+
private groupByName;
|
|
755
|
+
private contradictionForGroup;
|
|
756
|
+
private summarize;
|
|
746
757
|
}
|
|
747
758
|
|
|
748
759
|
/**
|
|
@@ -793,6 +804,20 @@ declare class KnowledgeStagingAggregator {
|
|
|
793
804
|
aggregate(extractorResults: readonly StagedEntry[], linkerResults: readonly StagedEntry[], diagramResults: readonly StagedEntry[]): Promise<AggregateResult>;
|
|
794
805
|
private extractDocName;
|
|
795
806
|
generateGapReport(knowledgeDir: string, store?: GraphStore): Promise<GapReport>;
|
|
807
|
+
/** Step 1-2: count `.md` entries per domain, capturing normalized names when a store is present. */
|
|
808
|
+
private collectDocumentedEntries;
|
|
809
|
+
/** Extract and normalize the documented title from each markdown file in a domain. */
|
|
810
|
+
private extractDocNames;
|
|
811
|
+
/** Step 3: backward-compatible report when no store is available. */
|
|
812
|
+
private buildEntryOnlyReport;
|
|
813
|
+
/** Step 4: query store for all business nodes, group by domain, deduplicate by name. */
|
|
814
|
+
private collectExtractedByDomain;
|
|
815
|
+
/** Keep the first occurrence of each normalized name, preserving order. */
|
|
816
|
+
private dedupeByName;
|
|
817
|
+
/** Step 5: build per-domain coverage with gap analysis and roll up totals. */
|
|
818
|
+
private buildDomainCoverage;
|
|
819
|
+
/** Collect extracted nodes that have no matching documented name. */
|
|
820
|
+
private computeGapEntries;
|
|
796
821
|
writeGapReport(report: GapReport): Promise<void>;
|
|
797
822
|
}
|
|
798
823
|
|
|
@@ -1747,10 +1772,20 @@ declare class TestDescriptionExtractor implements SignalExtractor {
|
|
|
1747
1772
|
readonly supportedExtensions: string[];
|
|
1748
1773
|
extract(content: string, filePath: string, language: Language): ExtractionRecord[];
|
|
1749
1774
|
private extractJsTs;
|
|
1775
|
+
private scanJsTsLine;
|
|
1776
|
+
private buildJsTsRecord;
|
|
1750
1777
|
private extractPython;
|
|
1778
|
+
private isPythonClassReset;
|
|
1779
|
+
private findPythonDocstring;
|
|
1780
|
+
private buildPythonRecord;
|
|
1751
1781
|
private extractGo;
|
|
1752
1782
|
private extractRust;
|
|
1783
|
+
private buildRustRecord;
|
|
1784
|
+
private findRustDocComment;
|
|
1753
1785
|
private extractJava;
|
|
1786
|
+
private buildJavaRecord;
|
|
1787
|
+
private findJavaDisplayNameBefore;
|
|
1788
|
+
private buildJavaRecordFromMethod;
|
|
1754
1789
|
}
|
|
1755
1790
|
|
|
1756
1791
|
/**
|
|
@@ -1763,9 +1798,20 @@ declare class EnumConstantExtractor implements SignalExtractor {
|
|
|
1763
1798
|
readonly supportedExtensions: string[];
|
|
1764
1799
|
extract(content: string, filePath: string, language: Language): ExtractionRecord[];
|
|
1765
1800
|
private extractTypeScript;
|
|
1801
|
+
private matchTsEnum;
|
|
1802
|
+
private matchTsAsConst;
|
|
1803
|
+
private matchTsUnion;
|
|
1766
1804
|
private extractJavaScript;
|
|
1805
|
+
private buildJsFreezeRecord;
|
|
1806
|
+
private matchJsConstObject;
|
|
1767
1807
|
private extractPython;
|
|
1808
|
+
private matchPythonEnum;
|
|
1809
|
+
private matchPythonLiteral;
|
|
1768
1810
|
private extractGo;
|
|
1811
|
+
private buildGoConstBlockRecord;
|
|
1812
|
+
private collectGoConsts;
|
|
1813
|
+
private parseGoConstLine;
|
|
1814
|
+
private resolveGoTypeName;
|
|
1769
1815
|
private extractRust;
|
|
1770
1816
|
private extractJava;
|
|
1771
1817
|
private collectEnumMembers;
|