@grafema/util 0.3.0-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/LICENSE +190 -0
- package/dist/api/GraphAPI.d.ts +87 -0
- package/dist/api/GraphAPI.d.ts.map +1 -0
- package/dist/api/GraphAPI.js +212 -0
- package/dist/api/GraphAPI.js.map +1 -0
- package/dist/api/GuaranteeAPI.d.ts +147 -0
- package/dist/api/GuaranteeAPI.d.ts.map +1 -0
- package/dist/api/GuaranteeAPI.js +290 -0
- package/dist/api/GuaranteeAPI.js.map +1 -0
- package/dist/config/ConfigLoader.d.ts +214 -0
- package/dist/config/ConfigLoader.d.ts.map +1 -0
- package/dist/config/ConfigLoader.js +441 -0
- package/dist/config/ConfigLoader.js.map +1 -0
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +5 -0
- package/dist/config/index.js.map +1 -0
- package/dist/core/CoverageAnalyzer.d.ts +65 -0
- package/dist/core/CoverageAnalyzer.d.ts.map +1 -0
- package/dist/core/CoverageAnalyzer.js +199 -0
- package/dist/core/CoverageAnalyzer.js.map +1 -0
- package/dist/core/FileExplainer.d.ts +101 -0
- package/dist/core/FileExplainer.d.ts.map +1 -0
- package/dist/core/FileExplainer.js +140 -0
- package/dist/core/FileExplainer.js.map +1 -0
- package/dist/core/FileOverview.d.ts +124 -0
- package/dist/core/FileOverview.d.ts.map +1 -0
- package/dist/core/FileOverview.js +279 -0
- package/dist/core/FileOverview.js.map +1 -0
- package/dist/core/GrafemaUri.d.ts +66 -0
- package/dist/core/GrafemaUri.d.ts.map +1 -0
- package/dist/core/GrafemaUri.js +191 -0
- package/dist/core/GrafemaUri.js.map +1 -0
- package/dist/core/GraphBackend.d.ts +158 -0
- package/dist/core/GraphBackend.d.ts.map +1 -0
- package/dist/core/GraphBackend.js +85 -0
- package/dist/core/GraphBackend.js.map +1 -0
- package/dist/core/GraphFreshnessChecker.d.ts +33 -0
- package/dist/core/GraphFreshnessChecker.d.ts.map +1 -0
- package/dist/core/GraphFreshnessChecker.js +104 -0
- package/dist/core/GraphFreshnessChecker.js.map +1 -0
- package/dist/core/GuaranteeManager.d.ts +254 -0
- package/dist/core/GuaranteeManager.d.ts.map +1 -0
- package/dist/core/GuaranteeManager.js +447 -0
- package/dist/core/GuaranteeManager.js.map +1 -0
- package/dist/core/HashUtils.d.ts +24 -0
- package/dist/core/HashUtils.d.ts.map +1 -0
- package/dist/core/HashUtils.js +46 -0
- package/dist/core/HashUtils.js.map +1 -0
- package/dist/core/IncrementalReanalyzer.d.ts +33 -0
- package/dist/core/IncrementalReanalyzer.d.ts.map +1 -0
- package/dist/core/IncrementalReanalyzer.js +67 -0
- package/dist/core/IncrementalReanalyzer.js.map +1 -0
- package/dist/core/ResourceRegistry.d.ts +17 -0
- package/dist/core/ResourceRegistry.d.ts.map +1 -0
- package/dist/core/ResourceRegistry.js +32 -0
- package/dist/core/ResourceRegistry.js.map +1 -0
- package/dist/core/SemanticId.d.ts +159 -0
- package/dist/core/SemanticId.d.ts.map +1 -0
- package/dist/core/SemanticId.js +291 -0
- package/dist/core/SemanticId.js.map +1 -0
- package/dist/core/VersionManager.d.ts +166 -0
- package/dist/core/VersionManager.d.ts.map +1 -0
- package/dist/core/VersionManager.js +239 -0
- package/dist/core/VersionManager.js.map +1 -0
- package/dist/core/brandNodeInternal.d.ts +14 -0
- package/dist/core/brandNodeInternal.d.ts.map +1 -0
- package/dist/core/brandNodeInternal.js +4 -0
- package/dist/core/brandNodeInternal.js.map +1 -0
- package/dist/core/nodes/GuaranteeNode.d.ts +76 -0
- package/dist/core/nodes/GuaranteeNode.d.ts.map +1 -0
- package/dist/core/nodes/GuaranteeNode.js +118 -0
- package/dist/core/nodes/GuaranteeNode.js.map +1 -0
- package/dist/core/nodes/IssueNode.d.ts +73 -0
- package/dist/core/nodes/IssueNode.d.ts.map +1 -0
- package/dist/core/nodes/IssueNode.js +130 -0
- package/dist/core/nodes/IssueNode.js.map +1 -0
- package/dist/core/nodes/NodeKind.d.ts +104 -0
- package/dist/core/nodes/NodeKind.d.ts.map +1 -0
- package/dist/core/nodes/NodeKind.js +166 -0
- package/dist/core/nodes/NodeKind.js.map +1 -0
- package/dist/diagnostics/DiagnosticCollector.d.ts +103 -0
- package/dist/diagnostics/DiagnosticCollector.d.ts.map +1 -0
- package/dist/diagnostics/DiagnosticCollector.js +133 -0
- package/dist/diagnostics/DiagnosticCollector.js.map +1 -0
- package/dist/diagnostics/DiagnosticReporter.d.ts +122 -0
- package/dist/diagnostics/DiagnosticReporter.d.ts.map +1 -0
- package/dist/diagnostics/DiagnosticReporter.js +300 -0
- package/dist/diagnostics/DiagnosticReporter.js.map +1 -0
- package/dist/diagnostics/DiagnosticWriter.d.ts +31 -0
- package/dist/diagnostics/DiagnosticWriter.d.ts.map +1 -0
- package/dist/diagnostics/DiagnosticWriter.js +44 -0
- package/dist/diagnostics/DiagnosticWriter.js.map +1 -0
- package/dist/diagnostics/categories.d.ts +57 -0
- package/dist/diagnostics/categories.d.ts.map +1 -0
- package/dist/diagnostics/categories.js +71 -0
- package/dist/diagnostics/categories.js.map +1 -0
- package/dist/diagnostics/index.d.ts +17 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/index.js +15 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/errors/GrafemaError.d.ts +200 -0
- package/dist/errors/GrafemaError.d.ts.map +1 -0
- package/dist/errors/GrafemaError.js +209 -0
- package/dist/errors/GrafemaError.js.map +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/instructions/index.d.ts +8 -0
- package/dist/instructions/index.d.ts.map +1 -0
- package/dist/instructions/index.js +20 -0
- package/dist/instructions/index.js.map +1 -0
- package/dist/instructions/onboarding.md +133 -0
- package/dist/knowledge/KnowledgeBase.d.ts +113 -0
- package/dist/knowledge/KnowledgeBase.d.ts.map +1 -0
- package/dist/knowledge/KnowledgeBase.js +420 -0
- package/dist/knowledge/KnowledgeBase.js.map +1 -0
- package/dist/knowledge/SemanticAddressResolver.d.ts +59 -0
- package/dist/knowledge/SemanticAddressResolver.d.ts.map +1 -0
- package/dist/knowledge/SemanticAddressResolver.js +160 -0
- package/dist/knowledge/SemanticAddressResolver.js.map +1 -0
- package/dist/knowledge/git-ingest.d.ts +58 -0
- package/dist/knowledge/git-ingest.d.ts.map +1 -0
- package/dist/knowledge/git-ingest.js +301 -0
- package/dist/knowledge/git-ingest.js.map +1 -0
- package/dist/knowledge/git-queries.d.ts +86 -0
- package/dist/knowledge/git-queries.d.ts.map +1 -0
- package/dist/knowledge/git-queries.js +177 -0
- package/dist/knowledge/git-queries.js.map +1 -0
- package/dist/knowledge/index.d.ts +14 -0
- package/dist/knowledge/index.d.ts.map +1 -0
- package/dist/knowledge/index.js +10 -0
- package/dist/knowledge/index.js.map +1 -0
- package/dist/knowledge/parser.d.ts +39 -0
- package/dist/knowledge/parser.d.ts.map +1 -0
- package/dist/knowledge/parser.js +292 -0
- package/dist/knowledge/parser.js.map +1 -0
- package/dist/knowledge/types.d.ts +133 -0
- package/dist/knowledge/types.d.ts.map +1 -0
- package/dist/knowledge/types.js +8 -0
- package/dist/knowledge/types.js.map +1 -0
- package/dist/logging/Logger.d.ts +98 -0
- package/dist/logging/Logger.d.ts.map +1 -0
- package/dist/logging/Logger.js +274 -0
- package/dist/logging/Logger.js.map +1 -0
- package/dist/notation/archetypes.d.ts +36 -0
- package/dist/notation/archetypes.d.ts.map +1 -0
- package/dist/notation/archetypes.js +173 -0
- package/dist/notation/archetypes.js.map +1 -0
- package/dist/notation/fold.d.ts +25 -0
- package/dist/notation/fold.d.ts.map +1 -0
- package/dist/notation/fold.js +598 -0
- package/dist/notation/fold.js.map +1 -0
- package/dist/notation/index.d.ts +18 -0
- package/dist/notation/index.d.ts.map +1 -0
- package/dist/notation/index.js +16 -0
- package/dist/notation/index.js.map +1 -0
- package/dist/notation/lodExtractor.d.ts +32 -0
- package/dist/notation/lodExtractor.d.ts.map +1 -0
- package/dist/notation/lodExtractor.js +149 -0
- package/dist/notation/lodExtractor.js.map +1 -0
- package/dist/notation/nameShortener.d.ts +22 -0
- package/dist/notation/nameShortener.d.ts.map +1 -0
- package/dist/notation/nameShortener.js +24 -0
- package/dist/notation/nameShortener.js.map +1 -0
- package/dist/notation/perspectives.d.ts +11 -0
- package/dist/notation/perspectives.d.ts.map +1 -0
- package/dist/notation/perspectives.js +16 -0
- package/dist/notation/perspectives.js.map +1 -0
- package/dist/notation/renderer.d.ts +31 -0
- package/dist/notation/renderer.d.ts.map +1 -0
- package/dist/notation/renderer.js +315 -0
- package/dist/notation/renderer.js.map +1 -0
- package/dist/notation/traceRenderer.d.ts +39 -0
- package/dist/notation/traceRenderer.d.ts.map +1 -0
- package/dist/notation/traceRenderer.js +358 -0
- package/dist/notation/traceRenderer.js.map +1 -0
- package/dist/notation/types.d.ts +66 -0
- package/dist/notation/types.d.ts.map +1 -0
- package/dist/notation/types.js +10 -0
- package/dist/notation/types.js.map +1 -0
- package/dist/queries/NodeContext.d.ts +81 -0
- package/dist/queries/NodeContext.d.ts.map +1 -0
- package/dist/queries/NodeContext.js +196 -0
- package/dist/queries/NodeContext.js.map +1 -0
- package/dist/queries/findCallsInFunction.d.ts +62 -0
- package/dist/queries/findCallsInFunction.d.ts.map +1 -0
- package/dist/queries/findCallsInFunction.js +169 -0
- package/dist/queries/findCallsInFunction.js.map +1 -0
- package/dist/queries/findContainingFunction.d.ts +57 -0
- package/dist/queries/findContainingFunction.d.ts.map +1 -0
- package/dist/queries/findContainingFunction.js +91 -0
- package/dist/queries/findContainingFunction.js.map +1 -0
- package/dist/queries/index.d.ts +18 -0
- package/dist/queries/index.d.ts.map +1 -0
- package/dist/queries/index.js +14 -0
- package/dist/queries/index.js.map +1 -0
- package/dist/queries/traceDataflow.d.ts +65 -0
- package/dist/queries/traceDataflow.d.ts.map +1 -0
- package/dist/queries/traceDataflow.js +754 -0
- package/dist/queries/traceDataflow.js.map +1 -0
- package/dist/queries/traceValues.d.ts +70 -0
- package/dist/queries/traceValues.d.ts.map +1 -0
- package/dist/queries/traceValues.js +373 -0
- package/dist/queries/traceValues.js.map +1 -0
- package/dist/queries/types.d.ts +166 -0
- package/dist/queries/types.d.ts.map +1 -0
- package/dist/queries/types.js +10 -0
- package/dist/queries/types.js.map +1 -0
- package/dist/schema/GraphSchemaExtractor.d.ts +53 -0
- package/dist/schema/GraphSchemaExtractor.d.ts.map +1 -0
- package/dist/schema/GraphSchemaExtractor.js +125 -0
- package/dist/schema/GraphSchemaExtractor.js.map +1 -0
- package/dist/schema/InterfaceSchemaExtractor.d.ts +73 -0
- package/dist/schema/InterfaceSchemaExtractor.d.ts.map +1 -0
- package/dist/schema/InterfaceSchemaExtractor.js +113 -0
- package/dist/schema/InterfaceSchemaExtractor.js.map +1 -0
- package/dist/schema/index.d.ts +5 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +3 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/storage/backends/RFDBServerBackend.d.ts +356 -0
- package/dist/storage/backends/RFDBServerBackend.d.ts.map +1 -0
- package/dist/storage/backends/RFDBServerBackend.js +748 -0
- package/dist/storage/backends/RFDBServerBackend.js.map +1 -0
- package/dist/storage/backends/typeValidation.d.ts +47 -0
- package/dist/storage/backends/typeValidation.d.ts.map +1 -0
- package/dist/storage/backends/typeValidation.js +141 -0
- package/dist/storage/backends/typeValidation.js.map +1 -0
- package/dist/utils/findRfdbBinary.d.ts +67 -0
- package/dist/utils/findRfdbBinary.d.ts.map +1 -0
- package/dist/utils/findRfdbBinary.js +261 -0
- package/dist/utils/findRfdbBinary.js.map +1 -0
- package/dist/utils/lazyDownload.d.ts +43 -0
- package/dist/utils/lazyDownload.d.ts.map +1 -0
- package/dist/utils/lazyDownload.js +175 -0
- package/dist/utils/lazyDownload.js.map +1 -0
- package/dist/utils/moduleResolution.d.ts +134 -0
- package/dist/utils/moduleResolution.d.ts.map +1 -0
- package/dist/utils/moduleResolution.js +189 -0
- package/dist/utils/moduleResolution.js.map +1 -0
- package/dist/utils/resolveNodeFile.d.ts +13 -0
- package/dist/utils/resolveNodeFile.d.ts.map +1 -0
- package/dist/utils/resolveNodeFile.js +18 -0
- package/dist/utils/resolveNodeFile.js.map +1 -0
- package/dist/utils/startRfdbServer.d.ts +63 -0
- package/dist/utils/startRfdbServer.d.ts.map +1 -0
- package/dist/utils/startRfdbServer.js +142 -0
- package/dist/utils/startRfdbServer.js.map +1 -0
- package/dist/validation/PathValidator.d.ts +80 -0
- package/dist/validation/PathValidator.d.ts.map +1 -0
- package/dist/validation/PathValidator.js +252 -0
- package/dist/validation/PathValidator.js.map +1 -0
- package/dist/version.d.ts +11 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +26 -0
- package/dist/version.js.map +1 -0
- package/package.json +50 -0
- package/src/api/GraphAPI.ts +307 -0
- package/src/api/GuaranteeAPI.ts +402 -0
- package/src/config/ConfigLoader.ts +653 -0
- package/src/config/index.ts +13 -0
- package/src/core/CoverageAnalyzer.ts +243 -0
- package/src/core/FileExplainer.ts +179 -0
- package/src/core/FileOverview.ts +397 -0
- package/src/core/GrafemaUri.ts +216 -0
- package/src/core/GraphBackend.ts +266 -0
- package/src/core/GraphFreshnessChecker.ts +145 -0
- package/src/core/GuaranteeManager.ts +684 -0
- package/src/core/HashUtils.ts +48 -0
- package/src/core/IncrementalReanalyzer.ts +106 -0
- package/src/core/ResourceRegistry.ts +39 -0
- package/src/core/SemanticId.ts +423 -0
- package/src/core/VersionManager.ts +405 -0
- package/src/core/brandNodeInternal.ts +16 -0
- package/src/core/nodes/GuaranteeNode.ts +162 -0
- package/src/core/nodes/IssueNode.ts +177 -0
- package/src/core/nodes/NodeKind.ts +192 -0
- package/src/diagnostics/DiagnosticCollector.ts +170 -0
- package/src/diagnostics/DiagnosticReporter.ts +395 -0
- package/src/diagnostics/DiagnosticWriter.ts +50 -0
- package/src/diagnostics/categories.ts +104 -0
- package/src/diagnostics/index.ts +30 -0
- package/src/errors/GrafemaError.ts +297 -0
- package/src/index.ts +261 -0
- package/src/instructions/index.ts +21 -0
- package/src/instructions/onboarding.md +133 -0
- package/src/knowledge/KnowledgeBase.ts +486 -0
- package/src/knowledge/SemanticAddressResolver.ts +191 -0
- package/src/knowledge/git-ingest.ts +402 -0
- package/src/knowledge/git-queries.ts +269 -0
- package/src/knowledge/index.ts +29 -0
- package/src/knowledge/parser.ts +294 -0
- package/src/knowledge/types.ts +146 -0
- package/src/logging/Logger.ts +303 -0
- package/src/notation/archetypes.ts +189 -0
- package/src/notation/fold.ts +696 -0
- package/src/notation/index.ts +27 -0
- package/src/notation/lodExtractor.ts +177 -0
- package/src/notation/nameShortener.ts +24 -0
- package/src/notation/perspectives.ts +18 -0
- package/src/notation/renderer.ts +394 -0
- package/src/notation/traceRenderer.ts +458 -0
- package/src/notation/types.ts +79 -0
- package/src/queries/NodeContext.ts +280 -0
- package/src/queries/findCallsInFunction.ts +249 -0
- package/src/queries/findContainingFunction.ts +124 -0
- package/src/queries/index.ts +44 -0
- package/src/queries/traceDataflow.ts +838 -0
- package/src/queries/traceValues.ts +531 -0
- package/src/queries/types.ts +191 -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 +895 -0
- package/src/storage/backends/typeValidation.ts +154 -0
- package/src/utils/findRfdbBinary.ts +288 -0
- package/src/utils/lazyDownload.ts +206 -0
- package/src/utils/moduleResolution.ts +271 -0
- package/src/utils/resolveNodeFile.ts +18 -0
- package/src/utils/startRfdbServer.ts +197 -0
- package/src/validation/PathValidator.ts +334 -0
- package/src/version.ts +28 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Vadim Reshetnikov
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clean Graph API for visualization
|
|
3
|
+
* Reads everything directly from RFDB (no caches)
|
|
4
|
+
*/
|
|
5
|
+
import type { IncomingMessage, ServerResponse } from 'http';
|
|
6
|
+
/**
|
|
7
|
+
* Native node from engine
|
|
8
|
+
*/
|
|
9
|
+
interface NativeNode {
|
|
10
|
+
id: bigint;
|
|
11
|
+
kind: number;
|
|
12
|
+
exported: boolean;
|
|
13
|
+
version: number;
|
|
14
|
+
name_offset?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Native edge from engine
|
|
18
|
+
*/
|
|
19
|
+
interface NativeEdge {
|
|
20
|
+
src: bigint;
|
|
21
|
+
dst: bigint;
|
|
22
|
+
etype: number;
|
|
23
|
+
version: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Engine interface
|
|
27
|
+
*/
|
|
28
|
+
interface GraphEngine {
|
|
29
|
+
findByType(type: number): bigint[];
|
|
30
|
+
getNode(id: bigint): NativeNode | null;
|
|
31
|
+
nodeExists(id: bigint): boolean;
|
|
32
|
+
getOutgoingEdges(id: bigint, types: number[] | null): NativeEdge[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Backend interface
|
|
36
|
+
*/
|
|
37
|
+
interface GraphBackend {
|
|
38
|
+
engine: GraphEngine;
|
|
39
|
+
_bigIntToId(id: bigint): string;
|
|
40
|
+
_idToBigInt(id: string): bigint;
|
|
41
|
+
_numberToNodeType(kind: number): string;
|
|
42
|
+
_numberToEdgeType(etype: number): string;
|
|
43
|
+
}
|
|
44
|
+
export declare class GraphAPI {
|
|
45
|
+
private backend;
|
|
46
|
+
private port;
|
|
47
|
+
private server;
|
|
48
|
+
constructor(backend: GraphBackend, port?: number);
|
|
49
|
+
/**
|
|
50
|
+
* Start API server
|
|
51
|
+
*/
|
|
52
|
+
start(): this;
|
|
53
|
+
/**
|
|
54
|
+
* Stop server
|
|
55
|
+
*/
|
|
56
|
+
stop(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Handle HTTP request
|
|
59
|
+
*/
|
|
60
|
+
handleRequest(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* GET /api/services
|
|
63
|
+
* Returns all SERVICE nodes
|
|
64
|
+
*/
|
|
65
|
+
handleGetServices(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* GET /api/node/:id
|
|
68
|
+
* Returns single node by ID
|
|
69
|
+
*/
|
|
70
|
+
handleGetNode(req: IncomingMessage, res: ServerResponse, nodeId: string): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* GET /api/node/:id/children
|
|
73
|
+
* Returns children via CONTAINS edges
|
|
74
|
+
*/
|
|
75
|
+
handleGetChildren(req: IncomingMessage, res: ServerResponse, nodeId: string): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* GET /api/node/:id/edges
|
|
78
|
+
* Returns all outgoing edges from node
|
|
79
|
+
*/
|
|
80
|
+
handleGetEdges(req: IncomingMessage, res: ServerResponse, nodeId: string): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Get node name from name_offset (TODO: implement string table lookup)
|
|
83
|
+
*/
|
|
84
|
+
private getNodeName;
|
|
85
|
+
}
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=GraphAPI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphAPI.d.ts","sourceRoot":"","sources":["../../src/api/GraphAPI.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAU,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAoBpE;;GAEG;AACH,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MA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GAAG,OAAO,CAAC,IAAI,CAAC;IAmB7F;;;OAGG;IACG,iBAAiB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCjG;;;OAGG;IACG,cAAc,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA4B9F;;OAEG;IACH,OAAO,CAAC,WAAW;CAKpB"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clean Graph API for visualization
|
|
3
|
+
* Reads everything directly from RFDB (no caches)
|
|
4
|
+
*/
|
|
5
|
+
import { createServer } from 'http';
|
|
6
|
+
import { parse as parseUrl } from 'url';
|
|
7
|
+
// Node type constants
|
|
8
|
+
const NODE_TYPES = {
|
|
9
|
+
SERVICE: 2,
|
|
10
|
+
FUNCTION: 3,
|
|
11
|
+
CLASS: 4,
|
|
12
|
+
MODULE: 8,
|
|
13
|
+
};
|
|
14
|
+
// Edge type constants
|
|
15
|
+
const EDGE_TYPES = {
|
|
16
|
+
CONTAINS: 1,
|
|
17
|
+
DEPENDS_ON: 2,
|
|
18
|
+
CALLS: 3,
|
|
19
|
+
IMPORTS: 8,
|
|
20
|
+
};
|
|
21
|
+
export class GraphAPI {
|
|
22
|
+
backend;
|
|
23
|
+
port;
|
|
24
|
+
server;
|
|
25
|
+
constructor(backend, port = 3000) {
|
|
26
|
+
this.backend = backend;
|
|
27
|
+
this.port = port;
|
|
28
|
+
this.server = null;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Start API server
|
|
32
|
+
*/
|
|
33
|
+
start() {
|
|
34
|
+
this.server = createServer((req, res) => {
|
|
35
|
+
this.handleRequest(req, res);
|
|
36
|
+
});
|
|
37
|
+
this.server.listen(this.port, () => {
|
|
38
|
+
console.log(`\n🚀 Graph API Server started`);
|
|
39
|
+
console.log(`📊 http://localhost:${this.port}`);
|
|
40
|
+
console.log(`\nEndpoints:`);
|
|
41
|
+
console.log(` GET /api/services - List all services`);
|
|
42
|
+
console.log(` GET /api/node/:id - Get node by ID`);
|
|
43
|
+
console.log(` GET /api/node/:id/children - Get node children (via CONTAINS edges)`);
|
|
44
|
+
console.log(` GET /api/node/:id/edges - Get all edges from node`);
|
|
45
|
+
console.log(`\nPress Ctrl+C to stop\n`);
|
|
46
|
+
});
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Stop server
|
|
51
|
+
*/
|
|
52
|
+
stop() {
|
|
53
|
+
if (this.server) {
|
|
54
|
+
this.server.close();
|
|
55
|
+
console.log('Graph API Server stopped');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Handle HTTP request
|
|
60
|
+
*/
|
|
61
|
+
async handleRequest(req, res) {
|
|
62
|
+
const { pathname } = parseUrl(req.url || '', true);
|
|
63
|
+
// CORS headers
|
|
64
|
+
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
65
|
+
res.setHeader('Content-Type', 'application/json');
|
|
66
|
+
try {
|
|
67
|
+
// GET /api/services
|
|
68
|
+
if (pathname === '/api/services') {
|
|
69
|
+
await this.handleGetServices(req, res);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
// GET /api/node/:id
|
|
73
|
+
const nodeMatch = pathname?.match(/^\/api\/node\/([^\/]+)$/);
|
|
74
|
+
if (nodeMatch) {
|
|
75
|
+
await this.handleGetNode(req, res, decodeURIComponent(nodeMatch[1]));
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// GET /api/node/:id/children
|
|
79
|
+
const childrenMatch = pathname?.match(/^\/api\/node\/([^\/]+)\/children$/);
|
|
80
|
+
if (childrenMatch) {
|
|
81
|
+
await this.handleGetChildren(req, res, decodeURIComponent(childrenMatch[1]));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// GET /api/node/:id/edges
|
|
85
|
+
const edgesMatch = pathname?.match(/^\/api\/node\/([^\/]+)\/edges$/);
|
|
86
|
+
if (edgesMatch) {
|
|
87
|
+
await this.handleGetEdges(req, res, decodeURIComponent(edgesMatch[1]));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
// 404
|
|
91
|
+
res.writeHead(404);
|
|
92
|
+
res.end(JSON.stringify({ error: 'Endpoint not found' }));
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
console.error('API error:', error);
|
|
96
|
+
res.writeHead(500);
|
|
97
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
98
|
+
res.end(JSON.stringify({ error: message }));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* GET /api/services
|
|
103
|
+
* Returns all SERVICE nodes
|
|
104
|
+
*/
|
|
105
|
+
async handleGetServices(req, res) {
|
|
106
|
+
// Find all SERVICE nodes from RFDB
|
|
107
|
+
const serviceIds = this.backend.engine.findByType(NODE_TYPES.SERVICE);
|
|
108
|
+
const services = serviceIds.map(id => {
|
|
109
|
+
const node = this.backend.engine.getNode(id);
|
|
110
|
+
if (!node)
|
|
111
|
+
return null;
|
|
112
|
+
return {
|
|
113
|
+
id: this.backend._bigIntToId(node.id),
|
|
114
|
+
type: 'SERVICE',
|
|
115
|
+
name: this.getNodeName(node),
|
|
116
|
+
exported: node.exported,
|
|
117
|
+
version: node.version,
|
|
118
|
+
};
|
|
119
|
+
}).filter(Boolean);
|
|
120
|
+
res.writeHead(200);
|
|
121
|
+
res.end(JSON.stringify(services));
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* GET /api/node/:id
|
|
125
|
+
* Returns single node by ID
|
|
126
|
+
*/
|
|
127
|
+
async handleGetNode(req, res, nodeId) {
|
|
128
|
+
const node = this.backend.engine.getNode(this.backend._idToBigInt(nodeId));
|
|
129
|
+
if (!node) {
|
|
130
|
+
res.writeHead(404);
|
|
131
|
+
res.end(JSON.stringify({ error: 'Node not found' }));
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
res.writeHead(200);
|
|
135
|
+
res.end(JSON.stringify({
|
|
136
|
+
id: this.backend._bigIntToId(node.id),
|
|
137
|
+
type: this.backend._numberToNodeType(node.kind),
|
|
138
|
+
name: this.getNodeName(node),
|
|
139
|
+
exported: node.exported,
|
|
140
|
+
version: node.version,
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* GET /api/node/:id/children
|
|
145
|
+
* Returns children via CONTAINS edges
|
|
146
|
+
*/
|
|
147
|
+
async handleGetChildren(req, res, nodeId) {
|
|
148
|
+
const nodeIdBigInt = this.backend._idToBigInt(nodeId);
|
|
149
|
+
// Check node exists
|
|
150
|
+
if (!this.backend.engine.nodeExists(nodeIdBigInt)) {
|
|
151
|
+
res.writeHead(404);
|
|
152
|
+
res.end(JSON.stringify({ error: 'Node not found' }));
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
// Get outgoing CONTAINS edges
|
|
156
|
+
const edges = this.backend.engine.getOutgoingEdges(nodeIdBigInt, [EDGE_TYPES.CONTAINS]);
|
|
157
|
+
const children = edges.map(edge => {
|
|
158
|
+
const childNode = this.backend.engine.getNode(edge.dst);
|
|
159
|
+
if (!childNode)
|
|
160
|
+
return null;
|
|
161
|
+
return {
|
|
162
|
+
id: this.backend._bigIntToId(childNode.id),
|
|
163
|
+
type: this.backend._numberToNodeType(childNode.kind),
|
|
164
|
+
name: this.getNodeName(childNode),
|
|
165
|
+
exported: childNode.exported,
|
|
166
|
+
version: childNode.version,
|
|
167
|
+
};
|
|
168
|
+
}).filter(Boolean);
|
|
169
|
+
res.writeHead(200);
|
|
170
|
+
res.end(JSON.stringify({
|
|
171
|
+
nodeId,
|
|
172
|
+
childCount: children.length,
|
|
173
|
+
children
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* GET /api/node/:id/edges
|
|
178
|
+
* Returns all outgoing edges from node
|
|
179
|
+
*/
|
|
180
|
+
async handleGetEdges(req, res, nodeId) {
|
|
181
|
+
const nodeIdBigInt = this.backend._idToBigInt(nodeId);
|
|
182
|
+
// Check node exists
|
|
183
|
+
if (!this.backend.engine.nodeExists(nodeIdBigInt)) {
|
|
184
|
+
res.writeHead(404);
|
|
185
|
+
res.end(JSON.stringify({ error: 'Node not found' }));
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
// Get all outgoing edges
|
|
189
|
+
const edges = this.backend.engine.getOutgoingEdges(nodeIdBigInt, null);
|
|
190
|
+
const formattedEdges = edges.map(edge => ({
|
|
191
|
+
src: this.backend._bigIntToId(edge.src),
|
|
192
|
+
dst: this.backend._bigIntToId(edge.dst),
|
|
193
|
+
type: this.backend._numberToEdgeType(edge.etype),
|
|
194
|
+
version: edge.version,
|
|
195
|
+
}));
|
|
196
|
+
res.writeHead(200);
|
|
197
|
+
res.end(JSON.stringify({
|
|
198
|
+
nodeId,
|
|
199
|
+
edgeCount: formattedEdges.length,
|
|
200
|
+
edges: formattedEdges
|
|
201
|
+
}));
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Get node name from name_offset (TODO: implement string table lookup)
|
|
205
|
+
*/
|
|
206
|
+
getNodeName(node) {
|
|
207
|
+
// TODO: Lookup in string table
|
|
208
|
+
// For now return placeholder
|
|
209
|
+
return `Node_${node.id.toString().substring(0, 8)}`;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=GraphAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphAPI.js","sourceRoot":"","sources":["../../src/api/GraphAPI.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,KAAK,CAAC;AAExC,sBAAsB;AACtB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ACN,SAAS,EAAE,cAAc,CAAC,MAAM;YAChC,KAAK,EAAE,cAAc;SACtB,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;OAEG;IACK,WAAW,CAAC,IAAgB;QAClC,+BAA+B;QAC/B,6BAA6B;QAC7B,OAAO,QAAQ,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IACtD,CAAC;CACF"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GuaranteeAPI - CRUD API for contract-based guarantees
|
|
3
|
+
*
|
|
4
|
+
* Contract-based guarantees use JSON schema validation instead of Datalog rules.
|
|
5
|
+
* They have namespaced types: guarantee:queue, guarantee:api, guarantee:permission
|
|
6
|
+
*
|
|
7
|
+
* This API complements GuaranteeManager which handles Datalog-based GUARANTEE nodes.
|
|
8
|
+
*/
|
|
9
|
+
import { type GuaranteeNodeRecord, type GuaranteePriority, type GuaranteeStatus, type GuaranteeType } from '../core/nodes/GuaranteeNode.js';
|
|
10
|
+
/**
|
|
11
|
+
* Graph interface for GuaranteeAPI
|
|
12
|
+
*/
|
|
13
|
+
export interface GuaranteeGraphBackend {
|
|
14
|
+
addNode(node: Record<string, unknown>): Promise<void>;
|
|
15
|
+
getNode(id: string): Promise<Record<string, unknown> | null>;
|
|
16
|
+
deleteNode(id: string): Promise<void>;
|
|
17
|
+
queryNodes(filter: {
|
|
18
|
+
type: string;
|
|
19
|
+
}): AsyncIterable<Record<string, unknown>>;
|
|
20
|
+
addEdge(edge: {
|
|
21
|
+
type: string;
|
|
22
|
+
src: string;
|
|
23
|
+
dst: string;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
deleteEdge(src: string, dst: string, type: string): Promise<void>;
|
|
26
|
+
getOutgoingEdges(nodeId: string, types: string[]): Promise<Array<{
|
|
27
|
+
src: string;
|
|
28
|
+
dst: string;
|
|
29
|
+
type: string;
|
|
30
|
+
}>>;
|
|
31
|
+
getIncomingEdges(nodeId: string, types: string[]): Promise<Array<{
|
|
32
|
+
src: string;
|
|
33
|
+
dst: string;
|
|
34
|
+
type: string;
|
|
35
|
+
}>>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Input for creating a guarantee
|
|
39
|
+
*/
|
|
40
|
+
export interface CreateGuaranteeInput {
|
|
41
|
+
type: 'guarantee:queue' | 'guarantee:api' | 'guarantee:permission';
|
|
42
|
+
name: string;
|
|
43
|
+
priority?: GuaranteePriority;
|
|
44
|
+
status?: GuaranteeStatus;
|
|
45
|
+
owner?: string;
|
|
46
|
+
schema?: Record<string, unknown>;
|
|
47
|
+
condition?: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
governs?: string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Input for updating a guarantee
|
|
53
|
+
*/
|
|
54
|
+
export interface UpdateGuaranteeInput {
|
|
55
|
+
priority?: GuaranteePriority;
|
|
56
|
+
status?: GuaranteeStatus;
|
|
57
|
+
owner?: string;
|
|
58
|
+
schema?: Record<string, unknown>;
|
|
59
|
+
condition?: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Filter for finding guarantees
|
|
64
|
+
*/
|
|
65
|
+
export interface GuaranteeFilter {
|
|
66
|
+
type?: GuaranteeType | GuaranteeType[];
|
|
67
|
+
priority?: GuaranteePriority | GuaranteePriority[];
|
|
68
|
+
status?: GuaranteeStatus | GuaranteeStatus[];
|
|
69
|
+
owner?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Result of checking a guarantee
|
|
73
|
+
*/
|
|
74
|
+
export interface CheckGuaranteeResult {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
passed: boolean;
|
|
78
|
+
errors: string[];
|
|
79
|
+
validatedCount: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* GuaranteeAPI - CRUD operations for contract-based guarantees
|
|
83
|
+
*/
|
|
84
|
+
export declare class GuaranteeAPI {
|
|
85
|
+
private graph;
|
|
86
|
+
private schemaCache;
|
|
87
|
+
constructor(graph: GuaranteeGraphBackend);
|
|
88
|
+
/**
|
|
89
|
+
* Create a new contract-based guarantee
|
|
90
|
+
*/
|
|
91
|
+
createGuarantee(input: CreateGuaranteeInput): Promise<GuaranteeNodeRecord>;
|
|
92
|
+
/**
|
|
93
|
+
* Get a guarantee by ID
|
|
94
|
+
*/
|
|
95
|
+
getGuarantee(id: string): Promise<GuaranteeNodeRecord | null>;
|
|
96
|
+
/**
|
|
97
|
+
* Find guarantees matching filter
|
|
98
|
+
*/
|
|
99
|
+
findGuarantees(filter?: GuaranteeFilter): Promise<GuaranteeNodeRecord[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Update a guarantee
|
|
102
|
+
*/
|
|
103
|
+
updateGuarantee(id: string, updates: UpdateGuaranteeInput): Promise<GuaranteeNodeRecord>;
|
|
104
|
+
/**
|
|
105
|
+
* Delete a guarantee
|
|
106
|
+
*/
|
|
107
|
+
deleteGuarantee(id: string): Promise<boolean>;
|
|
108
|
+
/**
|
|
109
|
+
* Add GOVERNS edge from guarantee to a node
|
|
110
|
+
*/
|
|
111
|
+
addGoverns(guaranteeId: string, nodeId: string): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Remove GOVERNS edge
|
|
114
|
+
*/
|
|
115
|
+
removeGoverns(guaranteeId: string, nodeId: string): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Get nodes governed by a guarantee
|
|
118
|
+
*/
|
|
119
|
+
getGoverned(guaranteeId: string): Promise<string[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Get guarantees governing a node
|
|
122
|
+
*/
|
|
123
|
+
getGoverningGuarantees(nodeId: string): Promise<GuaranteeNodeRecord[]>;
|
|
124
|
+
/**
|
|
125
|
+
* Check a guarantee using JSON schema validation
|
|
126
|
+
* Returns validation results for governed nodes
|
|
127
|
+
*/
|
|
128
|
+
checkGuarantee(id: string): Promise<CheckGuaranteeResult>;
|
|
129
|
+
/**
|
|
130
|
+
* Check all guarantees
|
|
131
|
+
*/
|
|
132
|
+
checkAllGuarantees(): Promise<{
|
|
133
|
+
total: number;
|
|
134
|
+
passed: number;
|
|
135
|
+
failed: number;
|
|
136
|
+
results: CheckGuaranteeResult[];
|
|
137
|
+
}>;
|
|
138
|
+
/**
|
|
139
|
+
* Normalize type filter to array of types
|
|
140
|
+
*/
|
|
141
|
+
private normalizeTypeFilter;
|
|
142
|
+
/**
|
|
143
|
+
* Clear schema cache (useful after schema updates)
|
|
144
|
+
*/
|
|
145
|
+
clearSchemaCache(): void;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=GuaranteeAPI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuaranteeAPI.d.ts","sourceRoot":"","sources":["../../src/api/GuaranteeAPI.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAiB,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAsB3J;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,UAAU,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,IAAI,EAAE;Q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