@harness-engineering/graph 0.9.0 → 0.10.0
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 +48 -2
- package/dist/index.d.ts +48 -2
- package/dist/index.js +81 -1
- package/dist/index.mjs +81 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1778,6 +1778,28 @@ interface DesignViolation {
|
|
|
1778
1778
|
suggestion?: string;
|
|
1779
1779
|
}
|
|
1780
1780
|
type DesignStrictness = 'strict' | 'standard' | 'permissive';
|
|
1781
|
+
/**
|
|
1782
|
+
* Generic finding shape accepted by `recordFindings()` — covers ANAT-*
|
|
1783
|
+
* (audit-component-anatomy, design-pipeline #2) and CRAFT-*
|
|
1784
|
+
* (harness-design-craft, design-pipeline #6) namespaces. Skills convert
|
|
1785
|
+
* their internal finding types into this shape before recording.
|
|
1786
|
+
*/
|
|
1787
|
+
interface CraftFindingRecord {
|
|
1788
|
+
/** Finding code, e.g. "ANAT-D023", "CRAFT-C001", "CRAFT-P001" */
|
|
1789
|
+
code: string;
|
|
1790
|
+
/** Project-relative file path (becomes the `file` node id) */
|
|
1791
|
+
file: string;
|
|
1792
|
+
/** Line number, if known */
|
|
1793
|
+
line?: number;
|
|
1794
|
+
/** Human-readable message */
|
|
1795
|
+
message: string;
|
|
1796
|
+
/** Severity at emission time */
|
|
1797
|
+
severity: 'error' | 'warn' | 'info';
|
|
1798
|
+
/** Optional evidence snippet */
|
|
1799
|
+
evidence?: string;
|
|
1800
|
+
/** Optional run identifier so #4 verifier can detect fixpoint across runs */
|
|
1801
|
+
runId?: string;
|
|
1802
|
+
}
|
|
1781
1803
|
declare class DesignConstraintAdapter {
|
|
1782
1804
|
private readonly store;
|
|
1783
1805
|
constructor(store: GraphStore);
|
|
@@ -1785,6 +1807,30 @@ declare class DesignConstraintAdapter {
|
|
|
1785
1807
|
checkForHardcodedFonts(source: string, file: string, strictness?: DesignStrictness): DesignViolation[];
|
|
1786
1808
|
checkAll(source: string, file: string, strictness?: DesignStrictness): DesignViolation[];
|
|
1787
1809
|
private mapSeverity;
|
|
1810
|
+
/**
|
|
1811
|
+
* Record externally-computed craft findings (audit-component-anatomy,
|
|
1812
|
+
* harness-design-craft, etc.) as graph state. Idempotent — re-running on
|
|
1813
|
+
* the same findings produces no duplicate nodes or edges thanks to
|
|
1814
|
+
* GraphStore's keyed merge semantics.
|
|
1815
|
+
*
|
|
1816
|
+
* Each finding becomes:
|
|
1817
|
+
* • a `design_constraint` node keyed by finding code (created lazily
|
|
1818
|
+
* if absent; metadata merged on re-record so the most recent message
|
|
1819
|
+
* / severity wins)
|
|
1820
|
+
* • a `violates_design` edge from the source file (id = file path) to
|
|
1821
|
+
* the constraint node, with per-finding metadata (line, severity,
|
|
1822
|
+
* message, evidence, runId)
|
|
1823
|
+
*
|
|
1824
|
+
* The file node is NOT created here — it's assumed to already exist in
|
|
1825
|
+
* the graph from a prior ingest. If it does not, the edge will still be
|
|
1826
|
+
* created (graph stores edges by key, not by referential integrity) and
|
|
1827
|
+
* a subsequent ingest will populate the file node.
|
|
1828
|
+
*/
|
|
1829
|
+
recordFindings(findings: readonly CraftFindingRecord[]): {
|
|
1830
|
+
constraintsAdded: number;
|
|
1831
|
+
edgesAdded: number;
|
|
1832
|
+
};
|
|
1833
|
+
private labelForCode;
|
|
1788
1834
|
}
|
|
1789
1835
|
|
|
1790
1836
|
interface GraphImpactData {
|
|
@@ -1981,6 +2027,6 @@ declare class CascadeSimulator {
|
|
|
1981
2027
|
private buildResult;
|
|
1982
2028
|
}
|
|
1983
2029
|
|
|
1984
|
-
declare const VERSION = "0.
|
|
2030
|
+
declare const VERSION = "0.9.0";
|
|
1985
2031
|
|
|
1986
|
-
export { ALL_EXTRACTORS, type AggregateResult, type AnomalyDetectionOptions, type AnomalyReport, ApiPathExtractor, type ArticulationPoint, type AskGraphResult, type AssembledContext, Assembler, BusinessKnowledgeIngestor, CIConnector, CURRENT_SCHEMA_VERSION, type PackedEnvelope as CacheableEnvelope, type CascadeLayer, type CascadeNode, type CascadeResult, type CascadeSimulationOptions, CascadeSimulator, type ClassificationResult, CodeIngestor, type CodeIngestorOptions, CompositeProbabilityStrategy, type ConflictDetail, type ConflictPrediction, ConflictPredictor, type ConflictSeverity, type ConflictType, ConfluenceConnector, type ConnectorConfig, ContextQL, type ContextQLParams, type ContextQLResult, type Contradiction, ContradictionDetector, type ContradictionEntry, type ContradictionResult, type CoverageReport, CoverageScorer, D2Parser, DEFAULT_BLOCKLIST, DEFAULT_PATTERNS, DEFAULT_SKIP_DIRS, DecisionIngestor, DesignConstraintAdapter, DesignIngestor, type DesignStrictness, type DesignViolation, type DetectedElement, type DiagramEntity, type DiagramFormatParser, type DiagramParseResult, DiagramParser, type DiagramRelationship, type DomainCoverage, type DomainCoverageScore, type DomainInferenceOptions, type DriftClassification, type DriftDetector, type DriftFinding, type DriftResult, EDGE_TYPES, type EdgeQuery, type EdgeType, EntityExtractor, EntityResolver, EnumConstantExtractor, type ExtractionCounts, type ExtractionRecord, ExtractionRunner, FigmaConnector, FusionLayer, type FusionResult, type GapEntry, type GapReport, GitIngestor, type GitRunner, GraphAnomalyAdapter, type GraphBudget, GraphComplexityAdapter, type GraphComplexityHotspot, type GraphComplexityResult, type GraphConnector, GraphConstraintAdapter, GraphCouplingAdapter, type GraphCouplingFileData, type GraphCouplingResult, type GraphCoverageReport, type GraphDeadCodeData, type GraphDependencyData, type GraphDriftData, type GraphEdge, GraphEdgeSchema, GraphEntropyAdapter, GraphFeedbackAdapter, type GraphFilterResult, type GraphHarnessCheckData, type GraphImpactData, type GraphLayerViolation, type GraphMetadata, type GraphNode, GraphNodeSchema, type GraphSnapshotSummary, type GraphStabilityTier, GraphStore, type HttpClient, INTENTS, ImageAnalysisExtractor, type ImageAnalysisExtractorOptions, type AnalysisProvider as ImageAnalysisProvider, type ImageAnalysisResult, type ImpactGroups, type IndependenceCheckParams, type IndependenceResult, type IngestResult, type Intent, IntentClassifier, JiraConnector, KnowledgeDocMaterializer, KnowledgeIngestor, type KnowledgePipelineOptions, type KnowledgePipelineResult, KnowledgePipelineRunner, type KnowledgeSnapshot, type KnowledgeSnapshotEntry, KnowledgeStagingAggregator, type Language, type LinkResult, type LoadGraphResult, type LoadMetadataResult, type MaterializeOptions, type MaterializeResult, type MaterializedDoc, MermaidParser, MiroConnector, NODE_STABILITY, NODE_TYPES, type NodeCategory, type NodeQuery, type NodeType, OBSERVABILITY_TYPES, type OverlapDetail, PackedSummaryCache, type PairResult, PlantUmlParser, type ProbabilityStrategy, type ProjectionSpec, type RequirementCoverage, RequirementIngestor, type ResolvedEntity, ResponseFormatter, type SignalExtractor, type SkippedEntry, SlackConnector, type SourceLocation, type StagedEntry, type StatisticalOutlier, StructuralDriftDetector, SyncManager, type SyncMetadata, type TaskDefinition, TaskIndependenceAnalyzer, TestDescriptionExtractor, TopologicalLinker, type TraceabilityOptions, type TraceabilityResult, type TracedFile, VERSION, ValidationRuleExtractor, type VectorSearchResult, VectorStore, askGraph, classifyNodeCategory, createExtractionRunner, detectLanguage, groupNodesByImpact, inferDomain, linkToCode, loadGraph, loadGraphMetadata, normalizeIntent, project, queryTraceability, resolveSkipDirs, saveGraph, skipDirGlobs };
|
|
2032
|
+
export { ALL_EXTRACTORS, type AggregateResult, type AnomalyDetectionOptions, type AnomalyReport, ApiPathExtractor, type ArticulationPoint, type AskGraphResult, type AssembledContext, Assembler, BusinessKnowledgeIngestor, CIConnector, CURRENT_SCHEMA_VERSION, type PackedEnvelope as CacheableEnvelope, type CascadeLayer, type CascadeNode, type CascadeResult, type CascadeSimulationOptions, CascadeSimulator, type ClassificationResult, CodeIngestor, type CodeIngestorOptions, CompositeProbabilityStrategy, type ConflictDetail, type ConflictPrediction, ConflictPredictor, type ConflictSeverity, type ConflictType, ConfluenceConnector, type ConnectorConfig, ContextQL, type ContextQLParams, type ContextQLResult, type Contradiction, ContradictionDetector, type ContradictionEntry, type ContradictionResult, type CoverageReport, CoverageScorer, type CraftFindingRecord, D2Parser, DEFAULT_BLOCKLIST, DEFAULT_PATTERNS, DEFAULT_SKIP_DIRS, DecisionIngestor, DesignConstraintAdapter, DesignIngestor, type DesignStrictness, type DesignViolation, type DetectedElement, type DiagramEntity, type DiagramFormatParser, type DiagramParseResult, DiagramParser, type DiagramRelationship, type DomainCoverage, type DomainCoverageScore, type DomainInferenceOptions, type DriftClassification, type DriftDetector, type DriftFinding, type DriftResult, EDGE_TYPES, type EdgeQuery, type EdgeType, EntityExtractor, EntityResolver, EnumConstantExtractor, type ExtractionCounts, type ExtractionRecord, ExtractionRunner, FigmaConnector, FusionLayer, type FusionResult, type GapEntry, type GapReport, GitIngestor, type GitRunner, GraphAnomalyAdapter, type GraphBudget, GraphComplexityAdapter, type GraphComplexityHotspot, type GraphComplexityResult, type GraphConnector, GraphConstraintAdapter, GraphCouplingAdapter, type GraphCouplingFileData, type GraphCouplingResult, type GraphCoverageReport, type GraphDeadCodeData, type GraphDependencyData, type GraphDriftData, type GraphEdge, GraphEdgeSchema, GraphEntropyAdapter, GraphFeedbackAdapter, type GraphFilterResult, type GraphHarnessCheckData, type GraphImpactData, type GraphLayerViolation, type GraphMetadata, type GraphNode, GraphNodeSchema, type GraphSnapshotSummary, type GraphStabilityTier, GraphStore, type HttpClient, INTENTS, ImageAnalysisExtractor, type ImageAnalysisExtractorOptions, type AnalysisProvider as ImageAnalysisProvider, type ImageAnalysisResult, type ImpactGroups, type IndependenceCheckParams, type IndependenceResult, type IngestResult, type Intent, IntentClassifier, JiraConnector, KnowledgeDocMaterializer, KnowledgeIngestor, type KnowledgePipelineOptions, type KnowledgePipelineResult, KnowledgePipelineRunner, type KnowledgeSnapshot, type KnowledgeSnapshotEntry, KnowledgeStagingAggregator, type Language, type LinkResult, type LoadGraphResult, type LoadMetadataResult, type MaterializeOptions, type MaterializeResult, type MaterializedDoc, MermaidParser, MiroConnector, NODE_STABILITY, NODE_TYPES, type NodeCategory, type NodeQuery, type NodeType, OBSERVABILITY_TYPES, type OverlapDetail, PackedSummaryCache, type PairResult, PlantUmlParser, type ProbabilityStrategy, type ProjectionSpec, type RequirementCoverage, RequirementIngestor, type ResolvedEntity, ResponseFormatter, type SignalExtractor, type SkippedEntry, SlackConnector, type SourceLocation, type StagedEntry, type StatisticalOutlier, StructuralDriftDetector, SyncManager, type SyncMetadata, type TaskDefinition, TaskIndependenceAnalyzer, TestDescriptionExtractor, TopologicalLinker, type TraceabilityOptions, type TraceabilityResult, type TracedFile, VERSION, ValidationRuleExtractor, type VectorSearchResult, VectorStore, askGraph, classifyNodeCategory, createExtractionRunner, detectLanguage, groupNodesByImpact, inferDomain, linkToCode, loadGraph, loadGraphMetadata, normalizeIntent, project, queryTraceability, resolveSkipDirs, saveGraph, skipDirGlobs };
|
package/dist/index.d.ts
CHANGED
|
@@ -1778,6 +1778,28 @@ interface DesignViolation {
|
|
|
1778
1778
|
suggestion?: string;
|
|
1779
1779
|
}
|
|
1780
1780
|
type DesignStrictness = 'strict' | 'standard' | 'permissive';
|
|
1781
|
+
/**
|
|
1782
|
+
* Generic finding shape accepted by `recordFindings()` — covers ANAT-*
|
|
1783
|
+
* (audit-component-anatomy, design-pipeline #2) and CRAFT-*
|
|
1784
|
+
* (harness-design-craft, design-pipeline #6) namespaces. Skills convert
|
|
1785
|
+
* their internal finding types into this shape before recording.
|
|
1786
|
+
*/
|
|
1787
|
+
interface CraftFindingRecord {
|
|
1788
|
+
/** Finding code, e.g. "ANAT-D023", "CRAFT-C001", "CRAFT-P001" */
|
|
1789
|
+
code: string;
|
|
1790
|
+
/** Project-relative file path (becomes the `file` node id) */
|
|
1791
|
+
file: string;
|
|
1792
|
+
/** Line number, if known */
|
|
1793
|
+
line?: number;
|
|
1794
|
+
/** Human-readable message */
|
|
1795
|
+
message: string;
|
|
1796
|
+
/** Severity at emission time */
|
|
1797
|
+
severity: 'error' | 'warn' | 'info';
|
|
1798
|
+
/** Optional evidence snippet */
|
|
1799
|
+
evidence?: string;
|
|
1800
|
+
/** Optional run identifier so #4 verifier can detect fixpoint across runs */
|
|
1801
|
+
runId?: string;
|
|
1802
|
+
}
|
|
1781
1803
|
declare class DesignConstraintAdapter {
|
|
1782
1804
|
private readonly store;
|
|
1783
1805
|
constructor(store: GraphStore);
|
|
@@ -1785,6 +1807,30 @@ declare class DesignConstraintAdapter {
|
|
|
1785
1807
|
checkForHardcodedFonts(source: string, file: string, strictness?: DesignStrictness): DesignViolation[];
|
|
1786
1808
|
checkAll(source: string, file: string, strictness?: DesignStrictness): DesignViolation[];
|
|
1787
1809
|
private mapSeverity;
|
|
1810
|
+
/**
|
|
1811
|
+
* Record externally-computed craft findings (audit-component-anatomy,
|
|
1812
|
+
* harness-design-craft, etc.) as graph state. Idempotent — re-running on
|
|
1813
|
+
* the same findings produces no duplicate nodes or edges thanks to
|
|
1814
|
+
* GraphStore's keyed merge semantics.
|
|
1815
|
+
*
|
|
1816
|
+
* Each finding becomes:
|
|
1817
|
+
* • a `design_constraint` node keyed by finding code (created lazily
|
|
1818
|
+
* if absent; metadata merged on re-record so the most recent message
|
|
1819
|
+
* / severity wins)
|
|
1820
|
+
* • a `violates_design` edge from the source file (id = file path) to
|
|
1821
|
+
* the constraint node, with per-finding metadata (line, severity,
|
|
1822
|
+
* message, evidence, runId)
|
|
1823
|
+
*
|
|
1824
|
+
* The file node is NOT created here — it's assumed to already exist in
|
|
1825
|
+
* the graph from a prior ingest. If it does not, the edge will still be
|
|
1826
|
+
* created (graph stores edges by key, not by referential integrity) and
|
|
1827
|
+
* a subsequent ingest will populate the file node.
|
|
1828
|
+
*/
|
|
1829
|
+
recordFindings(findings: readonly CraftFindingRecord[]): {
|
|
1830
|
+
constraintsAdded: number;
|
|
1831
|
+
edgesAdded: number;
|
|
1832
|
+
};
|
|
1833
|
+
private labelForCode;
|
|
1788
1834
|
}
|
|
1789
1835
|
|
|
1790
1836
|
interface GraphImpactData {
|
|
@@ -1981,6 +2027,6 @@ declare class CascadeSimulator {
|
|
|
1981
2027
|
private buildResult;
|
|
1982
2028
|
}
|
|
1983
2029
|
|
|
1984
|
-
declare const VERSION = "0.
|
|
2030
|
+
declare const VERSION = "0.9.0";
|
|
1985
2031
|
|
|
1986
|
-
export { ALL_EXTRACTORS, type AggregateResult, type AnomalyDetectionOptions, type AnomalyReport, ApiPathExtractor, type ArticulationPoint, type AskGraphResult, type AssembledContext, Assembler, BusinessKnowledgeIngestor, CIConnector, CURRENT_SCHEMA_VERSION, type PackedEnvelope as CacheableEnvelope, type CascadeLayer, type CascadeNode, type CascadeResult, type CascadeSimulationOptions, CascadeSimulator, type ClassificationResult, CodeIngestor, type CodeIngestorOptions, CompositeProbabilityStrategy, type ConflictDetail, type ConflictPrediction, ConflictPredictor, type ConflictSeverity, type ConflictType, ConfluenceConnector, type ConnectorConfig, ContextQL, type ContextQLParams, type ContextQLResult, type Contradiction, ContradictionDetector, type ContradictionEntry, type ContradictionResult, type CoverageReport, CoverageScorer, D2Parser, DEFAULT_BLOCKLIST, DEFAULT_PATTERNS, DEFAULT_SKIP_DIRS, DecisionIngestor, DesignConstraintAdapter, DesignIngestor, type DesignStrictness, type DesignViolation, type DetectedElement, type DiagramEntity, type DiagramFormatParser, type DiagramParseResult, DiagramParser, type DiagramRelationship, type DomainCoverage, type DomainCoverageScore, type DomainInferenceOptions, type DriftClassification, type DriftDetector, type DriftFinding, type DriftResult, EDGE_TYPES, type EdgeQuery, type EdgeType, EntityExtractor, EntityResolver, EnumConstantExtractor, type ExtractionCounts, type ExtractionRecord, ExtractionRunner, FigmaConnector, FusionLayer, type FusionResult, type GapEntry, type GapReport, GitIngestor, type GitRunner, GraphAnomalyAdapter, type GraphBudget, GraphComplexityAdapter, type GraphComplexityHotspot, type GraphComplexityResult, type GraphConnector, GraphConstraintAdapter, GraphCouplingAdapter, type GraphCouplingFileData, type GraphCouplingResult, type GraphCoverageReport, type GraphDeadCodeData, type GraphDependencyData, type GraphDriftData, type GraphEdge, GraphEdgeSchema, GraphEntropyAdapter, GraphFeedbackAdapter, type GraphFilterResult, type GraphHarnessCheckData, type GraphImpactData, type GraphLayerViolation, type GraphMetadata, type GraphNode, GraphNodeSchema, type GraphSnapshotSummary, type GraphStabilityTier, GraphStore, type HttpClient, INTENTS, ImageAnalysisExtractor, type ImageAnalysisExtractorOptions, type AnalysisProvider as ImageAnalysisProvider, type ImageAnalysisResult, type ImpactGroups, type IndependenceCheckParams, type IndependenceResult, type IngestResult, type Intent, IntentClassifier, JiraConnector, KnowledgeDocMaterializer, KnowledgeIngestor, type KnowledgePipelineOptions, type KnowledgePipelineResult, KnowledgePipelineRunner, type KnowledgeSnapshot, type KnowledgeSnapshotEntry, KnowledgeStagingAggregator, type Language, type LinkResult, type LoadGraphResult, type LoadMetadataResult, type MaterializeOptions, type MaterializeResult, type MaterializedDoc, MermaidParser, MiroConnector, NODE_STABILITY, NODE_TYPES, type NodeCategory, type NodeQuery, type NodeType, OBSERVABILITY_TYPES, type OverlapDetail, PackedSummaryCache, type PairResult, PlantUmlParser, type ProbabilityStrategy, type ProjectionSpec, type RequirementCoverage, RequirementIngestor, type ResolvedEntity, ResponseFormatter, type SignalExtractor, type SkippedEntry, SlackConnector, type SourceLocation, type StagedEntry, type StatisticalOutlier, StructuralDriftDetector, SyncManager, type SyncMetadata, type TaskDefinition, TaskIndependenceAnalyzer, TestDescriptionExtractor, TopologicalLinker, type TraceabilityOptions, type TraceabilityResult, type TracedFile, VERSION, ValidationRuleExtractor, type VectorSearchResult, VectorStore, askGraph, classifyNodeCategory, createExtractionRunner, detectLanguage, groupNodesByImpact, inferDomain, linkToCode, loadGraph, loadGraphMetadata, normalizeIntent, project, queryTraceability, resolveSkipDirs, saveGraph, skipDirGlobs };
|
|
2032
|
+
export { ALL_EXTRACTORS, type AggregateResult, type AnomalyDetectionOptions, type AnomalyReport, ApiPathExtractor, type ArticulationPoint, type AskGraphResult, type AssembledContext, Assembler, BusinessKnowledgeIngestor, CIConnector, CURRENT_SCHEMA_VERSION, type PackedEnvelope as CacheableEnvelope, type CascadeLayer, type CascadeNode, type CascadeResult, type CascadeSimulationOptions, CascadeSimulator, type ClassificationResult, CodeIngestor, type CodeIngestorOptions, CompositeProbabilityStrategy, type ConflictDetail, type ConflictPrediction, ConflictPredictor, type ConflictSeverity, type ConflictType, ConfluenceConnector, type ConnectorConfig, ContextQL, type ContextQLParams, type ContextQLResult, type Contradiction, ContradictionDetector, type ContradictionEntry, type ContradictionResult, type CoverageReport, CoverageScorer, type CraftFindingRecord, D2Parser, DEFAULT_BLOCKLIST, DEFAULT_PATTERNS, DEFAULT_SKIP_DIRS, DecisionIngestor, DesignConstraintAdapter, DesignIngestor, type DesignStrictness, type DesignViolation, type DetectedElement, type DiagramEntity, type DiagramFormatParser, type DiagramParseResult, DiagramParser, type DiagramRelationship, type DomainCoverage, type DomainCoverageScore, type DomainInferenceOptions, type DriftClassification, type DriftDetector, type DriftFinding, type DriftResult, EDGE_TYPES, type EdgeQuery, type EdgeType, EntityExtractor, EntityResolver, EnumConstantExtractor, type ExtractionCounts, type ExtractionRecord, ExtractionRunner, FigmaConnector, FusionLayer, type FusionResult, type GapEntry, type GapReport, GitIngestor, type GitRunner, GraphAnomalyAdapter, type GraphBudget, GraphComplexityAdapter, type GraphComplexityHotspot, type GraphComplexityResult, type GraphConnector, GraphConstraintAdapter, GraphCouplingAdapter, type GraphCouplingFileData, type GraphCouplingResult, type GraphCoverageReport, type GraphDeadCodeData, type GraphDependencyData, type GraphDriftData, type GraphEdge, GraphEdgeSchema, GraphEntropyAdapter, GraphFeedbackAdapter, type GraphFilterResult, type GraphHarnessCheckData, type GraphImpactData, type GraphLayerViolation, type GraphMetadata, type GraphNode, GraphNodeSchema, type GraphSnapshotSummary, type GraphStabilityTier, GraphStore, type HttpClient, INTENTS, ImageAnalysisExtractor, type ImageAnalysisExtractorOptions, type AnalysisProvider as ImageAnalysisProvider, type ImageAnalysisResult, type ImpactGroups, type IndependenceCheckParams, type IndependenceResult, type IngestResult, type Intent, IntentClassifier, JiraConnector, KnowledgeDocMaterializer, KnowledgeIngestor, type KnowledgePipelineOptions, type KnowledgePipelineResult, KnowledgePipelineRunner, type KnowledgeSnapshot, type KnowledgeSnapshotEntry, KnowledgeStagingAggregator, type Language, type LinkResult, type LoadGraphResult, type LoadMetadataResult, type MaterializeOptions, type MaterializeResult, type MaterializedDoc, MermaidParser, MiroConnector, NODE_STABILITY, NODE_TYPES, type NodeCategory, type NodeQuery, type NodeType, OBSERVABILITY_TYPES, type OverlapDetail, PackedSummaryCache, type PairResult, PlantUmlParser, type ProbabilityStrategy, type ProjectionSpec, type RequirementCoverage, RequirementIngestor, type ResolvedEntity, ResponseFormatter, type SignalExtractor, type SkippedEntry, SlackConnector, type SourceLocation, type StagedEntry, type StatisticalOutlier, StructuralDriftDetector, SyncManager, type SyncMetadata, type TaskDefinition, TaskIndependenceAnalyzer, TestDescriptionExtractor, TopologicalLinker, type TraceabilityOptions, type TraceabilityResult, type TracedFile, VERSION, ValidationRuleExtractor, type VectorSearchResult, VectorStore, askGraph, classifyNodeCategory, createExtractionRunner, detectLanguage, groupNodesByImpact, inferDomain, linkToCode, loadGraph, loadGraphMetadata, normalizeIntent, project, queryTraceability, resolveSkipDirs, saveGraph, skipDirGlobs };
|
package/dist/index.js
CHANGED
|
@@ -9383,6 +9383,16 @@ var DesignIngestor = class {
|
|
|
9383
9383
|
};
|
|
9384
9384
|
|
|
9385
9385
|
// src/constraints/DesignConstraintAdapter.ts
|
|
9386
|
+
var CODE_PREFIX_LABELS = {
|
|
9387
|
+
"ANAT-D": "Component anatomy (definition)",
|
|
9388
|
+
"ANAT-P": "Component anatomy (pattern presence)",
|
|
9389
|
+
"ANAT-U": "Component anatomy (usage)",
|
|
9390
|
+
"CRAFT-C": "Design craft (critique)",
|
|
9391
|
+
"CRAFT-P": "Design craft (polish)",
|
|
9392
|
+
"CRAFT-B": "Design craft (benchmark)",
|
|
9393
|
+
"DESIGN-": "Design constraint (legacy)",
|
|
9394
|
+
"A11Y-": "Accessibility"
|
|
9395
|
+
};
|
|
9386
9396
|
var DesignConstraintAdapter = class {
|
|
9387
9397
|
constructor(store) {
|
|
9388
9398
|
this.store = store;
|
|
@@ -9464,6 +9474,76 @@ var DesignConstraintAdapter = class {
|
|
|
9464
9474
|
return "error";
|
|
9465
9475
|
}
|
|
9466
9476
|
}
|
|
9477
|
+
/**
|
|
9478
|
+
* Record externally-computed craft findings (audit-component-anatomy,
|
|
9479
|
+
* harness-design-craft, etc.) as graph state. Idempotent — re-running on
|
|
9480
|
+
* the same findings produces no duplicate nodes or edges thanks to
|
|
9481
|
+
* GraphStore's keyed merge semantics.
|
|
9482
|
+
*
|
|
9483
|
+
* Each finding becomes:
|
|
9484
|
+
* • a `design_constraint` node keyed by finding code (created lazily
|
|
9485
|
+
* if absent; metadata merged on re-record so the most recent message
|
|
9486
|
+
* / severity wins)
|
|
9487
|
+
* • a `violates_design` edge from the source file (id = file path) to
|
|
9488
|
+
* the constraint node, with per-finding metadata (line, severity,
|
|
9489
|
+
* message, evidence, runId)
|
|
9490
|
+
*
|
|
9491
|
+
* The file node is NOT created here — it's assumed to already exist in
|
|
9492
|
+
* the graph from a prior ingest. If it does not, the edge will still be
|
|
9493
|
+
* created (graph stores edges by key, not by referential integrity) and
|
|
9494
|
+
* a subsequent ingest will populate the file node.
|
|
9495
|
+
*/
|
|
9496
|
+
recordFindings(findings) {
|
|
9497
|
+
let constraintsAdded = 0;
|
|
9498
|
+
let edgesAdded = 0;
|
|
9499
|
+
const seenConstraintIds = /* @__PURE__ */ new Set();
|
|
9500
|
+
for (const finding of findings) {
|
|
9501
|
+
const constraintId = `design_constraint:${finding.code}`;
|
|
9502
|
+
if (!seenConstraintIds.has(finding.code)) {
|
|
9503
|
+
const existing = this.store.getNode(constraintId);
|
|
9504
|
+
if (!existing) constraintsAdded += 1;
|
|
9505
|
+
this.store.addNode({
|
|
9506
|
+
id: constraintId,
|
|
9507
|
+
type: "design_constraint",
|
|
9508
|
+
name: finding.code,
|
|
9509
|
+
metadata: {
|
|
9510
|
+
code: finding.code,
|
|
9511
|
+
label: this.labelForCode(finding.code),
|
|
9512
|
+
mostRecentMessage: finding.message,
|
|
9513
|
+
mostRecentSeverity: finding.severity
|
|
9514
|
+
}
|
|
9515
|
+
});
|
|
9516
|
+
seenConstraintIds.add(finding.code);
|
|
9517
|
+
}
|
|
9518
|
+
const fileId = finding.file;
|
|
9519
|
+
const edgeMetadata = {
|
|
9520
|
+
message: finding.message,
|
|
9521
|
+
severity: finding.severity
|
|
9522
|
+
};
|
|
9523
|
+
if (finding.line !== void 0) edgeMetadata.line = finding.line;
|
|
9524
|
+
if (finding.evidence !== void 0) edgeMetadata.evidence = finding.evidence;
|
|
9525
|
+
if (finding.runId !== void 0) edgeMetadata.runId = finding.runId;
|
|
9526
|
+
const before = this.store.getEdges({
|
|
9527
|
+
from: fileId,
|
|
9528
|
+
to: constraintId,
|
|
9529
|
+
type: "violates_design"
|
|
9530
|
+
});
|
|
9531
|
+
this.store.addEdge({
|
|
9532
|
+
from: fileId,
|
|
9533
|
+
to: constraintId,
|
|
9534
|
+
type: "violates_design",
|
|
9535
|
+
metadata: edgeMetadata
|
|
9536
|
+
});
|
|
9537
|
+
if (before.length === 0) edgesAdded += 1;
|
|
9538
|
+
}
|
|
9539
|
+
return { constraintsAdded, edgesAdded };
|
|
9540
|
+
}
|
|
9541
|
+
labelForCode(code) {
|
|
9542
|
+
for (const prefix of Object.keys(CODE_PREFIX_LABELS)) {
|
|
9543
|
+
if (code.startsWith(prefix)) return CODE_PREFIX_LABELS[prefix];
|
|
9544
|
+
}
|
|
9545
|
+
return "Design constraint";
|
|
9546
|
+
}
|
|
9467
9547
|
};
|
|
9468
9548
|
|
|
9469
9549
|
// src/feedback/GraphFeedbackAdapter.ts
|
|
@@ -9991,7 +10071,7 @@ var ConflictPredictor = class {
|
|
|
9991
10071
|
};
|
|
9992
10072
|
|
|
9993
10073
|
// src/index.ts
|
|
9994
|
-
var VERSION = "0.
|
|
10074
|
+
var VERSION = "0.9.0";
|
|
9995
10075
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9996
10076
|
0 && (module.exports = {
|
|
9997
10077
|
ALL_EXTRACTORS,
|
package/dist/index.mjs
CHANGED
|
@@ -9268,6 +9268,16 @@ var DesignIngestor = class {
|
|
|
9268
9268
|
};
|
|
9269
9269
|
|
|
9270
9270
|
// src/constraints/DesignConstraintAdapter.ts
|
|
9271
|
+
var CODE_PREFIX_LABELS = {
|
|
9272
|
+
"ANAT-D": "Component anatomy (definition)",
|
|
9273
|
+
"ANAT-P": "Component anatomy (pattern presence)",
|
|
9274
|
+
"ANAT-U": "Component anatomy (usage)",
|
|
9275
|
+
"CRAFT-C": "Design craft (critique)",
|
|
9276
|
+
"CRAFT-P": "Design craft (polish)",
|
|
9277
|
+
"CRAFT-B": "Design craft (benchmark)",
|
|
9278
|
+
"DESIGN-": "Design constraint (legacy)",
|
|
9279
|
+
"A11Y-": "Accessibility"
|
|
9280
|
+
};
|
|
9271
9281
|
var DesignConstraintAdapter = class {
|
|
9272
9282
|
constructor(store) {
|
|
9273
9283
|
this.store = store;
|
|
@@ -9349,6 +9359,76 @@ var DesignConstraintAdapter = class {
|
|
|
9349
9359
|
return "error";
|
|
9350
9360
|
}
|
|
9351
9361
|
}
|
|
9362
|
+
/**
|
|
9363
|
+
* Record externally-computed craft findings (audit-component-anatomy,
|
|
9364
|
+
* harness-design-craft, etc.) as graph state. Idempotent — re-running on
|
|
9365
|
+
* the same findings produces no duplicate nodes or edges thanks to
|
|
9366
|
+
* GraphStore's keyed merge semantics.
|
|
9367
|
+
*
|
|
9368
|
+
* Each finding becomes:
|
|
9369
|
+
* • a `design_constraint` node keyed by finding code (created lazily
|
|
9370
|
+
* if absent; metadata merged on re-record so the most recent message
|
|
9371
|
+
* / severity wins)
|
|
9372
|
+
* • a `violates_design` edge from the source file (id = file path) to
|
|
9373
|
+
* the constraint node, with per-finding metadata (line, severity,
|
|
9374
|
+
* message, evidence, runId)
|
|
9375
|
+
*
|
|
9376
|
+
* The file node is NOT created here — it's assumed to already exist in
|
|
9377
|
+
* the graph from a prior ingest. If it does not, the edge will still be
|
|
9378
|
+
* created (graph stores edges by key, not by referential integrity) and
|
|
9379
|
+
* a subsequent ingest will populate the file node.
|
|
9380
|
+
*/
|
|
9381
|
+
recordFindings(findings) {
|
|
9382
|
+
let constraintsAdded = 0;
|
|
9383
|
+
let edgesAdded = 0;
|
|
9384
|
+
const seenConstraintIds = /* @__PURE__ */ new Set();
|
|
9385
|
+
for (const finding of findings) {
|
|
9386
|
+
const constraintId = `design_constraint:${finding.code}`;
|
|
9387
|
+
if (!seenConstraintIds.has(finding.code)) {
|
|
9388
|
+
const existing = this.store.getNode(constraintId);
|
|
9389
|
+
if (!existing) constraintsAdded += 1;
|
|
9390
|
+
this.store.addNode({
|
|
9391
|
+
id: constraintId,
|
|
9392
|
+
type: "design_constraint",
|
|
9393
|
+
name: finding.code,
|
|
9394
|
+
metadata: {
|
|
9395
|
+
code: finding.code,
|
|
9396
|
+
label: this.labelForCode(finding.code),
|
|
9397
|
+
mostRecentMessage: finding.message,
|
|
9398
|
+
mostRecentSeverity: finding.severity
|
|
9399
|
+
}
|
|
9400
|
+
});
|
|
9401
|
+
seenConstraintIds.add(finding.code);
|
|
9402
|
+
}
|
|
9403
|
+
const fileId = finding.file;
|
|
9404
|
+
const edgeMetadata = {
|
|
9405
|
+
message: finding.message,
|
|
9406
|
+
severity: finding.severity
|
|
9407
|
+
};
|
|
9408
|
+
if (finding.line !== void 0) edgeMetadata.line = finding.line;
|
|
9409
|
+
if (finding.evidence !== void 0) edgeMetadata.evidence = finding.evidence;
|
|
9410
|
+
if (finding.runId !== void 0) edgeMetadata.runId = finding.runId;
|
|
9411
|
+
const before = this.store.getEdges({
|
|
9412
|
+
from: fileId,
|
|
9413
|
+
to: constraintId,
|
|
9414
|
+
type: "violates_design"
|
|
9415
|
+
});
|
|
9416
|
+
this.store.addEdge({
|
|
9417
|
+
from: fileId,
|
|
9418
|
+
to: constraintId,
|
|
9419
|
+
type: "violates_design",
|
|
9420
|
+
metadata: edgeMetadata
|
|
9421
|
+
});
|
|
9422
|
+
if (before.length === 0) edgesAdded += 1;
|
|
9423
|
+
}
|
|
9424
|
+
return { constraintsAdded, edgesAdded };
|
|
9425
|
+
}
|
|
9426
|
+
labelForCode(code) {
|
|
9427
|
+
for (const prefix of Object.keys(CODE_PREFIX_LABELS)) {
|
|
9428
|
+
if (code.startsWith(prefix)) return CODE_PREFIX_LABELS[prefix];
|
|
9429
|
+
}
|
|
9430
|
+
return "Design constraint";
|
|
9431
|
+
}
|
|
9352
9432
|
};
|
|
9353
9433
|
|
|
9354
9434
|
// src/feedback/GraphFeedbackAdapter.ts
|
|
@@ -9876,7 +9956,7 @@ var ConflictPredictor = class {
|
|
|
9876
9956
|
};
|
|
9877
9957
|
|
|
9878
9958
|
// src/index.ts
|
|
9879
|
-
var VERSION = "0.
|
|
9959
|
+
var VERSION = "0.9.0";
|
|
9880
9960
|
export {
|
|
9881
9961
|
ALL_EXTRACTORS,
|
|
9882
9962
|
ApiPathExtractor,
|