@shapeshift-labs/frontier-lang-compiler 0.2.41 → 0.2.43
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/README.md +101 -1
- package/bench/compile-suite.mjs +31 -0
- package/bench/native-adapters.mjs +32 -0
- package/bench/native-import-suite.mjs +79 -0
- package/bench/native-matrix-suite.mjs +64 -0
- package/bench/native-transform-suite.mjs +125 -0
- package/bench/smoke.mjs +80 -375
- package/bench/source-change-suite.mjs +111 -0
- package/dist/coverage-matrix-profiles.js +19 -0
- package/dist/declarations/adapter-coverage.d.ts +181 -0
- package/dist/declarations/compile.d.ts +110 -0
- package/dist/declarations/import-adapter-core.d.ts +233 -0
- package/dist/declarations/import-adapter-options-native.d.ts +185 -0
- package/dist/declarations/import-adapter-options-platform.d.ts +204 -0
- package/dist/declarations/language-adapter-package-contracts.d.ts +190 -0
- package/dist/declarations/native-diff.d.ts +240 -0
- package/dist/declarations/native-import-contracts.d.ts +211 -0
- package/dist/declarations/native-import-coverage.d.ts +107 -0
- package/dist/declarations/native-import-losses.d.ts +199 -0
- package/dist/declarations/native-parser-features.d.ts +227 -0
- package/dist/declarations/native-parser-formats.d.ts +132 -0
- package/dist/declarations/native-project-admission.d.ts +160 -0
- package/dist/declarations/native-project.d.ts +209 -0
- package/dist/declarations/projection-coverage.d.ts +146 -0
- package/dist/declarations/projection-readiness.d.ts +115 -0
- package/dist/declarations/roundtrip.d.ts +200 -0
- package/dist/declarations/runtime.d.ts +135 -0
- package/dist/declarations/semantic-history.d.ts +188 -0
- package/dist/declarations/semantic-merge-conflicts.d.ts +82 -0
- package/dist/declarations/semantic-patch-bundle.d.ts +210 -0
- package/dist/declarations/semantic-sidecar-admission.d.ts +61 -0
- package/dist/declarations/semantic-sidecar.d.ts +317 -0
- package/dist/declarations/semantic-slice.d.ts +228 -0
- package/dist/declarations/source-preservation.d.ts +126 -0
- package/dist/declarations/target-adapters.d.ts +138 -0
- package/dist/declarations/universal-capability.d.ts +148 -0
- package/dist/declarations/universal-dialects.d.ts +242 -0
- package/dist/index.d.ts +28 -2570
- package/dist/index.js +76 -16575
- package/dist/internal/index-impl/ExternalSemanticIndexFormats.js +8 -0
- package/dist/internal/index-impl/FrontierCompileTargets.js +7 -0
- package/dist/internal/index-impl/NativeImportFeatureEvidencePolicies.js +111 -0
- package/dist/internal/index-impl/NativeImportLossKinds.js +24 -0
- package/dist/internal/index-impl/NativeImportReadinessBySeverity.js +6 -0
- package/dist/internal/index-impl/NativeImportRoundtripReadinessStatuses.js +7 -0
- package/dist/internal/index-impl/NativeImportTaxonomyKinds.js +19 -0
- package/dist/internal/index-impl/adapterCoverageCapabilityRow.js +13 -0
- package/dist/internal/index-impl/adapterCoverageSnapshotFromSummary.js +13 -0
- package/dist/internal/index-impl/adapterCoverageSourcePreservation.js +6 -0
- package/dist/internal/index-impl/adapterDiagnosticToLoss.js +23 -0
- package/dist/internal/index-impl/adapterDiagnosticsEvidence.js +27 -0
- package/dist/internal/index-impl/addLspSemanticTokens.js +32 -0
- package/dist/internal/index-impl/addLspSymbol.js +44 -0
- package/dist/internal/index-impl/addSet.js +5 -0
- package/dist/internal/index-impl/attachExternalOwnership.js +79 -0
- package/dist/internal/index-impl/attachNativeChangeRegionProjectionMetadata.js +13 -0
- package/dist/internal/index-impl/attachNativeImportLossSummary.js +11 -0
- package/dist/internal/index-impl/canonicalTargets.js +7 -0
- package/dist/internal/index-impl/clangAstChildEntries.js +9 -0
- package/dist/internal/index-impl/clangAstDeclaration.js +44 -0
- package/dist/internal/index-impl/clangAstKind.js +7 -0
- package/dist/internal/index-impl/clangAstNodeValue.js +7 -0
- package/dist/internal/index-impl/clangAstRoot.js +14 -0
- package/dist/internal/index-impl/clangDeclarationAction.js +7 -0
- package/dist/internal/index-impl/clangDeclarationName.js +10 -0
- package/dist/internal/index-impl/clangIncludePath.js +8 -0
- package/dist/internal/index-impl/clangLiteralValue.js +6 -0
- package/dist/internal/index-impl/clangLocPosition.js +12 -0
- package/dist/internal/index-impl/clangLocationKind.js +8 -0
- package/dist/internal/index-impl/clangPreprocessorKind.js +3 -0
- package/dist/internal/index-impl/clangPreprocessorRecords.js +8 -0
- package/dist/internal/index-impl/clangTypeName.js +9 -0
- package/dist/internal/index-impl/classifyNativeImportReadiness.js +9 -0
- package/dist/internal/index-impl/classifyNativeImportRoundtripReadiness.js +129 -0
- package/dist/internal/index-impl/compileFrontierDocument.js +28 -0
- package/dist/internal/index-impl/compileFrontierSource.js +8 -0
- package/dist/internal/index-impl/compileNativeSource.js +186 -0
- package/dist/internal/index-impl/compileTargetLanguage.js +5 -0
- package/dist/internal/index-impl/coverageMatrixContext.js +20 -0
- package/dist/internal/index-impl/createAstNormalizationContext.js +14 -0
- package/dist/internal/index-impl/createBabelNativeImporterAdapter.js +18 -0
- package/dist/internal/index-impl/createCSharpRoslynNativeImporterAdapter.js +68 -0
- package/dist/internal/index-impl/createClangAstNativeImporterAdapter.js +59 -0
- package/dist/internal/index-impl/createEstreeNativeImporterAdapter.js +12 -0
- package/dist/internal/index-impl/createGoAstNativeImporterAdapter.js +63 -0
- package/dist/internal/index-impl/createJavaAstNativeImporterAdapter.js +66 -0
- package/dist/internal/index-impl/createKotlinPsiNativeImporterAdapter.js +73 -0
- package/dist/internal/index-impl/createLightweightNativeImport.js +154 -0
- package/dist/internal/index-impl/createNativeImportCoverageMatrix.js +5 -0
- package/dist/internal/index-impl/createNativeImportFromCSharpRoslyn.js +39 -0
- package/dist/internal/index-impl/createNativeImportFromClangAst.js +36 -0
- package/dist/internal/index-impl/createNativeImportFromGoAst.js +35 -0
- package/dist/internal/index-impl/createNativeImportFromJavaAst.js +39 -0
- package/dist/internal/index-impl/createNativeImportFromKotlinPsi.js +47 -0
- package/dist/internal/index-impl/createNativeImportFromPythonAst.js +30 -0
- package/dist/internal/index-impl/createNativeImportFromRustSyn.js +30 -0
- package/dist/internal/index-impl/createNativeImportFromSwiftSyntax.js +37 -0
- package/dist/internal/index-impl/createNativeImportFromSyntaxAst.js +36 -0
- package/dist/internal/index-impl/createNativeImportFromTreeSitter.js +125 -0
- package/dist/internal/index-impl/createNativeImportFromTypeScriptAst.js +24 -0
- package/dist/internal/index-impl/createNativeImportResultContract.js +78 -0
- package/dist/internal/index-impl/createNativeParserAstFormatMatrix.js +5 -0
- package/dist/internal/index-impl/createNativeParserFeatureMatrix.js +5 -0
- package/dist/internal/index-impl/createNativeProjectImportResult.js +126 -0
- package/dist/internal/index-impl/createNativeRoundtripEvidence.js +117 -0
- package/dist/internal/index-impl/createNativeSourcePreservation.js +64 -0
- package/dist/internal/index-impl/createProjectImportAdmissionRecord.js +91 -0
- package/dist/internal/index-impl/createProjectionReadinessMatrix.js +5 -0
- package/dist/internal/index-impl/createProjectionTargetLossMatrix.js +5 -0
- package/dist/internal/index-impl/createPythonAstNativeImporterAdapter.js +52 -0
- package/dist/internal/index-impl/createRustSynNativeImporterAdapter.js +56 -0
- package/dist/internal/index-impl/createSemanticImportSidecar.js +105 -0
- package/dist/internal/index-impl/createSemanticImportSidecarAdmission.js +160 -0
- package/dist/internal/index-impl/createSemanticSlice.js +137 -0
- package/dist/internal/index-impl/createSwiftSyntaxNativeImporterAdapter.js +62 -0
- package/dist/internal/index-impl/createTreeSitterNativeImporterAdapter.js +58 -0
- package/dist/internal/index-impl/createTypeScriptCompilerNativeImporterAdapter.js +45 -0
- package/dist/internal/index-impl/createUniversalAstFromDocument.js +15 -0
- package/dist/internal/index-impl/createUniversalCapabilityMatrix.js +5 -0
- package/dist/internal/index-impl/csharpEvidenceSummary.js +18 -0
- package/dist/internal/index-impl/csharpGeneratedCodeLoss.js +20 -0
- package/dist/internal/index-impl/csharpGeneratedCodeMarker.js +16 -0
- package/dist/internal/index-impl/csharpGeneratedSourcePath.js +3 -0
- package/dist/internal/index-impl/csharpRoslynChildEntries.js +18 -0
- package/dist/internal/index-impl/csharpRoslynChildWithParent.js +6 -0
- package/dist/internal/index-impl/csharpRoslynDeclarationName.js +11 -0
- package/dist/internal/index-impl/csharpRoslynDeclarations.js +53 -0
- package/dist/internal/index-impl/csharpRoslynDirectiveKind.js +3 -0
- package/dist/internal/index-impl/csharpRoslynHasBody.js +3 -0
- package/dist/internal/index-impl/csharpRoslynKind.js +11 -0
- package/dist/internal/index-impl/csharpRoslynLiteralValue.js +5 -0
- package/dist/internal/index-impl/csharpRoslynMethodLikeKind.js +7 -0
- package/dist/internal/index-impl/csharpRoslynModifierNames.js +16 -0
- package/dist/internal/index-impl/csharpRoslynName.js +13 -0
- package/dist/internal/index-impl/csharpRoslynNodeValue.js +7 -0
- package/dist/internal/index-impl/csharpRoslynOperatorName.js +8 -0
- package/dist/internal/index-impl/csharpRoslynPosition.js +27 -0
- package/dist/internal/index-impl/csharpRoslynPositionKind.js +6 -0
- package/dist/internal/index-impl/csharpRoslynProblemNode.js +14 -0
- package/dist/internal/index-impl/csharpRoslynRecoveredKind.js +5 -0
- package/dist/internal/index-impl/csharpRoslynRoot.js +15 -0
- package/dist/internal/index-impl/csharpRoslynTypeDeclarationKind.js +8 -0
- package/dist/internal/index-impl/csharpRoslynTypeDeclarationSymbolKind.js +5 -0
- package/dist/internal/index-impl/csharpRoslynTypeName.js +19 -0
- package/dist/internal/index-impl/csharpRoslynUsingPath.js +5 -0
- package/dist/internal/index-impl/csharpRoslynVariableNames.js +10 -0
- package/dist/internal/index-impl/declarationRecord.js +11 -0
- package/dist/internal/index-impl/declarationSemanticCoverage.js +10 -0
- package/dist/internal/index-impl/diffNativeOwnershipRegions.js +19 -0
- package/dist/internal/index-impl/diffNativeSourceImports.js +166 -0
- package/dist/internal/index-impl/diffNativeSources.js +25 -0
- package/dist/internal/index-impl/diffNativeSymbols.js +41 -0
- package/dist/internal/index-impl/effectiveAdapterExactness.js +6 -0
- package/dist/internal/index-impl/effectiveNativeImporterAdapterCoverage.js +21 -0
- package/dist/internal/index-impl/emitForTarget.js +4 -0
- package/dist/internal/index-impl/emitForTargetWithSourceMap.js +11 -0
- package/dist/internal/index-impl/ensureTrailingNewline.js +4 -0
- package/dist/internal/index-impl/expandSemanticSliceSelection.js +51 -0
- package/dist/internal/index-impl/externalDiagnosticFact.js +22 -0
- package/dist/internal/index-impl/externalDiagnosticLoss.js +20 -0
- package/dist/internal/index-impl/externalDiagnosticSeverity.js +7 -0
- package/dist/internal/index-impl/externalDocument.js +12 -0
- package/dist/internal/index-impl/externalFact.js +10 -0
- package/dist/internal/index-impl/externalLanguageNameByNumber.js +23 -0
- package/dist/internal/index-impl/externalOccurrence.js +13 -0
- package/dist/internal/index-impl/externalRelation.js +10 -0
- package/dist/internal/index-impl/externalRelationPredicateForOccurrence.js +8 -0
- package/dist/internal/index-impl/externalSemanticBase.js +15 -0
- package/dist/internal/index-impl/externalSemanticCoverageLoss.js +17 -0
- package/dist/internal/index-impl/externalSemanticEvidence.js +16 -0
- package/dist/internal/index-impl/externalSemanticSourceMapMappings.js +26 -0
- package/dist/internal/index-impl/externalSymbol.js +14 -0
- package/dist/internal/index-impl/externalSymbolKindByNumber.js +32 -0
- package/dist/internal/index-impl/fileLevelNativeChangeRegion.js +23 -0
- package/dist/internal/index-impl/findSemanticImportRegion.js +6 -0
- package/dist/internal/index-impl/freezeNativeImporterAdapterCoverageSnapshot.js +13 -0
- package/dist/internal/index-impl/getNativeImportFeatureEvidencePolicy.js +5 -0
- package/dist/internal/index-impl/getNativeParserAstFormatProfile.js +4 -0
- package/dist/internal/index-impl/goAstChildEntries.js +23 -0
- package/dist/internal/index-impl/goAstDeclarationName.js +9 -0
- package/dist/internal/index-impl/goAstDeclarations.js +30 -0
- package/dist/internal/index-impl/goAstIdentName.js +5 -0
- package/dist/internal/index-impl/goAstImportPath.js +7 -0
- package/dist/internal/index-impl/goAstKind.js +15 -0
- package/dist/internal/index-impl/goAstLiteralValue.js +5 -0
- package/dist/internal/index-impl/goAstNodeValue.js +7 -0
- package/dist/internal/index-impl/goAstPackageName.js +5 -0
- package/dist/internal/index-impl/goAstPosition.js +30 -0
- package/dist/internal/index-impl/goAstPositionKind.js +6 -0
- package/dist/internal/index-impl/goAstReceiverName.js +8 -0
- package/dist/internal/index-impl/goAstRoot.js +12 -0
- package/dist/internal/index-impl/goAstTokenName.js +6 -0
- package/dist/internal/index-impl/goAstTypeName.js +27 -0
- package/dist/internal/index-impl/goAstTypeSpecSymbolKind.js +8 -0
- package/dist/internal/index-impl/goAstValueSpecName.js +4 -0
- package/dist/internal/index-impl/goAstValueSpecNames.js +7 -0
- package/dist/internal/index-impl/goBadAstKind.js +3 -0
- package/dist/internal/index-impl/goGeneratedCodeMarker.js +7 -0
- package/dist/internal/index-impl/goReceiverFieldCount.js +4 -0
- package/dist/internal/index-impl/goTypeEvidenceSummary.js +9 -0
- package/dist/internal/index-impl/hasNativeExactAstEvidence.js +13 -0
- package/dist/internal/index-impl/hashNativeSpanText.js +6 -0
- package/dist/internal/index-impl/identifierName.js +9 -0
- package/dist/internal/index-impl/ignoredCSharpRoslynField.js +31 -0
- package/dist/internal/index-impl/ignoredClangAstField.js +19 -0
- package/dist/internal/index-impl/ignoredGoAstField.js +23 -0
- package/dist/internal/index-impl/ignoredJavaAstField.js +29 -0
- package/dist/internal/index-impl/ignoredKotlinPsiField.js +26 -0
- package/dist/internal/index-impl/ignoredPythonAstField.js +17 -0
- package/dist/internal/index-impl/ignoredRustSynField.js +11 -0
- package/dist/internal/index-impl/ignoredSwiftSyntaxField.js +27 -0
- package/dist/internal/index-impl/ignoredSyntaxField.js +15 -0
- package/dist/internal/index-impl/importExternalSemanticIndex.js +141 -0
- package/dist/internal/index-impl/importNativeProject.js +26 -0
- package/dist/internal/index-impl/importNativeSource.js +317 -0
- package/dist/internal/index-impl/inferExternalSemanticIndexFormat.js +46 -0
- package/dist/internal/index-impl/inferredAdapterCoverageNotes.js +8 -0
- package/dist/internal/index-impl/inferredAdapterExactness.js +5 -0
- package/dist/internal/index-impl/inferredSemanticCoverageLevel.js +5 -0
- package/dist/internal/index-impl/isCSharpRoslynNode.js +4 -0
- package/dist/internal/index-impl/isClangAstNode.js +4 -0
- package/dist/internal/index-impl/isGoAstNode.js +4 -0
- package/dist/internal/index-impl/isJavaAstNode.js +4 -0
- package/dist/internal/index-impl/isKotlinPsiNode.js +4 -0
- package/dist/internal/index-impl/isNativeSourceImportResult.js +3 -0
- package/dist/internal/index-impl/isPythonAstNode.js +4 -0
- package/dist/internal/index-impl/isRustSynAstNode.js +4 -0
- package/dist/internal/index-impl/isSwiftSyntaxNode.js +4 -0
- package/dist/internal/index-impl/isSyntaxAstNode.js +3 -0
- package/dist/internal/index-impl/javaAnnotationProcessingSummary.js +13 -0
- package/dist/internal/index-impl/javaAstChildEntries.js +18 -0
- package/dist/internal/index-impl/javaAstChildWithParent.js +6 -0
- package/dist/internal/index-impl/javaAstDeclarationName.js +11 -0
- package/dist/internal/index-impl/javaAstDeclarations.js +35 -0
- package/dist/internal/index-impl/javaAstFieldNames.js +7 -0
- package/dist/internal/index-impl/javaAstHasBody.js +3 -0
- package/dist/internal/index-impl/javaAstImportPath.js +8 -0
- package/dist/internal/index-impl/javaAstKind.js +12 -0
- package/dist/internal/index-impl/javaAstLiteralValue.js +5 -0
- package/dist/internal/index-impl/javaAstModifierNames.js +16 -0
- package/dist/internal/index-impl/javaAstName.js +14 -0
- package/dist/internal/index-impl/javaAstNodeValue.js +8 -0
- package/dist/internal/index-impl/javaAstPackageName.js +5 -0
- package/dist/internal/index-impl/javaAstPosition.js +32 -0
- package/dist/internal/index-impl/javaAstPositionKind.js +7 -0
- package/dist/internal/index-impl/javaAstRoot.js +14 -0
- package/dist/internal/index-impl/javaAstTypeName.js +22 -0
- package/dist/internal/index-impl/javaBindingEvidenceSummary.js +10 -0
- package/dist/internal/index-impl/javaGeneratedCodeLoss.js +20 -0
- package/dist/internal/index-impl/javaGeneratedCodeMarker.js +16 -0
- package/dist/internal/index-impl/javaLombokAnnotationMarker.js +6 -0
- package/dist/internal/index-impl/javaPathEvidenceSummary.js +14 -0
- package/dist/internal/index-impl/javaProblemNode.js +3 -0
- package/dist/internal/index-impl/javaRecoveredAstKind.js +4 -0
- package/dist/internal/index-impl/javaTypeDeclarationKind.js +7 -0
- package/dist/internal/index-impl/javaTypeDeclarationSymbolKind.js +5 -0
- package/dist/internal/index-impl/kotlinCompilerPluginAnnotationNode.js +5 -0
- package/dist/internal/index-impl/kotlinContractNode.js +3 -0
- package/dist/internal/index-impl/kotlinCoroutineNode.js +8 -0
- package/dist/internal/index-impl/kotlinEvidenceSummary.js +21 -0
- package/dist/internal/index-impl/kotlinExpectActualNode.js +5 -0
- package/dist/internal/index-impl/kotlinGeneratedCodeLoss.js +22 -0
- package/dist/internal/index-impl/kotlinGeneratedCodeMarker.js +6 -0
- package/dist/internal/index-impl/kotlinGeneratedSourcePath.js +3 -0
- package/dist/internal/index-impl/kotlinPsiAnnotationNames.js +10 -0
- package/dist/internal/index-impl/kotlinPsiChildEntries.js +18 -0
- package/dist/internal/index-impl/kotlinPsiChildWithParent.js +6 -0
- package/dist/internal/index-impl/kotlinPsiDeclarationName.js +14 -0
- package/dist/internal/index-impl/kotlinPsiDeclarations.js +37 -0
- package/dist/internal/index-impl/kotlinPsiHasBody.js +3 -0
- package/dist/internal/index-impl/kotlinPsiImportPath.js +8 -0
- package/dist/internal/index-impl/kotlinPsiKind.js +13 -0
- package/dist/internal/index-impl/kotlinPsiModifiers.js +22 -0
- package/dist/internal/index-impl/kotlinPsiName.js +14 -0
- package/dist/internal/index-impl/kotlinPsiNodeValue.js +7 -0
- package/dist/internal/index-impl/kotlinPsiPackageName.js +8 -0
- package/dist/internal/index-impl/kotlinPsiPosition.js +27 -0
- package/dist/internal/index-impl/kotlinPsiPositionKind.js +6 -0
- package/dist/internal/index-impl/kotlinPsiProblemNode.js +10 -0
- package/dist/internal/index-impl/kotlinPsiRecoveredKind.js +5 -0
- package/dist/internal/index-impl/kotlinPsiRoot.js +15 -0
- package/dist/internal/index-impl/kotlinPsiTypeDeclarationKind.js +5 -0
- package/dist/internal/index-impl/kotlinPsiTypeDeclarationSymbolKind.js +8 -0
- package/dist/internal/index-impl/kotlinPsiTypeName.js +18 -0
- package/dist/internal/index-impl/kotlinPsiVariableNames.js +7 -0
- package/dist/internal/index-impl/kotlinScriptLoss.js +22 -0
- package/dist/internal/index-impl/kotlinUnsupportedSemanticLoss.js +23 -0
- package/dist/internal/index-impl/lineColumnForOffset.js +15 -0
- package/dist/internal/index-impl/literalSyntaxValue.js +4 -0
- package/dist/internal/index-impl/lossSeverityRank.js +6 -0
- package/dist/internal/index-impl/lspSymbolKindByNumber.js +19 -0
- package/dist/internal/index-impl/mapDiffSymbols.js +39 -0
- package/dist/internal/index-impl/matchingNativeTargetProjectionAdapter.js +4 -0
- package/dist/internal/index-impl/maxSemanticCoverageLevel.js +6 -0
- package/dist/internal/index-impl/mergeNativeLosses.js +12 -0
- package/dist/internal/index-impl/mergeSemanticIndexes.js +19 -0
- package/dist/internal/index-impl/mergeSemanticSliceSymbols.js +16 -0
- package/dist/internal/index-impl/missingInjectedParserResult.js +51 -0
- package/dist/internal/index-impl/nameFromExternalSymbol.js +10 -0
- package/dist/internal/index-impl/namedDeclaration.js +5 -0
- package/dist/internal/index-impl/nativeAstNodes.js +4 -0
- package/dist/internal/index-impl/nativeChangeMappingTouchesRegion.js +17 -0
- package/dist/internal/index-impl/nativeChangeProjectionEndpoint.js +28 -0
- package/dist/internal/index-impl/nativeChangeProjectionSourceMapLinks.js +33 -0
- package/dist/internal/index-impl/nativeChangeSpans.js +37 -0
- package/dist/internal/index-impl/nativeChangeSymbolTouchesRegion.js +10 -0
- package/dist/internal/index-impl/nativeChangeTouchedSymbol.js +21 -0
- package/dist/internal/index-impl/nativeChangedRegionProjectionAction.js +7 -0
- package/dist/internal/index-impl/nativeChangedRegionProjectionMetadata.js +49 -0
- package/dist/internal/index-impl/nativeChangedRegionProjectionSpanMetadata.js +12 -0
- package/dist/internal/index-impl/nativeCompileSourceLanguage.js +10 -0
- package/dist/internal/index-impl/nativeCompileTarget.js +10 -0
- package/dist/internal/index-impl/nativeDiffSymbolChanged.js +7 -0
- package/dist/internal/index-impl/nativeDiffSymbolKey.js +7 -0
- package/dist/internal/index-impl/nativeFeatureEvidenceRiskRank.js +6 -0
- package/dist/internal/index-impl/nativeImportCategoryForLossKind.js +16 -0
- package/dist/internal/index-impl/nativeImportEntries.js +4 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceHasKey.js +5 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceIds.js +10 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidencePolicy.js +14 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceReasons.js +8 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceValue.js +11 -0
- package/dist/internal/index-impl/nativeImportFeatureEvidenceValuePresent.js +7 -0
- package/dist/internal/index-impl/nativeImportHasExactAstCoverage.js +5 -0
- package/dist/internal/index-impl/nativeImportProjectionContext.js +40 -0
- package/dist/internal/index-impl/nativeImportReadiness.js +6 -0
- package/dist/internal/index-impl/nativeImportReadinessReasons.js +16 -0
- package/dist/internal/index-impl/nativeImportRoundtripParser.js +10 -0
- package/dist/internal/index-impl/nativeImportRoundtripReasons.js +22 -0
- package/dist/internal/index-impl/nativeImportSourcePreservationRecord.js +6 -0
- package/dist/internal/index-impl/nativeImportSourceText.js +6 -0
- package/dist/internal/index-impl/nativeImporterAdapterCapabilityEvidence.js +59 -0
- package/dist/internal/index-impl/nativeImporterAdapterCoverage.js +12 -0
- package/dist/internal/index-impl/nativeJavaScriptImporterDeps.js +12 -0
- package/dist/internal/index-impl/nativeNodeId.js +8 -0
- package/dist/internal/index-impl/nativeProjectionDeclarationKind.js +12 -0
- package/dist/internal/index-impl/nativeProjectionDeclarations.js +48 -0
- package/dist/internal/index-impl/nativeProjectionImportOnlySymbol.js +5 -0
- package/dist/internal/index-impl/nativeProjectionKindForNode.js +12 -0
- package/dist/internal/index-impl/nativeProjectionLineComment.js +5 -0
- package/dist/internal/index-impl/nativeProjectionLoss.js +23 -0
- package/dist/internal/index-impl/nativeProjectionSourceCandidate.js +22 -0
- package/dist/internal/index-impl/nativeProjectionStubHeader.js +11 -0
- package/dist/internal/index-impl/nativeProjectionStubLosses.js +36 -0
- package/dist/internal/index-impl/nativeSourceChangeReasons.js +11 -0
- package/dist/internal/index-impl/nativeSourceChangeSummary.js +13 -0
- package/dist/internal/index-impl/nativeSourceCompileDeclarationGeneratedSpan.js +25 -0
- package/dist/internal/index-impl/nativeSourceCompileDeclarationMappings.js +31 -0
- package/dist/internal/index-impl/nativeSourceCompileEvidence.js +30 -0
- package/dist/internal/index-impl/nativeSourceCompileFileMapping.js +21 -0
- package/dist/internal/index-impl/nativeSourceCompileFullGeneratedSpan.js +16 -0
- package/dist/internal/index-impl/nativeSourceCompileGeneratedSpanForOffset.js +17 -0
- package/dist/internal/index-impl/nativeSourceCompileGeneratedSpanFromSource.js +13 -0
- package/dist/internal/index-impl/nativeSourceCompileMapTarget.js +6 -0
- package/dist/internal/index-impl/nativeSourceCompilePreservedMappings.js +51 -0
- package/dist/internal/index-impl/nativeSourceCompileSourceMaps.js +41 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetCoverage.js +21 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetExtension.js +10 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetLoss.js +32 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetLosses.js +43 -0
- package/dist/internal/index-impl/nativeSourceCompileTargetPath.js +9 -0
- package/dist/internal/index-impl/nativeTargetProjectionAdapterEvidence.js +26 -0
- package/dist/internal/index-impl/nativeTargetProjectionAdapterMatches.js +16 -0
- package/dist/internal/index-impl/nativeTargetProjectionDiagnosticToLoss.js +22 -0
- package/dist/internal/index-impl/normalizeAdapterDiagnostics.js +28 -0
- package/dist/internal/index-impl/normalizeArray.js +4 -0
- package/dist/internal/index-impl/normalizeCSharpRoslynKind.js +38 -0
- package/dist/internal/index-impl/normalizeCompileTarget.js +9 -0
- package/dist/internal/index-impl/normalizeDiagnosticSeverity.js +6 -0
- package/dist/internal/index-impl/normalizeExternalOccurrenceRole.js +9 -0
- package/dist/internal/index-impl/normalizeExternalSemanticIndexFormat.js +34 -0
- package/dist/internal/index-impl/normalizeExternalSemanticIndexPayload.js +10 -0
- package/dist/internal/index-impl/normalizeExternalSemanticLanguage.js +7 -0
- package/dist/internal/index-impl/normalizeExternalSpan.js +21 -0
- package/dist/internal/index-impl/normalizeExternalSymbolKind.js +6 -0
- package/dist/internal/index-impl/normalizeFrontierSemanticIndexPayload.js +14 -0
- package/dist/internal/index-impl/normalizeGenericExternalSemanticIndexPayload.js +15 -0
- package/dist/internal/index-impl/normalizeGleanPayload.js +210 -0
- package/dist/internal/index-impl/normalizeGoAstKind.js +14 -0
- package/dist/internal/index-impl/normalizeJavaAstKind.js +24 -0
- package/dist/internal/index-impl/normalizeKotlinPsiKind.js +54 -0
- package/dist/internal/index-impl/normalizeLossSeverity.js +6 -0
- package/dist/internal/index-impl/normalizeLsifPayload.js +91 -0
- package/dist/internal/index-impl/normalizeLspDocuments.js +15 -0
- package/dist/internal/index-impl/normalizeLspPayload.js +33 -0
- package/dist/internal/index-impl/normalizeLspSymbolKind.js +5 -0
- package/dist/internal/index-impl/normalizeNativeDiffImport.js +15 -0
- package/dist/internal/index-impl/normalizeNativeImporterAdapter.js +33 -0
- package/dist/internal/index-impl/normalizeNativeImporterAdapterCoverage.js +38 -0
- package/dist/internal/index-impl/normalizeNativeImporterAdapterObservedCoverage.js +43 -0
- package/dist/internal/index-impl/normalizeNativeImporterSemanticCoverage.js +18 -0
- package/dist/internal/index-impl/normalizeNativeLossKind.js +8 -0
- package/dist/internal/index-impl/normalizeNativeLossRecord.js +20 -0
- package/dist/internal/index-impl/normalizeNativeLossRecords.js +6 -0
- package/dist/internal/index-impl/normalizeNativeTargetProjectionAdapter.js +37 -0
- package/dist/internal/index-impl/normalizeNativeTargetProjectionAdapterCoverage.js +20 -0
- package/dist/internal/index-impl/normalizeParserErrors.js +18 -0
- package/dist/internal/index-impl/normalizeRustSynKind.js +32 -0
- package/dist/internal/index-impl/normalizeScipPayload.js +98 -0
- package/dist/internal/index-impl/normalizeSemanticDbPayload.js +57 -0
- package/dist/internal/index-impl/normalizeSemanticSliceRef.js +4 -0
- package/dist/internal/index-impl/normalizeSwiftSyntaxKind.js +45 -0
- package/dist/internal/index-impl/normalizeSyntaxAstRoot.js +5 -0
- package/dist/internal/index-impl/numberOrUndefined.js +3 -0
- package/dist/internal/index-impl/observeNativeImporterAdapterCoverage.js +24 -0
- package/dist/internal/index-impl/observeNativeImporterAdapterCoverageDetails.js +66 -0
- package/dist/internal/index-impl/observeNativeImporterSemanticEvidence.js +23 -0
- package/dist/internal/index-impl/observedAdapterExactness.js +6 -0
- package/dist/internal/index-impl/oneLine.js +3 -0
- package/dist/internal/index-impl/parseCSharpRoslynSource.js +15 -0
- package/dist/internal/index-impl/parseClangAstSource.js +16 -0
- package/dist/internal/index-impl/parseGoAstSource.js +15 -0
- package/dist/internal/index-impl/parseJavaAstSource.js +16 -0
- package/dist/internal/index-impl/parseKotlinPsiSource.js +16 -0
- package/dist/internal/index-impl/parsePythonAstSource.js +16 -0
- package/dist/internal/index-impl/parseRustSynSource.js +13 -0
- package/dist/internal/index-impl/parseSwiftSyntaxSource.js +15 -0
- package/dist/internal/index-impl/parseTreeSitterSource.js +6 -0
- package/dist/internal/index-impl/primitiveCSharpRoslynFields.js +23 -0
- package/dist/internal/index-impl/primitiveClangAstFields.js +31 -0
- package/dist/internal/index-impl/primitiveGoAstFields.js +22 -0
- package/dist/internal/index-impl/primitiveJavaAstFields.js +22 -0
- package/dist/internal/index-impl/primitiveKotlinPsiFields.js +24 -0
- package/dist/internal/index-impl/primitivePythonAstFields.js +18 -0
- package/dist/internal/index-impl/primitiveRustSynFields.js +16 -0
- package/dist/internal/index-impl/primitiveSwiftSyntaxFields.js +21 -0
- package/dist/internal/index-impl/primitiveSyntaxFields.js +13 -0
- package/dist/internal/index-impl/primitiveTypeScriptFields.js +9 -0
- package/dist/internal/index-impl/projectFrontierAst.js +6 -0
- package/dist/internal/index-impl/projectImportAdmissionDecision.js +27 -0
- package/dist/internal/index-impl/projectImportAdmissionMergeScore.js +316 -0
- package/dist/internal/index-impl/projectImportAdmissionSummaries.js +252 -0
- package/dist/internal/index-impl/projectNativeImportToSource.js +90 -0
- package/dist/internal/index-impl/projectors.js +8 -0
- package/dist/internal/index-impl/pythonAliasName.js +5 -0
- package/dist/internal/index-impl/pythonAssignmentName.js +9 -0
- package/dist/internal/index-impl/pythonAstChildEntries.js +11 -0
- package/dist/internal/index-impl/pythonAstDeclaration.js +18 -0
- package/dist/internal/index-impl/pythonAstKind.js +3 -0
- package/dist/internal/index-impl/pythonAstLiteralValue.js +6 -0
- package/dist/internal/index-impl/pythonAstNodeValue.js +4 -0
- package/dist/internal/index-impl/pythonAstRoot.js +9 -0
- package/dist/internal/index-impl/pythonTargetName.js +12 -0
- package/dist/internal/index-impl/queryNativeParserFeatureMatrix.js +5 -0
- package/dist/internal/index-impl/queryProjectionReadinessMatrix.js +5 -0
- package/dist/internal/index-impl/readSemanticSliceJson.js +7 -0
- package/dist/internal/index-impl/readStringArray.js +5 -0
- package/dist/internal/index-impl/readUniversalAstJson.js +9 -0
- package/dist/internal/index-impl/relationPredicateForDeclaration.js +5 -0
- package/dist/internal/index-impl/renderCProjectionStubs.js +11 -0
- package/dist/internal/index-impl/renderGenericProjectionStubs.js +5 -0
- package/dist/internal/index-impl/renderJavaScriptProjectionStubs.js +12 -0
- package/dist/internal/index-impl/renderNativeProjectionStubs.js +13 -0
- package/dist/internal/index-impl/renderPythonProjectionStubs.js +10 -0
- package/dist/internal/index-impl/renderRustProjectionStubs.js +11 -0
- package/dist/internal/index-impl/renderTargetAst.js +6 -0
- package/dist/internal/index-impl/renderTargetAstWithSourceMap.js +6 -0
- package/dist/internal/index-impl/renderTypeScriptProjectionStubs.js +14 -0
- package/dist/internal/index-impl/renderers.js +8 -0
- package/dist/internal/index-impl/resolveCapabilityAdapters.js +29 -0
- package/dist/internal/index-impl/resolveNativeProjectAdapter.js +11 -0
- package/dist/internal/index-impl/resolveNativeTargetProjectionAdapter.js +14 -0
- package/dist/internal/index-impl/runNativeImporterAdapter.js +130 -0
- package/dist/internal/index-impl/runNativeTargetProjectionAdapter.js +115 -0
- package/dist/internal/index-impl/rustSynAstRoot.js +11 -0
- package/dist/internal/index-impl/rustSynChildEntries.js +10 -0
- package/dist/internal/index-impl/rustSynColumnToOneBased.js +3 -0
- package/dist/internal/index-impl/rustSynDeclaration.js +40 -0
- package/dist/internal/index-impl/rustSynIdentName.js +12 -0
- package/dist/internal/index-impl/rustSynImplName.js +11 -0
- package/dist/internal/index-impl/rustSynKind.js +15 -0
- package/dist/internal/index-impl/rustSynLiteralValue.js +5 -0
- package/dist/internal/index-impl/rustSynMacroKind.js +3 -0
- package/dist/internal/index-impl/rustSynNodeValue.js +6 -0
- package/dist/internal/index-impl/rustSynPathName.js +21 -0
- package/dist/internal/index-impl/rustSynPayload.js +6 -0
- package/dist/internal/index-impl/rustSynSpanKind.js +5 -0
- package/dist/internal/index-impl/rustSynUseName.js +26 -0
- package/dist/internal/index-impl/rustSynVisibility.js +9 -0
- package/dist/internal/index-impl/rustSynWrapperKind.js +12 -0
- package/dist/internal/index-impl/safeNativeImporterAdapterSummary.js +8 -0
- package/dist/internal/index-impl/safeNativeTargetProjectionAdapterSummary.js +8 -0
- package/dist/internal/index-impl/safeProjectionIdentifier.js +5 -0
- package/dist/internal/index-impl/scipOccurrenceRole.js +8 -0
- package/dist/internal/index-impl/scipOccurrenceRoleSet.js +12 -0
- package/dist/internal/index-impl/scipRelationshipRelations.js +20 -0
- package/dist/internal/index-impl/scipSymbolFacts.js +31 -0
- package/dist/internal/index-impl/scipSymbolId.js +8 -0
- package/dist/internal/index-impl/scipSyntaxKind.js +8 -0
- package/dist/internal/index-impl/selectSemanticSliceRecords.js +70 -0
- package/dist/internal/index-impl/semanticDbOccurrenceRole.js +5 -0
- package/dist/internal/index-impl/semanticDbSymbolFacts.js +15 -0
- package/dist/internal/index-impl/semanticDbSymbolId.js +7 -0
- package/dist/internal/index-impl/semanticHistoryRecords.js +233 -0
- package/dist/internal/index-impl/semanticIndexFromNativeDeclarations.js +127 -0
- package/dist/internal/index-impl/semanticMergeAdmissionForSeverity.js +5 -0
- package/dist/internal/index-impl/semanticMergeConflicts.js +116 -0
- package/dist/internal/index-impl/semanticPatchBundleRecords.js +240 -0
- package/dist/internal/index-impl/semanticPredicateMatches.js +4 -0
- package/dist/internal/index-impl/semanticSliceAssertion.js +8 -0
- package/dist/internal/index-impl/semanticSliceContext.js +24 -0
- package/dist/internal/index-impl/semanticSliceCurrentSource.js +4 -0
- package/dist/internal/index-impl/semanticSliceExpectedAssertions.js +8 -0
- package/dist/internal/index-impl/semanticSliceImportResult.js +30 -0
- package/dist/internal/index-impl/semanticSliceMappingMatchesRef.js +15 -0
- package/dist/internal/index-impl/semanticSliceMappingTouchesSets.js +7 -0
- package/dist/internal/index-impl/semanticSliceNativeNodeMatchesRef.js +12 -0
- package/dist/internal/index-impl/semanticSliceNativeParentMap.js +7 -0
- package/dist/internal/index-impl/semanticSliceReadiness.js +14 -0
- package/dist/internal/index-impl/semanticSliceReasons.js +11 -0
- package/dist/internal/index-impl/semanticSliceRecords.js +62 -0
- package/dist/internal/index-impl/semanticSliceRegionFromMapping.js +16 -0
- package/dist/internal/index-impl/semanticSliceRegionFromSymbol.js +21 -0
- package/dist/internal/index-impl/semanticSliceRegionMatchesRef.js +12 -0
- package/dist/internal/index-impl/semanticSliceRegionTouchesSets.js +6 -0
- package/dist/internal/index-impl/semanticSliceSourceFiles.js +35 -0
- package/dist/internal/index-impl/semanticSliceSourceHashAssertions.js +27 -0
- package/dist/internal/index-impl/semanticSliceSourceHashMap.js +18 -0
- package/dist/internal/index-impl/semanticSliceSourceMapLinks.js +21 -0
- package/dist/internal/index-impl/semanticSliceSourceSpans.js +9 -0
- package/dist/internal/index-impl/semanticSliceSourceTextMap.js +19 -0
- package/dist/internal/index-impl/semanticSliceSpanTouchesSelection.js +6 -0
- package/dist/internal/index-impl/semanticSliceSpansOverlap.js +15 -0
- package/dist/internal/index-impl/semanticSliceSymbolMatchesRef.js +13 -0
- package/dist/internal/index-impl/semanticSliceSymbolSpan.js +3 -0
- package/dist/internal/index-impl/semanticSliceSymbolTouchesSets.js +7 -0
- package/dist/internal/index-impl/semanticSliceTouchedSymbol.js +16 -0
- package/dist/internal/index-impl/semanticSliceValueMatches.js +6 -0
- package/dist/internal/index-impl/semanticTokenModifiers.js +7 -0
- package/dist/internal/index-impl/serializableDiagnostic.js +13 -0
- package/dist/internal/index-impl/serializableIncludeGraphSummary.js +10 -0
- package/dist/internal/index-impl/shortNodeText.js +6 -0
- package/dist/internal/index-impl/sourceMapRenderers.js +8 -0
- package/dist/internal/index-impl/sourcePreservationFromProjectionContext.js +5 -0
- package/dist/internal/index-impl/sourceSpanPathMatches.js +4 -0
- package/dist/internal/index-impl/sourceTextForSpan.js +12 -0
- package/dist/internal/index-impl/spanFromCSharpLineFields.js +12 -0
- package/dist/internal/index-impl/spanFromCSharpLineSpan.js +18 -0
- package/dist/internal/index-impl/spanFromCSharpRoslynNode.js +19 -0
- package/dist/internal/index-impl/spanFromClangAstNode.js +17 -0
- package/dist/internal/index-impl/spanFromGoAstNode.js +14 -0
- package/dist/internal/index-impl/spanFromJavaAstNode.js +36 -0
- package/dist/internal/index-impl/spanFromJavaLineFields.js +12 -0
- package/dist/internal/index-impl/spanFromJavaRange.js +22 -0
- package/dist/internal/index-impl/spanFromKotlinLineFields.js +12 -0
- package/dist/internal/index-impl/spanFromKotlinPsiNode.js +19 -0
- package/dist/internal/index-impl/spanFromKotlinRange.js +18 -0
- package/dist/internal/index-impl/spanFromLoc.js +11 -0
- package/dist/internal/index-impl/spanFromLspRange.js +12 -0
- package/dist/internal/index-impl/spanFromPythonAstNode.js +15 -0
- package/dist/internal/index-impl/spanFromRustSynNode.js +20 -0
- package/dist/internal/index-impl/spanFromScipOccurrence.js +40 -0
- package/dist/internal/index-impl/spanFromSemanticDbRange.js +11 -0
- package/dist/internal/index-impl/spanFromSwiftLineFields.js +12 -0
- package/dist/internal/index-impl/spanFromSwiftRange.js +18 -0
- package/dist/internal/index-impl/spanFromSwiftSyntaxNode.js +19 -0
- package/dist/internal/index-impl/spanFromTreeSitterNode.js +13 -0
- package/dist/internal/index-impl/spanFromTypeScriptNode.js +15 -0
- package/dist/internal/index-impl/stringFromTsExpression.js +7 -0
- package/dist/internal/index-impl/summarizeNativeChangedRegionProjections.js +16 -0
- package/dist/internal/index-impl/summarizeNativeImportFeatureEvidence.js +60 -0
- package/dist/internal/index-impl/summarizeNativeImportLosses.js +65 -0
- package/dist/internal/index-impl/summarizeProjectSourcePreservation.js +15 -0
- package/dist/internal/index-impl/swiftEvidenceSummary.js +19 -0
- package/dist/internal/index-impl/swiftGeneratedCodeLoss.js +20 -0
- package/dist/internal/index-impl/swiftGeneratedCodeMarker.js +11 -0
- package/dist/internal/index-impl/swiftGeneratedSourcePath.js +3 -0
- package/dist/internal/index-impl/swiftSyntaxAttributeNames.js +10 -0
- package/dist/internal/index-impl/swiftSyntaxChildEntries.js +18 -0
- package/dist/internal/index-impl/swiftSyntaxChildWithParent.js +6 -0
- package/dist/internal/index-impl/swiftSyntaxConditionalCompilationKind.js +3 -0
- package/dist/internal/index-impl/swiftSyntaxDeclarationName.js +19 -0
- package/dist/internal/index-impl/swiftSyntaxDeclarations.js +38 -0
- package/dist/internal/index-impl/swiftSyntaxEnumCaseNames.js +7 -0
- package/dist/internal/index-impl/swiftSyntaxFunctionLikeKind.js +8 -0
- package/dist/internal/index-impl/swiftSyntaxHasBody.js +3 -0
- package/dist/internal/index-impl/swiftSyntaxImportPath.js +14 -0
- package/dist/internal/index-impl/swiftSyntaxKind.js +11 -0
- package/dist/internal/index-impl/swiftSyntaxLiteralValue.js +5 -0
- package/dist/internal/index-impl/swiftSyntaxMacroKind.js +3 -0
- package/dist/internal/index-impl/swiftSyntaxModifierNames.js +16 -0
- package/dist/internal/index-impl/swiftSyntaxName.js +14 -0
- package/dist/internal/index-impl/swiftSyntaxNodeValue.js +7 -0
- package/dist/internal/index-impl/swiftSyntaxOperatorName.js +6 -0
- package/dist/internal/index-impl/swiftSyntaxPatternName.js +6 -0
- package/dist/internal/index-impl/swiftSyntaxPosition.js +27 -0
- package/dist/internal/index-impl/swiftSyntaxPositionKind.js +6 -0
- package/dist/internal/index-impl/swiftSyntaxProblemNode.js +13 -0
- package/dist/internal/index-impl/swiftSyntaxRecoveredKind.js +7 -0
- package/dist/internal/index-impl/swiftSyntaxRoot.js +15 -0
- package/dist/internal/index-impl/swiftSyntaxTypeDeclarationKind.js +7 -0
- package/dist/internal/index-impl/swiftSyntaxTypeDeclarationSymbolKind.js +8 -0
- package/dist/internal/index-impl/swiftSyntaxTypeName.js +19 -0
- package/dist/internal/index-impl/swiftSyntaxVariableNames.js +7 -0
- package/dist/internal/index-impl/syntaxDeclaration.js +18 -0
- package/dist/internal/index-impl/testSemanticSlice.js +43 -0
- package/dist/internal/index-impl/treeSitterDeclaration.js +24 -0
- package/dist/internal/index-impl/treeSitterFieldText.js +5 -0
- package/dist/internal/index-impl/truncatedAstLoss.js +16 -0
- package/dist/internal/index-impl/typeScriptDeclaration.js +14 -0
- package/dist/internal/index-impl/typeScriptKindName.js +6 -0
- package/dist/internal/index-impl/typeScriptNodeValue.js +4 -0
- package/dist/internal/index-impl/uniqueNativeProjectionDeclarations.js +9 -0
- package/dist/internal/index-impl/uniqueSemanticSliceNativeNodes.js +11 -0
- package/dist/internal/index-impl/uniqueSemanticSliceRegions.js +15 -0
- package/dist/internal/index-impl/uniqueSemanticSliceSpans.js +21 -0
- package/dist/internal/index-impl/unverifiedNativeAstLosses.js +16 -0
- package/dist/internal/index-impl/uriToPath.js +11 -0
- package/dist/internal/index-impl/visitCSharpRoslynNode.js +87 -0
- package/dist/internal/index-impl/visitClangAstNode.js +62 -0
- package/dist/internal/index-impl/visitGoAstNode.js +99 -0
- package/dist/internal/index-impl/visitJavaAstNode.js +73 -0
- package/dist/internal/index-impl/visitKotlinPsiNode.js +108 -0
- package/dist/internal/index-impl/visitPythonAstNode.js +47 -0
- package/dist/internal/index-impl/visitRustSynNode.js +62 -0
- package/dist/internal/index-impl/visitSwiftSyntaxNode.js +103 -0
- package/dist/internal/index-impl/visitSyntaxAstNode.js +46 -0
- package/dist/internal/index-impl/visitTreeSitterNode.js +145 -0
- package/dist/internal/index-impl/visitTypeScriptAstNode.js +45 -0
- package/dist/internal/index-impl/withExternalEmptyLoss.js +32 -0
- package/dist/internal/index-impl/withNativeImportReadiness.js +53 -0
- package/dist/internal/index-impl/writeSemanticSliceJson.js +7 -0
- package/dist/internal/index-impl/writeUniversalAstJson.js +8 -0
- package/dist/language-adapter-package-contracts.js +302 -0
- package/dist/native-import-coverage-matrix.js +237 -0
- package/dist/native-import-language-profiles.js +169 -0
- package/dist/native-import-utils.js +143 -0
- package/dist/native-js-ts-importers.js +85 -0
- package/dist/native-parser-ast-format-matrix.js +147 -0
- package/dist/native-parser-ast-format-profiles.js +271 -0
- package/dist/native-parser-feature-assessment.js +118 -0
- package/dist/native-parser-feature-coverage.js +268 -0
- package/dist/native-parser-feature-matrix.js +92 -0
- package/dist/native-parser-feature-rows.js +219 -0
- package/dist/native-region-scanner-core.js +179 -0
- package/dist/native-region-scanner-dynamic.js +259 -0
- package/dist/native-region-scanner-functional.js +191 -0
- package/dist/native-region-scanner-js.js +310 -0
- package/dist/native-region-scanner-main.js +301 -0
- package/dist/native-region-scanner.js +62 -0
- package/dist/native-source-maps.js +260 -0
- package/dist/native-source-preservation-scanner.js +266 -0
- package/dist/native-source-preservation-types.d.ts +77 -0
- package/dist/projection-readiness-helpers.js +166 -0
- package/dist/projection-readiness-matrix.js +122 -0
- package/dist/projection-target-loss-matrix.js +318 -0
- package/dist/semantic-import-contract-summary.js +188 -0
- package/dist/semantic-import-layers.js +320 -0
- package/dist/semantic-import-regions.js +181 -0
- package/dist/semantic-import-sidecar-admission-types.d.ts +61 -0
- package/dist/semantic-import-sidecar-entry.js +78 -0
- package/dist/semantic-import-sidecar-types.d.ts +275 -0
- package/dist/semantic-import-source-preservation.js +198 -0
- package/dist/universal-capability-matrix.js +280 -0
- package/dist/universal-dialect-layer.js +74 -0
- package/dist/universal-dialect-registry.js +204 -0
- package/dist/universal-dialect-utils.js +110 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import{csharpRoslynDeclarationName}from'./csharpRoslynDeclarationName.js';import{csharpRoslynModifierNames}from'./csharpRoslynModifierNames.js';import{csharpRoslynName}from'./csharpRoslynName.js';import{csharpRoslynTypeName}from'./csharpRoslynTypeName.js';import{csharpRoslynUsingPath}from'./csharpRoslynUsingPath.js';
|
|
2
|
+
export function primitiveCSharpRoslynFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
const name = csharpRoslynDeclarationName(node);
|
|
5
|
+
if (name) fields.name = name;
|
|
6
|
+
const importPath = csharpRoslynUsingPath(node);
|
|
7
|
+
if (importPath) fields.importPath = importPath;
|
|
8
|
+
const type = csharpRoslynTypeName(node.type ?? node.Type ?? node.returnType ?? node.ReturnType);
|
|
9
|
+
if (type) fields.type = type;
|
|
10
|
+
const modifiers = csharpRoslynModifierNames(node);
|
|
11
|
+
if (modifiers.length) fields.modifiers = modifiers.join(',');
|
|
12
|
+
const alias = csharpRoslynName(node.alias ?? node.Alias);
|
|
13
|
+
if (alias) fields.alias = alias;
|
|
14
|
+
if (node.static === true || node.isStatic === true) fields.static = true;
|
|
15
|
+
if (node.global === true || node.isGlobal === true) fields.global = true;
|
|
16
|
+
if (node.generated === true || node.Generated === true) fields.generated = true;
|
|
17
|
+
if (node.containsDiagnostics === true || node.ContainsDiagnostics === true) fields.containsDiagnostics = true;
|
|
18
|
+
if (node.containsSkippedText === true || node.ContainsSkippedText === true) fields.containsSkippedText = true;
|
|
19
|
+
if (node.isMissing === true || node.IsMissing === true) fields.isMissing = true;
|
|
20
|
+
if (Array.isArray(node.parameterList?.parameters ?? node.parameters)) fields.parameterCount = (node.parameterList?.parameters ?? node.parameters).length;
|
|
21
|
+
if (Array.isArray(node.attributeLists)) fields.attributeListCount = node.attributeLists.length;
|
|
22
|
+
return fields;
|
|
23
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{clangDeclarationName}from'./clangDeclarationName.js';import{clangIncludePath}from'./clangIncludePath.js';import{clangLiteralValue}from'./clangLiteralValue.js';import{clangTypeName}from'./clangTypeName.js';
|
|
2
|
+
export function primitiveClangAstFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
const name = clangDeclarationName(node);
|
|
5
|
+
if (name) fields.name = name;
|
|
6
|
+
const type = clangTypeName(node.type ?? node.qualType);
|
|
7
|
+
if (type) fields.type = type;
|
|
8
|
+
for (const key of [
|
|
9
|
+
'mangledName',
|
|
10
|
+
'storageClass',
|
|
11
|
+
'tagUsed',
|
|
12
|
+
'completeDefinition',
|
|
13
|
+
'isThisDeclarationADefinition',
|
|
14
|
+
'inline',
|
|
15
|
+
'isUsed',
|
|
16
|
+
'isReferenced',
|
|
17
|
+
'valueCategory',
|
|
18
|
+
'opcode',
|
|
19
|
+
'castKind'
|
|
20
|
+
]) {
|
|
21
|
+
const value = node[key];
|
|
22
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || value === null) fields[key] = value;
|
|
23
|
+
}
|
|
24
|
+
const includePath = clangIncludePath(node);
|
|
25
|
+
if (includePath) fields.includePath = includePath;
|
|
26
|
+
const literal = clangLiteralValue(node);
|
|
27
|
+
if (literal !== undefined) fields.literal = literal;
|
|
28
|
+
const referenced = clangDeclarationName(node.referencedDecl);
|
|
29
|
+
if (referenced) fields.referenced = referenced;
|
|
30
|
+
return fields;
|
|
31
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{goAstDeclarationName}from'./goAstDeclarationName.js';import{goAstIdentName}from'./goAstIdentName.js';import{goAstImportPath}from'./goAstImportPath.js';import{goAstReceiverName}from'./goAstReceiverName.js';import{goAstTokenName}from'./goAstTokenName.js';import{goAstTypeName}from'./goAstTypeName.js';
|
|
2
|
+
export function primitiveGoAstFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
const name = goAstDeclarationName(node);
|
|
5
|
+
if (name) fields.name = name;
|
|
6
|
+
const type = goAstTypeName(node.Type ?? node.type);
|
|
7
|
+
if (type) fields.type = type;
|
|
8
|
+
const tok = goAstTokenName(node.Tok ?? node.tok);
|
|
9
|
+
if (tok) fields.token = tok;
|
|
10
|
+
const importPath = goAstImportPath(node);
|
|
11
|
+
if (importPath) fields.importPath = importPath;
|
|
12
|
+
const receiver = goAstReceiverName(node);
|
|
13
|
+
if (receiver) fields.receiver = receiver;
|
|
14
|
+
for (const key of ['Incomplete', 'Doc', 'Comment']) {
|
|
15
|
+
const value = node[key] ?? node[key[0].toLowerCase() + key.slice(1)];
|
|
16
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || value === null) fields[key[0].toLowerCase() + key.slice(1)] = value;
|
|
17
|
+
}
|
|
18
|
+
if (Array.isArray(node.Names ?? node.names)) {
|
|
19
|
+
fields.names = (node.Names ?? node.names).map(goAstIdentName).filter(Boolean).join(',');
|
|
20
|
+
}
|
|
21
|
+
return fields;
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{javaAstDeclarationName}from'./javaAstDeclarationName.js';import{javaAstImportPath}from'./javaAstImportPath.js';import{javaAstModifierNames}from'./javaAstModifierNames.js';import{javaAstPackageName}from'./javaAstPackageName.js';import{javaAstTypeName}from'./javaAstTypeName.js';
|
|
2
|
+
export function primitiveJavaAstFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
const name = javaAstDeclarationName(node);
|
|
5
|
+
if (name) fields.name = name;
|
|
6
|
+
const importPath = javaAstImportPath(node);
|
|
7
|
+
if (importPath) fields.importPath = importPath;
|
|
8
|
+
const type = javaAstTypeName(node.type ?? node.typeName ?? node.returnType ?? node.elementType);
|
|
9
|
+
if (type) fields.type = type;
|
|
10
|
+
const packageName = javaAstPackageName(node);
|
|
11
|
+
if (packageName) fields.packageName = packageName;
|
|
12
|
+
const modifiers = javaAstModifierNames(node);
|
|
13
|
+
if (modifiers.length) fields.modifiers = modifiers.join(',');
|
|
14
|
+
if (node.static === true || node.isStatic === true) fields.static = true;
|
|
15
|
+
if (node.default === true || node.isDefault === true) fields.default = true;
|
|
16
|
+
if (node.generated === true || node.Generated === true) fields.generated = true;
|
|
17
|
+
if (typeof node.binaryName === 'string') fields.binaryName = node.binaryName;
|
|
18
|
+
if (typeof node.qualifiedName === 'string') fields.qualifiedName = node.qualifiedName;
|
|
19
|
+
if (Array.isArray(node.parameters)) fields.parameterCount = node.parameters.length;
|
|
20
|
+
if (Array.isArray(node.throws ?? node.thrownExceptions)) fields.throwsCount = (node.throws ?? node.thrownExceptions).length;
|
|
21
|
+
return fields;
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{kotlinPsiAnnotationNames}from'./kotlinPsiAnnotationNames.js';import{kotlinPsiDeclarationName}from'./kotlinPsiDeclarationName.js';import{kotlinPsiImportPath}from'./kotlinPsiImportPath.js';import{kotlinPsiModifiers}from'./kotlinPsiModifiers.js';import{kotlinPsiPackageName}from'./kotlinPsiPackageName.js';import{kotlinPsiTypeName}from'./kotlinPsiTypeName.js';
|
|
2
|
+
export function primitiveKotlinPsiFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
const name = kotlinPsiDeclarationName(node, kind);
|
|
5
|
+
if (name) fields.name = name;
|
|
6
|
+
const importPath = kotlinPsiImportPath(node);
|
|
7
|
+
if (importPath) fields.importPath = importPath;
|
|
8
|
+
const packageName = kotlinPsiPackageName(node);
|
|
9
|
+
if (packageName) fields.packageName = packageName;
|
|
10
|
+
const type = kotlinPsiTypeName(node.typeReference ?? node.returnTypeRef ?? node.returnType ?? node.type);
|
|
11
|
+
if (type) fields.type = type;
|
|
12
|
+
const receiver = kotlinPsiTypeName(node.receiverTypeReference ?? node.receiverTypeRef);
|
|
13
|
+
if (receiver) fields.receiverType = receiver;
|
|
14
|
+
const modifiers = kotlinPsiModifiers(node);
|
|
15
|
+
if (modifiers.length) fields.modifiers = modifiers.join(',');
|
|
16
|
+
const annotations = kotlinPsiAnnotationNames(node);
|
|
17
|
+
if (annotations.length) fields.annotations = annotations.join(',');
|
|
18
|
+
if (node.generated === true || node.isGenerated === true) fields.generated = true;
|
|
19
|
+
if (node.isScript === true || kind === 'KtScript') fields.script = true;
|
|
20
|
+
if (Array.isArray(node.typeParameters ?? node.typeParameterList?.parameters)) fields.typeParameterCount = (node.typeParameters ?? node.typeParameterList?.parameters).length;
|
|
21
|
+
if (Array.isArray(node.valueParameters ?? node.valueParameterList?.parameters ?? node.parameters)) fields.parameterCount = (node.valueParameters ?? node.valueParameterList?.parameters ?? node.parameters).length;
|
|
22
|
+
if (Array.isArray(node.superTypeListEntries ?? node.superTypes)) fields.superTypeCount = (node.superTypeListEntries ?? node.superTypes).length;
|
|
23
|
+
return fields;
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{pythonAliasName}from'./pythonAliasName.js';import{pythonAstLiteralValue}from'./pythonAstLiteralValue.js';
|
|
2
|
+
export function primitivePythonAstFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
for (const key of ['name', 'id', 'arg', 'module', 'level', 'attr', 'asname', 'type_comment']) {
|
|
5
|
+
if (typeof node[key] === 'string' || typeof node[key] === 'number' || typeof node[key] === 'boolean' || node[key] === null) {
|
|
6
|
+
fields[key] = node[key];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
if (Array.isArray(node.names)) {
|
|
10
|
+
fields.names = node.names
|
|
11
|
+
.map((entry) => pythonAliasName(entry))
|
|
12
|
+
.filter(Boolean)
|
|
13
|
+
.join(',');
|
|
14
|
+
}
|
|
15
|
+
const literal = pythonAstLiteralValue(node);
|
|
16
|
+
if (literal !== undefined) fields.literal = literal;
|
|
17
|
+
return fields;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{rustSynIdentName}from'./rustSynIdentName.js';import{rustSynPathName}from'./rustSynPathName.js';import{rustSynVisibility}from'./rustSynVisibility.js';
|
|
2
|
+
export function primitiveRustSynFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
const ident = rustSynIdentName(node.ident ?? node.name ?? node.sig?.ident);
|
|
5
|
+
if (ident) fields.ident = ident;
|
|
6
|
+
const path = rustSynPathName(node.path ?? node.trait_ ?? node.self_ty ?? node.selfType ?? node.ty);
|
|
7
|
+
if (path) fields.path = path;
|
|
8
|
+
const visibility = rustSynVisibility(node.vis ?? node.visibility);
|
|
9
|
+
if (visibility) fields.visibility = visibility;
|
|
10
|
+
for (const key of ['mutability', 'defaultness', 'constness', 'asyncness', 'unsafety', 'abi']) {
|
|
11
|
+
const value = node[key];
|
|
12
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || value === null) fields[key] = value;
|
|
13
|
+
}
|
|
14
|
+
if (Array.isArray(node.attrs) && node.attrs.length) fields.attributeCount = node.attrs.length;
|
|
15
|
+
return fields;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{swiftSyntaxAttributeNames}from'./swiftSyntaxAttributeNames.js';import{swiftSyntaxDeclarationName}from'./swiftSyntaxDeclarationName.js';import{swiftSyntaxImportPath}from'./swiftSyntaxImportPath.js';import{swiftSyntaxModifierNames}from'./swiftSyntaxModifierNames.js';import{swiftSyntaxTypeName}from'./swiftSyntaxTypeName.js';
|
|
2
|
+
export function primitiveSwiftSyntaxFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
const name = swiftSyntaxDeclarationName(node, kind);
|
|
5
|
+
if (name) fields.name = name;
|
|
6
|
+
const importPath = swiftSyntaxImportPath(node);
|
|
7
|
+
if (importPath) fields.importPath = importPath;
|
|
8
|
+
const type = swiftSyntaxTypeName(node.type ?? node.typeAnnotation?.type ?? node.returnClause?.type ?? node.extendedType);
|
|
9
|
+
if (type) fields.type = type;
|
|
10
|
+
const modifiers = swiftSyntaxModifierNames(node);
|
|
11
|
+
if (modifiers.length) fields.modifiers = modifiers.join(',');
|
|
12
|
+
const attributes = swiftSyntaxAttributeNames(node);
|
|
13
|
+
if (attributes.length) fields.attributes = attributes.join(',');
|
|
14
|
+
if (node.generated === true || node.isGenerated === true) fields.generated = true;
|
|
15
|
+
if (node.isMissing === true || node.presence === 'missing') fields.isMissing = true;
|
|
16
|
+
if (node.hasError === true || node.containsDiagnostics === true) fields.hasError = true;
|
|
17
|
+
if (Array.isArray(node.genericParameterClause?.parameters ?? node.genericParameters)) fields.genericParameterCount = (node.genericParameterClause?.parameters ?? node.genericParameters).length;
|
|
18
|
+
if (Array.isArray(node.inheritanceClause?.inheritedTypes ?? node.inheritedTypes)) fields.inheritedTypeCount = (node.inheritanceClause?.inheritedTypes ?? node.inheritedTypes).length;
|
|
19
|
+
if (Array.isArray(node.signature?.parameterClause?.parameters ?? node.parameters)) fields.parameterCount = (node.signature?.parameterClause?.parameters ?? node.parameters).length;
|
|
20
|
+
return fields;
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{literalSyntaxValue}from'./literalSyntaxValue.js';
|
|
2
|
+
export function primitiveSyntaxFields(node) {
|
|
3
|
+
const fields = {};
|
|
4
|
+
for (const key of ['name', 'operator', 'sourceType', 'async', 'generator', 'computed', 'static', 'exportKind', 'importKind', 'optional']) {
|
|
5
|
+
if (typeof node[key] === 'string' || typeof node[key] === 'number' || typeof node[key] === 'boolean' || node[key] === null) {
|
|
6
|
+
fields[key] = node[key];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
const literal = literalSyntaxValue(node);
|
|
10
|
+
if (literal !== undefined) fields.literal = literal;
|
|
11
|
+
if (node.source && typeof node.source === 'object' && typeof node.source.value === 'string') fields.source = node.source.value;
|
|
12
|
+
return fields;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{identifierName}from'./identifierName.js';import{stringFromTsExpression}from'./stringFromTsExpression.js';
|
|
2
|
+
export function primitiveTypeScriptFields(node, kind) {
|
|
3
|
+
const fields = { kind };
|
|
4
|
+
const name = identifierName(node.name);
|
|
5
|
+
if (name) fields.name = name;
|
|
6
|
+
const moduleSpecifier = stringFromTsExpression(node.moduleSpecifier);
|
|
7
|
+
if (moduleSpecifier) fields.moduleSpecifier = moduleSpecifier;
|
|
8
|
+
return fields;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{normalizeCompileTarget}from'./normalizeCompileTarget.js';import{projectors}from'./projectors.js';
|
|
2
|
+
export function projectFrontierAst(document, target = 'typescript', options = {}) {
|
|
3
|
+
const normalized = normalizeCompileTarget(target);
|
|
4
|
+
const projector = projectors[normalized];
|
|
5
|
+
return projector(document, options);
|
|
6
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function admissionRejectionReasons(input){
|
|
2
|
+
const reasons=[];
|
|
3
|
+
if(input.readiness==='blocked') reasons.push('Project import readiness is blocked.');
|
|
4
|
+
if(input.failedEvidenceIds.length) reasons.push(`Project import has failed evidence: ${input.failedEvidenceIds.join(', ')}`);
|
|
5
|
+
if((input.blockingLossIds??[]).length) reasons.push(`Project import has blocking losses: ${input.blockingLossIds.join(', ')}`);
|
|
6
|
+
if(input.semanticEvidence.empty) reasons.push('Project import has no semantic symbols, occurrences, relations, or facts.');
|
|
7
|
+
if(input.sourcePreservation.stale>0) reasons.push(`Project import has stale source preservation for ${input.sourcePreservation.stale} source(s).`);
|
|
8
|
+
return reasons;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function admissionPriorityReasons(input){
|
|
12
|
+
const reasons=[];
|
|
13
|
+
if(input.readiness==='needs-review'||input.readiness==='ready-with-losses') reasons.push(`Project import readiness is ${input.readiness}.`);
|
|
14
|
+
if(input.semanticEvidence.emptySourceCount>0) reasons.push(`${input.semanticEvidence.emptySourceCount} source(s) have empty semantic evidence.`);
|
|
15
|
+
if(input.sourcePreservation.quality==='lossy'||input.sourcePreservation.quality==='missing') reasons.push(`Project source preservation quality is ${input.sourcePreservation.quality}.`);
|
|
16
|
+
if(input.mergeCandidateRisk.highestRisk!=='low') reasons.push(`Highest merge-candidate risk is ${input.mergeCandidateRisk.highestRisk}.`);
|
|
17
|
+
if(input.ownership.changed>0) reasons.push(`Project import changes ${input.ownership.changed} ownership region(s) or region conflict key(s).`);
|
|
18
|
+
return reasons;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function admissionPriority(action,readiness,sourcePreservation,mergeCandidateRisk){
|
|
22
|
+
if(action==='reject') return 'blocker';
|
|
23
|
+
if(mergeCandidateRisk.highestRisk==='high'||readiness==='blocked') return 'critical';
|
|
24
|
+
if(readiness==='needs-review'||sourcePreservation.quality==='stale') return 'high';
|
|
25
|
+
if(readiness==='ready-with-losses'||sourcePreservation.quality==='lossy'||mergeCandidateRisk.highestRisk==='medium'||mergeCandidateRisk.highestRisk==='unknown') return 'normal';
|
|
26
|
+
return 'low';
|
|
27
|
+
}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import{uniqueRecordsById,uniqueStrings}from'../../native-import-utils.js';
|
|
2
|
+
|
|
3
|
+
const scoreWeights=Object.freeze({
|
|
4
|
+
semanticEvidence:22,
|
|
5
|
+
sourcePreservation:18,
|
|
6
|
+
sourceFreshness:14,
|
|
7
|
+
ownershipChange:14,
|
|
8
|
+
proofReadiness:20,
|
|
9
|
+
targetProjectionCoverage:12
|
|
10
|
+
});
|
|
11
|
+
const readinessScore=Object.freeze({ready:100,'ready-with-losses':75,'needs-review':45,blocked:0});
|
|
12
|
+
const readinessSortRank=Object.freeze({ready:3,'ready-with-losses':2,'needs-review':1,blocked:0});
|
|
13
|
+
const riskSortRank=Object.freeze({low:3,medium:2,unknown:1,high:0});
|
|
14
|
+
const actionSortRank=Object.freeze({admit:2,prioritize:1,reject:0});
|
|
15
|
+
const preservationScore=Object.freeze({exact:100,lossy:62,missing:30,stale:0,empty:20});
|
|
16
|
+
const proofEvidenceKind=/proof|test|trace|verify|verification|benchmark|behavior|contract/i;
|
|
17
|
+
|
|
18
|
+
export function admissionMergeScore(input){
|
|
19
|
+
const components={
|
|
20
|
+
semanticEvidence:semanticEvidenceScore(input),
|
|
21
|
+
sourcePreservation:sourcePreservationScore(input),
|
|
22
|
+
sourceFreshness:sourceFreshnessScore(input),
|
|
23
|
+
ownershipChange:ownershipChangeScore(input),
|
|
24
|
+
proofReadiness:proofReadinessScore(input),
|
|
25
|
+
targetProjectionCoverage:targetProjectionCoverageScore(input)
|
|
26
|
+
};
|
|
27
|
+
const weightedTotal=Object.values(components).reduce((sum,component)=>sum+component.weightedScore,0);
|
|
28
|
+
const weightTotal=Object.values(components).reduce((sum,component)=>sum+component.weight,0);
|
|
29
|
+
const uncappedValue=roundScore(weightTotal?weightedTotal*100/weightTotal:0);
|
|
30
|
+
const value=admissionScoreValue(uncappedValue,input);
|
|
31
|
+
return {
|
|
32
|
+
schema:'frontier.lang.semanticMergeScore.v1',
|
|
33
|
+
version:1,
|
|
34
|
+
value,
|
|
35
|
+
uncappedValue,
|
|
36
|
+
sortKey:mergeScoreSortKey(value,input),
|
|
37
|
+
higherIsBetter:true,
|
|
38
|
+
readiness:input.readiness,
|
|
39
|
+
risk:input.mergeCandidateRisk.highestRisk,
|
|
40
|
+
action:input.action,
|
|
41
|
+
priority:input.priority,
|
|
42
|
+
components,
|
|
43
|
+
penalties:uniqueStrings([
|
|
44
|
+
...(input.action==='reject'?['Admission action is reject.']:[]),
|
|
45
|
+
...Object.values(components).flatMap((component)=>component.score<100?component.reasons:[])
|
|
46
|
+
])
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function semanticEvidenceScore(input){
|
|
51
|
+
const sourceCount=Math.max(1,input.sourceCount??0);
|
|
52
|
+
const semanticTotal=input.semanticEvidence.symbols+input.semanticEvidence.occurrences+input.semanticEvidence.relations+input.semanticEvidence.facts;
|
|
53
|
+
const nonEmptySources=Math.max(0,(input.sourceCount??0)-input.semanticEvidence.emptySourceCount);
|
|
54
|
+
const sourceCoverage=(input.sourceCount??0)>0?nonEmptySources/sourceCount:(semanticTotal>0?1:0);
|
|
55
|
+
const symbolDensity=Math.min(1,input.semanticEvidence.symbols/sourceCount);
|
|
56
|
+
const evidenceDensity=Math.min(1,input.semanticEvidence.evidenceRecords/sourceCount);
|
|
57
|
+
const score=input.semanticEvidence.empty?0:roundScore(sourceCoverage*68+symbolDensity*22+evidenceDensity*10);
|
|
58
|
+
return scoreComponent('semanticEvidence',score,[
|
|
59
|
+
...(input.semanticEvidence.empty?['No semantic evidence was imported.']:[]),
|
|
60
|
+
...(input.semanticEvidence.emptySourceCount?[
|
|
61
|
+
`${input.semanticEvidence.emptySourceCount} source(s) have no semantic evidence.`
|
|
62
|
+
]:[])
|
|
63
|
+
],{
|
|
64
|
+
symbols:input.semanticEvidence.symbols,
|
|
65
|
+
occurrences:input.semanticEvidence.occurrences,
|
|
66
|
+
relations:input.semanticEvidence.relations,
|
|
67
|
+
facts:input.semanticEvidence.facts,
|
|
68
|
+
evidenceRecords:input.semanticEvidence.evidenceRecords,
|
|
69
|
+
emptySourceCount:input.semanticEvidence.emptySourceCount,
|
|
70
|
+
emptySourcePaths:input.semanticEvidence.emptySourcePaths
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function sourcePreservationScore(input){
|
|
75
|
+
const base=preservationScore[input.sourcePreservation.quality]??35;
|
|
76
|
+
const exactRatio=input.sourcePreservation.total?input.sourcePreservation.exactSourceAvailable/input.sourcePreservation.total:0;
|
|
77
|
+
const score=roundScore(Math.min(base,base*0.8+exactRatio*20));
|
|
78
|
+
return scoreComponent('sourcePreservation',score,[
|
|
79
|
+
...(input.sourcePreservation.quality!=='exact'?[`Project source preservation is ${input.sourcePreservation.quality}.`]:[]),
|
|
80
|
+
...(input.sourcePreservation.truncated?['Project source preservation is truncated.']:[]),
|
|
81
|
+
...(input.sourcePreservation.lossySourcePaths.length?[`Lossy or missing source preservation: ${input.sourcePreservation.lossySourcePaths.join(', ')}`]:[])
|
|
82
|
+
],{
|
|
83
|
+
quality:input.sourcePreservation.quality,
|
|
84
|
+
total:input.sourcePreservation.total,
|
|
85
|
+
exactSourceAvailable:input.sourcePreservation.exactSourceAvailable,
|
|
86
|
+
sourceBytes:input.sourcePreservation.sourceBytes,
|
|
87
|
+
tokens:input.sourcePreservation.tokens,
|
|
88
|
+
trivia:input.sourcePreservation.trivia,
|
|
89
|
+
directives:input.sourcePreservation.directives,
|
|
90
|
+
comments:input.sourcePreservation.comments,
|
|
91
|
+
truncated:input.sourcePreservation.truncated,
|
|
92
|
+
lossySourcePaths:input.sourcePreservation.lossySourcePaths
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function sourceFreshnessScore(input){
|
|
97
|
+
const sourceCount=Math.max(input.sourceCount??0,input.sourcePreservation.total,1);
|
|
98
|
+
const fresh=Math.max(0,sourceCount-input.sourcePreservation.stale);
|
|
99
|
+
const score=roundScore(fresh*100/sourceCount);
|
|
100
|
+
return scoreComponent('sourceFreshness',score,[
|
|
101
|
+
...(input.sourcePreservation.stale?[
|
|
102
|
+
`Project import has stale source hashes for ${input.sourcePreservation.stale} source(s).`
|
|
103
|
+
]:[])
|
|
104
|
+
],{
|
|
105
|
+
stale:input.sourcePreservation.stale,
|
|
106
|
+
staleSourcePaths:input.sourcePreservation.staleSourcePaths,
|
|
107
|
+
checkedSources:sourceCount
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function ownershipChangeScore(input){
|
|
112
|
+
const changed=input.ownership.changed;
|
|
113
|
+
const total=input.ownership.total;
|
|
114
|
+
const candidateConflictKeys=input.ownership.candidateRegionConflictKeys.length;
|
|
115
|
+
let score=total===0&&changed===0?70:100;
|
|
116
|
+
if(changed>0){
|
|
117
|
+
score=total>0
|
|
118
|
+
? Math.max(0,100-(changed/Math.max(total,changed))*75-candidateConflictKeys*5)
|
|
119
|
+
: Math.max(10,85-changed*12-candidateConflictKeys*5);
|
|
120
|
+
}
|
|
121
|
+
return scoreComponent('ownershipChange',roundScore(score),[
|
|
122
|
+
...(total===0&&changed===0?['No ownership-region evidence was available for this project import.']:[]),
|
|
123
|
+
...(changed?[`Project import changes ${changed} ownership region(s) or region conflict key(s).`]:[])
|
|
124
|
+
],{
|
|
125
|
+
total,
|
|
126
|
+
changed,
|
|
127
|
+
changedIds:input.ownership.changedIds,
|
|
128
|
+
changedKeys:input.ownership.changedKeys,
|
|
129
|
+
candidateRegionConflictKeys:input.ownership.candidateRegionConflictKeys,
|
|
130
|
+
byKind:input.ownership.byKind,
|
|
131
|
+
byGranularity:input.ownership.byGranularity,
|
|
132
|
+
byPrecision:input.ownership.byPrecision,
|
|
133
|
+
byLanguage:input.ownership.byLanguage
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function proofReadinessScore(input){
|
|
138
|
+
const evidence=admissionEvidenceRecords(input.projectResult,input.imports);
|
|
139
|
+
const proofRecords=evidence.filter((record)=>proofEvidenceKind.test(String(record?.kind??record?.metadata?.kind??record?.type??''))||record?.kind==='proof');
|
|
140
|
+
const failedEvidence=uniqueStrings([
|
|
141
|
+
...input.failedEvidenceIds,
|
|
142
|
+
...evidence.filter((record)=>record?.status==='failed').map((record)=>record.id).filter(Boolean)
|
|
143
|
+
]);
|
|
144
|
+
const passedProofRecords=proofRecords.filter((record)=>record?.status==='passed'||record?.status==='ok'||record?.status==='success');
|
|
145
|
+
const pendingProofRecords=proofRecords.filter((record)=>record?.status==='pending'||record?.status==='assumed'||record?.status==='unknown');
|
|
146
|
+
const blockingLossIds=input.contract?.readiness?.blockingLossIds??input.lossSummary?.blockingLossIds??[];
|
|
147
|
+
const reviewLossIds=input.contract?.readiness?.reviewLossIds??input.lossSummary?.reviewLossIds??[];
|
|
148
|
+
const base=readinessScore[input.readiness]??45;
|
|
149
|
+
const score=clampScore(base+Math.min(16,passedProofRecords.length*8+proofRecords.length*3)-failedEvidence.length*25-blockingLossIds.length*12-Math.min(18,reviewLossIds.length*3));
|
|
150
|
+
return scoreComponent('proofReadiness',score,[
|
|
151
|
+
...(input.readiness!=='ready'?[`Project import readiness is ${input.readiness}.`]:[]),
|
|
152
|
+
...(failedEvidence.length?[`Failed evidence: ${failedEvidence.join(', ')}`]:[]),
|
|
153
|
+
...(blockingLossIds.length?[`Blocking losses: ${blockingLossIds.join(', ')}`]:[]),
|
|
154
|
+
...(pendingProofRecords.length?[`${pendingProofRecords.length} proof/readiness evidence record(s) are pending or assumed.`]:[])
|
|
155
|
+
],{
|
|
156
|
+
readiness:input.readiness,
|
|
157
|
+
evidenceRecords:evidence.length,
|
|
158
|
+
proofRecords:proofRecords.length,
|
|
159
|
+
passedProofRecords:passedProofRecords.length,
|
|
160
|
+
pendingProofRecords:pendingProofRecords.length,
|
|
161
|
+
failedEvidenceIds:failedEvidence,
|
|
162
|
+
blockingLossIds,
|
|
163
|
+
reviewLossIds
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function targetProjectionCoverageScore(input){
|
|
168
|
+
const coverage=targetProjectionCoverageSignals(input);
|
|
169
|
+
let score;
|
|
170
|
+
if(coverage.targetEntries>0){
|
|
171
|
+
const supportedRatio=coverage.supportedTargets/coverage.targetEntries;
|
|
172
|
+
const adapterRatio=Math.min(1,coverage.adapterProjectionTargets/coverage.targetEntries);
|
|
173
|
+
const readinessRatio=coverage.readinessScore/100;
|
|
174
|
+
score=roundScore(supportedRatio*55+readinessRatio*25+adapterRatio*20);
|
|
175
|
+
}else{
|
|
176
|
+
score=coverage.sourceMapMappings>0||coverage.generatedRangeMappings>0||coverage.targetPaths>0
|
|
177
|
+
? 62
|
|
178
|
+
: coverage.exactSourceProjection>0?55:45;
|
|
179
|
+
}
|
|
180
|
+
if(coverage.missingAdapters>0) score=clampScore(score-Math.min(40,coverage.missingAdapters*10));
|
|
181
|
+
if(coverage.unsupportedTargetFeatures>0) score=clampScore(score-Math.min(35,coverage.unsupportedTargetFeatures*10));
|
|
182
|
+
return scoreComponent('targetProjectionCoverage',score,[
|
|
183
|
+
...(coverage.targetEntries===0?['No explicit target projection coverage was supplied; score uses source-map and exact-source fallback signals.']:[]),
|
|
184
|
+
...(coverage.missingAdapters?[`${coverage.missingAdapters} target projection adapter(s) are missing.`]:[]),
|
|
185
|
+
...(coverage.unsupportedTargetFeatures?[`${coverage.unsupportedTargetFeatures} target projection target(s) have unsupported features.`]:[])
|
|
186
|
+
],coverage);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function targetProjectionCoverageSignals(input){
|
|
190
|
+
const entries=targetProjectionEntries(input.projectResult,input.imports);
|
|
191
|
+
const matrices=projectionMatrices(input.projectResult,input.imports);
|
|
192
|
+
for(const matrix of matrices){
|
|
193
|
+
for(const language of matrix?.languages??[]) entries.push(...(language?.targets??[]));
|
|
194
|
+
}
|
|
195
|
+
const sourceMapSummary=input.contract?.sourceMaps??{};
|
|
196
|
+
const summary=matrices.reduce((current,matrix)=>{
|
|
197
|
+
current.exactSourceProjection+=matrix?.summary?.exactSourceProjection??0;
|
|
198
|
+
current.targetAdapterProjection+=matrix?.summary?.targetAdapterProjection??0;
|
|
199
|
+
current.missingAdapters+=matrix?.summary?.missingAdapters??0;
|
|
200
|
+
current.unsupportedTargetFeatures+=matrix?.summary?.unsupportedTargetFeatures??0;
|
|
201
|
+
return current;
|
|
202
|
+
},{exactSourceProjection:0,targetAdapterProjection:0,missingAdapters:0,unsupportedTargetFeatures:0});
|
|
203
|
+
const targetEntries=entries.length;
|
|
204
|
+
const supportedTargets=entries.filter((entry)=>entry?.supported===true).length;
|
|
205
|
+
const adapterProjectionTargets=entries.filter((entry)=>
|
|
206
|
+
entry?.lossClass==='targetAdapterProjection'||entry?.lossClass==='exactSourceProjection'||entry?.adapter||entry?.adapterKind==='targetProjection'
|
|
207
|
+
).length+summary.targetAdapterProjection+summary.exactSourceProjection;
|
|
208
|
+
const readinessValues=entries.map((entry)=>readinessScore[entry?.readiness]??45);
|
|
209
|
+
const readinessAverage=readinessValues.length?readinessValues.reduce((sum,value)=>sum+value,0)/readinessValues.length:0;
|
|
210
|
+
return {
|
|
211
|
+
targetEntries,
|
|
212
|
+
supportedTargets,
|
|
213
|
+
adapterProjectionTargets,
|
|
214
|
+
exactSourceProjection:Math.max(summary.exactSourceProjection,input.sourcePreservation.exactSourceAvailable??0),
|
|
215
|
+
targetAdapterProjection:summary.targetAdapterProjection,
|
|
216
|
+
missingAdapters:summary.missingAdapters+entries.filter((entry)=>entry?.lossClass==='missingAdapter'||entry?.supported===false).length,
|
|
217
|
+
unsupportedTargetFeatures:summary.unsupportedTargetFeatures+entries.filter((entry)=>entry?.lossClass==='unsupportedTargetFeatures').length,
|
|
218
|
+
readinessScore:roundScore(readinessAverage),
|
|
219
|
+
sourceMapMappings:sourceMapSummary.mappingCount??0,
|
|
220
|
+
generatedRangeMappings:sourceMapSummary.generatedRangeMappings??0,
|
|
221
|
+
targetPaths:sourceMapSummary.targetPaths?.length??0,
|
|
222
|
+
adapterGeneratedRanges:input.contract?.adapterCoverage?.generatedRanges??0
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function targetProjectionEntries(projectResult,imports){
|
|
227
|
+
return [
|
|
228
|
+
projectResult?.targetCoverage,
|
|
229
|
+
projectResult?.metadata?.targetCoverage,
|
|
230
|
+
projectResult?.metadata?.targetProjectionCoverage,
|
|
231
|
+
...(projectResult?.targetCoverages??[]),
|
|
232
|
+
...(projectResult?.metadata?.targetCoverages??[]),
|
|
233
|
+
...(imports??[]).flatMap((imported)=>[
|
|
234
|
+
imported?.targetCoverage,
|
|
235
|
+
imported?.metadata?.targetCoverage,
|
|
236
|
+
imported?.metadata?.targetProjectionCoverage,
|
|
237
|
+
...(imported?.targetCoverages??[]),
|
|
238
|
+
...(imported?.metadata?.targetCoverages??[])
|
|
239
|
+
])
|
|
240
|
+
].flatMap((entry)=>Array.isArray(entry)?entry:[entry]).filter((entry)=>entry&&typeof entry==='object'&&(entry.target||entry.lossClass||entry.supported!==undefined));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function projectionMatrices(projectResult,imports){
|
|
244
|
+
return [
|
|
245
|
+
projectResult?.projectionMatrix,
|
|
246
|
+
projectResult?.metadata?.projectionMatrix,
|
|
247
|
+
...(projectResult?.projectionMatrices??[]),
|
|
248
|
+
...(projectResult?.metadata?.projectionMatrices??[]),
|
|
249
|
+
...(imports??[]).flatMap((imported)=>[
|
|
250
|
+
imported?.projectionMatrix,
|
|
251
|
+
imported?.metadata?.projectionMatrix,
|
|
252
|
+
...(imported?.projectionMatrices??[]),
|
|
253
|
+
...(imported?.metadata?.projectionMatrices??[])
|
|
254
|
+
])
|
|
255
|
+
].filter((matrix)=>matrix?.kind==='frontier.lang.projectionTargetLossMatrix'||Array.isArray(matrix?.languages));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function admissionEvidenceRecords(projectResult,imports){
|
|
259
|
+
return uniqueRecordsById([
|
|
260
|
+
...(projectResult?.evidence??[]),
|
|
261
|
+
...(projectResult?.patch?.evidence??[]),
|
|
262
|
+
...(projectResult?.universalAst?.evidence??[]),
|
|
263
|
+
...(imports??[]).flatMap((imported)=>[
|
|
264
|
+
...(imported?.evidence??[]),
|
|
265
|
+
...(imported?.patch?.evidence??[]),
|
|
266
|
+
...(imported?.universalAst?.evidence??[])
|
|
267
|
+
])
|
|
268
|
+
]);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function scoreComponent(key,score,reasons,signals){
|
|
272
|
+
const normalizedScore=clampScore(score);
|
|
273
|
+
const weight=scoreWeights[key];
|
|
274
|
+
return {
|
|
275
|
+
key,
|
|
276
|
+
score:normalizedScore,
|
|
277
|
+
weight,
|
|
278
|
+
weightedScore:roundWeighted(normalizedScore*weight/100),
|
|
279
|
+
status:componentStatus(normalizedScore),
|
|
280
|
+
reasons:uniqueStrings(reasons),
|
|
281
|
+
signals
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
function componentStatus(score){
|
|
286
|
+
if(score<=0) return 'blocked';
|
|
287
|
+
if(score<50) return 'weak';
|
|
288
|
+
if(score<80) return 'partial';
|
|
289
|
+
return 'strong';
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function mergeScoreSortKey(value,input){
|
|
293
|
+
return Math.round(value*1000)
|
|
294
|
+
+(readinessSortRank[input.readiness]??1)*100
|
|
295
|
+
+(riskSortRank[input.mergeCandidateRisk.highestRisk]??1)*10
|
|
296
|
+
+(actionSortRank[input.action]??0);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function admissionScoreValue(value,input){
|
|
300
|
+
if(input.action==='reject') return Math.min(value,35);
|
|
301
|
+
if(input.readiness==='blocked') return Math.min(value,25);
|
|
302
|
+
if(input.mergeCandidateRisk.highestRisk==='high') return Math.min(value,60);
|
|
303
|
+
return value;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function clampScore(value){
|
|
307
|
+
return Math.max(0,Math.min(100,roundScore(value)));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function roundScore(value){
|
|
311
|
+
return Math.round((Number.isFinite(value)?value:0)*100)/100;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function roundWeighted(value){
|
|
315
|
+
return Math.round((Number.isFinite(value)?value:0)*1000)/1000;
|
|
316
|
+
}
|