@grafema/core 0.1.1-alpha → 0.2.1-beta
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/Orchestrator.d.ts +7 -0
- package/dist/Orchestrator.d.ts.map +1 -1
- package/dist/Orchestrator.js +25 -3
- package/dist/config/ConfigLoader.d.ts +18 -0
- package/dist/config/ConfigLoader.d.ts.map +1 -1
- package/dist/config/ConfigLoader.js +65 -3
- package/dist/core/FileExplainer.d.ts +101 -0
- package/dist/core/FileExplainer.d.ts.map +1 -0
- package/dist/core/FileExplainer.js +139 -0
- package/dist/core/NodeFactory.d.ts +44 -5
- package/dist/core/NodeFactory.d.ts.map +1 -1
- package/dist/core/NodeFactory.js +52 -7
- package/dist/core/nodes/ArrayLiteralNode.d.ts.map +1 -1
- package/dist/core/nodes/ArrayLiteralNode.js +4 -2
- package/dist/core/nodes/BranchNode.d.ts +41 -0
- package/dist/core/nodes/BranchNode.d.ts.map +1 -0
- package/dist/core/nodes/BranchNode.js +82 -0
- package/dist/core/nodes/CallSiteNode.d.ts +2 -2
- package/dist/core/nodes/CallSiteNode.d.ts.map +1 -1
- package/dist/core/nodes/CallSiteNode.js +9 -5
- package/dist/core/nodes/CaseNode.d.ts +43 -0
- package/dist/core/nodes/CaseNode.d.ts.map +1 -0
- package/dist/core/nodes/CaseNode.js +81 -0
- package/dist/core/nodes/ClassNode.d.ts +2 -2
- package/dist/core/nodes/ClassNode.d.ts.map +1 -1
- package/dist/core/nodes/ClassNode.js +8 -4
- package/dist/core/nodes/ConstantNode.d.ts +2 -2
- package/dist/core/nodes/ConstantNode.d.ts.map +1 -1
- package/dist/core/nodes/ConstantNode.js +6 -4
- package/dist/core/nodes/ConstructorCallNode.d.ts +51 -0
- package/dist/core/nodes/ConstructorCallNode.d.ts.map +1 -0
- package/dist/core/nodes/ConstructorCallNode.js +171 -0
- package/dist/core/nodes/DatabaseQueryNode.d.ts +3 -2
- package/dist/core/nodes/DatabaseQueryNode.d.ts.map +1 -1
- package/dist/core/nodes/DatabaseQueryNode.js +5 -2
- package/dist/core/nodes/DecoratorNode.d.ts +2 -2
- package/dist/core/nodes/DecoratorNode.d.ts.map +1 -1
- package/dist/core/nodes/DecoratorNode.js +5 -3
- package/dist/core/nodes/EnumNode.d.ts +2 -2
- package/dist/core/nodes/EnumNode.d.ts.map +1 -1
- package/dist/core/nodes/EnumNode.js +5 -3
- package/dist/core/nodes/EventListenerNode.d.ts +4 -4
- package/dist/core/nodes/EventListenerNode.d.ts.map +1 -1
- package/dist/core/nodes/EventListenerNode.js +7 -4
- package/dist/core/nodes/ExportNode.d.ts +2 -2
- package/dist/core/nodes/ExportNode.d.ts.map +1 -1
- package/dist/core/nodes/ExportNode.js +8 -4
- package/dist/core/nodes/ExpressionNode.d.ts +2 -2
- package/dist/core/nodes/ExpressionNode.d.ts.map +1 -1
- package/dist/core/nodes/ExpressionNode.js +6 -4
- package/dist/core/nodes/ExternalModuleNode.d.ts +4 -0
- package/dist/core/nodes/ExternalModuleNode.d.ts.map +1 -1
- package/dist/core/nodes/ExternalModuleNode.js +10 -2
- package/dist/core/nodes/HttpRequestNode.d.ts +4 -4
- package/dist/core/nodes/HttpRequestNode.d.ts.map +1 -1
- package/dist/core/nodes/HttpRequestNode.js +7 -4
- package/dist/core/nodes/ImportNode.d.ts +10 -2
- package/dist/core/nodes/ImportNode.d.ts.map +1 -1
- package/dist/core/nodes/ImportNode.js +21 -4
- package/dist/core/nodes/InterfaceNode.d.ts +2 -2
- package/dist/core/nodes/InterfaceNode.d.ts.map +1 -1
- package/dist/core/nodes/InterfaceNode.js +5 -3
- package/dist/core/nodes/LiteralNode.d.ts +2 -2
- package/dist/core/nodes/LiteralNode.d.ts.map +1 -1
- package/dist/core/nodes/LiteralNode.js +6 -4
- package/dist/core/nodes/MethodCallNode.d.ts +2 -2
- package/dist/core/nodes/MethodCallNode.d.ts.map +1 -1
- package/dist/core/nodes/MethodCallNode.js +9 -5
- package/dist/core/nodes/MethodNode.d.ts +2 -2
- package/dist/core/nodes/MethodNode.d.ts.map +1 -1
- package/dist/core/nodes/MethodNode.js +8 -4
- package/dist/core/nodes/ObjectLiteralNode.d.ts.map +1 -1
- package/dist/core/nodes/ObjectLiteralNode.js +4 -2
- package/dist/core/nodes/ParameterNode.d.ts +2 -2
- package/dist/core/nodes/ParameterNode.d.ts.map +1 -1
- package/dist/core/nodes/ParameterNode.js +5 -3
- package/dist/core/nodes/TypeNode.d.ts +2 -2
- package/dist/core/nodes/TypeNode.d.ts.map +1 -1
- package/dist/core/nodes/TypeNode.js +5 -3
- package/dist/core/nodes/VariableDeclarationNode.d.ts +2 -2
- package/dist/core/nodes/VariableDeclarationNode.d.ts.map +1 -1
- package/dist/core/nodes/VariableDeclarationNode.js +9 -5
- package/dist/core/nodes/index.d.ts +3 -0
- package/dist/core/nodes/index.d.ts.map +1 -1
- package/dist/core/nodes/index.js +3 -0
- package/dist/data/builtins/BuiltinRegistry.d.ts +78 -0
- package/dist/data/builtins/BuiltinRegistry.d.ts.map +1 -0
- package/dist/data/builtins/BuiltinRegistry.js +110 -0
- package/dist/data/builtins/definitions.d.ts +28 -0
- package/dist/data/builtins/definitions.d.ts.map +1 -0
- package/dist/data/builtins/definitions.js +250 -0
- package/dist/data/builtins/index.d.ts +10 -0
- package/dist/data/builtins/index.d.ts.map +1 -0
- package/dist/data/builtins/index.js +8 -0
- package/dist/data/builtins/jsGlobals.d.ts +18 -0
- package/dist/data/builtins/jsGlobals.d.ts.map +1 -0
- package/dist/data/builtins/jsGlobals.js +26 -0
- package/dist/data/builtins/types.d.ts +34 -0
- package/dist/data/builtins/types.d.ts.map +1 -0
- package/dist/data/builtins/types.js +7 -0
- package/dist/data/globals/definitions.d.ts +27 -0
- package/dist/data/globals/definitions.d.ts.map +1 -0
- package/dist/data/globals/definitions.js +117 -0
- package/dist/data/globals/index.d.ts +36 -0
- package/dist/data/globals/index.d.ts.map +1 -0
- package/dist/data/globals/index.js +52 -0
- package/dist/diagnostics/DiagnosticReporter.d.ts +23 -0
- package/dist/diagnostics/DiagnosticReporter.d.ts.map +1 -1
- package/dist/diagnostics/DiagnosticReporter.js +88 -0
- package/dist/diagnostics/index.d.ts +1 -1
- package/dist/diagnostics/index.d.ts.map +1 -1
- package/dist/errors/GrafemaError.d.ts +43 -0
- package/dist/errors/GrafemaError.d.ts.map +1 -1
- package/dist/errors/GrafemaError.js +50 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/plugins/analysis/DatabaseAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/DatabaseAnalyzer.js +3 -2
- package/dist/plugins/analysis/ExpressAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/ExpressAnalyzer.js +3 -1
- package/dist/plugins/analysis/ExpressResponseAnalyzer.d.ts +148 -0
- package/dist/plugins/analysis/ExpressResponseAnalyzer.d.ts.map +1 -0
- package/dist/plugins/analysis/ExpressResponseAnalyzer.js +495 -0
- package/dist/plugins/analysis/ExpressRouteAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/ExpressRouteAnalyzer.js +53 -18
- package/dist/plugins/analysis/FetchAnalyzer.d.ts +40 -0
- package/dist/plugins/analysis/FetchAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/FetchAnalyzer.js +163 -15
- package/dist/plugins/analysis/JSASTAnalyzer.d.ts +157 -26
- package/dist/plugins/analysis/JSASTAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/JSASTAnalyzer.js +2418 -191
- package/dist/plugins/analysis/RustAnalyzer.js +4 -4
- package/dist/plugins/analysis/SQLiteAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/SQLiteAnalyzer.js +4 -2
- package/dist/plugins/analysis/SocketIOAnalyzer.d.ts +9 -0
- package/dist/plugins/analysis/SocketIOAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/SocketIOAnalyzer.js +91 -7
- package/dist/plugins/analysis/ast/GraphBuilder.d.ts +173 -0
- package/dist/plugins/analysis/ast/GraphBuilder.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/GraphBuilder.js +1256 -65
- package/dist/plugins/analysis/ast/types.d.ts +294 -0
- package/dist/plugins/analysis/ast/types.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/ASTVisitor.d.ts +5 -1
- package/dist/plugins/analysis/ast/visitors/ASTVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.d.ts +1 -0
- package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.js +12 -1
- package/dist/plugins/analysis/ast/visitors/FunctionVisitor.d.ts +10 -0
- package/dist/plugins/analysis/ast/visitors/FunctionVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/FunctionVisitor.js +62 -0
- package/dist/plugins/analysis/ast/visitors/ImportExportVisitor.d.ts +4 -0
- package/dist/plugins/analysis/ast/visitors/ImportExportVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/ImportExportVisitor.js +101 -0
- package/dist/plugins/analysis/ast/visitors/VariableVisitor.d.ts +16 -1
- package/dist/plugins/analysis/ast/visitors/VariableVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/VariableVisitor.js +233 -39
- package/dist/plugins/discovery/WorkspaceDiscovery.d.ts.map +1 -1
- package/dist/plugins/discovery/WorkspaceDiscovery.js +9 -4
- package/dist/plugins/enrichment/AliasTracker.d.ts.map +1 -1
- package/dist/plugins/enrichment/AliasTracker.js +16 -1
- package/dist/plugins/enrichment/ArgumentParameterLinker.d.ts +32 -0
- package/dist/plugins/enrichment/ArgumentParameterLinker.d.ts.map +1 -0
- package/dist/plugins/enrichment/ArgumentParameterLinker.js +175 -0
- package/dist/plugins/enrichment/ClosureCaptureEnricher.d.ts +51 -0
- package/dist/plugins/enrichment/ClosureCaptureEnricher.d.ts.map +1 -0
- package/dist/plugins/enrichment/ClosureCaptureEnricher.js +205 -0
- package/dist/plugins/enrichment/ExternalCallResolver.d.ts +42 -0
- package/dist/plugins/enrichment/ExternalCallResolver.d.ts.map +1 -0
- package/dist/plugins/enrichment/ExternalCallResolver.js +213 -0
- package/dist/plugins/enrichment/FunctionCallResolver.d.ts +58 -0
- package/dist/plugins/enrichment/FunctionCallResolver.d.ts.map +1 -0
- package/dist/plugins/enrichment/FunctionCallResolver.js +340 -0
- package/dist/plugins/enrichment/HTTPConnectionEnricher.d.ts +16 -3
- package/dist/plugins/enrichment/HTTPConnectionEnricher.d.ts.map +1 -1
- package/dist/plugins/enrichment/HTTPConnectionEnricher.js +64 -20
- package/dist/plugins/enrichment/MethodCallResolver.d.ts.map +1 -1
- package/dist/plugins/enrichment/MethodCallResolver.js +15 -1
- package/dist/plugins/enrichment/MountPointResolver.d.ts +14 -12
- package/dist/plugins/enrichment/MountPointResolver.d.ts.map +1 -1
- package/dist/plugins/enrichment/MountPointResolver.js +172 -151
- package/dist/plugins/enrichment/NodejsBuiltinsResolver.d.ts +44 -0
- package/dist/plugins/enrichment/NodejsBuiltinsResolver.d.ts.map +1 -0
- package/dist/plugins/enrichment/NodejsBuiltinsResolver.js +271 -0
- package/dist/plugins/enrichment/ValueDomainAnalyzer.d.ts +5 -27
- package/dist/plugins/enrichment/ValueDomainAnalyzer.d.ts.map +1 -1
- package/dist/plugins/enrichment/ValueDomainAnalyzer.js +62 -139
- package/dist/plugins/indexing/JSModuleIndexer.d.ts +15 -0
- package/dist/plugins/indexing/JSModuleIndexer.d.ts.map +1 -1
- package/dist/plugins/indexing/JSModuleIndexer.js +58 -0
- package/dist/plugins/indexing/RustModuleIndexer.d.ts +1 -1
- package/dist/plugins/indexing/RustModuleIndexer.js +4 -4
- package/dist/plugins/validation/BrokenImportValidator.d.ts +31 -0
- package/dist/plugins/validation/BrokenImportValidator.d.ts.map +1 -0
- package/dist/plugins/validation/BrokenImportValidator.js +249 -0
- package/dist/plugins/validation/CallResolverValidator.d.ts +21 -10
- package/dist/plugins/validation/CallResolverValidator.d.ts.map +1 -1
- package/dist/plugins/validation/CallResolverValidator.js +101 -76
- package/dist/plugins/validation/DataFlowValidator.d.ts.map +1 -1
- package/dist/plugins/validation/DataFlowValidator.js +49 -41
- package/dist/plugins/validation/GraphConnectivityValidator.d.ts.map +1 -1
- package/dist/plugins/validation/GraphConnectivityValidator.js +25 -1
- package/dist/plugins/validation/SQLInjectionValidator.d.ts.map +1 -1
- package/dist/plugins/validation/SQLInjectionValidator.js +2 -3
- package/dist/queries/findCallsInFunction.d.ts +52 -0
- package/dist/queries/findCallsInFunction.d.ts.map +1 -0
- package/dist/queries/findCallsInFunction.js +135 -0
- package/dist/queries/findContainingFunction.d.ts +45 -0
- package/dist/queries/findContainingFunction.d.ts.map +1 -0
- package/dist/queries/findContainingFunction.js +54 -0
- package/dist/queries/index.d.ts +14 -0
- package/dist/queries/index.d.ts.map +1 -0
- package/dist/queries/index.js +11 -0
- package/dist/queries/traceValues.d.ts +70 -0
- package/dist/queries/traceValues.d.ts.map +1 -0
- package/dist/queries/traceValues.js +299 -0
- package/dist/queries/types.d.ts +163 -0
- package/dist/queries/types.d.ts.map +1 -0
- package/dist/queries/types.js +9 -0
- package/dist/schema/GraphSchemaExtractor.d.ts +53 -0
- package/dist/schema/GraphSchemaExtractor.d.ts.map +1 -0
- package/dist/schema/GraphSchemaExtractor.js +124 -0
- package/dist/schema/InterfaceSchemaExtractor.d.ts +73 -0
- package/dist/schema/InterfaceSchemaExtractor.d.ts.map +1 -0
- package/dist/schema/InterfaceSchemaExtractor.js +112 -0
- package/dist/schema/index.d.ts +5 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +2 -0
- package/dist/storage/backends/RFDBServerBackend.d.ts +13 -18
- package/dist/storage/backends/RFDBServerBackend.d.ts.map +1 -1
- package/dist/storage/backends/RFDBServerBackend.js +47 -51
- package/dist/storage/backends/typeValidation.d.ts.map +1 -1
- package/dist/storage/backends/typeValidation.js +1 -0
- package/package.json +3 -3
- package/src/Orchestrator.ts +35 -3
- package/src/config/ConfigLoader.ts +94 -3
- package/src/core/FileExplainer.ts +179 -0
- package/src/core/NodeFactory.ts +72 -8
- package/src/core/nodes/ArrayLiteralNode.ts +3 -2
- package/src/core/nodes/BranchNode.ts +113 -0
- package/src/core/nodes/CallSiteNode.ts +7 -5
- package/src/core/nodes/CaseNode.ts +123 -0
- package/src/core/nodes/ClassNode.ts +6 -4
- package/src/core/nodes/ConstantNode.ts +5 -4
- package/src/core/nodes/ConstructorCallNode.ts +217 -0
- package/src/core/nodes/DatabaseQueryNode.ts +5 -1
- package/src/core/nodes/DecoratorNode.ts +4 -3
- package/src/core/nodes/EnumNode.ts +4 -3
- package/src/core/nodes/EventListenerNode.ts +7 -4
- package/src/core/nodes/ExportNode.ts +6 -4
- package/src/core/nodes/ExpressionNode.ts +5 -4
- package/src/core/nodes/ExternalModuleNode.ts +11 -2
- package/src/core/nodes/HttpRequestNode.ts +7 -4
- package/src/core/nodes/ImportNode.ts +31 -4
- package/src/core/nodes/InterfaceNode.ts +4 -3
- package/src/core/nodes/LiteralNode.ts +5 -4
- package/src/core/nodes/MethodCallNode.ts +7 -5
- package/src/core/nodes/MethodNode.ts +6 -4
- package/src/core/nodes/ObjectLiteralNode.ts +3 -2
- package/src/core/nodes/ParameterNode.ts +4 -3
- package/src/core/nodes/TypeNode.ts +4 -3
- package/src/core/nodes/VariableDeclarationNode.ts +7 -5
- package/src/core/nodes/index.ts +3 -0
- package/src/data/builtins/BuiltinRegistry.ts +124 -0
- package/src/data/builtins/definitions.ts +267 -0
- package/src/data/builtins/index.ts +10 -0
- package/src/data/builtins/jsGlobals.ts +28 -0
- package/src/data/builtins/types.ts +36 -0
- package/src/data/globals/definitions.ts +156 -0
- package/src/data/globals/index.ts +66 -0
- package/src/diagnostics/DiagnosticReporter.ts +120 -0
- package/src/diagnostics/index.ts +1 -1
- package/src/errors/GrafemaError.ts +65 -0
- package/src/index.ts +45 -0
- package/src/plugins/analysis/DatabaseAnalyzer.ts +4 -2
- package/src/plugins/analysis/ExpressAnalyzer.ts +5 -1
- package/src/plugins/analysis/ExpressResponseAnalyzer.ts +636 -0
- package/src/plugins/analysis/ExpressRouteAnalyzer.ts +57 -18
- package/src/plugins/analysis/FetchAnalyzer.ts +204 -16
- package/src/plugins/analysis/JSASTAnalyzer.ts +2958 -260
- package/src/plugins/analysis/RustAnalyzer.ts +4 -4
- package/src/plugins/analysis/SQLiteAnalyzer.ts +5 -2
- package/src/plugins/analysis/SocketIOAnalyzer.ts +121 -7
- package/src/plugins/analysis/ast/GraphBuilder.ts +1578 -70
- package/src/plugins/analysis/ast/types.ts +387 -0
- package/src/plugins/analysis/ast/visitors/ASTVisitor.ts +8 -0
- package/src/plugins/analysis/ast/visitors/CallExpressionVisitor.ts +16 -1
- package/src/plugins/analysis/ast/visitors/FunctionVisitor.ts +77 -2
- package/src/plugins/analysis/ast/visitors/ImportExportVisitor.ts +112 -1
- package/src/plugins/analysis/ast/visitors/VariableVisitor.ts +272 -47
- package/src/plugins/discovery/WorkspaceDiscovery.ts +11 -4
- package/src/plugins/enrichment/AliasTracker.ts +22 -1
- package/src/plugins/enrichment/ArgumentParameterLinker.ts +240 -0
- package/src/plugins/enrichment/ClosureCaptureEnricher.ts +267 -0
- package/src/plugins/enrichment/ExternalCallResolver.ts +262 -0
- package/src/plugins/enrichment/FunctionCallResolver.ts +456 -0
- package/src/plugins/enrichment/HTTPConnectionEnricher.ts +70 -20
- package/src/plugins/enrichment/MethodCallResolver.ts +21 -1
- package/src/plugins/enrichment/MountPointResolver.ts +206 -198
- package/src/plugins/enrichment/NodejsBuiltinsResolver.ts +365 -0
- package/src/plugins/enrichment/ValueDomainAnalyzer.ts +67 -184
- package/src/plugins/indexing/JSModuleIndexer.ts +66 -0
- package/src/plugins/indexing/RustModuleIndexer.ts +4 -4
- package/src/plugins/validation/BrokenImportValidator.ts +325 -0
- package/src/plugins/validation/CallResolverValidator.ts +129 -109
- package/src/plugins/validation/DataFlowValidator.ts +75 -58
- package/src/plugins/validation/GraphConnectivityValidator.ts +39 -1
- package/src/plugins/validation/SQLInjectionValidator.ts +2 -5
- package/src/queries/README.md +46 -0
- package/src/queries/findCallsInFunction.ts +206 -0
- package/src/queries/findContainingFunction.ts +83 -0
- package/src/queries/index.ts +23 -0
- package/src/queries/traceValues.ts +398 -0
- package/src/queries/types.ts +187 -0
- package/src/schema/GraphSchemaExtractor.ts +177 -0
- package/src/schema/InterfaceSchemaExtractor.ts +173 -0
- package/src/schema/index.ts +5 -0
- package/src/storage/backends/RFDBServerBackend.ts +64 -68
- package/src/storage/backends/typeValidation.ts +1 -0
package/dist/Orchestrator.d.ts
CHANGED
|
@@ -51,6 +51,11 @@ export interface OrchestratorOptions {
|
|
|
51
51
|
* If provided and non-empty, discovery plugins are skipped.
|
|
52
52
|
*/
|
|
53
53
|
services?: ServiceDefinition[];
|
|
54
|
+
/**
|
|
55
|
+
* Enable strict mode for fail-fast debugging.
|
|
56
|
+
* When true, enrichers report unresolved references as fatal errors.
|
|
57
|
+
*/
|
|
58
|
+
strictMode?: boolean;
|
|
54
59
|
}
|
|
55
60
|
/**
|
|
56
61
|
* Service info from discovery
|
|
@@ -116,6 +121,8 @@ export declare class Orchestrator {
|
|
|
116
121
|
private logger;
|
|
117
122
|
/** Config-provided services (REG-174) */
|
|
118
123
|
private configServices;
|
|
124
|
+
/** Strict mode flag (REG-330) */
|
|
125
|
+
private strictMode;
|
|
119
126
|
constructor(options?: OrchestratorOptions);
|
|
120
127
|
/**
|
|
121
128
|
* Запустить анализ проекта
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Orchestrator.d.ts","sourceRoot":"","sources":["../src/Orchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,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AM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgExE;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CActC"}
|
package/dist/Orchestrator.js
CHANGED
|
@@ -33,6 +33,8 @@ export class Orchestrator {
|
|
|
33
33
|
logger;
|
|
34
34
|
/** Config-provided services (REG-174) */
|
|
35
35
|
configServices;
|
|
36
|
+
/** Strict mode flag (REG-330) */
|
|
37
|
+
strictMode;
|
|
36
38
|
constructor(options = {}) {
|
|
37
39
|
this.graph = options.graph;
|
|
38
40
|
this.config = options;
|
|
@@ -55,6 +57,8 @@ export class Orchestrator {
|
|
|
55
57
|
this.logger = options.logger ?? createLogger(options.logLevel ?? 'info');
|
|
56
58
|
// Store config-provided services (REG-174)
|
|
57
59
|
this.configServices = options.services;
|
|
60
|
+
// Strict mode configuration (REG-330)
|
|
61
|
+
this.strictMode = options.strictMode ?? false;
|
|
58
62
|
// Modified auto-add logic: SKIP auto-add if config services provided (REG-174)
|
|
59
63
|
const hasDiscovery = this.plugins.some(p => p.metadata?.phase === 'DISCOVERY');
|
|
60
64
|
const hasConfigServices = this.configServices && this.configServices.length > 0;
|
|
@@ -255,6 +259,23 @@ export class Orchestrator {
|
|
|
255
259
|
await this.runPhase('ENRICHMENT', { manifest, graph: this.graph, workerCount: this.workerCount });
|
|
256
260
|
this.profiler.end('ENRICHMENT');
|
|
257
261
|
this.logger.info('ENRICHMENT phase complete', { duration: ((Date.now() - enrichmentStart) / 1000).toFixed(2) });
|
|
262
|
+
// STRICT MODE BARRIER: Check for fatal errors after ENRICHMENT (REG-330)
|
|
263
|
+
if (this.strictMode) {
|
|
264
|
+
const enrichmentDiagnostics = this.diagnosticCollector.getByPhase('ENRICHMENT');
|
|
265
|
+
const strictErrors = enrichmentDiagnostics.filter(d => d.severity === 'fatal');
|
|
266
|
+
if (strictErrors.length > 0) {
|
|
267
|
+
this.logger.error(`Strict mode: ${strictErrors.length} unresolved reference(s) found`);
|
|
268
|
+
for (const err of strictErrors) {
|
|
269
|
+
this.logger.error(` [${err.code}] ${err.message}`, {
|
|
270
|
+
file: err.file,
|
|
271
|
+
line: err.line,
|
|
272
|
+
plugin: err.plugin,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
throw new Error(`Strict mode: ${strictErrors.length} unresolved reference(s) found during ENRICHMENT. ` +
|
|
276
|
+
`Run without --strict for graceful degradation, or fix the underlying issues.`);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
258
279
|
// PHASE 4: VALIDATION - проверка корректности графа (глобально)
|
|
259
280
|
const validationStart = Date.now();
|
|
260
281
|
this.profiler.start('VALIDATION');
|
|
@@ -446,6 +467,7 @@ export class Orchestrator {
|
|
|
446
467
|
onProgress: this.onProgress,
|
|
447
468
|
forceAnalysis: this.forceAnalysis,
|
|
448
469
|
logger: this.logger,
|
|
470
|
+
strictMode: this.strictMode, // REG-330: Pass strict mode flag
|
|
449
471
|
};
|
|
450
472
|
// Add reportIssue for VALIDATION phase
|
|
451
473
|
if (phaseName === 'VALIDATION') {
|
|
@@ -602,13 +624,13 @@ export class Orchestrator {
|
|
|
602
624
|
}
|
|
603
625
|
// Check if server binary exists
|
|
604
626
|
const projectRoot = join(dirname(fileURLToPath(import.meta.url)), '../..');
|
|
605
|
-
const serverBinary = join(projectRoot, '
|
|
606
|
-
const debugBinary = join(projectRoot, '
|
|
627
|
+
const serverBinary = join(projectRoot, 'packages/rfdb-server/target/release/rfdb-server');
|
|
628
|
+
const debugBinary = join(projectRoot, 'packages/rfdb-server/target/debug/rfdb-server');
|
|
607
629
|
let binaryPath = existsSync(serverBinary) ? serverBinary : debugBinary;
|
|
608
630
|
if (!existsSync(binaryPath)) {
|
|
609
631
|
console.log(`[Orchestrator] RFDB server binary not found at ${binaryPath}, building...`);
|
|
610
632
|
execSync('cargo build --bin rfdb-server', {
|
|
611
|
-
cwd: join(projectRoot, '
|
|
633
|
+
cwd: join(projectRoot, 'packages/rfdb-server'),
|
|
612
634
|
stdio: 'inherit',
|
|
613
635
|
});
|
|
614
636
|
binaryPath = debugBinary;
|
|
@@ -44,6 +44,24 @@ export interface GrafemaConfig {
|
|
|
44
44
|
* If provided and non-empty, auto-discovery is skipped.
|
|
45
45
|
*/
|
|
46
46
|
services: ServiceDefinition[];
|
|
47
|
+
/**
|
|
48
|
+
* Glob patterns for files to include during indexing (optional).
|
|
49
|
+
* See OrchestratorConfig.include for documentation.
|
|
50
|
+
*/
|
|
51
|
+
include?: string[];
|
|
52
|
+
/**
|
|
53
|
+
* Glob patterns for files to exclude during indexing (optional).
|
|
54
|
+
* See OrchestratorConfig.exclude for documentation.
|
|
55
|
+
*/
|
|
56
|
+
exclude?: string[];
|
|
57
|
+
/**
|
|
58
|
+
* Enable strict mode for fail-fast debugging.
|
|
59
|
+
* When true, analysis fails if enrichers cannot resolve references.
|
|
60
|
+
* When false (default), graceful degradation with warnings.
|
|
61
|
+
*
|
|
62
|
+
* Can be overridden via CLI: --strict
|
|
63
|
+
*/
|
|
64
|
+
strict?: boolean;
|
|
47
65
|
}
|
|
48
66
|
/**
|
|
49
67
|
* Default plugin configuration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigLoader.d.ts","sourceRoot":"","sources":["../../src/config/ConfigLoader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;IACF;;;OAGG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigLoader.d.ts","sourceRoot":"","sources":["../../src/config/ConfigLoader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;IACF;;;OAGG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAE9B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,aAqC5B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CACxB,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAY,GAChD,aAAa,CAoEf"}
|
|
@@ -12,6 +12,7 @@ export const DEFAULT_CONFIG = {
|
|
|
12
12
|
analysis: [
|
|
13
13
|
'JSASTAnalyzer',
|
|
14
14
|
'ExpressRouteAnalyzer',
|
|
15
|
+
'ExpressResponseAnalyzer',
|
|
15
16
|
'SocketIOAnalyzer',
|
|
16
17
|
'DatabaseAnalyzer',
|
|
17
18
|
'FetchAnalyzer',
|
|
@@ -19,7 +20,9 @@ export const DEFAULT_CONFIG = {
|
|
|
19
20
|
],
|
|
20
21
|
enrichment: [
|
|
21
22
|
'MethodCallResolver',
|
|
23
|
+
'ArgumentParameterLinker',
|
|
22
24
|
'AliasTracker',
|
|
25
|
+
'ClosureCaptureEnricher',
|
|
23
26
|
'ValueDomainAnalyzer',
|
|
24
27
|
'MountPointResolver',
|
|
25
28
|
'PrefixEvaluator',
|
|
@@ -27,16 +30,18 @@ export const DEFAULT_CONFIG = {
|
|
|
27
30
|
'HTTPConnectionEnricher',
|
|
28
31
|
],
|
|
29
32
|
validation: [
|
|
30
|
-
'
|
|
33
|
+
'GraphConnectivityValidator',
|
|
34
|
+
'DataFlowValidator',
|
|
31
35
|
'EvalBanValidator',
|
|
36
|
+
'CallResolverValidator',
|
|
32
37
|
'SQLInjectionValidator',
|
|
33
38
|
'ShadowingDetector',
|
|
34
|
-
'GraphConnectivityValidator',
|
|
35
|
-
'DataFlowValidator',
|
|
36
39
|
'TypeScriptDeadCodeValidator',
|
|
40
|
+
'BrokenImportValidator',
|
|
37
41
|
],
|
|
38
42
|
},
|
|
39
43
|
services: [], // Empty by default (uses auto-discovery)
|
|
44
|
+
strict: false, // Graceful degradation by default
|
|
40
45
|
};
|
|
41
46
|
/**
|
|
42
47
|
* Load Grafema config from project directory.
|
|
@@ -83,6 +88,8 @@ export function loadConfig(projectPath, logger = console) {
|
|
|
83
88
|
// Validate services array if present (THROWS on error per Linus review)
|
|
84
89
|
// This is OUTSIDE try-catch - config errors MUST throw
|
|
85
90
|
validateServices(parsed.services, projectPath);
|
|
91
|
+
// Validate include/exclude patterns (THROWS on error)
|
|
92
|
+
validatePatterns(parsed.include, parsed.exclude, logger);
|
|
86
93
|
// Merge with defaults (user config may be partial)
|
|
87
94
|
return mergeConfig(DEFAULT_CONFIG, parsed);
|
|
88
95
|
}
|
|
@@ -103,6 +110,8 @@ export function loadConfig(projectPath, logger = console) {
|
|
|
103
110
|
// Validate services array if present (THROWS on error)
|
|
104
111
|
// This is OUTSIDE try-catch - config errors MUST throw
|
|
105
112
|
validateServices(parsed.services, projectPath);
|
|
113
|
+
// Validate include/exclude patterns (THROWS on error)
|
|
114
|
+
validatePatterns(parsed.include, parsed.exclude, logger);
|
|
106
115
|
return mergeConfig(DEFAULT_CONFIG, parsed);
|
|
107
116
|
}
|
|
108
117
|
// 3. No config file - return defaults
|
|
@@ -169,6 +178,53 @@ function validateServices(services, projectPath) {
|
|
|
169
178
|
}
|
|
170
179
|
}
|
|
171
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Validate include/exclude patterns.
|
|
183
|
+
* THROWS on error (fail loudly per project convention).
|
|
184
|
+
*
|
|
185
|
+
* Validation rules:
|
|
186
|
+
* 1. Must be arrays if provided
|
|
187
|
+
* 2. Array elements must be non-empty strings
|
|
188
|
+
* 3. Warn (don't error) if include array is empty (would exclude everything)
|
|
189
|
+
*
|
|
190
|
+
* @param include - Parsed include patterns (may be undefined)
|
|
191
|
+
* @param exclude - Parsed exclude patterns (may be undefined)
|
|
192
|
+
* @param logger - Logger for warnings
|
|
193
|
+
*/
|
|
194
|
+
function validatePatterns(include, exclude, logger) {
|
|
195
|
+
// Validate include
|
|
196
|
+
if (include !== undefined && include !== null) {
|
|
197
|
+
if (!Array.isArray(include)) {
|
|
198
|
+
throw new Error(`Config error: include must be an array, got ${typeof include}`);
|
|
199
|
+
}
|
|
200
|
+
for (let i = 0; i < include.length; i++) {
|
|
201
|
+
if (typeof include[i] !== 'string') {
|
|
202
|
+
throw new Error(`Config error: include[${i}] must be a string, got ${typeof include[i]}`);
|
|
203
|
+
}
|
|
204
|
+
if (!include[i].trim()) {
|
|
205
|
+
throw new Error(`Config error: include[${i}] cannot be empty or whitespace-only`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Warn if empty array (would exclude everything)
|
|
209
|
+
if (include.length === 0) {
|
|
210
|
+
logger.warn('Warning: include is an empty array - no files will be processed');
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// Validate exclude
|
|
214
|
+
if (exclude !== undefined && exclude !== null) {
|
|
215
|
+
if (!Array.isArray(exclude)) {
|
|
216
|
+
throw new Error(`Config error: exclude must be an array, got ${typeof exclude}`);
|
|
217
|
+
}
|
|
218
|
+
for (let i = 0; i < exclude.length; i++) {
|
|
219
|
+
if (typeof exclude[i] !== 'string') {
|
|
220
|
+
throw new Error(`Config error: exclude[${i}] must be a string, got ${typeof exclude[i]}`);
|
|
221
|
+
}
|
|
222
|
+
if (!exclude[i].trim()) {
|
|
223
|
+
throw new Error(`Config error: exclude[${i}] cannot be empty or whitespace-only`);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
172
228
|
/**
|
|
173
229
|
* Merge user config with defaults.
|
|
174
230
|
* User config takes precedence, but missing sections use defaults.
|
|
@@ -183,5 +239,11 @@ function mergeConfig(defaults, user) {
|
|
|
183
239
|
validation: user.plugins?.validation ?? defaults.plugins.validation,
|
|
184
240
|
},
|
|
185
241
|
services: user.services ?? defaults.services,
|
|
242
|
+
// Include/exclude patterns: pass through if specified, otherwise undefined
|
|
243
|
+
// (don't merge with defaults - undefined means "no filtering")
|
|
244
|
+
// Note: YAML null becomes undefined here (null ?? undefined = undefined)
|
|
245
|
+
include: user.include ?? undefined,
|
|
246
|
+
exclude: user.exclude ?? undefined,
|
|
247
|
+
strict: user.strict ?? defaults.strict,
|
|
186
248
|
};
|
|
187
249
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FileExplainer - Show what nodes exist in a file for discovery
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Help users discover what nodes exist in the graph for a file,
|
|
5
|
+
* displaying semantic IDs so users can query them.
|
|
6
|
+
*
|
|
7
|
+
* This addresses the core UX problem: users can't find nodes because
|
|
8
|
+
* semantic IDs are opaque (e.g., "src/app.ts->fetchData->try#0->VARIABLE->response").
|
|
9
|
+
* This tool shows what's in the graph so users know what they can query.
|
|
10
|
+
*
|
|
11
|
+
* @see _tasks/REG-177/006-don-revised-plan.md for design rationale
|
|
12
|
+
*/
|
|
13
|
+
import type { GraphBackend, BaseNodeRecord } from '@grafema/types';
|
|
14
|
+
/**
|
|
15
|
+
* Result of explaining a file's graph contents
|
|
16
|
+
*/
|
|
17
|
+
export interface FileExplainResult {
|
|
18
|
+
/** The file path that was explained */
|
|
19
|
+
file: string;
|
|
20
|
+
/** Whether the file has been analyzed */
|
|
21
|
+
status: 'ANALYZED' | 'NOT_ANALYZED';
|
|
22
|
+
/** All nodes in the graph for this file, enhanced with context */
|
|
23
|
+
nodes: EnhancedNode[];
|
|
24
|
+
/** Node counts grouped by type */
|
|
25
|
+
byType: Record<string, number>;
|
|
26
|
+
/** Total number of nodes in the file */
|
|
27
|
+
totalCount: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A node record enhanced with scope context information.
|
|
31
|
+
*
|
|
32
|
+
* The context field provides human-readable information about
|
|
33
|
+
* where the node appears (e.g., "inside try block", "catch parameter").
|
|
34
|
+
*/
|
|
35
|
+
export interface EnhancedNode extends BaseNodeRecord {
|
|
36
|
+
/** Human-readable context about the node's scope */
|
|
37
|
+
context?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* FileExplainer class - explains what nodes exist in a file's graph.
|
|
41
|
+
*
|
|
42
|
+
* Use this when:
|
|
43
|
+
* - User can't find a variable/function they expect to be in the graph
|
|
44
|
+
* - User wants to understand what's been analyzed for a file
|
|
45
|
+
* - User needs semantic IDs to construct queries
|
|
46
|
+
*
|
|
47
|
+
* Example:
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const explainer = new FileExplainer(graphBackend);
|
|
50
|
+
* const result = await explainer.explain('src/app.ts');
|
|
51
|
+
*
|
|
52
|
+
* if (result.status === 'NOT_ANALYZED') {
|
|
53
|
+
* console.log('File not in graph. Run: grafema analyze');
|
|
54
|
+
* } else {
|
|
55
|
+
* for (const node of result.nodes) {
|
|
56
|
+
* console.log(`[${node.type}] ${node.name}`);
|
|
57
|
+
* console.log(` ID: ${node.id}`);
|
|
58
|
+
* if (node.context) {
|
|
59
|
+
* console.log(` Context: ${node.context}`);
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare class FileExplainer {
|
|
66
|
+
private graph;
|
|
67
|
+
constructor(graph: GraphBackend);
|
|
68
|
+
/**
|
|
69
|
+
* Explain what nodes exist in the graph for a file.
|
|
70
|
+
*
|
|
71
|
+
* @param filePath - The file path to explain (relative or absolute)
|
|
72
|
+
* @returns FileExplainResult with all nodes, grouped by type, with context
|
|
73
|
+
*/
|
|
74
|
+
explain(filePath: string): Promise<FileExplainResult>;
|
|
75
|
+
/**
|
|
76
|
+
* Query graph for all nodes in a file
|
|
77
|
+
*
|
|
78
|
+
* Note: The server-side file filter may not work correctly in all cases,
|
|
79
|
+
* so we also filter client-side to ensure only nodes from the requested file are returned.
|
|
80
|
+
*/
|
|
81
|
+
private getNodesForFile;
|
|
82
|
+
/**
|
|
83
|
+
* Group nodes by type, counting occurrences
|
|
84
|
+
*/
|
|
85
|
+
private groupByType;
|
|
86
|
+
/**
|
|
87
|
+
* Enhance nodes with human-readable scope context.
|
|
88
|
+
*
|
|
89
|
+
* Detects patterns in semantic IDs like:
|
|
90
|
+
* - "file->func->try#0->VARIABLE->x" → "inside try block"
|
|
91
|
+
* - "file->func->catch#0->VARIABLE->error" → "inside catch block"
|
|
92
|
+
*/
|
|
93
|
+
private enhanceWithContext;
|
|
94
|
+
/**
|
|
95
|
+
* Detect scope context from semantic ID patterns.
|
|
96
|
+
*
|
|
97
|
+
* Returns human-readable context string or undefined if no special scope.
|
|
98
|
+
*/
|
|
99
|
+
private detectScopeContext;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=FileExplainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileExplainer.d.ts","sourceRoot":"","sources":["../../src/core/FileExplainer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAc,MAAM,gBAAgB,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,MAAM,EAAE,UAAU,GAAG,cAAc,CAAC;IACpC,kEAAkE;IAClE,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,aAAa;IACZ,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,YAAY;IAEvC;;;;;OAKG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA0B3D;;;;;OAKG;YACW,eAAe;IAc7B;;OAEG;IACH,OAAO,CAAC,WAAW;IAWnB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;CAQ3B"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FileExplainer - Show what nodes exist in a file for discovery
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Help users discover what nodes exist in the graph for a file,
|
|
5
|
+
* displaying semantic IDs so users can query them.
|
|
6
|
+
*
|
|
7
|
+
* This addresses the core UX problem: users can't find nodes because
|
|
8
|
+
* semantic IDs are opaque (e.g., "src/app.ts->fetchData->try#0->VARIABLE->response").
|
|
9
|
+
* This tool shows what's in the graph so users know what they can query.
|
|
10
|
+
*
|
|
11
|
+
* @see _tasks/REG-177/006-don-revised-plan.md for design rationale
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Scope patterns to detect from semantic IDs.
|
|
15
|
+
* Order matters - more specific patterns should come first.
|
|
16
|
+
*/
|
|
17
|
+
const SCOPE_PATTERNS = [
|
|
18
|
+
{ pattern: /->catch#\d+->/, context: 'inside catch block' },
|
|
19
|
+
{ pattern: /->try#\d+->/, context: 'inside try block' },
|
|
20
|
+
{ pattern: /->if#\d+->/, context: 'inside conditional' },
|
|
21
|
+
{ pattern: /->else#\d+->/, context: 'inside else block' },
|
|
22
|
+
{ pattern: /->for#\d+->/, context: 'inside loop' },
|
|
23
|
+
{ pattern: /->while#\d+->/, context: 'inside loop' },
|
|
24
|
+
{ pattern: /->switch#\d+->/, context: 'inside switch' },
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* FileExplainer class - explains what nodes exist in a file's graph.
|
|
28
|
+
*
|
|
29
|
+
* Use this when:
|
|
30
|
+
* - User can't find a variable/function they expect to be in the graph
|
|
31
|
+
* - User wants to understand what's been analyzed for a file
|
|
32
|
+
* - User needs semantic IDs to construct queries
|
|
33
|
+
*
|
|
34
|
+
* Example:
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const explainer = new FileExplainer(graphBackend);
|
|
37
|
+
* const result = await explainer.explain('src/app.ts');
|
|
38
|
+
*
|
|
39
|
+
* if (result.status === 'NOT_ANALYZED') {
|
|
40
|
+
* console.log('File not in graph. Run: grafema analyze');
|
|
41
|
+
* } else {
|
|
42
|
+
* for (const node of result.nodes) {
|
|
43
|
+
* console.log(`[${node.type}] ${node.name}`);
|
|
44
|
+
* console.log(` ID: ${node.id}`);
|
|
45
|
+
* if (node.context) {
|
|
46
|
+
* console.log(` Context: ${node.context}`);
|
|
47
|
+
* }
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export class FileExplainer {
|
|
53
|
+
graph;
|
|
54
|
+
constructor(graph) {
|
|
55
|
+
this.graph = graph;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Explain what nodes exist in the graph for a file.
|
|
59
|
+
*
|
|
60
|
+
* @param filePath - The file path to explain (relative or absolute)
|
|
61
|
+
* @returns FileExplainResult with all nodes, grouped by type, with context
|
|
62
|
+
*/
|
|
63
|
+
async explain(filePath) {
|
|
64
|
+
// Query graph for all nodes in this file
|
|
65
|
+
const nodes = await this.getNodesForFile(filePath);
|
|
66
|
+
// Group by type
|
|
67
|
+
const byType = this.groupByType(nodes);
|
|
68
|
+
// Enhance with context from semantic ID parsing
|
|
69
|
+
const enhanced = this.enhanceWithContext(nodes);
|
|
70
|
+
// Sort nodes: by type, then by name
|
|
71
|
+
enhanced.sort((a, b) => {
|
|
72
|
+
const typeCompare = a.type.localeCompare(b.type);
|
|
73
|
+
if (typeCompare !== 0)
|
|
74
|
+
return typeCompare;
|
|
75
|
+
return (a.name || '').localeCompare(b.name || '');
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
file: filePath,
|
|
79
|
+
status: nodes.length > 0 ? 'ANALYZED' : 'NOT_ANALYZED',
|
|
80
|
+
nodes: enhanced,
|
|
81
|
+
byType,
|
|
82
|
+
totalCount: nodes.length,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Query graph for all nodes in a file
|
|
87
|
+
*
|
|
88
|
+
* Note: The server-side file filter may not work correctly in all cases,
|
|
89
|
+
* so we also filter client-side to ensure only nodes from the requested file are returned.
|
|
90
|
+
*/
|
|
91
|
+
async getNodesForFile(filePath) {
|
|
92
|
+
const filter = { file: filePath };
|
|
93
|
+
const nodes = [];
|
|
94
|
+
for await (const node of this.graph.queryNodes(filter)) {
|
|
95
|
+
// Client-side filter as backup (server filter may not work correctly)
|
|
96
|
+
if (node.file === filePath) {
|
|
97
|
+
nodes.push(node);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return nodes;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Group nodes by type, counting occurrences
|
|
104
|
+
*/
|
|
105
|
+
groupByType(nodes) {
|
|
106
|
+
const counts = {};
|
|
107
|
+
for (const node of nodes) {
|
|
108
|
+
const type = node.type || 'UNKNOWN';
|
|
109
|
+
counts[type] = (counts[type] || 0) + 1;
|
|
110
|
+
}
|
|
111
|
+
return counts;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Enhance nodes with human-readable scope context.
|
|
115
|
+
*
|
|
116
|
+
* Detects patterns in semantic IDs like:
|
|
117
|
+
* - "file->func->try#0->VARIABLE->x" → "inside try block"
|
|
118
|
+
* - "file->func->catch#0->VARIABLE->error" → "inside catch block"
|
|
119
|
+
*/
|
|
120
|
+
enhanceWithContext(nodes) {
|
|
121
|
+
return nodes.map((node) => {
|
|
122
|
+
const context = this.detectScopeContext(node.id);
|
|
123
|
+
return context ? { ...node, context } : { ...node };
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Detect scope context from semantic ID patterns.
|
|
128
|
+
*
|
|
129
|
+
* Returns human-readable context string or undefined if no special scope.
|
|
130
|
+
*/
|
|
131
|
+
detectScopeContext(semanticId) {
|
|
132
|
+
for (const { pattern, context } of SCOPE_PATTERNS) {
|
|
133
|
+
if (pattern.test(semanticId)) {
|
|
134
|
+
return context;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -67,6 +67,9 @@ interface MethodCallOptions {
|
|
|
67
67
|
args?: unknown[];
|
|
68
68
|
counter?: number;
|
|
69
69
|
}
|
|
70
|
+
interface ConstructorCallOptions {
|
|
71
|
+
counter?: number;
|
|
72
|
+
}
|
|
70
73
|
interface VariableOptions {
|
|
71
74
|
parentScopeId?: string;
|
|
72
75
|
counter?: number;
|
|
@@ -92,13 +95,11 @@ interface ArrayLiteralOptions {
|
|
|
92
95
|
counter?: number;
|
|
93
96
|
}
|
|
94
97
|
interface EventListenerOptions {
|
|
95
|
-
column?: number;
|
|
96
98
|
parentScopeId?: string;
|
|
97
99
|
callbackArg?: string;
|
|
98
100
|
counter?: number;
|
|
99
101
|
}
|
|
100
102
|
interface HttpRequestOptions {
|
|
101
|
-
column?: number;
|
|
102
103
|
parentScopeId?: string;
|
|
103
104
|
counter?: number;
|
|
104
105
|
}
|
|
@@ -186,6 +187,20 @@ export declare class NodeFactory {
|
|
|
186
187
|
* Create SCOPE node
|
|
187
188
|
*/
|
|
188
189
|
static createScope(scopeType: string, file: string, line: number, options?: ScopeOptions): BrandedNode<import("./nodes/ScopeNode.js").ScopeNodeRecord>;
|
|
190
|
+
/**
|
|
191
|
+
* Create BRANCH node
|
|
192
|
+
*/
|
|
193
|
+
static createBranch(branchType: 'switch' | 'if' | 'ternary', file: string, line: number, column: number, options?: {
|
|
194
|
+
parentScopeId?: string;
|
|
195
|
+
counter?: number;
|
|
196
|
+
}): BrandedNode<import("./nodes/BranchNode.js").BranchNodeRecord>;
|
|
197
|
+
/**
|
|
198
|
+
* Create CASE node
|
|
199
|
+
*/
|
|
200
|
+
static createCase(value: unknown, isDefault: boolean, fallsThrough: boolean, isEmpty: boolean, file: string, line: number, column: number, options?: {
|
|
201
|
+
parentBranchId?: string;
|
|
202
|
+
counter?: number;
|
|
203
|
+
}): BrandedNode<import("./nodes/CaseNode.js").CaseNodeRecord>;
|
|
189
204
|
/**
|
|
190
205
|
* Create CALL_SITE node
|
|
191
206
|
*/
|
|
@@ -194,6 +209,30 @@ export declare class NodeFactory {
|
|
|
194
209
|
* Create METHOD_CALL node
|
|
195
210
|
*/
|
|
196
211
|
static createMethodCall(objectName: string | undefined, methodName: string, file: string, line: number, column: number, options?: MethodCallOptions): BrandedNode<import("./nodes/MethodCallNode.js").MethodCallNodeRecord>;
|
|
212
|
+
/**
|
|
213
|
+
* Create CONSTRUCTOR_CALL node
|
|
214
|
+
*
|
|
215
|
+
* Represents a `new ClassName()` expression.
|
|
216
|
+
* Used for data flow: VARIABLE --ASSIGNED_FROM--> CONSTRUCTOR_CALL
|
|
217
|
+
*
|
|
218
|
+
* @param className - Name of the constructor (e.g., 'Date', 'MyClass')
|
|
219
|
+
* @param file - File path
|
|
220
|
+
* @param line - Line number
|
|
221
|
+
* @param column - Column position
|
|
222
|
+
* @param options - Optional counter for disambiguation
|
|
223
|
+
*/
|
|
224
|
+
static createConstructorCall(className: string, file: string, line: number, column: number, options?: ConstructorCallOptions): BrandedNode<import("./nodes/ConstructorCallNode.js").ConstructorCallNodeRecord>;
|
|
225
|
+
/**
|
|
226
|
+
* Generate CONSTRUCTOR_CALL node ID without creating the full node
|
|
227
|
+
*
|
|
228
|
+
* Used by JSASTAnalyzer when creating assignment metadata.
|
|
229
|
+
* The full node is created later by GraphBuilder.
|
|
230
|
+
*/
|
|
231
|
+
static generateConstructorCallId(className: string, file: string, line: number, column: number, options?: ConstructorCallOptions): string;
|
|
232
|
+
/**
|
|
233
|
+
* Check if a class name is a built-in JavaScript constructor
|
|
234
|
+
*/
|
|
235
|
+
static isBuiltinConstructor(className: string): boolean;
|
|
197
236
|
/**
|
|
198
237
|
* Create VARIABLE_DECLARATION node
|
|
199
238
|
*/
|
|
@@ -232,15 +271,15 @@ export declare class NodeFactory {
|
|
|
232
271
|
/**
|
|
233
272
|
* Create EVENT_LISTENER node
|
|
234
273
|
*/
|
|
235
|
-
static createEventListener(eventName: string, objectName: string | undefined, file: string, line: number, options?: EventListenerOptions): BrandedNode<import("./nodes/EventListenerNode.js").EventListenerNodeRecord>;
|
|
274
|
+
static createEventListener(eventName: string, objectName: string | undefined, file: string, line: number, column: number, options?: EventListenerOptions): BrandedNode<import("./nodes/EventListenerNode.js").EventListenerNodeRecord>;
|
|
236
275
|
/**
|
|
237
276
|
* Create HTTP_REQUEST node
|
|
238
277
|
*/
|
|
239
|
-
static createHttpRequest(url: string | undefined, method: string | undefined, file: string, line: number, options?: HttpRequestOptions): BrandedNode<import("./nodes/HttpRequestNode.js").HttpRequestNodeRecord>;
|
|
278
|
+
static createHttpRequest(url: string | undefined, method: string | undefined, file: string, line: number, column: number, options?: HttpRequestOptions): BrandedNode<import("./nodes/HttpRequestNode.js").HttpRequestNodeRecord>;
|
|
240
279
|
/**
|
|
241
280
|
* Create DATABASE_QUERY node
|
|
242
281
|
*/
|
|
243
|
-
static createDatabaseQuery(query: string | undefined, operation: string | undefined, file: string, line: number, options?: DatabaseQueryOptions): BrandedNode<import("./nodes/DatabaseQueryNode.js").DatabaseQueryNodeRecord>;
|
|
282
|
+
static createDatabaseQuery(query: string | undefined, operation: string | undefined, file: string, line: number, column: number, options?: DatabaseQueryOptions): BrandedNode<import("./nodes/DatabaseQueryNode.js").DatabaseQueryNodeRecord>;
|
|
244
283
|
/**
|
|
245
284
|
* Create IMPORT node
|
|
246
285
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeFactory.d.ts","sourceRoot":"","sources":["../../src/core/NodeFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,
|
|
1
|
+
{"version":3,"file":"NodeFactory.d.ts","sourceRoot":"","sources":["../../src/core/NodeFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAgCL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB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