rea-agents 6.4.0 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1420) hide show
  1. package/DISCLAIMER.md +136 -0
  2. package/README.md +76 -16
  3. package/THIRD_PARTY_NOTICES.md +135 -0
  4. package/bridge/android/ReaJadxBridge.java +281 -25
  5. package/bridge/cutter/rea_bridge.py +825 -0
  6. package/bridge/ghidra/ReaGhidraAnalysisOptions.java +38 -0
  7. package/bridge/ghidra/ReaGhidraBridge.java +1232 -142
  8. package/bridge/ghidra/ReaGhidraBundleActivator.java +14 -0
  9. package/bridge/ghidra/ReaGhidraMipsSoftFloat.java +176 -0
  10. package/bridge/ghidra/ReaGhidraPrepareRaw.java +49 -0
  11. package/bridge/hopper_bridge.py +111 -69
  12. package/bridge/mitmproxy/capture.py +189 -13
  13. package/bridge/native/rea_lldb_tracer.py +88 -10
  14. package/bridge/process/ProcessRunTokenReader.swift +76 -34
  15. package/bridge/pwndbg/core_context.py +15 -2
  16. package/bridge/pwntools/layout_impl.py +5 -0
  17. package/bridge/pwntools/recorded_crash_impl.py +31 -10
  18. package/dist/adb/AdbCommand.js +148 -0
  19. package/dist/adb/AdbConfiguration.js +41 -7
  20. package/dist/adb/AdbDeviceOutput.js +59 -37
  21. package/dist/adb/AdbDirectoryListing.js +80 -0
  22. package/dist/adb/AdbHostFileName.js +34 -0
  23. package/dist/adb/AdbInputSnapshot.js +126 -0
  24. package/dist/adb/AdbProvider.js +1106 -346
  25. package/dist/adb/AdbShellOutput.js +146 -77
  26. package/dist/android/AndroidTargetSnapshot.js +7 -7
  27. package/dist/android/JadxAnalysis.js +53 -33
  28. package/dist/android/JadxConfiguration.js +283 -145
  29. package/dist/android/JadxDoctor.js +123 -0
  30. package/dist/android/JadxFailure.js +154 -0
  31. package/dist/android/JadxInterruption.js +13 -0
  32. package/dist/android/JadxJavaProbe.js +246 -0
  33. package/dist/android/JadxMcpTransport.js +53 -18
  34. package/dist/android/JadxProtocol.js +43 -2
  35. package/dist/android/JadxProvider.js +183 -102
  36. package/dist/android/JadxRelease.js +17 -2
  37. package/dist/android/JadxSession.js +35 -14
  38. package/dist/android/JadxWorkspaceRoot.js +157 -0
  39. package/dist/apktool/ApktoolCommandCleanup.js +134 -0
  40. package/dist/apktool/ApktoolCommandOutput.js +22 -0
  41. package/dist/apktool/ApktoolConfiguration.js +306 -45
  42. package/dist/apktool/ApktoolDecodeOutput.js +131 -42
  43. package/dist/apktool/ApktoolDecodedInventory.js +52 -0
  44. package/dist/apktool/ApktoolProvider.js +296 -340
  45. package/dist/apktool/ApktoolStringTables.js +178 -0
  46. package/dist/apktool/ApktoolWorkspace.js +162 -0
  47. package/dist/application/AnalysisContextQueries.js +5 -8
  48. package/dist/application/AnalysisDocument.js +19 -4
  49. package/dist/application/AnalysisProvider.js +36 -18
  50. package/dist/application/AppBundleExecutable.js +16 -9
  51. package/dist/application/BinaryTargetResolver.js +204 -40
  52. package/dist/application/BrowserEvidence.js +1 -1
  53. package/dist/application/BrowserObservationService.js +54 -9
  54. package/dist/application/BrowserScenarioCaptureService.js +26 -7
  55. package/dist/application/CallPathTracing.js +52 -13
  56. package/dist/application/CapabilityInventory.js +182 -36
  57. package/dist/application/ClaudeDesktopConfigLocation.js +152 -0
  58. package/dist/application/ClientConfigurationCleanup.js +73 -0
  59. package/dist/application/ClientConfigurationDocument.js +270 -151
  60. package/dist/application/ClientConfigurationFiles.js +51 -14
  61. package/dist/application/ClientConfigurationPublication.js +167 -0
  62. package/dist/application/ClientRegistrationEnvironment.js +40 -4
  63. package/dist/application/ClientRegistrationIdentity.js +112 -32
  64. package/dist/application/ClientRegistrationStatus.js +280 -84
  65. package/dist/application/DirectAnalysis.js +98 -30
  66. package/dist/application/DirectAnalysisCleanup.js +5 -1
  67. package/dist/application/DirectAnalysisStatus.js +13 -1
  68. package/dist/application/Doctor.js +192 -37
  69. package/dist/application/DoctorDiagnostics.js +59 -16
  70. package/dist/application/DoctorProviderIds.js +8 -0
  71. package/dist/application/DoctorScope.js +11 -2
  72. package/dist/application/DshCordisPatch.js +355 -0
  73. package/dist/application/DshCordisYaml.js +155 -0
  74. package/dist/application/EnhancedLiteralTracing.js +30 -16
  75. package/dist/application/EnhancedToolTypes.js +0 -1
  76. package/dist/application/EnhancedTools.js +154 -56
  77. package/dist/application/EvidenceBundleCommands.js +30 -7
  78. package/dist/application/EvidenceBundleFiles.js +29 -7
  79. package/dist/application/FunctionAnalysisEvidence.js +3 -0
  80. package/dist/application/GeminiClientSettings.js +25 -13
  81. package/dist/application/HermesClientHome.js +20 -0
  82. package/dist/application/HermesConfigurationYaml.js +312 -0
  83. package/dist/application/HopperDownload.js +11 -3
  84. package/dist/application/HopperReleaseFeed.js +71 -0
  85. package/dist/application/InventoryProjectionEvidence.js +0 -1
  86. package/dist/application/InvestigationProviders.js +14 -3
  87. package/dist/application/JsonFiles.js +110 -20
  88. package/dist/application/JsonInputFile.js +220 -62
  89. package/dist/application/LinuxHopper.js +218 -115
  90. package/dist/application/LinuxHopperPublisher.js +656 -0
  91. package/dist/application/MacHopper.js +203 -83
  92. package/dist/application/MacHopperPaths.js +40 -0
  93. package/dist/application/{MipsElfAbiFlags.js → MipsElfMetadata.js} +71 -10
  94. package/dist/application/MipsElfSharedLoad.js +164 -0
  95. package/dist/application/MipsGnuAttributes.js +90 -0
  96. package/dist/application/MsixPackageStorage.js +140 -0
  97. package/dist/application/ProgressReporter.js +1 -1
  98. package/dist/application/ProviderOperationExecution.js +15 -14
  99. package/dist/application/ReconstructionCoverageService.js +0 -1
  100. package/dist/application/ReconstructionObligationCandidates.js +20 -4
  101. package/dist/application/ReconstructionObligationLedgerDiagnostics.js +2 -2
  102. package/dist/application/ReconstructionObligationLedgerEvaluation.js +19 -33
  103. package/dist/application/ReconstructionObligationLedgerProjection.js +3 -72
  104. package/dist/application/ReconstructionObligationLedgerService.js +6 -2
  105. package/dist/application/ReconstructionObligationOriginalCases.js +10 -1
  106. package/dist/application/ReferenceSourceImport.js +24 -8
  107. package/dist/application/ReferenceSourceImportEntries.js +180 -37
  108. package/dist/application/ReferenceSourceImportPolicy.js +5 -3
  109. package/dist/application/ReferenceSourceImportTypes.js +0 -1
  110. package/dist/application/ReferenceSourceVcsAdapter.js +36 -17
  111. package/dist/application/RegularFileRead.js +117 -70
  112. package/dist/application/Setup.js +59 -21
  113. package/dist/application/SetupClientConfiguration.js +301 -66
  114. package/dist/application/SetupClients.js +25 -10
  115. package/dist/application/SetupHost.js +149 -51
  116. package/dist/application/SetupInstallFailure.js +58 -3
  117. package/dist/application/SetupPlan.js +94 -55
  118. package/dist/application/SetupRecoveryBackup.js +93 -0
  119. package/dist/application/SetupRegistrationEnvironment.js +14 -1
  120. package/dist/application/SetupSkill.js +303 -76
  121. package/dist/application/SourceLimitations.js +35 -0
  122. package/dist/application/SupportedClients.js +166 -32
  123. package/dist/application/TypeScriptEmittedSourceCandidates.js +26 -0
  124. package/dist/application/Uninstall.js +356 -110
  125. package/dist/application/UninstallFailure.js +14 -0
  126. package/dist/application/Update.js +54 -25
  127. package/dist/application/UpdateCommandProgress.js +66 -0
  128. package/dist/application/UpdateFailure.js +17 -0
  129. package/dist/application/UpdateMaintenance.js +18 -31
  130. package/dist/application/UpdateRuntime.js +198 -54
  131. package/dist/application/WebModuleTraceService.js +42 -22
  132. package/dist/application/WebNetworkCaptureService.js +24 -12
  133. package/dist/application/WebRuntimeService.js +41 -8
  134. package/dist/application/WebScriptExportService.js +6 -4
  135. package/dist/application/WebSourceLocationService.js +23 -8
  136. package/dist/application/WindowsCapabilities.js +18 -15
  137. package/dist/application/WorkflowEvidence.js +31 -1
  138. package/dist/application/analysisView/AnalysisViewService.js +46 -11
  139. package/dist/application/android/AndroidAnalysisService.js +5 -4
  140. package/dist/application/android/AndroidPackageInspection.js +25 -0
  141. package/dist/application/android/AndroidSearchEvidenceSummary.js +98 -0
  142. package/dist/application/artifacts/ArtifactComparisonEvidence.js +32 -0
  143. package/dist/application/binary/AnalysisProviderEvaluation.js +14 -11
  144. package/dist/application/binary/AnalysisProviderRegistry.js +365 -60
  145. package/dist/application/binary/AnalysisSnapshotCache.js +41 -20
  146. package/dist/application/binary/AnalysisSnapshotFiles.js +75 -9
  147. package/dist/application/binary/BinarySession.js +308 -117
  148. package/dist/application/binary/BinarySessionExecution.js +5 -4
  149. package/dist/application/binary/BinarySessionOpen.js +13 -6
  150. package/dist/application/binary/BinarySessionRecords.js +36 -7
  151. package/dist/application/binary/BinarySessionStatus.js +96 -27
  152. package/dist/application/binary/BinaryTargetSummary.js +9 -0
  153. package/dist/application/binary/CompositeProvider.js +116 -28
  154. package/dist/application/binary/LazyAnalysisProvider.js +6 -66
  155. package/dist/application/binary/SessionProviderRouter.js +16 -4
  156. package/dist/application/binaryDiagnostics/BinaryLayoutService.js +14 -5
  157. package/dist/application/binaryDiagnostics/PeResourcesService.js +25 -5
  158. package/dist/application/binaryDiagnostics/RecordedCrashService.js +17 -7
  159. package/dist/application/captures/PacketCaptureService.js +84 -0
  160. package/dist/application/closeOwnedWebResources.js +37 -0
  161. package/dist/application/electron/ElectronFusePort.js +1 -0
  162. package/dist/application/electron/ElectronFuseService.js +45 -0
  163. package/dist/application/evm/EvmInterfaceEvidence.js +11 -0
  164. package/dist/application/evm/EvmInterfaceService.js +5 -15
  165. package/dist/application/firmware/FirmwareAnalysisService.js +4 -3
  166. package/dist/application/flutter/DartAotInspection.js +26 -0
  167. package/dist/application/flutter/FlutterBuildAnalysisPort.js +1 -0
  168. package/dist/application/flutter/FlutterBuildAnalysisService.js +13 -0
  169. package/dist/application/frida/FridaInstrumentationPort.js +8 -0
  170. package/dist/application/frida/FridaInstrumentationService.js +310 -0
  171. package/dist/application/frida/fridaInputErrors.js +17 -0
  172. package/dist/application/go/GoBinaryPort.js +1 -0
  173. package/dist/application/go/GoBinaryService.js +79 -0
  174. package/dist/application/harmony/HarmonyApplicationService.js +17 -0
  175. package/dist/application/investigation/EvidenceLedger.js +43 -18
  176. package/dist/application/investigation/InvestigationRecords.js +12 -21
  177. package/dist/application/investigation/UnknownEvidence.js +22 -18
  178. package/dist/application/javascript/ElectronActiveObservationService.js +55 -25
  179. package/dist/application/javascript/ElectronBoundaryAnalysis.js +17 -3
  180. package/dist/application/javascript/ElectronBoundaryGraph.js +2 -0
  181. package/dist/application/javascript/ElectronBoundaryGraphCallPaths.js +144 -0
  182. package/dist/application/javascript/ElectronBoundaryGraphIpc.js +26 -7
  183. package/dist/application/javascript/ElectronBoundaryGraphNative.js +1 -1
  184. package/dist/application/javascript/ElectronBoundaryGraphWindows.js +61 -11
  185. package/dist/application/javascript/ElectronEvidence.js +1 -2
  186. package/dist/application/javascript/ElectronObservationService.js +41 -8
  187. package/dist/application/javascript/JavaScriptApplicationEvidence.js +21 -0
  188. package/dist/application/javascript/JavaScriptApplicationService.js +29 -14
  189. package/dist/application/javascript/JavaScriptApplicationWorkflowService.js +0 -1
  190. package/dist/application/javascript/JavaScriptArtifactAnalysis.js +119 -49
  191. package/dist/application/javascript/JavaScriptArtifactAnalysisTypes.js +30 -1
  192. package/dist/application/javascript/JavaScriptArtifactGraphAccumulator.js +51 -21
  193. package/dist/application/javascript/JavaScriptArtifactGraphBuilder.js +31 -7
  194. package/dist/application/javascript/JavaScriptArtifactGraphContext.js +28 -6
  195. package/dist/application/javascript/JavaScriptArtifactGraphDocuments.js +25 -14
  196. package/dist/application/javascript/JavaScriptArtifactGraphEvidence.js +3 -3
  197. package/dist/application/javascript/JavaScriptArtifactGraphFindings.js +186 -50
  198. package/dist/application/javascript/JavaScriptArtifactGraphStructure.js +173 -14
  199. package/dist/application/javascript/JavaScriptArtifactPathResolution.js +959 -188
  200. package/dist/application/javascript/JavaScriptArtifactReconstruction.js +57 -32
  201. package/dist/application/javascript/JavaScriptArtifactReconstructionInput.js +2 -0
  202. package/dist/application/javascript/JavaScriptModuleRelationships.js +34 -12
  203. package/dist/application/javascript/JavaScriptRecoveryService.js +29 -9
  204. package/dist/application/javascript/JavaScriptRuntimeObservationEvidence.js +1 -2
  205. package/dist/application/javascript/JavaScriptRuntimeObservationService.js +33 -9
  206. package/dist/application/javascript/JavaScriptRuntimeReconciliationService.js +0 -1
  207. package/dist/application/javascript/JavaScriptSemanticGraphAsyncProjection.js +4 -5
  208. package/dist/application/javascript/JavaScriptSemanticGraphBuilder.js +138 -43
  209. package/dist/application/javascript/JavaScriptSemanticGraphChildProcessProjection.js +13 -4
  210. package/dist/application/javascript/JavaScriptSemanticGraphConstruction.js +23 -3
  211. package/dist/application/javascript/JavaScriptSemanticGraphDataProjection.js +18 -5
  212. package/dist/application/javascript/JavaScriptSemanticGraphElectronProjection.js +67 -0
  213. package/dist/application/javascript/JavaScriptSemanticGraphFlowProjection.js +4 -6
  214. package/dist/application/javascript/JavaScriptSemanticGraphObjectProjection.js +2 -3
  215. package/dist/application/javascript/JavaScriptSemanticGraphResourceProjection.js +2 -3
  216. package/dist/application/javascript/JavaScriptSemanticGraphValueProjection.js +5 -8
  217. package/dist/application/javascript/JavaScriptSemanticTraceService.js +0 -1
  218. package/dist/application/managed/ManagedApplicationGraphService.js +0 -1
  219. package/dist/application/managed/ManagedMemberComparisonService.js +72 -54
  220. package/dist/application/managed/ManagedNativeVerificationService.js +0 -1
  221. package/dist/application/managed/ManagedReconstructionService.js +0 -1
  222. package/dist/application/native/NativeCallRoutes.js +78 -41
  223. package/dist/application/native/NativeDispatchMetadataInspection.js +6 -2
  224. package/dist/application/native/NativeUiActionTrace.js +43 -22
  225. package/dist/application/native/NativeValueTrace.js +65 -23
  226. package/dist/application/pcap/PcapAnalysisPort.js +1 -0
  227. package/dist/application/pcap/PcapAnalysisService.js +24 -0
  228. package/dist/application/process/ProcessCli.js +33 -13
  229. package/dist/application/reverse/ReverseEngineeringCommandPort.js +1 -0
  230. package/dist/application/reverse/ReverseEngineeringService.js +688 -0
  231. package/dist/application/rust/RustBinaryPort.js +1 -0
  232. package/dist/application/rust/RustBinaryService.js +82 -0
  233. package/dist/application/signals/SignalRecordingService.js +84 -0
  234. package/dist/application/sqlite/SqliteDatabaseCapability.js +30 -0
  235. package/dist/application/sqlite/SqliteDatabasePort.js +1 -0
  236. package/dist/application/sqlite/SqliteDatabaseService.js +76 -0
  237. package/dist/application/wasm/WasmArtifactPort.js +1 -0
  238. package/dist/application/wasm/WasmArtifactService.js +76 -0
  239. package/dist/application/wasm/WasmInterfaceComparisonService.js +188 -0
  240. package/dist/artifacts/AnalysisCleanupLease.js +119 -0
  241. package/dist/artifacts/ArtifactFileOperation.js +150 -0
  242. package/dist/artifacts/ArtifactHash.js +15 -3
  243. package/dist/artifacts/ArtifactPaths.js +4 -7
  244. package/dist/artifacts/ArtifactProvider.js +24 -9
  245. package/dist/artifacts/ArtifactReader.js +63 -5
  246. package/dist/artifacts/ArtifactResourceScope.js +92 -9
  247. package/dist/artifacts/AsarArtifactReader.js +186 -120
  248. package/dist/artifacts/AsarEntryStream.js +49 -17
  249. package/dist/artifacts/AsarListing.js +78 -0
  250. package/dist/artifacts/DirectoryArtifactReader.js +119 -28
  251. package/dist/artifacts/MachOSliceArtifactReader.js +153 -23
  252. package/dist/artifacts/NativeDmgArtifactReader.js +264 -62
  253. package/dist/artifacts/OrderedReads.js +57 -0
  254. package/dist/artifacts/SafeOutputTree.js +24 -7
  255. package/dist/artifacts/SafeOutputTreeCreationFailure.js +1 -0
  256. package/dist/artifacts/SafeOutputTreeReadback.js +10 -16
  257. package/dist/artifacts/ZipArtifactReader.js +150 -25
  258. package/dist/artifacts/apple/AppleAssetCatalogAnalysis.js +79 -68
  259. package/dist/artifacts/apple/DylibFileAccess.js +106 -0
  260. package/dist/artifacts/apple/DylibResolutionReader.js +72 -157
  261. package/dist/artifacts/apple/InterfaceBuilderAnalysis.js +108 -29
  262. package/dist/artifacts/apple/InterfaceBuilderDecodeBudget.js +81 -28
  263. package/dist/artifacts/apple/KeyedArchiveReader.js +23 -13
  264. package/dist/artifacts/apple/MachoLoadCommandReader.js +77 -61
  265. package/dist/artifacts/apple/NibArchive.js +11 -4
  266. package/dist/artifacts/apple/PlistNumberLiterals.js +106 -118
  267. package/dist/artifacts/extraction/ArtifactExtraction.js +21 -19
  268. package/dist/artifacts/hostExecutableMarking.js +16 -0
  269. package/dist/artifacts/inventory/ArtifactGraphConstruction.js +139 -41
  270. package/dist/artifacts/inventory/classify.js +36 -17
  271. package/dist/artifacts/inventory/hashStableRootArtifact.js +14 -7
  272. package/dist/artifacts/inventory/reader.js +36 -21
  273. package/dist/artifacts/inventory/scanCanonical.js +27 -21
  274. package/dist/artifacts/inventory/scanReader.js +36 -10
  275. package/dist/artifacts/javascript/JavaScriptArtifactFiles.js +166 -8
  276. package/dist/artifacts/readArtifactFileChunks.js +9 -0
  277. package/dist/artifacts/readStableArtifact.js +13 -11
  278. package/dist/browser/BrowserProcessStartup.js +20 -9
  279. package/dist/browser/BrowserScenarioPartialObservation.js +74 -92
  280. package/dist/browser/BrowserScenarioSecrets.js +176 -46
  281. package/dist/browser/CdpBrowserProvider.js +124 -102
  282. package/dist/browser/CdpCaptureDocuments.js +232 -102
  283. package/dist/browser/CdpCaptureDomSvg.js +80 -76
  284. package/dist/browser/CdpCaptureEventBodyShapes.js +9 -5
  285. package/dist/browser/CdpCaptureEventHandlers.js +23 -12
  286. package/dist/browser/CdpCaptureEvents.js +49 -10
  287. package/dist/browser/CdpCaptureStorage.js +22 -5
  288. package/dist/browser/CdpCaptureStorageFingerprints.js +54 -11
  289. package/dist/browser/CdpCaptureValues.js +12 -1
  290. package/dist/browser/CdpConnection.js +135 -30
  291. package/dist/browser/CdpElectronInspection.js +74 -64
  292. package/dist/browser/CdpElectronProvider.js +63 -6
  293. package/dist/browser/CdpElectronScriptEvents.js +4 -1
  294. package/dist/browser/CdpElectronScripts.js +4 -6
  295. package/dist/browser/CdpElectronWorkers.js +20 -4
  296. package/dist/browser/CdpEndpoint.js +143 -17
  297. package/dist/browser/CdpObservationSession.js +24 -8
  298. package/dist/browser/CdpPageCapture.js +68 -17
  299. package/dist/browser/CdpPageCaptureScripts.js +18 -13
  300. package/dist/browser/CdpPageCaptureWorkers.js +46 -11
  301. package/dist/browser/CdpSafeMetadata.js +32 -24
  302. package/dist/browser/CdpScreenshot.js +5 -14
  303. package/dist/browser/CdpSnapshotNodes.js +103 -0
  304. package/dist/browser/CdpSnapshotStrings.js +15 -0
  305. package/dist/browser/CdpTargetSession.js +76 -7
  306. package/dist/browser/CdpTargetSessionOwner.js +198 -0
  307. package/dist/browser/CdpWebMcpDiscovery.js +23 -6
  308. package/dist/browser/ElectronCaptureCleanup.js +82 -0
  309. package/dist/browser/ElectronProcessCleanup.js +91 -0
  310. package/dist/browser/PlaywrightBrowserScenarioProvider.js +75 -20
  311. package/dist/browser/PlaywrightElectronActiveActions.js +57 -9
  312. package/dist/browser/PlaywrightElectronActiveFuses.js +86 -0
  313. package/dist/browser/PlaywrightElectronActiveProjection.js +21 -4
  314. package/dist/browser/PlaywrightElectronActiveProvider.js +237 -175
  315. package/dist/browser/PlaywrightExecutionBoundary.js +6 -4
  316. package/dist/browser/PlaywrightScenarioBrowser.js +240 -91
  317. package/dist/browser/PlaywrightScenarioEvents.js +287 -38
  318. package/dist/browser/PlaywrightScenarioServiceWorkers.js +336 -0
  319. package/dist/browser/PlaywrightScenarioSession.js +151 -46
  320. package/dist/browser/PlaywrightScenarioStorage.js +15 -7
  321. package/dist/browser/StructuredFieldToken.js +53 -0
  322. package/dist/browser/WebArtifactCleanup.js +53 -0
  323. package/dist/browser/WebSourceMapFetcher.js +181 -89
  324. package/dist/browser/assets/LocalWebScriptArtifacts.js +24 -3
  325. package/dist/browser/assets/PublishWebScripts.js +13 -2
  326. package/dist/browser/assets/ScenarioScriptCapture.js +2 -1
  327. package/dist/browser/assets/WebArtifactReads.js +15 -3
  328. package/dist/browser/assets/WebSourceLocationArtifacts.js +47 -3
  329. package/dist/browser/execution/CdpRuntimeSession.js +36 -7
  330. package/dist/browser/execution/CdpWebRuntimeProvider.js +22 -4
  331. package/dist/browser/history/CaptureFailures.js +29 -10
  332. package/dist/browser/history/CaptureFormatError.js +2 -2
  333. package/dist/browser/history/{HarJson.js → CaptureJson.js} +14 -4
  334. package/dist/browser/history/CaptureRedaction.js +16 -3
  335. package/dist/browser/history/CaptureRelease.js +20 -2
  336. package/dist/browser/history/HarCapture.js +54 -30
  337. package/dist/browser/history/HarSchema.js +36 -36
  338. package/dist/browser/history/HistoricalCaptureDecoder.js +93 -25
  339. package/dist/browser/history/NodeCaptureAdapter.js +48 -0
  340. package/dist/browser/history/{HarCaptureProcess.js → NodeCaptureProcess.js} +18 -9
  341. package/dist/browser/history/QlogCapture.js +385 -0
  342. package/dist/browser/history/SazCapture.js +130 -0
  343. package/dist/browser/history/SazHttp.js +61 -0
  344. package/dist/browser/history/SazMetadata.js +55 -0
  345. package/dist/browser/history/SazProjection.js +90 -0
  346. package/dist/browser/modules/NativeModuleResolver.js +248 -131
  347. package/dist/browser/modules/WebModuleArtifacts.js +49 -3
  348. package/dist/browser/network/PlaywrightNetworkContent.js +67 -9
  349. package/dist/browser/network/PlaywrightScenarioNetwork.js +249 -26
  350. package/dist/captures/TsharkCaptureProvider.js +377 -0
  351. package/dist/captures/parseFieldDiscovery.js +66 -0
  352. package/dist/captures/parsePacketOutput.js +21 -0
  353. package/dist/catalogIdentity.js +58 -42
  354. package/dist/cli/adbCommands.js +20 -21
  355. package/dist/cli/analysisViewCommands.js +1 -1
  356. package/dist/cli/androidCommands.js +13 -16
  357. package/dist/cli/apktoolCommands.js +14 -25
  358. package/dist/cli/applicationCommands.js +44 -17
  359. package/dist/cli/artifactCommands.js +1 -1
  360. package/dist/cli/binaryDiagnosticsCommands.js +17 -13
  361. package/dist/cli/browserAdvancedCommands.js +46 -26
  362. package/dist/cli/browserCommands.js +59 -33
  363. package/dist/cli/captureCommands.js +72 -0
  364. package/dist/cli/cliResultOutput.js +274 -0
  365. package/dist/cli/coreBinaryCommands.js +77 -30
  366. package/dist/cli/coreNativeCommands.js +53 -31
  367. package/dist/cli/cutterCommands.js +88 -0
  368. package/dist/cli/electronCommands.js +76 -13
  369. package/dist/cli/evmCommands.js +9 -19
  370. package/dist/cli/finishAnalysisCommand.js +52 -0
  371. package/dist/cli/firmwareCommands.js +20 -50
  372. package/dist/cli/flutterCommands.js +53 -0
  373. package/dist/cli/fridaCommands.js +219 -0
  374. package/dist/cli/goCommands.js +20 -0
  375. package/dist/cli/interactiveSetup.js +11 -1
  376. package/dist/cli/javascriptApplicationAnalysis.js +1 -1
  377. package/dist/cli/javascriptRecoveryCommands.js +18 -23
  378. package/dist/cli/jebCommands.js +2 -14
  379. package/dist/cli/jsonOutput.js +2 -2
  380. package/dist/cli/managedCommands.js +31 -3
  381. package/dist/cli/options.js +26 -2
  382. package/dist/cli/pcapCommands.js +29 -0
  383. package/dist/cli/processCommands.js +1 -1
  384. package/dist/cli/reverseEngineeringCommands.js +268 -0
  385. package/dist/cli/rustCommands.js +20 -0
  386. package/dist/cli/setupCommands.js +41 -12
  387. package/dist/cli/signalCommands.js +72 -0
  388. package/dist/cli/sqliteCommands.js +52 -0
  389. package/dist/cli/utilityCommands.js +116 -74
  390. package/dist/cli/wasmCommands.js +50 -0
  391. package/dist/cli/webModuleCommands.js +27 -38
  392. package/dist/cli/webNetworkCaptureCommands.js +10 -9
  393. package/dist/cli/webRuntimeCommands.js +15 -6
  394. package/dist/cli/webSourceLocationCommands.js +14 -33
  395. package/dist/cli-runtime/AnalysisCleanupLease-CWfTGYKd.js +103 -0
  396. package/dist/cli-runtime/AnalysisProvider-BGrYaMVo.js +38 -0
  397. package/dist/cli-runtime/AnalysisSnapshotCache-BjRlXeUS.js +711 -0
  398. package/dist/cli-runtime/ArtifactFileOperation-Dg4BcoEM.js +122 -0
  399. package/dist/cli-runtime/ArtifactReader-DMwm42bk.js +78 -0
  400. package/dist/cli-runtime/ArtifactResourceScope-CokZGcII.js +175 -0
  401. package/dist/cli-runtime/AsarHeader-BxwU17DJ.js +31 -0
  402. package/dist/cli-runtime/BinarySessionStatus-DRhjr7Vb.js +212 -0
  403. package/dist/cli-runtime/BinaryTargetResolver-tuCTjBlQ.js +1238 -0
  404. package/dist/cli-runtime/BoundedFileBytes-DRtiQNAQ.js +43 -0
  405. package/dist/cli-runtime/CdpTargetSession-CQ08KHbh.js +925 -0
  406. package/dist/cli-runtime/ClientConfigPath-Dn-V_GUf.js +255 -0
  407. package/dist/cli-runtime/ClientConfigurationDocument-C9T8MNGc.js +2021 -0
  408. package/dist/cli-runtime/ClientRegistrationStatus-PnD29RTX.js +585 -0
  409. package/dist/cli-runtime/CurrentEntrypointPath-m7QCIVN0.js +14 -0
  410. package/dist/cli-runtime/DirectAnalysis-C5NyUryV.js +581 -0
  411. package/dist/cli-runtime/DirectoryArtifactReader-CokAJ8vo.js +448 -0
  412. package/dist/cli-runtime/Doctor-DrkWsav4.js +668 -0
  413. package/dist/cli-runtime/ElectronFileScope-AP7VoVr7.js +1109 -0
  414. package/dist/cli-runtime/ElectronFuseFailures-DsjXR7Xp.js +609 -0
  415. package/dist/cli-runtime/ExecFileOutput-D6KLYTve.js +119 -0
  416. package/dist/cli-runtime/InterfaceBuilderDecodeBudget-CW1IO3dG.js +298 -0
  417. package/dist/cli-runtime/InventoryProjectionEvidence-DTH5QAqL.js +49 -0
  418. package/dist/cli-runtime/InvestigationProviders-CFh4a64d.js +118 -0
  419. package/dist/cli-runtime/JavaScriptApplicationEvidenceGraph-gOmPB2L6.js +160 -0
  420. package/dist/cli-runtime/JavaScriptApplicationWorkflowEvidence-WZgtK_Ok.js +75 -0
  421. package/dist/cli-runtime/JavaScriptWorkerMemoryLimit-B1bwMM1a.js +86 -0
  422. package/dist/cli-runtime/JebMcpEndpoint-BEalGZh9.js +710 -0
  423. package/dist/cli-runtime/JsonFiles-uvd6ZyQi.js +600 -0
  424. package/dist/cli-runtime/KunaInstallation-P0j3x851.js +1781 -0
  425. package/dist/cli-runtime/MacCodeSignature-MgYbRK_H.js +24 -0
  426. package/dist/cli-runtime/MacHopperPaths-bGzqjF1Z.js +34 -0
  427. package/dist/cli-runtime/MachoLoadCommandReader-CZm6N5vF.js +330 -0
  428. package/dist/cli-runtime/ManagedSnapshot-CPE9C3OD.js +4481 -0
  429. package/dist/cli-runtime/OwnedCommandCleanup-BN_V6Erc.js +187 -0
  430. package/dist/cli-runtime/OwnedRegularFile-D1f5nUCx.js +256 -0
  431. package/dist/cli-runtime/OwnedStagedOutput-D31dOozz.js +126 -0
  432. package/dist/cli-runtime/PrivateRuntimeRoot-Cd23u6jd.js +296 -0
  433. package/dist/cli-runtime/ProcessOwnership-CtrNr6ee.js +545 -0
  434. package/dist/cli-runtime/ProcessOwnershipObservation-C006iCtZ.js +920 -0
  435. package/dist/cli-runtime/ProviderDeadline-rSuH4Pm8.js +148 -0
  436. package/dist/cli-runtime/ProviderOperationExecution-CmU-XrQr.js +38 -0
  437. package/dist/cli-runtime/ProviderProcess-D87A7ctp.js +770 -0
  438. package/dist/cli-runtime/RegularFileRead-mbgGYtxe.js +125 -0
  439. package/dist/cli-runtime/SafeOutputTree-i904hd_2.js +525 -0
  440. package/dist/cli-runtime/SetupHost-CMPmPraB.js +1268 -0
  441. package/dist/cli-runtime/SharedStartupAttempt-BxKyf3Uv.js +1424 -0
  442. package/dist/cli-runtime/StableFileHash-Ame_h3lY.js +61 -0
  443. package/dist/cli-runtime/SupportedClients-DMafjitv.js +1066 -0
  444. package/dist/cli-runtime/UninstallFailure-1blyKXHE.js +22 -0
  445. package/dist/cli-runtime/Update-DAsASWlE.js +143 -0
  446. package/dist/cli-runtime/UpdateFailure-BcFNxEZZ.js +24 -0
  447. package/dist/cli-runtime/WindowsBatchCommand-Cx9kaVNf.js +97 -0
  448. package/dist/cli-runtime/WindowsNativeLoader-BqyZO0ZD.js +142 -0
  449. package/dist/cli-runtime/ZipArtifactReader-Jed69LEL.js +252 -0
  450. package/dist/cli-runtime/analysisErrorCleanup-COdAmDsb.js +33 -0
  451. package/dist/cli-runtime/appleArchiveFormat-Bb3G5CCI.js +269 -0
  452. package/dist/cli-runtime/application__DirectAnalysisStatus-F74bu9oy.js +150 -0
  453. package/dist/cli-runtime/application__EnhancedTools-Bg51b0Yp.js +1820 -0
  454. package/dist/cli-runtime/application__FunctionAnalysisEvidence-DBWIaYCh.js +41 -0
  455. package/dist/cli-runtime/application__ReconstructionCoverageService-AEPNpZqJ.js +32 -0
  456. package/dist/cli-runtime/application__ReconstructionObligationLedgerService-Cl9cPEZf.js +828 -0
  457. package/dist/cli-runtime/application__Setup-DwQzEewK.js +526 -0
  458. package/dist/cli-runtime/application__Uninstall-BOf9oyvQ.js +468 -0
  459. package/dist/cli-runtime/application__UpdateRuntime-CzWkRJHa.js +435 -0
  460. package/dist/cli-runtime/application__android__AndroidApplicationService-shW_aKlj.js +31 -0
  461. package/dist/cli-runtime/application__apple__AppleApplicationService-DIv6d3wB.js +31 -0
  462. package/dist/cli-runtime/application__harmony__HarmonyApplicationService-OIUFVQFV.js +31 -0
  463. package/dist/cli-runtime/application__javascript__ElectronActiveObservationService-wvCh72hK.js +118 -0
  464. package/dist/cli-runtime/application__javascript__ElectronObservationService-SydXPCwM.js +88 -0
  465. package/dist/cli-runtime/application__javascript__JavaScriptApplicationService-o0uEsjEc.js +12254 -0
  466. package/dist/cli-runtime/application__javascript__JavaScriptApplicationWorkflowService-BAheG_71.js +2336 -0
  467. package/dist/cli-runtime/application__javascript__JavaScriptRuntimeReconciliationService-Cnn4GP8q.js +88 -0
  468. package/dist/cli-runtime/application__javascript__JavaScriptSemanticTraceService-CmvLfV1A.js +299 -0
  469. package/dist/cli-runtime/artifacts__ArtifactProvider-wx2K0F2I.js +2205 -0
  470. package/dist/cli-runtime/binary-CWVNJhAC.js +19608 -0
  471. package/dist/cli-runtime/catalogIdentity-DAEEsOdX.js +1112 -0
  472. package/dist/cli-runtime/cli.js +44469 -0
  473. package/dist/cli-runtime/cliOutput-CgSuw782.js +163 -0
  474. package/dist/cli-runtime/cliOutput.js +5 -0
  475. package/dist/cli-runtime/cliResultOutput-10sd6xGx.js +1453 -0
  476. package/dist/cli-runtime/cliResultOutput.js +6 -0
  477. package/dist/cli-runtime/composition__browserScenario-BtPb1c1y.js +3414 -0
  478. package/dist/cli-runtime/composition__electronObservation-Bk8R6DJo.js +614 -0
  479. package/dist/cli-runtime/composition__electronScenario-BVF0qStH.js +916 -0
  480. package/dist/cli-runtime/cutterToolContracts-BQtG_Nzo.js +5267 -0
  481. package/dist/cli-runtime/doctorRuntime-B__SIpm-.js +478 -0
  482. package/dist/cli-runtime/dotnet__ManagedStaticProvider-DO5Yzcp4.js +5 -0
  483. package/dist/cli-runtime/errorSchemas-Ixz_q7qt.js +655 -0
  484. package/dist/cli-runtime/homeDirectory-DC_DeJIg.js +18 -0
  485. package/dist/cli-runtime/javascriptApplicationAnalysis-Dk6yBV8g.js +2088 -0
  486. package/dist/cli-runtime/javascriptExportReturnShapeProjection-CObOIiQ6.js +78 -0
  487. package/dist/cli-runtime/javascriptExportShapeComparisonSchemas-DpwuBenh.js +1244 -0
  488. package/dist/cli-runtime/javascriptRuntimeReconciliation-C6ZgWMys.js +1509 -0
  489. package/dist/cli-runtime/javascriptRuntimeReconciliationSchemas-D6tZKUQs.js +247 -0
  490. package/dist/cli-runtime/javascriptSemanticTraceSchemas-C7m0b6_w.js +126 -0
  491. package/dist/cli-runtime/lipo-DPQ6qurH.js +394 -0
  492. package/dist/cli-runtime/logger-BuDJ9xxO.js +48 -0
  493. package/dist/cli-runtime/machoContainer-Cy98bkFm.js +352 -0
  494. package/dist/cli-runtime/managedApplicationGraph-BazVqpJv.js +1136 -0
  495. package/dist/cli-runtime/managedToolContracts-BuFkMBH5.js +99 -0
  496. package/dist/cli-runtime/mcpDoctor.js +361 -0
  497. package/dist/cli-runtime/mcpStartupPolicy-imCbM3qo.js +28 -0
  498. package/dist/cli-runtime/native__NativeMacOSProvider-DTcRhuGA.js +5502 -0
  499. package/dist/cli-runtime/officialToolContracts-CzzVLx8I.js +1522 -0
  500. package/dist/cli-runtime/peMachine-B9ggfSJJ.js +95 -0
  501. package/dist/cli-runtime/propertyListKeys-D5dSASEy.js +355 -0
  502. package/dist/cli-runtime/providerCleanupError-BhsJyAhk.js +25 -0
  503. package/dist/cli-runtime/providerIdentities-Ao1XTvwx.js +31 -0
  504. package/dist/cli-runtime/providerStartupTimeout-B2tF2LtZ.js +17 -0
  505. package/dist/cli-runtime/readArtifactFileChunks-BbTL_PtB.js +129 -0
  506. package/dist/cli-runtime/reconstructionObligationLedgerSchemas-Bi6sect1.js +22156 -0
  507. package/dist/cli-runtime/rolldown-runtime-DXoylpqc.js +121 -0
  508. package/dist/cli-runtime/runtimeVersion-CMGd0bDu.js +23 -0
  509. package/dist/cli-runtime/safeJson-DKKACtdy.js +25 -0
  510. package/dist/cli-runtime/scanCanonical-CcDFUr-w.js +2594 -0
  511. package/dist/cli-runtime/snapshotEnvironment-Yvx5qwsl.js +196 -0
  512. package/dist/cli-runtime/toolContracts-CJzEyZ38.js +3795 -0
  513. package/dist/cli-runtime/toolOutputSchemaGroups-BqdSzySu.js +12249 -0
  514. package/dist/cli-runtime/workflowInputError-BP8z9Wxl.js +26 -0
  515. package/dist/cli.js +48 -5
  516. package/dist/cliBrowserScenarioCommands.js +41 -7
  517. package/dist/cliCommandNames.js +48 -0
  518. package/dist/cliEvidenceCommands.js +0 -1
  519. package/dist/cliJavaScriptRuntimeCommands.js +16 -14
  520. package/dist/cliJsonInput.js +12 -4
  521. package/dist/cliLogging.js +66 -15
  522. package/dist/cliObservationOptions.js +9 -0
  523. package/dist/cliOutput.js +105 -7
  524. package/dist/composition/binary.js +19 -2
  525. package/dist/composition/captures.js +3 -0
  526. package/dist/composition/directAnalysis.js +36 -11
  527. package/dist/composition/electronFuses.js +4 -0
  528. package/dist/composition/evm.js +12 -0
  529. package/dist/composition/flutter.js +3 -0
  530. package/dist/composition/go.js +4 -0
  531. package/dist/composition/javascriptAnalysisWorkerProcess.js +8 -8
  532. package/dist/composition/jeb.js +45 -5
  533. package/dist/composition/pcap.js +3 -0
  534. package/dist/composition/resolveWindowsProviderExecutable.js +61 -0
  535. package/dist/composition/reverseEngineering.js +29 -0
  536. package/dist/composition/rust.js +4 -0
  537. package/dist/composition/signals.js +3 -0
  538. package/dist/composition/sqlite.js +4 -0
  539. package/dist/composition/wasm.js +22 -0
  540. package/dist/composition/webNetworkCaptures.js +7 -2
  541. package/dist/config/environment.js +79 -4
  542. package/dist/config/ghidraDisabledAnalyzers.js +25 -0
  543. package/dist/config/homeDirectory.js +9 -6
  544. package/dist/config/mcpInputSchemaProfile.js +5 -1
  545. package/dist/config/mcpOutputSchemaProfile.js +22 -0
  546. package/dist/config/parseConfig.js +28 -34
  547. package/dist/config/parsers.js +4 -3
  548. package/dist/config/{ghidraStartupTimeout.js → providerStartupTimeout.js} +7 -3
  549. package/dist/contracts/adb/adbToolContracts.js +8 -8
  550. package/dist/contracts/analysisDetail.js +6 -3
  551. package/dist/contracts/analysisViewApiSurfaceExample.js +68 -0
  552. package/dist/contracts/analysisViewToolContracts.js +65 -3
  553. package/dist/contracts/android/androidToolContracts.js +17 -8
  554. package/dist/contracts/apktool/apktoolToolContracts.js +5 -1
  555. package/dist/contracts/applicationToolContracts.js +17 -2
  556. package/dist/contracts/artifactComparisonExample.js +18 -14
  557. package/dist/contracts/artifactToolContracts.js +16 -3
  558. package/dist/contracts/browserScenarioToolContracts.js +1 -1
  559. package/dist/contracts/browserToolContracts.js +13 -1
  560. package/dist/contracts/captures/captureToolContracts.js +42 -0
  561. package/dist/contracts/compactInputSchema.js +39 -12
  562. package/dist/contracts/cutterToolContracts.js +84 -0
  563. package/dist/contracts/enhancedToolContracts.js +2 -2
  564. package/dist/contracts/evm/evmToolContracts.js +30 -15
  565. package/dist/contracts/firmware/firmwareToolContracts.js +1 -1
  566. package/dist/contracts/flutter/flutterToolContracts.js +47 -0
  567. package/dist/contracts/fridaRemoteAddress.js +23 -0
  568. package/dist/contracts/fridaToolContracts.js +274 -0
  569. package/dist/contracts/functionComparisonExample.js +12 -1
  570. package/dist/contracts/gdbToolContracts.js +102 -0
  571. package/dist/contracts/go/goToolContracts.js +20 -0
  572. package/dist/contracts/hopperMemoryContracts.js +15 -0
  573. package/dist/contracts/inputSchemaPresentation.js +199 -38
  574. package/dist/contracts/investigationExamples.js +1 -0
  575. package/dist/contracts/javascript/electronToolContracts.js +27 -2
  576. package/dist/contracts/javascript/javascriptExportShapeComparisonExample.js +1 -0
  577. package/dist/contracts/javascript/javascriptRecoveryToolContracts.js +13 -1
  578. package/dist/contracts/javascript/javascriptRuntimeReconciliationExample.js +1 -0
  579. package/dist/contracts/jsonSchemaKeywords.js +29 -0
  580. package/dist/contracts/managed/managedToolContracts.js +43 -4
  581. package/dist/contracts/managed/managedWorkflowExamples.js +10 -1
  582. package/dist/contracts/managed/managedWorkflowToolContracts.js +4 -30
  583. package/dist/contracts/mobileApplicationGraphExamples.js +27 -12
  584. package/dist/contracts/native/binaryDiagnosticsToolContracts.js +3 -2
  585. package/dist/contracts/native/nativeToolContracts.js +10 -6
  586. package/dist/contracts/officialToolContracts.js +7 -7
  587. package/dist/contracts/pcap/pcapToolContracts.js +33 -0
  588. package/dist/contracts/providerSelection.js +1 -0
  589. package/dist/contracts/reconstructionReadinessExample.js +126 -119
  590. package/dist/contracts/reverseEngineeringToolContracts.js +52 -0
  591. package/dist/contracts/rizinDebugToolContracts.js +97 -0
  592. package/dist/contracts/rust/rustToolContracts.js +20 -0
  593. package/dist/contracts/sessionLifecycleInputs.js +34 -2
  594. package/dist/contracts/sessionToolContracts.js +4 -4
  595. package/dist/contracts/sessionToolSchemas.js +14 -0
  596. package/dist/contracts/signals/signalToolContracts.js +40 -0
  597. package/dist/contracts/sqlite/sqliteToolContracts.js +36 -0
  598. package/dist/contracts/toolContractExamples.js +29 -0
  599. package/dist/contracts/toolContractTypes.js +2 -0
  600. package/dist/contracts/toolContracts.js +26 -0
  601. package/dist/contracts/toolEffects.js +252 -9
  602. package/dist/contracts/toolOutputSchemaGroups.js +78 -32
  603. package/dist/contracts/toolOutputSchemaPrimitives.js +118 -10
  604. package/dist/contracts/toolSchemaMetadata.js +102 -16
  605. package/dist/contracts/unknownContractExamples.js +1 -1
  606. package/dist/contracts/wasm/wasmComparisonContracts.js +52 -0
  607. package/dist/contracts/wasm/wasmToolContracts.js +33 -0
  608. package/dist/contracts/webNetworkCaptureToolContracts.js +15 -4
  609. package/dist/cutter/CutterBridgeClient.js +760 -0
  610. package/dist/cutter/CutterBridgeService.js +187 -0
  611. package/dist/doctorRuntime.js +41 -8
  612. package/dist/domain/adb/adbDeviceAnalysis.js +45 -5
  613. package/dist/domain/analysisErrorBase.js +79 -2
  614. package/dist/domain/analysisErrorCleanup.js +4 -2
  615. package/dist/domain/analysisErrorCore.js +32 -0
  616. package/dist/domain/analysisErrorPresentation.js +80 -20
  617. package/dist/domain/analysisErrorProjection.js +72 -37
  618. package/dist/domain/analysisProfile.js +7 -3
  619. package/dist/domain/analysisSearch.js +26 -0
  620. package/dist/domain/analysisSnapshot.js +312 -185
  621. package/dist/domain/analysisView/WebNetworkApiSurfaceAccumulator.js +353 -0
  622. package/dist/domain/analysisView/analysisView.js +391 -44
  623. package/dist/domain/analysisView/analysisViewCoverage.js +32 -0
  624. package/dist/domain/analysisView/analysisViewDataAdmission.js +86 -0
  625. package/dist/domain/analysisView/analysisViewErrors.js +4 -0
  626. package/dist/domain/analysisView/analysisViewParent.js +12 -0
  627. package/dist/domain/analysisView/analysisViewText.js +29 -0
  628. package/dist/domain/analysisView/androidPackageView.js +102 -0
  629. package/dist/domain/analysisView/artifactInventoryView.js +126 -0
  630. package/dist/domain/analysisView/binaryLayoutView.js +11 -4
  631. package/dist/domain/analysisView/dartAotView.js +93 -0
  632. package/dist/domain/analysisView/evmInterfaceView.js +105 -0
  633. package/dist/domain/analysisView/interfaceBuilderView.js +182 -0
  634. package/dist/domain/analysisView/javascriptApplicationCoverage.js +27 -0
  635. package/dist/domain/analysisView/javascriptApplicationView.js +123 -49
  636. package/dist/domain/analysisView/javascriptFactsView.js +92 -0
  637. package/dist/domain/analysisView/javascriptModuleReferences.js +37 -0
  638. package/dist/domain/analysisView/machoView.js +186 -0
  639. package/dist/domain/analysisView/managedArtifactView.js +108 -0
  640. package/dist/domain/analysisView/managedMemberView.js +215 -0
  641. package/dist/domain/analysisView/nativeFunctionView.js +20 -25
  642. package/dist/domain/analysisView/pcapCaptureView.js +264 -0
  643. package/dist/domain/analysisView/qlogCaptureView.js +198 -0
  644. package/dist/domain/analysisView/wasmArtifactView.js +162 -0
  645. package/dist/domain/analysisView/webNetworkApiSurfaceView.js +123 -0
  646. package/dist/domain/analysisView/webNetworkCaptureView.js +388 -0
  647. package/dist/domain/android/androidAnalysis.js +36 -2
  648. package/dist/domain/android/androidApplication.js +37 -64
  649. package/dist/domain/apktool/apktoolResourceAnalysis.js +70 -8
  650. package/dist/domain/apple/appleApplication.js +70 -87
  651. package/dist/domain/apple/appleArchiveFormat.js +184 -0
  652. package/dist/domain/apple/appleAssetCatalog.js +15 -0
  653. package/dist/domain/apple/appleBundleAnatomy.js +57 -69
  654. package/dist/domain/apple/dyldPaths.js +9 -2
  655. package/dist/domain/apple/dylibResolution.js +24 -10
  656. package/dist/domain/apple/dylibResolutionFindings.js +8 -9
  657. package/dist/domain/apple/interfaceBuilderGraph.js +78 -33
  658. package/dist/domain/apple/interfaceBuilderKeyedArchive.js +39 -12
  659. package/dist/domain/apple/jvmClassFile.js +226 -0
  660. package/dist/domain/apple/keyedArchive.js +39 -17
  661. package/dist/domain/apple/machoContainer.js +123 -8
  662. package/dist/domain/apple/machoCpuIdentity.js +4 -0
  663. package/dist/domain/apple/plistNumbers.js +67 -5
  664. package/dist/domain/apple/plistValue.js +95 -19
  665. package/dist/domain/artifactComparison.js +116 -37
  666. package/dist/domain/artifactDecompressionBudget.js +26 -0
  667. package/dist/domain/artifactGraph.js +18 -9
  668. package/dist/domain/artifactIdentity.js +4 -1
  669. package/dist/domain/artifactInspection.js +34 -3
  670. package/dist/domain/artifactInventoryEvidence.js +146 -40
  671. package/dist/domain/binaryTarget.js +251 -109
  672. package/dist/domain/binaryTargetTypes.js +24 -1
  673. package/dist/domain/browserNetworkEvidence.js +24 -3
  674. package/dist/domain/browserObservation.js +92 -56
  675. package/dist/domain/browserObservationError.js +4 -4
  676. package/dist/domain/browserObservationSchemas.js +4 -1
  677. package/dist/domain/browserScenarioCapture.js +11 -1
  678. package/dist/domain/browserScenarioCaptureLimits.js +34 -0
  679. package/dist/domain/browserScenarioCaptureValues.js +76 -2
  680. package/dist/domain/browserScenarioDiff.js +120 -11
  681. package/dist/domain/browserScenarioDiffEvidence.js +44 -13
  682. package/dist/domain/browserScenarioDiffValues.js +10 -3
  683. package/dist/domain/browserScenarioNetworkComparison.js +158 -0
  684. package/dist/domain/browserScenarioNormalization.js +10 -13
  685. package/dist/domain/browserScenarioValues.js +7 -13
  686. package/dist/domain/browserSession.js +2 -2
  687. package/dist/domain/bundleComparison.js +1 -5
  688. package/dist/domain/callPath.js +40 -3
  689. package/dist/domain/captures/packetCapture.js +139 -0
  690. package/dist/domain/captures/packetFields.js +81 -0
  691. package/dist/domain/changedBehavior.js +43 -41
  692. package/dist/domain/comparisonSourceEvidence.js +6 -0
  693. package/dist/domain/dosCom.js +2 -2
  694. package/dist/domain/dosMz.js +66 -19
  695. package/dist/domain/electron/electronFuseEvidence.js +42 -0
  696. package/dist/domain/electron/electronFuses.js +360 -0
  697. package/dist/domain/elfFixedHeader.js +66 -0
  698. package/dist/domain/evidence.js +105 -39
  699. package/dist/domain/evidenceBundle.js +67 -22
  700. package/dist/domain/evidenceErrors.js +5 -0
  701. package/dist/domain/evm/evmInterface.js +18 -4
  702. package/dist/domain/evm/solidityMetadata.js +70 -0
  703. package/dist/domain/explicitSensitiveFailure.js +44 -23
  704. package/dist/domain/fileSnapshotObservation.js +25 -0
  705. package/dist/domain/firmware/firmwareAnalysis.js +29 -0
  706. package/dist/domain/fixedTupleSchema.js +9 -0
  707. package/dist/domain/flutter/flutterBuildAnalysis.js +141 -0
  708. package/dist/domain/functionCallCoverage.js +60 -0
  709. package/dist/domain/functionComparisonDimensions.js +136 -18
  710. package/dist/domain/functionComparisonNormalization.js +83 -19
  711. package/dist/domain/functionComparisonResults.js +7 -6
  712. package/dist/domain/functionComparisonSchemas.js +14 -3
  713. package/dist/domain/functionDossierEvidence.js +4 -0
  714. package/dist/domain/go/goBinary.js +96 -0
  715. package/dist/domain/harmony/harmonyApplication.js +156 -0
  716. package/dist/domain/hopperErrors.js +19 -18
  717. package/dist/domain/hopperPublisher.js +12 -0
  718. package/dist/domain/hopperValues.js +135 -34
  719. package/dist/domain/javascript/electronActiveObservation.js +1 -0
  720. package/dist/domain/javascript/electronObservation.js +4 -1
  721. package/dist/domain/javascript/electronStaticAnalysisBrowser.js +94 -33
  722. package/dist/domain/javascript/electronStaticAnalysisIpc.js +3 -1
  723. package/dist/domain/javascript/electronStaticAnalysisNative.js +19 -5
  724. package/dist/domain/javascript/electronStaticAnalysisValues.js +14 -28
  725. package/dist/domain/javascript/electronStaticOptionObjects.js +45 -0
  726. package/dist/domain/javascript/electronWrappedCallPaths.js +551 -0
  727. package/dist/domain/javascript/htmlArtifactReferences.js +94 -4
  728. package/dist/domain/javascript/javascriptAnalysisResourceControls.js +37 -1
  729. package/dist/domain/javascript/javascriptApplicationAnalysis.js +7 -0
  730. package/dist/domain/javascript/javascriptApplicationChangeGraph.js +10 -2
  731. package/dist/domain/javascript/javascriptApplicationEvidenceSchemas.js +1 -1
  732. package/dist/domain/javascript/javascriptApplicationGraph.js +17 -1
  733. package/dist/domain/javascript/javascriptApplicationGraphSchemas.js +1 -0
  734. package/dist/domain/javascript/javascriptApplicationProjectionResources.js +8 -0
  735. package/dist/domain/javascript/javascriptApplicationVersionComparisonSchemas.js +3 -1
  736. package/dist/domain/javascript/javascriptApplicationVersionItems.js +49 -21
  737. package/dist/domain/javascript/javascriptApplicationVersionKeys.js +31 -18
  738. package/dist/domain/javascript/javascriptArtifactFiles.js +2 -1
  739. package/dist/domain/javascript/javascriptAstFingerprint.js +89 -24
  740. package/dist/domain/javascript/javascriptAstValues.js +132 -5
  741. package/dist/domain/javascript/javascriptBootstrap.js +94 -0
  742. package/dist/domain/javascript/javascriptBootstrapIntegrity.js +372 -0
  743. package/dist/domain/javascript/javascriptBuiltinResourceMethods.js +8 -0
  744. package/dist/domain/javascript/javascriptBundledRequireOrigin.js +278 -0
  745. package/dist/domain/javascript/javascriptCommonJsExportReceivers.js +231 -0
  746. package/dist/domain/javascript/javascriptContextBridgeExposure.js +23 -0
  747. package/dist/domain/javascript/javascriptElectronMemberWrites.js +96 -22
  748. package/dist/domain/javascript/javascriptExportShapeComparisonSchemas.js +6 -5
  749. package/dist/domain/javascript/javascriptExportShapeVariants.js +1 -1
  750. package/dist/domain/javascript/javascriptFeatureSeed.js +34 -17
  751. package/dist/domain/javascript/javascriptFeatureTrace.js +9 -3
  752. package/dist/domain/javascript/javascriptFeatureTraceSchemas.js +42 -11
  753. package/dist/domain/javascript/javascriptGraphqlOperations.js +382 -0
  754. package/dist/domain/javascript/javascriptIntrinsicInvocation.js +132 -0
  755. package/dist/domain/javascript/javascriptModuleDeclaration.js +48 -0
  756. package/dist/domain/javascript/javascriptModuleInterop.js +618 -0
  757. package/dist/domain/javascript/javascriptModuleResolutionMode.js +18 -0
  758. package/dist/domain/javascript/javascriptModuleSpecifier.js +5 -0
  759. package/dist/domain/javascript/javascriptNativeHandoff.js +7 -12
  760. package/dist/domain/javascript/javascriptPackageImportAliases.js +58 -0
  761. package/dist/domain/javascript/javascriptRecovery.js +12 -5
  762. package/dist/domain/javascript/javascriptRpcEndpoints.js +7 -93
  763. package/dist/domain/javascript/javascriptRuntimeLoadState.js +16 -0
  764. package/dist/domain/javascript/javascriptRuntimeObservation.js +4 -1
  765. package/dist/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.js +45 -16
  766. package/dist/domain/javascript/javascriptRuntimeReconciliationMatching.js +65 -47
  767. package/dist/domain/javascript/javascriptRuntimeReconciliationResult.js +0 -1
  768. package/dist/domain/javascript/javascriptRuntimeReconciliationSchemas.js +5 -4
  769. package/dist/domain/javascript/javascriptRuntimeStaticCandidates.js +113 -11
  770. package/dist/domain/javascript/javascriptSemanticAmbientWrites.js +511 -0
  771. package/dist/domain/javascript/javascriptSemanticAnalysis.js +706 -204
  772. package/dist/domain/javascript/javascriptSemanticAsyncEffects.js +54 -54
  773. package/dist/domain/javascript/javascriptSemanticCallResolution.js +59 -30
  774. package/dist/domain/javascript/javascriptSemanticCallableStack.js +52 -0
  775. package/dist/domain/javascript/javascriptSemanticCalls.js +10 -15
  776. package/dist/domain/javascript/javascriptSemanticChildProcesses.js +163 -92
  777. package/dist/domain/javascript/javascriptSemanticCoverage.js +5 -1
  778. package/dist/domain/javascript/javascriptSemanticDataEffectHelpers.js +435 -45
  779. package/dist/domain/javascript/javascriptSemanticDataEffects.js +46 -29
  780. package/dist/domain/javascript/javascriptSemanticDependencies.js +69 -0
  781. package/dist/domain/javascript/javascriptSemanticDerivedAnalysis.js +1 -1
  782. package/dist/domain/javascript/javascriptSemanticEvaluationOrder.js +126 -0
  783. package/dist/domain/javascript/javascriptSemanticExpressionShapes.js +111 -0
  784. package/dist/domain/javascript/javascriptSemanticFingerprints.js +11 -14
  785. package/dist/domain/javascript/javascriptSemanticGetterQueries.js +147 -0
  786. package/dist/domain/javascript/javascriptSemanticGetterResults.js +264 -0
  787. package/dist/domain/javascript/javascriptSemanticGraph.js +22 -1
  788. package/dist/domain/javascript/javascriptSemanticGraphSchemas.js +13 -1
  789. package/dist/domain/javascript/javascriptSemanticIterationSources.js +5 -4
  790. package/dist/domain/javascript/javascriptSemanticMapOperations.js +51 -0
  791. package/dist/domain/javascript/javascriptSemanticMemberMutations.js +421 -154
  792. package/dist/domain/javascript/javascriptSemanticMutationInitializers.js +500 -27
  793. package/dist/domain/javascript/javascriptSemanticObjectReferences.js +377 -174
  794. package/dist/domain/javascript/javascriptSemanticObjects.js +53 -43
  795. package/dist/domain/javascript/javascriptSemanticOpaqueEffects.js +163 -0
  796. package/dist/domain/javascript/javascriptSemanticPrimitives.js +11 -1
  797. package/dist/domain/javascript/javascriptSemanticProjection.js +180 -95
  798. package/dist/domain/javascript/javascriptSemanticPromises.js +6 -9
  799. package/dist/domain/javascript/javascriptSemanticProvenance.js +5 -1
  800. package/dist/domain/javascript/javascriptSemanticQuery.js +7 -2
  801. package/dist/domain/javascript/javascriptSemanticQueryIdentity.js +2 -1
  802. package/dist/domain/javascript/javascriptSemanticQuerySchemas.js +1 -1
  803. package/dist/domain/javascript/javascriptSemanticReferenceSources.js +25 -0
  804. package/dist/domain/javascript/javascriptSemanticRequireOrigin.js +369 -8
  805. package/dist/domain/javascript/javascriptSemanticResourceLimits.js +3 -19
  806. package/dist/domain/javascript/javascriptSemanticResources.js +33 -44
  807. package/dist/domain/javascript/javascriptSemanticReturnedReferences.js +81 -26
  808. package/dist/domain/javascript/javascriptSemanticReturns.js +37 -30
  809. package/dist/domain/javascript/javascriptSemanticState.js +225 -39
  810. package/dist/domain/javascript/javascriptSemanticTraversal.js +6 -4
  811. package/dist/domain/javascript/javascriptSemanticValues.js +379 -56
  812. package/dist/domain/javascript/javascriptSourceMapPaths.js +44 -17
  813. package/dist/domain/javascript/javascriptSourceParser.js +121 -7
  814. package/dist/domain/javascript/javascriptSourceSelection.js +11 -0
  815. package/dist/domain/javascript/javascriptStaticAnalysis.js +69 -24
  816. package/dist/domain/javascript/javascriptStaticAnalysisBundler.js +97 -23
  817. package/dist/domain/javascript/javascriptStaticAnalysisCalls.js +488 -48
  818. package/dist/domain/javascript/javascriptStaticAnalysisHelpers.js +196 -78
  819. package/dist/domain/javascript/javascriptStaticAnalysisState.js +4 -0
  820. package/dist/domain/javascript/javascriptStaticAnalysisTypes.js +2 -1
  821. package/dist/domain/javascript/javascriptSymbolicBindings.js +1118 -0
  822. package/dist/domain/javascript/javascriptSymbolicControlFlow.js +44 -0
  823. package/dist/domain/javascript/javascriptSymbolicValues.js +45 -0
  824. package/dist/domain/javascript/sourceToBundleComparison.js +3 -1
  825. package/dist/domain/javascript/sourceToBundleComparisonSchemas.js +2 -0
  826. package/dist/domain/javascript/sourceToBundleSignals.js +50 -13
  827. package/dist/domain/jsonValue.js +37 -12
  828. package/dist/domain/localPath.js +6 -3
  829. package/dist/domain/managed/managedApplicationGraph.js +5 -0
  830. package/dist/domain/managed/managedApplicationGraphCoverage.js +6 -2
  831. package/dist/domain/managed/managedApplicationGraphNodes.js +14 -10
  832. package/dist/domain/managed/managedArtifact.js +77 -1
  833. package/dist/domain/managed/managedInspectionEvidence.js +5 -6
  834. package/dist/domain/managed/managedMemberComparison.js +6 -0
  835. package/dist/domain/managed/managedMemberComparisonCoverage.js +36 -3
  836. package/dist/domain/managed/managedMemberComparisonItems.js +135 -59
  837. package/dist/domain/managed/managedMemberComparisonMatch.js +237 -42
  838. package/dist/domain/managed/managedMemberSignatureIdentity.js +40 -0
  839. package/dist/domain/managed/managedNativeVerificationMatch.js +54 -31
  840. package/dist/domain/managed/managedNativeVerificationSchemas.js +15 -4
  841. package/dist/domain/managed/managedReconstruction.js +5 -8
  842. package/dist/domain/mobileApplicationGraphProjection.js +95 -0
  843. package/dist/domain/native/addressCoordinate.js +11 -0
  844. package/dist/domain/native/binaryLayout.js +2 -4
  845. package/dist/domain/native/bytePattern.js +121 -0
  846. package/dist/domain/native/nativeAotPe.js +31 -4
  847. package/dist/domain/native/nativeAotSnapshotObservation.js +18 -0
  848. package/dist/domain/native/nativeCallPartialObservation.js +14 -12
  849. package/dist/domain/native/nativeInspection.js +38 -4
  850. package/dist/domain/native/nativeInstruction.js +17 -2
  851. package/dist/domain/native/nativeInvestigationGraph.js +9 -5
  852. package/dist/domain/native/nativeLoadImage.js +32 -1
  853. package/dist/domain/native/nativeUiObservation.js +5 -6
  854. package/dist/domain/native/objcSwiftMetadata.js +19 -9
  855. package/dist/domain/native/peResources.js +14 -4
  856. package/dist/domain/native/recordedCrash.js +79 -10
  857. package/dist/domain/offsetDateTime.js +60 -0
  858. package/dist/domain/pcap/pcapAnalysis.js +91 -0
  859. package/dist/domain/pcap/pcapEvidence.js +15 -0
  860. package/dist/domain/peMachine.js +38 -0
  861. package/dist/domain/pngHeader.js +18 -0
  862. package/dist/domain/process/processCaptureCoverage.js +26 -3
  863. package/dist/domain/process/processCaptureExample.js +2 -0
  864. package/dist/domain/process/processCaptureValidation.js +33 -8
  865. package/dist/domain/process/processComparison.js +41 -13
  866. package/dist/domain/process/processScenario.js +7 -0
  867. package/dist/domain/process/processTraceDimensionProjection.js +1 -1
  868. package/dist/domain/process/processTraceEvaluation.js +119 -74
  869. package/dist/domain/process/processTraceSpecification.js +243 -89
  870. package/dist/domain/propertyListKeys.js +238 -23
  871. package/dist/domain/propertyListXml.js +149 -0
  872. package/dist/domain/propertyListXmlText.js +20 -4
  873. package/dist/domain/providerAdapterError.js +2 -5
  874. package/dist/domain/providerCleanupError.js +2 -4
  875. package/dist/domain/providerConfigurationRefusal.js +12 -0
  876. package/dist/domain/providerSelectionError.js +2 -1
  877. package/dist/domain/qlogCapture.js +62 -0
  878. package/dist/domain/rawBinary.js +105 -0
  879. package/dist/domain/reconstructionCoverage.js +40 -24
  880. package/dist/domain/reconstructionCoverageEvaluation.js +50 -47
  881. package/dist/domain/reconstructionCoverageEvidence.js +26 -0
  882. package/dist/domain/reconstructionCoverageVerifierResults.js +35 -0
  883. package/dist/domain/reconstructionObligationLedgerIntegrity.js +114 -0
  884. package/dist/domain/reconstructionObligationLedgerSchemas.js +104 -1
  885. package/dist/domain/reconstructionReadiness.js +4 -8
  886. package/dist/domain/reconstructionReadinessJourneyFindings.js +4 -1
  887. package/dist/domain/reconstructionUnknowns.js +9 -1
  888. package/dist/domain/reconstructionVerification.js +86 -43
  889. package/dist/domain/recordedTransportUrl.js +59 -0
  890. package/dist/domain/referenceSourceClassification.js +27 -23
  891. package/dist/domain/referenceSourceGraph.js +51 -13
  892. package/dist/domain/referenceSourceImportParsing.js +27 -13
  893. package/dist/domain/referenceSourcePathIdentity.js +13 -1
  894. package/dist/domain/referenceSourceRequireBindings.js +40 -108
  895. package/dist/domain/referenceSourceSummary.js +92 -0
  896. package/dist/domain/relationshipCoverage.js +43 -0
  897. package/dist/domain/residualUnknown.js +93 -26
  898. package/dist/domain/reverseEngineering.js +31 -0
  899. package/dist/domain/runtimeVersion.js +8 -0
  900. package/dist/domain/rust/rustBinary.js +200 -0
  901. package/dist/domain/signals/annotationTextWindow.js +31 -0
  902. package/dist/domain/signals/signalDecoders.js +69 -0
  903. package/dist/domain/signals/signalRecording.js +115 -0
  904. package/dist/domain/sourceMapContents.js +10 -3
  905. package/dist/domain/sourceMapEnvelope.js +17 -11
  906. package/dist/domain/sqlite/sqliteDatabase.js +189 -0
  907. package/dist/domain/staticRuntimeCorrelation.js +7 -9
  908. package/dist/domain/swiftSymbolClassification.js +17 -0
  909. package/dist/domain/symbolAnalysis.js +20 -7
  910. package/dist/domain/urlComponents.js +6 -0
  911. package/dist/domain/wasm/wasmArtifact.js +119 -0
  912. package/dist/domain/wasm/wasmInterface.js +89 -0
  913. package/dist/domain/webBundleAnalysis.js +14 -3
  914. package/dist/domain/webBundleAnalyzerAst.js +7 -2
  915. package/dist/domain/webBundleAnalyzerInspection.js +113 -57
  916. package/dist/domain/webBundleAnalyzerResult.js +18 -6
  917. package/dist/domain/webCaptureDiff.js +235 -51
  918. package/dist/domain/webCaptureFrameComparison.js +49 -0
  919. package/dist/domain/webInventory.js +28 -14
  920. package/dist/domain/webMcpDiscovery.js +5 -2
  921. package/dist/domain/webModuleImports.js +22 -27
  922. package/dist/domain/webModuleTrace.js +25 -8
  923. package/dist/domain/webNetworkCapture.js +101 -39
  924. package/dist/domain/webNetworkCaptureCoordinates.js +21 -0
  925. package/dist/domain/webRuntime.js +0 -1
  926. package/dist/domain/webScreenshot.js +2 -2
  927. package/dist/domain/webScriptArtifacts.js +2 -4
  928. package/dist/domain/webScriptExport.js +6 -8
  929. package/dist/domain/webScriptExportError.js +2 -3
  930. package/dist/domain/webScriptExportPlan.js +2 -2
  931. package/dist/domain/webSourceLocation.js +20 -9
  932. package/dist/domain/xmlDocument.js +41 -0
  933. package/dist/domain/zipPackageFormat.js +25 -3
  934. package/dist/dotnet/ManagedArtifactInspector.js +25 -12
  935. package/dist/dotnet/ManagedDecodeBudget.js +87 -9
  936. package/dist/dotnet/ManagedMemberInspector.js +127 -22
  937. package/dist/dotnet/ManagedMemberInspectorCore.js +408 -141
  938. package/dist/dotnet/ManagedMemberInstructionDecoder.js +109 -37
  939. package/dist/dotnet/ManagedMemberOwnership.js +65 -0
  940. package/dist/dotnet/ManagedMemberPointers.js +69 -0
  941. package/dist/dotnet/ManagedMemberRows.js +181 -48
  942. package/dist/dotnet/ManagedMetadataHeaps.js +110 -25
  943. package/dist/dotnet/ManagedMetadataInventory.js +5 -5
  944. package/dist/dotnet/ManagedMetadataInventoryRows.js +36 -52
  945. package/dist/dotnet/ManagedMetadataLayout.js +26 -16
  946. package/dist/dotnet/ManagedMetadataRowSizes.js +1 -1
  947. package/dist/dotnet/ManagedMethodBodyReader.js +29 -11
  948. package/dist/dotnet/ManagedMethodSpecs.js +78 -0
  949. package/dist/dotnet/ManagedNativeBoundaryHelpers.js +20 -19
  950. package/dist/dotnet/ManagedNativeBoundaryInspector.js +13 -21
  951. package/dist/dotnet/ManagedPeReader.js +60 -27
  952. package/dist/dotnet/ManagedReaderFailure.js +9 -0
  953. package/dist/dotnet/ManagedSnapshot.js +93 -0
  954. package/dist/dotnet/ManagedStaticProvider.js +55 -64
  955. package/dist/dotnet/ManagedTypeMemberLists.js +105 -0
  956. package/dist/dotnet/ManagedTypeNameDigests.js +177 -0
  957. package/dist/dotnet/ManagedTypeNames.js +58 -0
  958. package/dist/dotnet/ManagedTypeNesting.js +25 -0
  959. package/dist/dotnet/ManagedTypeReferences.js +94 -0
  960. package/dist/dotnet/ManagedUserStrings.js +75 -0
  961. package/dist/electron/ElectronFuseFailures.js +105 -0
  962. package/dist/electron/ElectronFusePath.js +248 -0
  963. package/dist/electron/ElectronFuseProvider.js +88 -0
  964. package/dist/electron/ElectronFuseReader.js +333 -0
  965. package/dist/evaluation/AgentEvaluationFixtures.js +194 -11
  966. package/dist/evaluation/CodexAgentEval.js +19 -40
  967. package/dist/evaluation/KnownAnswerEvaluation.js +126 -57
  968. package/dist/evm/EvmoleFailures.js +20 -14
  969. package/dist/evm/EvmoleInterfaceAdapter.js +5 -1
  970. package/dist/evm/EvmoleInterfaceProvider.js +142 -35
  971. package/dist/evm/EvmoleInterfaceWorker.js +2 -0
  972. package/dist/evm/SolidityMetadata.js +139 -0
  973. package/dist/filesystem/OwnedRegularFile.js +116 -0
  974. package/dist/filesystem/OwnedStagedOutput.js +155 -0
  975. package/dist/filesystem/RegularFile.js +65 -9
  976. package/dist/filesystem/StableFileHash.js +56 -38
  977. package/dist/filesystem/callerPath.js +26 -0
  978. package/dist/filesystem/readFileHandleChunks.js +72 -13
  979. package/dist/filesystem/readStableFileBytes.js +85 -0
  980. package/dist/firmware/FirmwareCommand.js +15 -9
  981. package/dist/firmware/FirmwareFailures.js +56 -0
  982. package/dist/firmware/FirmwareFiles.js +136 -110
  983. package/dist/firmware/FirmwareProvider.js +122 -65
  984. package/dist/firmware/FirmwarePublication.js +244 -12
  985. package/dist/firmware/FirmwareReports.js +202 -12
  986. package/dist/flutter/DartElf.js +445 -0
  987. package/dist/flutter/ElfBuildId.js +137 -0
  988. package/dist/flutter/ElfLoadMap.js +91 -0
  989. package/dist/flutter/FlutterBuildProvider.js +866 -0
  990. package/dist/flutter/FlutterPayloadScan.js +180 -0
  991. package/dist/frida/FridaInstrumentationManager.js +1104 -0
  992. package/dist/gdb/GdbSessionManager.js +1639 -0
  993. package/dist/generatedPackageMetadata.js +2 -2
  994. package/dist/ghidra/GhidraAnalysisProfile.js +146 -14
  995. package/dist/ghidra/GhidraAnalysisSeeds.js +39 -55
  996. package/dist/ghidra/GhidraBridgeSources.js +12 -0
  997. package/dist/ghidra/GhidraClient.js +501 -180
  998. package/dist/ghidra/GhidraClientStartup.js +5 -3
  999. package/dist/ghidra/GhidraClientWire.js +5 -2
  1000. package/dist/ghidra/GhidraDiagnostics.js +23 -5
  1001. package/dist/ghidra/GhidraDoctor.js +60 -26
  1002. package/dist/ghidra/GhidraDosSnapshot.js +83 -0
  1003. package/dist/ghidra/GhidraExecutableHeader.js +54 -0
  1004. package/dist/ghidra/GhidraFileArtifacts.js +93 -0
  1005. package/dist/ghidra/GhidraFunctionValues.js +50 -2
  1006. package/dist/ghidra/GhidraInstallation.js +305 -108
  1007. package/dist/ghidra/GhidraInstallationPolicy.js +94 -103
  1008. package/dist/ghidra/GhidraInstallationProperties.js +57 -0
  1009. package/dist/ghidra/GhidraInventoryValues.js +52 -6
  1010. package/dist/ghidra/GhidraJavaLaunch.js +99 -11
  1011. package/dist/ghidra/GhidraJavaProbe.js +267 -0
  1012. package/dist/ghidra/GhidraJavaProperties.js +119 -0
  1013. package/dist/ghidra/GhidraLanguageCatalog.js +83 -8
  1014. package/dist/ghidra/GhidraLauncher.js +325 -85
  1015. package/dist/ghidra/GhidraLoadImageAttest.js +82 -65
  1016. package/dist/ghidra/GhidraLoadImageValues.js +109 -27
  1017. package/dist/ghidra/GhidraMipsProfile.js +258 -14
  1018. package/dist/ghidra/GhidraNativeAotSnapshotOwner.js +221 -0
  1019. package/dist/ghidra/GhidraPeProfile.js +91 -0
  1020. package/dist/ghidra/GhidraPowerPcProfile.js +51 -0
  1021. package/dist/ghidra/GhidraProvider.js +267 -42
  1022. package/dist/ghidra/GhidraProviderCapabilities.js +29 -15
  1023. package/dist/ghidra/GhidraProviderClient.js +439 -276
  1024. package/dist/ghidra/GhidraPspExtension.js +210 -0
  1025. package/dist/ghidra/GhidraPspProfile.js +62 -0
  1026. package/dist/ghidra/GhidraRawBinaryLanguage.js +49 -0
  1027. package/dist/ghidra/GhidraReleasePolicy.js +93 -0
  1028. package/dist/ghidra/GhidraRequestQueue.js +64 -40
  1029. package/dist/ghidra/GhidraRiscvProfile.js +100 -0
  1030. package/dist/ghidra/GhidraSessionError.js +301 -24
  1031. package/dist/ghidra/GhidraSessionValues.js +76 -0
  1032. package/dist/ghidra/GhidraSocketConnection.js +25 -11
  1033. package/dist/ghidra/GhidraTargetSnapshot.js +67 -50
  1034. package/dist/ghidra/GhidraTransport.js +86 -62
  1035. package/dist/ghidra/extensions/GhidraExtensions.js +30 -45
  1036. package/dist/go/GoBinaryContainer.js +140 -0
  1037. package/dist/go/GoBinaryImage.js +210 -0
  1038. package/dist/go/GoBinaryProvider.js +180 -0
  1039. package/dist/go/GoElfImage.js +211 -0
  1040. package/dist/go/GoMachoImage.js +164 -0
  1041. package/dist/go/GoModuleText.js +217 -0
  1042. package/dist/go/GoPeImage.js +124 -0
  1043. package/dist/hopper/BridgeLauncher.js +78 -6
  1044. package/dist/hopper/HopperAnalysisProfile.js +23 -11
  1045. package/dist/hopper/HopperCleanup.js +29 -4
  1046. package/dist/hopper/HopperClient.js +317 -93
  1047. package/dist/hopper/HopperMacPublisher.js +29 -0
  1048. package/dist/hopper/HopperMachOImage.js +61 -29
  1049. package/dist/hopper/HopperProcessDiagnostic.js +27 -0
  1050. package/dist/hopper/HopperProvider.js +57 -29
  1051. package/dist/hopper/HopperProviderCapabilities.js +9 -4
  1052. package/dist/hopper/HopperRegexSearch.js +21 -60
  1053. package/dist/hopper/HopperRequestQueue.js +17 -5
  1054. package/dist/hopper/HopperSessionValues.js +10 -1
  1055. package/dist/ida/IdaBusyHealth.js +78 -0
  1056. package/dist/ida/IdaCallGraph.js +134 -0
  1057. package/dist/ida/IdaConfiguration.js +7 -2
  1058. package/dist/ida/IdaDiagnosticRedactor.js +199 -0
  1059. package/dist/ida/IdaDiagnosticWriter.js +62 -0
  1060. package/dist/ida/IdaDoctor.js +7 -5
  1061. package/dist/ida/IdaJsonDiagnostic.js +138 -0
  1062. package/dist/ida/IdaMcpConnection.js +308 -32
  1063. package/dist/ida/IdaNativeProtocol.js +85 -0
  1064. package/dist/ida/IdaOperationRunner.js +246 -61
  1065. package/dist/ida/IdaProtocolValues.js +88 -5
  1066. package/dist/ida/IdaProvider.js +45 -10
  1067. package/dist/ida/IdaProviderCapabilities.js +37 -8
  1068. package/dist/ida/IdaSessionClient.js +379 -60
  1069. package/dist/ida/IdaWorkspace.js +54 -6
  1070. package/dist/inspector/V8InspectorCaptureProjection.js +14 -2
  1071. package/dist/inspector/V8InspectorEndpoint.js +15 -13
  1072. package/dist/inspector/V8InspectorProvider.js +43 -7
  1073. package/dist/javascript/analysis/JavaScriptAnalysisTransfer.js +44 -12
  1074. package/dist/javascript/analysis/JavaScriptAnalysisWorker.js +107 -32
  1075. package/dist/javascript/analysis/JavaScriptAnalysisWorkerProtocol.js +7 -4
  1076. package/dist/javascript/analysis/JavaScriptAnalysisWorkerSchemas.js +85 -10
  1077. package/dist/javascript/analysis/JavaScriptAnalysisWorkerServer.js +16 -6
  1078. package/dist/javascript/recovery/RecoveryFiles.js +107 -13
  1079. package/dist/javascript/recovery/WakaruExecution.js +19 -11
  1080. package/dist/javascript/recovery/WakaruProvider.js +12 -9
  1081. package/dist/javascript/recovery/WakaruPublication.js +24 -10
  1082. package/dist/javascript/recovery/WakaruRelease.js +1 -1
  1083. package/dist/javascript/recovery/WakaruReport.js +3 -2
  1084. package/dist/javascript/sourceMaps/DecodedSourceMap.js +2 -16
  1085. package/dist/javascript/sourceMaps/SourceMapCommand.js +22 -4
  1086. package/dist/javascript/sourceMaps/SourceMapDecoder.js +22 -4
  1087. package/dist/javascript/sourceMaps/SourceMapFormat.js +25 -38
  1088. package/dist/javascript/sourceMaps/TraceSourceMap.js +34 -6
  1089. package/dist/jeb/JebMcpConnection.js +148 -82
  1090. package/dist/jeb/JebMcpConnectionOwner.js +116 -0
  1091. package/dist/jeb/JebMcpDeadline.js +46 -0
  1092. package/dist/jeb/JebMcpEndpoint.js +6 -1
  1093. package/dist/jeb/JebProvider.js +82 -58
  1094. package/dist/kuna/KunaAddress.js +11 -0
  1095. package/dist/kuna/KunaCommand.js +217 -0
  1096. package/dist/kuna/KunaConfiguration.js +90 -0
  1097. package/dist/kuna/KunaDoctor.js +198 -0
  1098. package/dist/kuna/KunaInstallation.js +137 -0
  1099. package/dist/kuna/KunaJson.js +23 -0
  1100. package/dist/kuna/KunaJsonStream.js +433 -0
  1101. package/dist/kuna/KunaLimits.js +5 -0
  1102. package/dist/kuna/KunaProjectCache.js +804 -0
  1103. package/dist/kuna/KunaProjectExport.js +202 -0
  1104. package/dist/kuna/KunaProjectFiles.js +191 -0
  1105. package/dist/kuna/KunaProjectReader.js +115 -0
  1106. package/dist/kuna/KunaProvider.js +217 -0
  1107. package/dist/kuna/KunaProviderCapabilities.js +102 -0
  1108. package/dist/kuna/KunaQueryErrors.js +12 -0
  1109. package/dist/kuna/KunaQueryWork.js +113 -0
  1110. package/dist/kuna/KunaReferenceFiles.js +258 -0
  1111. package/dist/kuna/KunaReferenceQueries.js +211 -0
  1112. package/dist/kuna/KunaRelease.js +10 -0
  1113. package/dist/kuna/KunaRunSlots.js +56 -0
  1114. package/dist/kuna/KunaSessionClient.js +1162 -0
  1115. package/dist/kuna/KunaStringInventory.js +145 -0
  1116. package/dist/kuna/KunaStringQueries.js +133 -0
  1117. package/dist/kuna/KunaTargetCommands.js +205 -0
  1118. package/dist/kuna/KunaUnavailable.js +11 -0
  1119. package/dist/logger.js +14 -1
  1120. package/dist/main/processShutdown.js +17 -0
  1121. package/dist/main/shutdown.js +3 -0
  1122. package/dist/main/transport.js +68 -4
  1123. package/dist/main.js +16 -15
  1124. package/dist/mcp/AnalysisProvider-BABWbLoM.js +38 -0
  1125. package/dist/mcp/AnalysisSnapshotFiles-BXz0c37-.js +1423 -0
  1126. package/dist/mcp/ArtifactFileOperation-64cQKI7B.js +1704 -0
  1127. package/dist/mcp/ArtifactProvider-Dx6pmil1.js +2200 -0
  1128. package/dist/mcp/ArtifactProviderMetadata-UCJr2oZW.js +167 -0
  1129. package/dist/mcp/ArtifactReader-BrnwNaKY.js +78 -0
  1130. package/dist/mcp/ArtifactResourceScope-zi3Dkqzy.js +175 -0
  1131. package/dist/mcp/AsarHeader-B_IbppTz.js +31 -0
  1132. package/dist/mcp/BinarySessionStatus-CZ9nnXMt.js +213 -0
  1133. package/dist/mcp/BinaryTargetResolver-BUncASDP.js +1358 -0
  1134. package/dist/mcp/BoundedFileBytes-DYt5q9G2.js +43 -0
  1135. package/dist/mcp/CdpCaptureDocuments-Y2uFcBpl.js +795 -0
  1136. package/dist/mcp/CdpCaptureValues-tNIg-gQK.js +97 -0
  1137. package/dist/mcp/CdpEndpoint-BrhMhpSi.js +641 -0
  1138. package/dist/mcp/CdpOptionalCommand-PZZhlqxv.js +120 -0
  1139. package/dist/mcp/CdpTargetSession-BmmDC3XO.js +290 -0
  1140. package/dist/mcp/DirectAnalysis-B9KuCHTG.js +417 -0
  1141. package/dist/mcp/DirectAnalysisStatus-BgzopkIt.js +44 -0
  1142. package/dist/mcp/ElectronFileScope-FXtK0d6I.js +110 -0
  1143. package/dist/mcp/ElectronFuseFailures-uZ_wOV6T.js +610 -0
  1144. package/dist/mcp/MachoLoadCommandReader-C2VGgHA3.js +330 -0
  1145. package/dist/mcp/ManagedStaticProvider-CZuoPme2.js +5326 -0
  1146. package/dist/mcp/NativeMacOSProvider-CMguKrvN.js +5495 -0
  1147. package/dist/mcp/NativeMacOSProviderMetadata-B_RH4KXF.js +397 -0
  1148. package/dist/mcp/OwnedCommand-BW1jBSt9.js +1241 -0
  1149. package/dist/mcp/ProcedureAddressResolution-H6Qwpb_Y.js +59 -0
  1150. package/dist/mcp/WorkflowEvidence-CO4C7ALz.js +118 -0
  1151. package/dist/mcp/analysisErrorCleanup-Q344SnTO.js +34 -0
  1152. package/dist/mcp/analysisErrorCore-BIEP7tvF.js +509 -0
  1153. package/dist/mcp/analysisErrorProjection-B8teQwwD.js +942 -0
  1154. package/dist/mcp/artifactToolContracts-C9dRDo-D.js +74 -0
  1155. package/dist/mcp/browserObservation-DUraZs62.js +4633 -0
  1156. package/dist/mcp/browserObservationError-C5okJ5el.js +63 -0
  1157. package/dist/mcp/browserObservationSchemas-DwGGxBpu.js +573 -0
  1158. package/dist/mcp/browserScenario-BRUz7yN0.js +3415 -0
  1159. package/dist/mcp/browserScenarioCapture-CiMAsMx8.js +595 -0
  1160. package/dist/mcp/callerPath-CpPnMZyN.js +678 -0
  1161. package/dist/mcp/canonicalDigest-Bi_0_zGi.js +71 -0
  1162. package/dist/mcp/electronActiveObservation-DV0Ffy9X.js +227 -0
  1163. package/dist/mcp/electronFuses-D5SS7XXw.js +367 -0
  1164. package/dist/mcp/electronObservation-DsN-NqY1.js +621 -0
  1165. package/dist/mcp/electronObservation-wOYWwqgF.js +112 -0
  1166. package/dist/mcp/electronScenario-CYrt2zBK.js +913 -0
  1167. package/dist/mcp/emptyArraySchema-C0o2Sxwp.js +140 -0
  1168. package/dist/mcp/enhancedInputs-6CCgB3VB.js +56 -0
  1169. package/dist/mcp/javascriptRuntimeObservation-BVbhkO2-.js +693 -0
  1170. package/dist/mcp/javascriptRuntimeObservation-Cu0Yedqq.js +121 -0
  1171. package/dist/mcp/jsonSerialization-V-wWiFRE.js +152 -0
  1172. package/dist/mcp/lipo-DSTgUqL1.js +395 -0
  1173. package/dist/mcp/localPath-AxvW9aPe.js +19 -0
  1174. package/dist/mcp/logger-BGdGHadX.js +48 -0
  1175. package/dist/mcp/machoContainer-CMSxUBlK.js +605 -0
  1176. package/dist/mcp/main-Cx-Z7m_n.js +80276 -0
  1177. package/dist/mcp/main.js +6 -0
  1178. package/dist/mcp/managedToolContracts-CSlbKJP-.js +101 -0
  1179. package/dist/mcp/nativeValueTrace-BEZbDieM.js +3601 -0
  1180. package/dist/mcp/officialToolContracts-CauCcSsc.js +1432 -0
  1181. package/dist/mcp/peMachine-aP1iYnHq.js +95 -0
  1182. package/dist/mcp/pngHeader-DQ-ObyY2.js +147 -0
  1183. package/dist/mcp/propertyListKeys-BfCo0k4w.js +356 -0
  1184. package/dist/mcp/providerCleanupError-DIRHxzWo.js +125 -0
  1185. package/dist/mcp/providerIdentities--ptAh481.js +31 -0
  1186. package/dist/mcp/providerIdentity-BCQ5n5tw.js +16 -0
  1187. package/dist/mcp/providerOperationHealth-9DRSGM8N.js +71 -0
  1188. package/dist/mcp/rolldown-runtime-BjeaiXFo.js +121 -0
  1189. package/dist/mcp/safeJson-NeGfpkrI.js +25 -0
  1190. package/dist/mcp/scanCanonical-CF3ATd1V.js +3788 -0
  1191. package/dist/mcp/serverIdentity-BK0Ejd_Y.js +1507 -0
  1192. package/dist/mcp/sourceMapEnvelope-DAaRUIGj.js +94 -0
  1193. package/dist/mcp/toolContracts-BPoHQdlC.js +12414 -0
  1194. package/dist/mcp/toolOutputSchemaGroups-MJ_f-PMK.js +17730 -0
  1195. package/dist/mcp/webContentArtifact-DfGkgDcI.js +269 -0
  1196. package/dist/mcp/webRuntime-ccyhkRru.js +74 -0
  1197. package/dist/mcp/webSourceLocation-DKIum0vJ.js +13167 -0
  1198. package/dist/mcpDoctor.js +95 -70
  1199. package/dist/mcpStartupPolicy.js +20 -2
  1200. package/dist/native/AppleDispatchCoverage.js +57 -17
  1201. package/dist/native/AppleDispatchMetadata.js +82 -29
  1202. package/dist/native/AppleMachoFixups.js +208 -35
  1203. package/dist/native/AppleMachoSelection.js +30 -23
  1204. package/dist/native/AppleObjcCategories.js +13 -3
  1205. package/dist/native/AppleObjcDispatchFacets.js +95 -17
  1206. package/dist/native/AppleObjcProperties.js +61 -17
  1207. package/dist/native/AppleObjcProtocols.js +25 -7
  1208. package/dist/native/AppleSwiftVtables.js +2 -0
  1209. package/dist/native/CommandRunner.js +146 -32
  1210. package/dist/native/LldbCallTracer.js +235 -179
  1211. package/dist/native/LldbReadbackFiles.js +70 -0
  1212. package/dist/native/LldbRetainedObservations.js +28 -56
  1213. package/dist/native/MachoArchitectureSelection.js +50 -0
  1214. package/dist/native/NativeCallObservation.js +55 -53
  1215. package/dist/native/NativeCallTarget.js +95 -0
  1216. package/dist/native/NativeMacOSProvider.js +318 -188
  1217. package/dist/native/NativeMachoInspection.js +155 -81
  1218. package/dist/native/NativePlistSource.js +179 -0
  1219. package/dist/native/NativeUiCleanupError.js +30 -0
  1220. package/dist/native/NativeUiHelperRuntime.js +48 -35
  1221. package/dist/native/NativeUiObservation.js +69 -47
  1222. package/dist/native/SignatureTargetBinding.js +147 -65
  1223. package/dist/native/parsers/codesign.js +27 -10
  1224. package/dist/native/parsers/demangle.js +22 -12
  1225. package/dist/native/parsers/dyldInfo.js +73 -4
  1226. package/dist/native/parsers/lipo.js +53 -19
  1227. package/dist/native/parsers/machoUuid.js +150 -0
  1228. package/dist/native/parsers/otool.js +275 -32
  1229. package/dist/native/parsers/plist.js +40 -25
  1230. package/dist/native/pe/PeResourceLayout.js +22 -7
  1231. package/dist/native/pe/PeResourceParser.js +10 -9
  1232. package/dist/native/pe/PeResourcesProvider.js +76 -15
  1233. package/dist/native/pwndbg/CoreFileMappingAuthority.js +51 -0
  1234. package/dist/native/pwndbg/PwndbgCoreContext.js +39 -28
  1235. package/dist/native/pwntools/PwntoolsDecoder.js +339 -52
  1236. package/dist/native/pwntools/PwntoolsFailures.js +19 -4
  1237. package/dist/native/pwntools/PwntoolsInputLimit.js +27 -0
  1238. package/dist/native/pwntools/PwntoolsRecordedCrashProvider.js +38 -16
  1239. package/dist/native/pwntools/PwntoolsResourceLimits.js +3 -3
  1240. package/dist/native/pwntools/RecordedCrashSourceBindings.js +12 -8
  1241. package/dist/native/pwntools/RecordedCrashStructureBindings.js +3 -1
  1242. package/dist/objdump/ObjdumpCommand.js +24 -0
  1243. package/dist/pcap/PcapCommand.js +146 -0
  1244. package/dist/pcap/PcapConfiguration.js +93 -0
  1245. package/dist/pcap/PcapNativeBound.js +58 -0
  1246. package/dist/pcap/PcapOutput.js +276 -0
  1247. package/dist/pcap/PcapProvider.js +454 -0
  1248. package/dist/pcap/PcapSnapshot.js +191 -0
  1249. package/dist/process/ArtifactAnalysisResources.js +306 -0
  1250. package/dist/process/BoundedFileBytes.js +8 -3
  1251. package/dist/process/CurrentEntrypointPath.js +8 -0
  1252. package/dist/process/DarwinProcessRunTokenReader.js +276 -61
  1253. package/dist/process/DetachedPgpSignature.js +57 -0
  1254. package/dist/process/ExecFileBoundedOutput.js +44 -0
  1255. package/dist/process/ExecFileOutput.js +44 -17
  1256. package/dist/{hopper/HopperTargetLease.js → process/HopperLease.js} +76 -19
  1257. package/dist/process/JavaScriptWorkerMemoryLimit.js +25 -0
  1258. package/dist/process/LinuxResourceLimits.js +60 -0
  1259. package/dist/process/MacCodeSignature.js +3 -0
  1260. package/dist/process/OwnedCommand.js +144 -25
  1261. package/dist/process/PrivateRuntimeRoot.js +9 -19
  1262. package/dist/process/PrivateRuntimeRootUnavailableError.js +10 -0
  1263. package/dist/process/ProcessOwnership.js +70 -17
  1264. package/dist/process/ProcessOwnershipObservation.js +35 -4
  1265. package/dist/process/ProviderDeadline.js +58 -12
  1266. package/dist/process/ProviderProcess.js +233 -17
  1267. package/dist/process/RegexMatcher.js +96 -0
  1268. package/dist/process/SharedStartupAttempt.js +59 -0
  1269. package/dist/process/WindowsAuthority.js +48 -39
  1270. package/dist/process/WindowsBatchCommand.js +46 -0
  1271. package/dist/process/boundedUtf8Text.js +13 -0
  1272. package/dist/process/capture/FilesystemSnapshot.js +63 -11
  1273. package/dist/process/capture/ProcessCaptureClock.js +2 -0
  1274. package/dist/process/capture/ProcessCaptureError.js +64 -7
  1275. package/dist/process/capture/ProcessCaptureJournal.js +2 -1
  1276. package/dist/process/capture/ProcessCaptureLifecycle.js +104 -56
  1277. package/dist/process/capture/ProcessCaptureProgress.js +7 -4
  1278. package/dist/process/capture/ProcessHarness.js +34 -17
  1279. package/dist/process/capture/ProcessNormalization.js +278 -36
  1280. package/dist/process/capture/ProcessSampling.js +3 -2
  1281. package/dist/process/capture/ProcessScenarioRuntimeValidation.js +13 -13
  1282. package/dist/process/capture/TerminalRenderer.js +31 -10
  1283. package/dist/process/ownedDebuggerSession.js +203 -0
  1284. package/dist/process/snapshotEnvironment.js +8 -8
  1285. package/dist/{application/binary → providers}/AnalysisClientCleanup.js +3 -3
  1286. package/dist/providers/AnalysisClientCreation.js +193 -0
  1287. package/dist/providers/AnalysisClientFailure.js +191 -0
  1288. package/dist/providers/DeferredAnalysisClient.js +48 -0
  1289. package/dist/providers/OwnedCommandCleanup.js +65 -0
  1290. package/dist/providers/ProviderInspectionScope.js +10 -0
  1291. package/dist/recordedCatalogDigests.js +2 -0
  1292. package/dist/reference/ReferenceSourceReader.js +64 -1
  1293. package/dist/reference/ReferenceSourceReaderEntries.js +79 -56
  1294. package/dist/reference/ReferenceSourceReaderErrors.js +5 -1
  1295. package/dist/reference/ReferenceSourceReaderFile.js +2 -2
  1296. package/dist/reference/ReferenceSourceReaderTypes.js +1 -2
  1297. package/dist/reference/ReferenceSourceReaderValidate.js +0 -1
  1298. package/dist/rizin/RizinCommand.js +14 -0
  1299. package/dist/rizin/RizinDebugSessionManager.js +1111 -0
  1300. package/dist/rust/RustAuditableReader.js +309 -0
  1301. package/dist/rust/RustBinaryImage.js +116 -0
  1302. package/dist/rust/RustBinaryProvider.js +194 -0
  1303. package/dist/server/EvidenceMcpServer.js +160 -37
  1304. package/dist/server/admittedToolOperation.js +7 -2
  1305. package/dist/server/contractToolHandler.js +17 -4
  1306. package/dist/server/createServer.js +179 -30
  1307. package/dist/server/externalMutationAdmission.js +50 -0
  1308. package/dist/server/mcpProgress.js +4 -2
  1309. package/dist/server/promptCompletion.js +43 -28
  1310. package/dist/server/providerEnvironment.js +3 -0
  1311. package/dist/server/registerAnalysisViewTool.js +6 -2
  1312. package/dist/server/registerAndroidTools.js +22 -4
  1313. package/dist/server/registerApplicationTools/projectMobileApplicationGraph.js +8 -1
  1314. package/dist/server/registerArtifactComparisonTool.js +13 -2
  1315. package/dist/server/registerArtifactTools.js +21 -1
  1316. package/dist/server/registerBrowserScenarioTool.js +7 -5
  1317. package/dist/server/registerBrowserTools.js +4 -8
  1318. package/dist/server/registerBundleComparisonTool.js +4 -4
  1319. package/dist/server/registerCaptureTools.js +12 -0
  1320. package/dist/server/registerCutterTools.js +32 -0
  1321. package/dist/server/registerElectronTools.js +13 -21
  1322. package/dist/server/registerEnhancedTools.js +7 -6
  1323. package/dist/server/registerEvidenceTools.js +14 -10
  1324. package/dist/server/registerEvmTools.js +22 -4
  1325. package/dist/server/registerFlutterTools.js +17 -0
  1326. package/dist/server/registerFridaTools.js +201 -0
  1327. package/dist/server/registerFunctionComparisonTool.js +29 -9
  1328. package/dist/server/registerGdbTools.js +64 -0
  1329. package/dist/server/registerGoTools.js +9 -0
  1330. package/dist/server/registerInvestigationTools/helpers.js +2 -2
  1331. package/dist/server/registerInvestigationTools.js +31 -27
  1332. package/dist/server/registerJavaScriptRuntimeObservationTools.js +3 -9
  1333. package/dist/server/registerManagedTools.js +11 -1
  1334. package/dist/server/registerManagedWorkflowTools/evidence.js +14 -7
  1335. package/dist/server/registerNativeTools.js +14 -0
  1336. package/dist/server/registerOfficialTools.js +5 -0
  1337. package/dist/server/registerPcapTools.js +35 -0
  1338. package/dist/server/registerProcessComparisonTool.js +12 -2
  1339. package/dist/server/registerReverseEngineeringTools.js +86 -0
  1340. package/dist/server/registerRizinDebugTools.js +53 -0
  1341. package/dist/server/registerRustTools.js +9 -0
  1342. package/dist/server/registerSessionRecordTools.js +19 -13
  1343. package/dist/server/registerSessionStatusTool.js +33 -8
  1344. package/dist/server/registerSessionTools.js +31 -31
  1345. package/dist/server/registerSignalTools.js +12 -0
  1346. package/dist/server/registerSqliteTools.js +9 -0
  1347. package/dist/server/registerWasmTools.js +46 -0
  1348. package/dist/server/registerWebNetworkCaptureTool.js +24 -10
  1349. package/dist/server/retainedSummaryDelivery.js +28 -0
  1350. package/dist/server/runDerivedOperation.js +2 -0
  1351. package/dist/server/sessionAvailabilityPolicy.js +3 -0
  1352. package/dist/server/toolRegistrationOptions.js +8 -0
  1353. package/dist/server/toolResult.js +52 -19
  1354. package/dist/server/toolResultEncoding.js +36 -3
  1355. package/dist/serverIdentity.js +17 -8
  1356. package/dist/signals/SigrokRecordingProvider.js +346 -0
  1357. package/dist/signals/parseDecoderDiscovery.js +65 -0
  1358. package/dist/sqlite/SqliteDatabaseFailures.js +147 -0
  1359. package/dist/sqlite/SqliteDatabaseInspection.js +436 -0
  1360. package/dist/sqlite/SqliteDatabaseLimits.js +16 -0
  1361. package/dist/sqlite/SqliteDatabaseProvider.js +295 -0
  1362. package/dist/sqlite/SqliteDatabaseSnapshot.js +182 -0
  1363. package/dist/sqlite/SqliteDatabaseWorker.js +46 -0
  1364. package/dist/sqlite/SqliteDatabaseWorkerExecution.js +127 -0
  1365. package/dist/wasm/WabtArtifactProvider.js +358 -0
  1366. package/dist/wasm/WabtFailures.js +119 -0
  1367. package/dist/wasm/WabtInterface.js +309 -0
  1368. package/dist/wasm/WabtOutput.js +60 -0
  1369. package/dist/wasm/WabtRelease.js +12 -0
  1370. package/dist/wasm/WabtRuntime.js +58 -0
  1371. package/dist/wasm/WabtString.js +48 -0
  1372. package/dist/wasm/WabtWat.js +147 -0
  1373. package/dist/wasm/WasmGlueAdapter.js +66 -0
  1374. package/dist/wasm/WasmInterfaceBudget.js +11 -0
  1375. package/dist/windows/WindowsNativeLoader.js +53 -9
  1376. package/dist/windows/WindowsOwnedProcess.js +150 -17
  1377. package/dist/windows/WindowsPrivateRuntime.js +66 -2
  1378. package/install.sh +157 -98
  1379. package/licenses/Apache-2.0.txt +202 -0
  1380. package/licenses/GCC-Runtime-Library-Exception-3.1.txt +73 -0
  1381. package/licenses/GPL-3.0.txt +674 -0
  1382. package/licenses/LGPL-2.0.txt +480 -0
  1383. package/licenses/MIT-template.txt +18 -0
  1384. package/licenses/MinGW-w64-runtime.txt +240 -0
  1385. package/licenses/Node-22.19.0-LICENSE.txt +2666 -0
  1386. package/licenses/README.md +68 -0
  1387. package/licenses/cfworker-MIT.txt +21 -0
  1388. package/licenses/dotnet-runtime-MIT.txt +23 -0
  1389. package/licenses/frida-17.23.2-COPYING.txt +50 -0
  1390. package/licenses/ghidra-12.1.4-DISCLAIMER.txt +13 -0
  1391. package/licenses/ghidra-12.1.4-LICENSE.txt +201 -0
  1392. package/licenses/ghidra-12.1.4-NOTICE.txt +49 -0
  1393. package/licenses/npm-dependencies.txt +3757 -0
  1394. package/licenses/npm-runtime-notices.txt +8722 -0
  1395. package/licenses/upstream-sources.json +72 -0
  1396. package/licenses/xterm-MIT.txt +21 -0
  1397. package/native/windows/README.md +130 -12
  1398. package/native/windows/build/manifest.json +2 -2
  1399. package/native/windows/build/rea-windows-x64.node +0 -0
  1400. package/package.json +97 -22
  1401. package/scripts/electron-active-hook-boundaries.cjs +15 -2
  1402. package/scripts/electron-active-hook.cjs +412 -47
  1403. package/scripts/hopper-demo-x11.py +65 -13
  1404. package/scripts/prepack.mjs +5 -0
  1405. package/scripts/rea-android-workspace-guardian.mjs +46 -0
  1406. package/scripts/rea.mjs +89 -26
  1407. package/scripts/verify-windows-native-artifact.mjs +2 -2
  1408. package/skills/reverse-engineer-anything/SKILL.md +146 -11
  1409. package/skills/reverse-engineer-anything/references/android-applications.md +3 -1
  1410. package/skills/reverse-engineer-anything/references/connection-and-recovery.md +10 -10
  1411. package/skills/reverse-engineer-anything/references/evidence-workflows.md +23 -0
  1412. package/skills/reverse-engineer-anything/references/javascript-applications.md +72 -3
  1413. package/skills/reverse-engineer-anything/references/native-and-artifacts.md +149 -19
  1414. package/skills/reverse-engineer-anything/references/runtime-observation.md +57 -7
  1415. package/third_party/README.md +1 -1
  1416. package/third_party/wabt/README.md +24 -0
  1417. package/dist/browser/history/HarCaptureAdapter.js +0 -20
  1418. package/dist/cli/streamedJsonOutput.js +0 -135
  1419. package/dist/hopper/HopperRegexWorker.js +0 -27
  1420. /package/dist/{application/binary → process}/AbortablePromise.js +0 -0
@@ -0,0 +1,2088 @@
1
+ import { __esmMin } from "./rolldown-runtime-DXoylpqc.js";
2
+ import { canonicalJson, canonicalJsonDigestSteps, compareUnicodeCodePoints, digestCanonicalValue, digestSchema, init_artifactGraph, init_canonicalDigest, init_canonicalJsonDigestSteps, init_canonicalOrdering, init_comparisonSemantics, init_digests, init_localPath, init_unicodeCodePointOrder, integrityContradictionSchema, localPathStringSchema, prefixedDigestSchema, uniqueSorted } from "./reconstructionObligationLedgerSchemas-Bi6sect1.js";
3
+ import { freezeJsonSnapshot, freezeOwnedJsonSnapshotSteps, init_immutableJson, init_jsonValue, jsonValueSchema } from "./errorSchemas-Ixz_q7qt.js";
4
+ import { z } from "zod";
5
+ import { posix } from "node:path";
6
+ import { domainToASCII, fileURLToPath, pathToFileURL } from "node:url";
7
+ import { TraceMap } from "@jridgewell/trace-mapping";
8
+
9
+ //#region dist/domain/javascript/javascriptApplicationEvidenceSchemas.js
10
+ var boundedTextSchema$2, boundedKeySchema, unsafePathSegments, isSafeRelativePath, relativePathSchema$1, applicationEvidenceAuthoritySchema, applicationFactStateSchema, applicationConfidenceSchema, applicationUnavailableReasonSchema, unavailableFactSchema, availableArtifactSchema, applicationArtifactReferenceSchema, sourceRangeSchema$1, fileOffsetRangeSchema, applicationLocationSchema, applicationLocationReferenceSchema, applicationExtractorSchema, applicationLimitSchema, coverageLimitsSchema, omittedCountSchema, applicationCoverageSchema, completeApplicationCoverage, partialApplicationCoverage, truncatedApplicationCoverage, applicationGraphEvidenceBaseSchema, applicationGraphEvidenceContextSchema, applicationGraphEvidenceLocationSchema, checkAuthorityState, checkStateConfidence, checkTraceability, checkArtifactBacking, applicationGraphEvidenceSchema, applicationNodeIdentitySchema;
11
+ function init_javascriptApplicationEvidenceSchemas() {
12
+ return (init_javascriptApplicationEvidenceSchemas = __esmMin((() => {
13
+ init_digests();
14
+ boundedTextSchema$2 = z.string().min(1);
15
+ boundedKeySchema = z.string().min(1);
16
+ unsafePathSegments = new Set([
17
+ "",
18
+ ".",
19
+ ".."
20
+ ]);
21
+ isSafeRelativePath = (path) => {
22
+ if (path.startsWith("/")) return false;
23
+ return path.split("/").every((part) => !unsafePathSegments.has(part));
24
+ };
25
+ relativePathSchema$1 = z.string().min(1).refine(isSafeRelativePath, "Expected a normalized relative POSIX path without traversal");
26
+ applicationEvidenceAuthoritySchema = z.enum([
27
+ "artifact-bytes",
28
+ "ast-static-analysis",
29
+ "static-relationship-inference",
30
+ "passive-cdp-runtime",
31
+ "cross-layer-reconciliation",
32
+ "cross-version-comparison",
33
+ "controlled-replay",
34
+ "native-analysis-provider",
35
+ "managed-static-analysis",
36
+ "historical-reference",
37
+ "user-assertion",
38
+ "unknown"
39
+ ]);
40
+ applicationFactStateSchema = z.enum([
41
+ "observed",
42
+ "inferred",
43
+ "unknown",
44
+ "unavailable"
45
+ ]);
46
+ applicationConfidenceSchema = z.enum([
47
+ "exact",
48
+ "high",
49
+ "medium",
50
+ "low",
51
+ "unknown"
52
+ ]);
53
+ applicationUnavailableReasonSchema = z.enum([
54
+ "not-applicable",
55
+ "not-observed",
56
+ "truncated",
57
+ "provider-unavailable",
58
+ "unresolved",
59
+ "unknown"
60
+ ]);
61
+ unavailableFactSchema = z.strictObject({
62
+ available: z.literal(false),
63
+ reason: applicationUnavailableReasonSchema,
64
+ detail: boundedTextSchema$2
65
+ });
66
+ availableArtifactSchema = z.strictObject({
67
+ available: z.literal(true),
68
+ artifact_id: prefixedDigestSchema("art"),
69
+ sha256: digestSchema
70
+ }).superRefine((artifact, context) => {
71
+ if (artifact.artifact_id !== `art_${artifact.sha256}`) context.addIssue({
72
+ code: "custom",
73
+ path: ["artifact_id"],
74
+ message: "Artifact identifier must commit the same SHA-256 digest"
75
+ });
76
+ });
77
+ applicationArtifactReferenceSchema = z.discriminatedUnion("available", [availableArtifactSchema, unavailableFactSchema]);
78
+ sourceRangeSchema$1 = z.strictObject({
79
+ kind: z.literal("source-range"),
80
+ source: boundedTextSchema$2,
81
+ start: z.strictObject({
82
+ line: z.number().int().min(1),
83
+ column: z.number().int().min(0)
84
+ }),
85
+ end: z.strictObject({
86
+ line: z.number().int().min(1),
87
+ column: z.number().int().min(0)
88
+ })
89
+ }).superRefine((location, context) => {
90
+ if (location.end.line < location.start.line || location.end.line === location.start.line && location.end.column < location.start.column) context.addIssue({
91
+ code: "custom",
92
+ path: ["end"],
93
+ message: "Source range end must not precede its start"
94
+ });
95
+ });
96
+ fileOffsetRangeSchema = z.strictObject({
97
+ kind: z.literal("file-offset-range"),
98
+ start: z.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
99
+ end: z.number().int().min(0).max(Number.MAX_SAFE_INTEGER)
100
+ }).superRefine((location, context) => {
101
+ if (location.end < location.start) context.addIssue({
102
+ code: "custom",
103
+ path: ["end"],
104
+ message: "File offset range end must not precede its start"
105
+ });
106
+ });
107
+ applicationLocationSchema = z.discriminatedUnion("kind", [
108
+ z.strictObject({
109
+ kind: z.literal("artifact-path"),
110
+ path: relativePathSchema$1
111
+ }),
112
+ sourceRangeSchema$1,
113
+ fileOffsetRangeSchema,
114
+ z.strictObject({
115
+ kind: z.literal("url"),
116
+ url: z.string().min(1)
117
+ }),
118
+ z.strictObject({
119
+ kind: z.literal("runtime"),
120
+ capture_sha256: digestSchema,
121
+ target_key: boundedKeySchema,
122
+ frame_key: boundedKeySchema.nullable(),
123
+ script_key: boundedKeySchema.nullable()
124
+ }),
125
+ z.strictObject({
126
+ kind: z.literal("native-address"),
127
+ address: boundedKeySchema,
128
+ symbol: boundedTextSchema$2.nullable()
129
+ }),
130
+ z.strictObject({
131
+ kind: z.literal("package-export"),
132
+ package_name: boundedKeySchema,
133
+ export_path: boundedTextSchema$2
134
+ })
135
+ ]);
136
+ applicationLocationReferenceSchema = z.discriminatedUnion("available", [z.strictObject({
137
+ available: z.literal(true),
138
+ value: applicationLocationSchema
139
+ }), unavailableFactSchema]);
140
+ applicationExtractorSchema = z.strictObject({
141
+ name: z.string().min(1),
142
+ version: z.string().min(1),
143
+ operation: z.string().min(1),
144
+ executable_sha256: digestSchema.nullable()
145
+ });
146
+ applicationLimitSchema = z.strictObject({
147
+ name: z.string().min(1),
148
+ value: z.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
149
+ unit: z.enum([
150
+ "items",
151
+ "bytes",
152
+ "milliseconds",
153
+ "depth",
154
+ "characters",
155
+ "instructions",
156
+ "other"
157
+ ])
158
+ });
159
+ coverageLimitsSchema = z.array(applicationLimitSchema);
160
+ omittedCountSchema = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
161
+ applicationCoverageSchema = z.union([
162
+ z.strictObject({
163
+ status: z.literal("complete"),
164
+ truncated: z.literal(false),
165
+ omitted_count: z.literal(0),
166
+ limits: coverageLimitsSchema
167
+ }),
168
+ z.strictObject({
169
+ status: z.literal("partial"),
170
+ truncated: z.literal(false),
171
+ omitted_count: omittedCountSchema.nullable(),
172
+ limits: coverageLimitsSchema
173
+ }),
174
+ z.strictObject({
175
+ status: z.literal("partial"),
176
+ truncated: z.literal(true),
177
+ omitted_count: z.union([omittedCountSchema.positive(), z.null()]),
178
+ limits: z.array(applicationLimitSchema).min(1)
179
+ }),
180
+ z.strictObject({
181
+ status: z.enum(["unknown", "unavailable"]),
182
+ truncated: z.literal(false),
183
+ omitted_count: z.null(),
184
+ limits: coverageLimitsSchema
185
+ })
186
+ ]);
187
+ completeApplicationCoverage = (limits = []) => applicationCoverageSchema.parse({
188
+ status: "complete",
189
+ truncated: false,
190
+ omitted_count: 0,
191
+ limits
192
+ });
193
+ partialApplicationCoverage = (limits, omittedCount) => applicationCoverageSchema.parse({
194
+ status: "partial",
195
+ truncated: false,
196
+ omitted_count: omittedCount,
197
+ limits
198
+ });
199
+ truncatedApplicationCoverage = (limits, omittedCount) => applicationCoverageSchema.parse({
200
+ status: "partial",
201
+ truncated: true,
202
+ omitted_count: omittedCount,
203
+ limits
204
+ });
205
+ applicationGraphEvidenceBaseSchema = z.strictObject({
206
+ authority: applicationEvidenceAuthoritySchema,
207
+ state: applicationFactStateSchema,
208
+ confidence: applicationConfidenceSchema,
209
+ artifact: applicationArtifactReferenceSchema,
210
+ location: applicationLocationReferenceSchema,
211
+ extractor: applicationExtractorSchema,
212
+ coverage: applicationCoverageSchema,
213
+ limitations: z.array(boundedTextSchema$2),
214
+ evidence_ids: z.array(prefixedDigestSchema("ev"))
215
+ });
216
+ applicationGraphEvidenceContextSchema = applicationGraphEvidenceBaseSchema.omit({ location: true });
217
+ applicationGraphEvidenceLocationSchema = applicationLocationReferenceSchema;
218
+ checkAuthorityState = (evidence, context) => {
219
+ if (evidence.authority === "static-relationship-inference" && evidence.state !== "inferred") context.addIssue({
220
+ code: "custom",
221
+ path: ["state"],
222
+ message: "Static relationship authority must remain inferred"
223
+ });
224
+ if (evidence.authority === "cross-layer-reconciliation" && evidence.state !== "inferred") context.addIssue({
225
+ code: "custom",
226
+ path: ["state"],
227
+ message: "Cross-layer reconciliation authority must remain inferred"
228
+ });
229
+ if (evidence.authority === "cross-version-comparison" && evidence.state !== "inferred") context.addIssue({
230
+ code: "custom",
231
+ path: ["state"],
232
+ message: "Cross-version comparison authority must remain inferred"
233
+ });
234
+ if (evidence.authority === "unknown" && !["unknown", "unavailable"].includes(evidence.state)) context.addIssue({
235
+ code: "custom",
236
+ path: ["state"],
237
+ message: "Unknown authority cannot claim an observed fact"
238
+ });
239
+ };
240
+ checkStateConfidence = (evidence, context) => {
241
+ if (["unknown", "unavailable"].includes(evidence.state) && (evidence.confidence !== "unknown" || evidence.limitations.length === 0)) context.addIssue({
242
+ code: "custom",
243
+ message: "Unknown and unavailable facts require unknown confidence and an explicit limitation"
244
+ });
245
+ if (evidence.state === "observed" && evidence.confidence === "unknown") context.addIssue({
246
+ code: "custom",
247
+ path: ["confidence"],
248
+ message: "Observed facts require a bounded non-unknown confidence"
249
+ });
250
+ if (evidence.state === "inferred" && ![
251
+ "high",
252
+ "medium",
253
+ "low"
254
+ ].includes(evidence.confidence)) context.addIssue({
255
+ code: "custom",
256
+ path: ["confidence"],
257
+ message: "Inferred facts require high, medium, or low confidence"
258
+ });
259
+ if (evidence.confidence === "exact" && evidence.state !== "observed") context.addIssue({
260
+ code: "custom",
261
+ path: ["confidence"],
262
+ message: "Exact confidence is reserved for observed facts"
263
+ });
264
+ };
265
+ checkTraceability = (evidence, context) => {
266
+ if (evidence.state === "observed" && !evidence.location.available) context.addIssue({
267
+ code: "custom",
268
+ path: ["location"],
269
+ message: "Observed facts require an actionable location"
270
+ });
271
+ if (evidence.state === "inferred" && evidence.limitations.length === 0) context.addIssue({
272
+ code: "custom",
273
+ path: ["limitations"],
274
+ message: "Inferred facts require an explicit limitation"
275
+ });
276
+ if (evidence.coverage.status !== "complete" && evidence.limitations.length === 0) context.addIssue({
277
+ code: "custom",
278
+ path: ["limitations"],
279
+ message: "Non-complete coverage requires an explicit limitation"
280
+ });
281
+ };
282
+ checkArtifactBacking = (evidence, context) => {
283
+ const artifactBacked = [
284
+ "artifact-bytes",
285
+ "ast-static-analysis",
286
+ "controlled-replay",
287
+ "native-analysis-provider",
288
+ "managed-static-analysis"
289
+ ].includes(evidence.authority);
290
+ if (artifactBacked && evidence.state !== "unavailable" && !evidence.artifact.available) context.addIssue({
291
+ code: "custom",
292
+ path: ["artifact"],
293
+ message: "Artifact-backed facts require a content digest"
294
+ });
295
+ };
296
+ applicationGraphEvidenceSchema = applicationGraphEvidenceBaseSchema.superRefine((evidence, context) => {
297
+ checkAuthorityState(evidence, context);
298
+ checkStateConfidence(evidence, context);
299
+ checkTraceability(evidence, context);
300
+ checkArtifactBacking(evidence, context);
301
+ });
302
+ applicationNodeIdentitySchema = z.discriminatedUnion("strategy", [
303
+ z.strictObject({
304
+ strategy: z.literal("content-digest"),
305
+ stability: z.literal("global-exact"),
306
+ sha256: digestSchema
307
+ }),
308
+ z.strictObject({
309
+ strategy: z.literal("source-map-original"),
310
+ stability: z.literal("source-map-exact"),
311
+ source_map_sha256: digestSchema,
312
+ original_source: z.string(),
313
+ source_root: z.string().nullable(),
314
+ source_sha256: digestSchema.nullable()
315
+ }),
316
+ z.strictObject({
317
+ strategy: z.literal("canonical-path"),
318
+ stability: z.literal("artifact-version"),
319
+ artifact_sha256: digestSchema,
320
+ path: relativePathSchema$1
321
+ }),
322
+ z.strictObject({
323
+ strategy: z.literal("structural-fingerprint"),
324
+ stability: z.literal("cross-version-inference"),
325
+ algorithm: z.string().min(1),
326
+ fingerprint_sha256: digestSchema,
327
+ basis: z.array(z.enum([
328
+ "syntax-tree",
329
+ "control-flow",
330
+ "imports",
331
+ "exports",
332
+ "literals",
333
+ "api-usage"
334
+ ])).min(1)
335
+ }),
336
+ z.strictObject({
337
+ strategy: z.literal("artifact-local-key"),
338
+ stability: z.literal("artifact-version"),
339
+ artifact_sha256: digestSchema,
340
+ namespace: boundedKeySchema,
341
+ key: z.string()
342
+ }),
343
+ z.strictObject({
344
+ strategy: z.literal("runtime-instance"),
345
+ stability: z.literal("capture-only"),
346
+ capture_sha256: digestSchema,
347
+ runtime_key: boundedTextSchema$2
348
+ }),
349
+ z.strictObject({
350
+ strategy: z.literal("observation-fingerprint"),
351
+ stability: z.literal("observation-only"),
352
+ observation_sha256: digestSchema,
353
+ scope: boundedTextSchema$2
354
+ })
355
+ ]);
356
+ })))();
357
+ }
358
+
359
+ //#endregion
360
+ //#region dist/domain/javascript/javascriptSemanticGraphSchemas.js
361
+ var boundedTextSchema$1, semanticNodeIdSchema, semanticRelationIdSchema, semanticUnknownIdSchema, semanticEvidenceContextIdSchema, javaScriptSemanticEvidenceContextSchema, javaScriptSemanticEvidenceReferenceSchema, JAVASCRIPT_SEMANTIC_NODE_KINDS, JAVASCRIPT_SEMANTIC_RELATION_FAMILIES, JAVASCRIPT_SEMANTIC_RELATIONS, JAVASCRIPT_SEMANTIC_RELATION_FAMILY, relativePathSchema, sourcePointSchema, sourceRangeSchema, semanticPropertiesSchema, semanticNodeIdentitySchema, javaScriptSemanticNodeInputSchema, javaScriptSemanticNodeSchema, javaScriptSemanticRelationInputSchema, javaScriptSemanticRelationSchema, JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS, javaScriptSemanticUnknownOmissionSchema, javaScriptSemanticUnknownOmissionsSchema, javaScriptSemanticUnknownInputSchema, javaScriptSemanticUnknownSchema, fingerprintComponentsSchema, javaScriptSemanticFingerprintInputSchema, javaScriptSemanticFingerprintSchema, familyCoverageSchema, graphCoverageSchema, javaScriptSemanticGraphInputSchema, javaScriptSemanticGraphRecordSchema;
362
+ function init_javascriptSemanticGraphSchemas() {
363
+ return (init_javascriptSemanticGraphSchemas = __esmMin((() => {
364
+ init_javascriptApplicationEvidenceSchemas();
365
+ init_jsonValue();
366
+ init_digests();
367
+ boundedTextSchema$1 = z.string().min(1);
368
+ semanticNodeIdSchema = prefixedDigestSchema("jsrg_node");
369
+ semanticRelationIdSchema = z.string().regex(/^jsrg_relation_[a-f0-9]{64}$/u);
370
+ semanticUnknownIdSchema = z.string().regex(/^jsrg_unknown_[a-f0-9]{64}$/u);
371
+ semanticEvidenceContextIdSchema = z.string().regex(/^jsrg_evidence_[a-f0-9]{64}$/u);
372
+ javaScriptSemanticEvidenceContextSchema = applicationGraphEvidenceContextSchema.extend({ context_id: semanticEvidenceContextIdSchema });
373
+ javaScriptSemanticEvidenceReferenceSchema = z.strictObject({
374
+ context_id: semanticEvidenceContextIdSchema,
375
+ location: applicationGraphEvidenceLocationSchema
376
+ });
377
+ JAVASCRIPT_SEMANTIC_NODE_KINDS = [
378
+ "module",
379
+ "function",
380
+ "parameter",
381
+ "binding",
382
+ "expression",
383
+ "literal",
384
+ "property-slot",
385
+ "call-site",
386
+ "return-site",
387
+ "closure-capture",
388
+ "promise",
389
+ "task",
390
+ "event",
391
+ "listener",
392
+ "timer",
393
+ "child-process",
394
+ "stdio",
395
+ "signal",
396
+ "config-source",
397
+ "request",
398
+ "response",
399
+ "boundary",
400
+ "resource",
401
+ "unknown-frontier"
402
+ ];
403
+ JAVASCRIPT_SEMANTIC_RELATION_FAMILIES = [
404
+ "boundary",
405
+ "call-flow",
406
+ "child-process",
407
+ "closure",
408
+ "configuration",
409
+ "data-flow",
410
+ "event",
411
+ "object-flow",
412
+ "promise-ownership",
413
+ "request",
414
+ "resource-lifecycle",
415
+ "timer"
416
+ ];
417
+ JAVASCRIPT_SEMANTIC_RELATIONS = [
418
+ "acquires",
419
+ "aggregates",
420
+ "aliases",
421
+ "argument-to-parameter",
422
+ "awaits",
423
+ "calls",
424
+ "cancels-timer",
425
+ "captures",
426
+ "chains",
427
+ "coerces",
428
+ "connects-stdio",
429
+ "consumed-by",
430
+ "constructs-request",
431
+ "creates-promise",
432
+ "defaults",
433
+ "defines",
434
+ "destructures",
435
+ "detaches-task",
436
+ "dispatches-candidate",
437
+ "forwards-signal",
438
+ "listens-error",
439
+ "listens-exit",
440
+ "owns",
441
+ "overrides",
442
+ "parses",
443
+ "reads",
444
+ "reads-argv",
445
+ "reads-config",
446
+ "reads-environment",
447
+ "reads-property",
448
+ "registers-listener",
449
+ "releases",
450
+ "removes-listener",
451
+ "returns-task",
452
+ "returns-to-call",
453
+ "schedules-timer",
454
+ "spawns",
455
+ "spreads",
456
+ "supplies-argv",
457
+ "supplies-env",
458
+ "supplies-request-field",
459
+ "validates",
460
+ "writes",
461
+ "writes-property"
462
+ ];
463
+ JAVASCRIPT_SEMANTIC_RELATION_FAMILY = {
464
+ acquires: "resource-lifecycle",
465
+ aggregates: "promise-ownership",
466
+ aliases: "data-flow",
467
+ "argument-to-parameter": "call-flow",
468
+ awaits: "promise-ownership",
469
+ calls: "call-flow",
470
+ "cancels-timer": "timer",
471
+ captures: "closure",
472
+ chains: "promise-ownership",
473
+ coerces: "boundary",
474
+ "connects-stdio": "child-process",
475
+ "consumed-by": "request",
476
+ "constructs-request": "request",
477
+ "creates-promise": "promise-ownership",
478
+ defaults: "configuration",
479
+ defines: "data-flow",
480
+ destructures: "object-flow",
481
+ "detaches-task": "promise-ownership",
482
+ "dispatches-candidate": "event",
483
+ "forwards-signal": "child-process",
484
+ "listens-error": "child-process",
485
+ "listens-exit": "child-process",
486
+ owns: "promise-ownership",
487
+ overrides: "configuration",
488
+ parses: "boundary",
489
+ reads: "data-flow",
490
+ "reads-argv": "configuration",
491
+ "reads-config": "configuration",
492
+ "reads-environment": "configuration",
493
+ "reads-property": "object-flow",
494
+ "registers-listener": "event",
495
+ releases: "resource-lifecycle",
496
+ "removes-listener": "event",
497
+ "returns-task": "promise-ownership",
498
+ "returns-to-call": "call-flow",
499
+ "schedules-timer": "timer",
500
+ spawns: "child-process",
501
+ spreads: "object-flow",
502
+ "supplies-argv": "child-process",
503
+ "supplies-env": "child-process",
504
+ "supplies-request-field": "request",
505
+ validates: "boundary",
506
+ writes: "data-flow",
507
+ "writes-property": "object-flow"
508
+ };
509
+ relativePathSchema = z.string().min(1).refine((path) => !path.startsWith("/") && path.split("/").every((part) => ![
510
+ "",
511
+ ".",
512
+ ".."
513
+ ].includes(part)), "Expected a normalized relative POSIX path without traversal");
514
+ sourcePointSchema = z.strictObject({
515
+ line: z.number().int().min(1),
516
+ column: z.number().int().min(0)
517
+ });
518
+ sourceRangeSchema = z.strictObject({
519
+ start: sourcePointSchema,
520
+ end: sourcePointSchema
521
+ }).superRefine((range, context) => {
522
+ if (range.end.line < range.start.line || range.end.line === range.start.line && range.end.column < range.start.column) context.addIssue({
523
+ code: "custom",
524
+ path: ["end"],
525
+ message: "Source range end must not precede its start"
526
+ });
527
+ });
528
+ semanticPropertiesSchema = z.record(z.string().min(1), jsonValueSchema);
529
+ semanticNodeIdentitySchema = z.strictObject({
530
+ artifact_sha256: digestSchema,
531
+ module_path: relativePathSchema,
532
+ source_range: sourceRangeSchema.nullable(),
533
+ role_key: z.string().min(1)
534
+ });
535
+ javaScriptSemanticNodeInputSchema = z.strictObject({
536
+ kind: z.enum(JAVASCRIPT_SEMANTIC_NODE_KINDS),
537
+ identity: semanticNodeIdentitySchema,
538
+ function_node_id: semanticNodeIdSchema.nullable(),
539
+ application_node_ids: z.array(prefixedDigestSchema("jag_node")),
540
+ label: z.string().min(1).nullable(),
541
+ properties: semanticPropertiesSchema,
542
+ evidence: applicationGraphEvidenceSchema
543
+ });
544
+ javaScriptSemanticNodeSchema = javaScriptSemanticNodeInputSchema.extend({
545
+ evidence: javaScriptSemanticEvidenceReferenceSchema,
546
+ node_id: semanticNodeIdSchema.describe("SHA-256 of the node kind and identity; stable for one artifact version.")
547
+ });
548
+ javaScriptSemanticRelationInputSchema = z.strictObject({
549
+ source_node_id: semanticNodeIdSchema,
550
+ target_node_id: semanticNodeIdSchema,
551
+ relation: z.enum(JAVASCRIPT_SEMANTIC_RELATIONS),
552
+ resolution: z.enum(["resolved", "candidate"]),
553
+ properties: semanticPropertiesSchema,
554
+ evidence: applicationGraphEvidenceSchema
555
+ });
556
+ javaScriptSemanticRelationSchema = javaScriptSemanticRelationInputSchema.extend({
557
+ evidence: javaScriptSemanticEvidenceReferenceSchema,
558
+ relation_id: semanticRelationIdSchema.describe("SHA-256 of the exact relation content, including its evidence reference.")
559
+ });
560
+ JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS = [
561
+ "ambiguous-target",
562
+ "bound-reached",
563
+ "dynamic-call",
564
+ "dynamic-property",
565
+ "dynamic-scope",
566
+ "eval-or-generated-code",
567
+ "incomplete-module",
568
+ "missing-source",
569
+ "resource-limit",
570
+ "unknown-value",
571
+ "unsupported-syntax"
572
+ ];
573
+ javaScriptSemanticUnknownOmissionSchema = z.strictObject({
574
+ family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
575
+ reason: z.enum(JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS),
576
+ occurrences: z.number().int().positive()
577
+ });
578
+ javaScriptSemanticUnknownOmissionsSchema = z.array(javaScriptSemanticUnknownOmissionSchema).min(1).max(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES.length * JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS.length);
579
+ javaScriptSemanticUnknownInputSchema = z.strictObject({
580
+ node_id: semanticNodeIdSchema.nullable(),
581
+ family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
582
+ relation_kinds: z.array(z.enum(JAVASCRIPT_SEMANTIC_RELATIONS)).min(1),
583
+ reason: z.enum(JAVASCRIPT_SEMANTIC_UNKNOWN_REASONS),
584
+ detail: boundedTextSchema$1,
585
+ candidate_node_ids: z.array(semanticNodeIdSchema),
586
+ evidence: applicationGraphEvidenceSchema
587
+ });
588
+ javaScriptSemanticUnknownSchema = javaScriptSemanticUnknownInputSchema.extend({
589
+ evidence: javaScriptSemanticEvidenceReferenceSchema,
590
+ unknown_id: semanticUnknownIdSchema
591
+ });
592
+ fingerprintComponentsSchema = z.strictObject({
593
+ parameter_arity: z.number().int().min(0),
594
+ normalized_ast_sha256: digestSchema,
595
+ control_flow_sha256: digestSchema,
596
+ relation_shape_sha256: digestSchema,
597
+ literal_set_sha256: digestSchema,
598
+ effects: z.array(z.enum([
599
+ "async",
600
+ "child-process",
601
+ "event",
602
+ "network",
603
+ "promise",
604
+ "resource",
605
+ "timer"
606
+ ]))
607
+ });
608
+ javaScriptSemanticFingerprintInputSchema = z.strictObject({
609
+ function_node_id: semanticNodeIdSchema,
610
+ algorithm: z.literal("rea.javascript-semantic-function"),
611
+ status: z.enum([
612
+ "complete",
613
+ "partial",
614
+ "unavailable"
615
+ ]),
616
+ components: fingerprintComponentsSchema,
617
+ limitations: z.array(boundedTextSchema$1),
618
+ evidence: applicationGraphEvidenceSchema
619
+ });
620
+ javaScriptSemanticFingerprintSchema = javaScriptSemanticFingerprintInputSchema.extend({
621
+ evidence: javaScriptSemanticEvidenceReferenceSchema,
622
+ fingerprint_id: prefixedDigestSchema("jsrg_fingerprint"),
623
+ fingerprint_sha256: digestSchema
624
+ });
625
+ familyCoverageSchema = z.strictObject({
626
+ family: z.enum(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES),
627
+ status: z.enum([
628
+ "complete",
629
+ "partial",
630
+ "unknown",
631
+ "unsupported"
632
+ ]),
633
+ retained_relations: z.number().int().min(0),
634
+ omitted_relations: z.number().int().min(0).nullable(),
635
+ unknown_ids: z.array(semanticUnknownIdSchema)
636
+ });
637
+ graphCoverageSchema = z.strictObject({
638
+ status: z.enum([
639
+ "complete",
640
+ "partial",
641
+ "unknown",
642
+ "unavailable"
643
+ ]),
644
+ truncated: z.boolean(),
645
+ omitted_unknown_occurrences: javaScriptSemanticUnknownOmissionsSchema.exactOptional(),
646
+ omitted_nodes: z.number().int().min(0).nullable(),
647
+ omitted_relations: z.number().int().min(0).nullable(),
648
+ limits: z.array(z.strictObject({
649
+ name: z.string().min(1),
650
+ value: z.number().int().min(0),
651
+ unit: z.enum([
652
+ "items",
653
+ "bytes",
654
+ "milliseconds",
655
+ "depth",
656
+ "other"
657
+ ])
658
+ })),
659
+ families: z.array(familyCoverageSchema).length(12)
660
+ });
661
+ javaScriptSemanticGraphInputSchema = z.strictObject({
662
+ schema: z.literal("JavaScriptSemanticRelationGraph"),
663
+ root_artifact_sha256: digestSchema,
664
+ application_graph_id: prefixedDigestSchema("jag"),
665
+ root_node_ids: z.array(semanticNodeIdSchema).min(1),
666
+ evidence_contexts: z.array(javaScriptSemanticEvidenceContextSchema),
667
+ nodes: z.array(javaScriptSemanticNodeSchema).min(1),
668
+ relations: z.array(javaScriptSemanticRelationSchema),
669
+ fingerprints: z.array(javaScriptSemanticFingerprintSchema),
670
+ unknowns: z.array(javaScriptSemanticUnknownSchema),
671
+ coverage: graphCoverageSchema,
672
+ limitations: z.array(boundedTextSchema$1)
673
+ });
674
+ javaScriptSemanticGraphRecordSchema = javaScriptSemanticGraphInputSchema.extend({ graph_id: prefixedDigestSchema("jsrg") });
675
+ })))();
676
+ }
677
+
678
+ //#endregion
679
+ //#region dist/domain/javascript/javascriptSourceSelection.js
680
+ var javaScriptSourcePathsSchema, javaScriptSourceSelectionSchema;
681
+ function init_javascriptSourceSelection() {
682
+ return (init_javascriptSourceSelection = __esmMin((() => {
683
+ javaScriptSourcePathsSchema = z.array(z.string().min(1)).min(1).describe("Exact relevant file paths from the artifact inventory, relative to the application root, analyzed in first-request order before unselected scopes; no globs or implicit dependencies. Omit to analyze all sources.");
684
+ javaScriptSourceSelectionSchema = z.strictObject({
685
+ requested_paths: javaScriptSourcePathsSchema,
686
+ unselected_files: z.number().int().min(0)
687
+ });
688
+ })))();
689
+ }
690
+
691
+ //#endregion
692
+ //#region dist/domain/javascript/javascriptSourceMapPaths.js
693
+ var javascriptSourceMapReferenceSchema, resolveJavaScriptSourceMapReferences, resolveJavaScriptSourceMapUrl, resolveSourceMapUrls, resolveJavaScriptSourceMapPath, unusableHost, carriesUsableHost, windowsFileUrl, decodedUrlPath;
694
+ function init_javascriptSourceMapPaths() {
695
+ return (init_javascriptSourceMapPaths = __esmMin((() => {
696
+ javascriptSourceMapReferenceSchema = z.strictObject({
697
+ source_name: z.string(),
698
+ source_root: z.string().nullable(),
699
+ map_path: z.string().min(1),
700
+ resolution: z.discriminatedUnion("kind", [z.strictObject({
701
+ kind: z.enum(["artifact-relative", "suffix"]),
702
+ path: z.string().min(1)
703
+ }), z.strictObject({
704
+ kind: z.literal("unresolved"),
705
+ reason: z.string().min(1)
706
+ })])
707
+ });
708
+ resolveJavaScriptSourceMapReferences = (sourceNames, sourceRoot, mapPath) => {
709
+ if (sourceNames.length === 0) return [];
710
+ const resolvedSources = resolveSourceMapUrls(sourceNames.map((sourceName) => sourceName ?? ""), sourceRoot, "");
711
+ return sourceNames.map((sourceName, index) => {
712
+ if (sourceName === null) return null;
713
+ const reference = resolvedSources[index];
714
+ if (reference === undefined) throw new TypeError(`TraceMap did not resolve source declaration ${String(index)}`);
715
+ return {
716
+ source_name: sourceName,
717
+ source_root: sourceRoot,
718
+ map_path: mapPath,
719
+ resolution: resolveJavaScriptSourceMapPath(reference, mapPath)
720
+ };
721
+ });
722
+ };
723
+ resolveJavaScriptSourceMapUrl = (source, sourceRoot, mapUrl) => {
724
+ const resolved = resolveSourceMapUrls([source ?? ""], sourceRoot, mapUrl)[0];
725
+ if (resolved === undefined) throw new TypeError("TraceMap did not resolve its single source declaration");
726
+ return resolved;
727
+ };
728
+ resolveSourceMapUrls = (sources, sourceRoot, mapUrl) => new TraceMap({
729
+ version: 3,
730
+ names: [],
731
+ sources,
732
+ ...sourceRoot == null ? {} : { sourceRoot },
733
+ mappings: ""
734
+ }, mapUrl).resolvedSources;
735
+ resolveJavaScriptSourceMapPath = (source, mapPath) => {
736
+ const portable = source.replaceAll("\\", "/");
737
+ const windowsPath = /^[a-z]:\//iu.test(portable) || source.startsWith("\\\\");
738
+ const anchor = `/${"source/".repeat(portable.split("/").length + 1)}`;
739
+ const directory = posix.join(anchor, posix.dirname(mapPath));
740
+ const base = pathToFileURL(`${directory}/`, { windows: false });
741
+ const absolute = windowsPath ? windowsFileUrl(source) : URL.parse(source);
742
+ const resolved = windowsPath ? absolute : URL.parse(source, base);
743
+ if (resolved === null) return {
744
+ kind: "unresolved",
745
+ reason: "Source reference is not a valid URL or filesystem path."
746
+ };
747
+ if (!resolved.pathname.startsWith("/")) return {
748
+ kind: "unresolved",
749
+ reason: "Source reference uses a non-hierarchical URL without a file pathname."
750
+ };
751
+ if (resolved.pathname.endsWith("/")) return {
752
+ kind: "unresolved",
753
+ reason: "Source reference names a directory rather than a file."
754
+ };
755
+ const declaredPath = windowsPath ? absolute?.pathname ?? "" : URL.parse(source, "file:///")?.pathname ?? "";
756
+ if (/%(?:2f|5c)/iu.test(declaredPath)) return {
757
+ kind: "unresolved",
758
+ reason: "Source reference contains an encoded path separator."
759
+ };
760
+ const relative = absolute === null ? !portable.startsWith("/") : absolute.href !== resolved.href;
761
+ const path = decodedUrlPath(resolved);
762
+ if (path === null) return {
763
+ kind: "unresolved",
764
+ reason: "Source reference has malformed URL encoding or an invalid file URL."
765
+ };
766
+ const value = relative ? posix.relative(anchor, path) : path.replace(/^\/+/, "");
767
+ if (value === "" || value === ".." || value.startsWith("../")) return {
768
+ kind: "unresolved",
769
+ reason: "Source reference resolves outside the inventoried artifact."
770
+ };
771
+ return {
772
+ path: value,
773
+ kind: relative ? "artifact-relative" : "suffix"
774
+ };
775
+ };
776
+ unusableHost = /[\0\t\n\r #/:<>?@[\\\]^|%]/u;
777
+ carriesUsableHost = (host) => !unusableHost.test(host) && domainToASCII(host) !== "";
778
+ windowsFileUrl = (path) => {
779
+ if (path.startsWith("\\\\") && !carriesUsableHost(path.slice(2).split("\\")[0] ?? "")) return null;
780
+ try {
781
+ return pathToFileURL(path, { windows: true });
782
+ } catch (cause) {
783
+ if (cause instanceof TypeError) return null;
784
+ throw cause;
785
+ }
786
+ };
787
+ decodedUrlPath = (url) => {
788
+ try {
789
+ if (url.protocol === "file:") {
790
+ const windows = url.hostname !== "" && url.hostname !== "localhost";
791
+ const path = fileURLToPath(url, { windows });
792
+ return windows ? path.replaceAll("\\", "/") : path;
793
+ }
794
+ return `${url.host}${decodeURIComponent(url.pathname)}`;
795
+ } catch (cause) {
796
+ if (cause instanceof URIError || cause instanceof TypeError) return null;
797
+ throw cause;
798
+ }
799
+ };
800
+ })))();
801
+ }
802
+
803
+ //#endregion
804
+ //#region dist/domain/javascript/javascriptApplicationGraphSchemas.js
805
+ var boundedTextSchema, JAVASCRIPT_APPLICATION_NODE_KINDS, applicationNodeKindSchema, JAVASCRIPT_APPLICATION_RELATIONS, applicationRelationSchema, applicationPropertiesSchema, applicationNodeObservationBaseSchema, applicationNodeObservationInputSchema, applicationNodeObservationSchema, applicationNodeInputSchema, applicationNodeSchema, applicationEdgeInputSchema, applicationEdgeSchema, javascriptApplicationGraphInputSchema, javascriptApplicationGraphRecordSchema;
806
+ function init_javascriptApplicationGraphSchemas() {
807
+ return (init_javascriptApplicationGraphSchemas = __esmMin((() => {
808
+ init_javascriptSourceMapPaths();
809
+ init_javascriptApplicationEvidenceSchemas();
810
+ init_jsonValue();
811
+ init_digests();
812
+ boundedTextSchema = z.string().min(1);
813
+ JAVASCRIPT_APPLICATION_NODE_KINDS = [
814
+ "package",
815
+ "installer",
816
+ "artifact",
817
+ "asar-entry",
818
+ "electron-main",
819
+ "electron-preload",
820
+ "electron-renderer",
821
+ "electron-utility",
822
+ "javascript-asset",
823
+ "javascript-chunk",
824
+ "javascript-module",
825
+ "javascript-expression",
826
+ "source-map",
827
+ "source-module",
828
+ "browser-window",
829
+ "frame",
830
+ "target",
831
+ "context-bridge-api",
832
+ "ipc-channel",
833
+ "ipc-handler",
834
+ "worker",
835
+ "service-worker",
836
+ "endpoint",
837
+ "storage",
838
+ "native-addon",
839
+ "native-export",
840
+ "managed-assembly",
841
+ "managed-module",
842
+ "managed-type",
843
+ "managed-method",
844
+ "managed-field",
845
+ "managed-pinvoke-import",
846
+ "managed-native-implementation",
847
+ "runtime-script-instance",
848
+ "unknown"
849
+ ];
850
+ applicationNodeKindSchema = z.enum(JAVASCRIPT_APPLICATION_NODE_KINDS);
851
+ JAVASCRIPT_APPLICATION_RELATIONS = [
852
+ "contains",
853
+ "loads",
854
+ "imports",
855
+ "maps_to",
856
+ "exposes",
857
+ "sends",
858
+ "invokes",
859
+ "handles",
860
+ "calls",
861
+ "persists_to",
862
+ "observed_as",
863
+ "changed_from"
864
+ ];
865
+ applicationRelationSchema = z.enum(JAVASCRIPT_APPLICATION_RELATIONS);
866
+ applicationPropertiesSchema = z.record(z.string().min(1), jsonValueSchema);
867
+ applicationNodeObservationBaseSchema = z.strictObject({
868
+ label: z.string().min(1).nullable(),
869
+ source_map_reference: javascriptSourceMapReferenceSchema.nullable(),
870
+ properties: applicationPropertiesSchema,
871
+ evidence: applicationGraphEvidenceSchema
872
+ });
873
+ applicationNodeObservationInputSchema = applicationNodeObservationBaseSchema.extend({ source_map_reference: javascriptSourceMapReferenceSchema.nullable().default(null) });
874
+ applicationNodeObservationSchema = applicationNodeObservationBaseSchema.extend({
875
+ observation_id: prefixedDigestSchema("jag_observation"),
876
+ identifier_strategy: z.strictObject({
877
+ strategy: z.literal("semantic-content-sha256"),
878
+ stability: z.literal("observation-exact")
879
+ })
880
+ });
881
+ applicationNodeInputSchema = z.strictObject({
882
+ kind: applicationNodeKindSchema,
883
+ identity: applicationNodeIdentitySchema,
884
+ observations: z.array(applicationNodeObservationInputSchema).min(1)
885
+ });
886
+ applicationNodeSchema = z.strictObject({
887
+ node_id: prefixedDigestSchema("jag_node"),
888
+ kind: applicationNodeKindSchema,
889
+ identity: applicationNodeIdentitySchema,
890
+ observations: z.array(applicationNodeObservationSchema).min(1)
891
+ });
892
+ applicationEdgeInputSchema = z.strictObject({
893
+ source_node_id: prefixedDigestSchema("jag_node"),
894
+ target_node_id: prefixedDigestSchema("jag_node"),
895
+ relation: applicationRelationSchema,
896
+ properties: applicationPropertiesSchema,
897
+ evidence: applicationGraphEvidenceSchema
898
+ });
899
+ applicationEdgeSchema = applicationEdgeInputSchema.extend({
900
+ edge_id: prefixedDigestSchema("jag_edge"),
901
+ identifier_strategy: z.strictObject({
902
+ strategy: z.literal("semantic-content-sha256"),
903
+ stability: z.literal("relationship-exact")
904
+ })
905
+ });
906
+ javascriptApplicationGraphInputSchema = z.strictObject({
907
+ schema: z.literal("JavaScriptApplicationGraph"),
908
+ root_node_ids: z.array(prefixedDigestSchema("jag_node")).min(1),
909
+ nodes: z.array(applicationNodeSchema).min(1),
910
+ edges: z.array(applicationEdgeSchema),
911
+ coverage: applicationCoverageSchema,
912
+ limitations: z.array(boundedTextSchema)
913
+ });
914
+ javascriptApplicationGraphRecordSchema = javascriptApplicationGraphInputSchema.extend({ graph_id: prefixedDigestSchema("jag") });
915
+ })))();
916
+ }
917
+
918
+ //#endregion
919
+ //#region dist/domain/zodCollectionSteps.js
920
+ /** Elements validated between yields, in the issues and paths a whole-array parse reports. */
921
+ function* parseElementSteps(element, values, path, issues) {
922
+ const parsed = [];
923
+ for (const [index, value] of values.entries()) {
924
+ if (index % 64 === 0) yield;
925
+ const result = element.safeParse(value);
926
+ if (result.success) parsed.push(result.data);
927
+ else issues.push(...result.error.issues.map((issue) => ({
928
+ ...issue,
929
+ path: [
930
+ ...path,
931
+ index,
932
+ ...issue.path
933
+ ]
934
+ })));
935
+ }
936
+ return parsed;
937
+ }
938
+ var arrayContainerSchema;
939
+ function init_zodCollectionSteps() {
940
+ return (init_zodCollectionSteps = __esmMin((() => {
941
+ arrayContainerSchema = (array) => array.clone({
942
+ ...array.def,
943
+ element: z.unknown()
944
+ });
945
+ })))();
946
+ }
947
+
948
+ //#endregion
949
+ //#region dist/domain/javascript/javascriptApplicationGraph.js
950
+ function* checkGraphContentSteps$1(graph, context) {
951
+ sortedUniqueIssue$1(graph.root_node_ids, ["root_node_ids"], "Root nodes", context);
952
+ sortedUniqueIssue$1(graph.nodes.map(({ node_id: id }) => id), ["nodes"], "Nodes", context);
953
+ sortedUniqueIssue$1(graph.edges.map(({ edge_id: id }) => id), ["edges"], "Edges", context);
954
+ sortedUniqueIssue$1(graph.limitations, ["limitations"], "Graph limitations", context);
955
+ sortedUniqueIssue$1(graph.coverage.limits.map(limitKey), ["coverage", "limits"], "Graph limits", context);
956
+ if (graph.coverage.status !== "complete" && graph.limitations.length === 0) context.addIssue({
957
+ code: "custom",
958
+ message: "Non-complete graph coverage requires an explicit limitation",
959
+ path: ["limitations"]
960
+ });
961
+ const nodesById = new Map(graph.nodes.map((node) => [node.node_id, node]));
962
+ for (const root of graph.root_node_ids) if (!nodesById.has(root)) context.addIssue({
963
+ code: "custom",
964
+ message: "Root identifier must name a graph node",
965
+ path: ["root_node_ids"]
966
+ });
967
+ for (const [index, node] of graph.nodes.entries()) {
968
+ if (index % 64 === 0) yield;
969
+ checkNode(node, index, context);
970
+ }
971
+ for (const [index, edge] of graph.edges.entries()) {
972
+ if (index % 64 === 0) yield;
973
+ const { edge_id: identifier, ...semantic } = edge;
974
+ if (identifier !== edgeId(semantic)) context.addIssue({
975
+ code: "custom",
976
+ message: "Edge identifier does not match its semantic content",
977
+ path: [
978
+ "edges",
979
+ index,
980
+ "edge_id"
981
+ ]
982
+ });
983
+ if (!nodesById.has(edge.source_node_id) || !nodesById.has(edge.target_node_id)) context.addIssue({
984
+ code: "custom",
985
+ message: "Edge endpoints must name graph nodes",
986
+ path: ["edges", index]
987
+ });
988
+ if (edge.source_node_id === edge.target_node_id) context.addIssue({
989
+ code: "custom",
990
+ message: "Application graph edges cannot be self-referential",
991
+ path: ["edges", index]
992
+ });
993
+ if (edge.relation === "changed_from" && nodesById.get(edge.source_node_id)?.kind !== nodesById.get(edge.target_node_id)?.kind) context.addIssue({
994
+ code: "custom",
995
+ message: "changed_from endpoints must have the same node kind",
996
+ path: [
997
+ "edges",
998
+ index,
999
+ "relation"
1000
+ ]
1001
+ });
1002
+ checkEvidenceNormalization(edge.evidence, [
1003
+ "edges",
1004
+ index,
1005
+ "evidence"
1006
+ ], context);
1007
+ }
1008
+ }
1009
+ function* parseAndSealApplicationGraphSteps(container) {
1010
+ const issues = [];
1011
+ const parsed = {
1012
+ ...container,
1013
+ nodes: yield* parseElementSteps(applicationGraphShape.nodes.element, container.nodes, ["nodes"], issues),
1014
+ edges: yield* parseElementSteps(applicationGraphShape.edges.element, container.edges, ["edges"], issues)
1015
+ };
1016
+ if (issues.length > 0) throw new z.ZodError(issues);
1017
+ const content = normalizeGraphInput$1(parsed);
1018
+ let invalid = false;
1019
+ yield* checkGraphContentSteps$1(content, { addIssue: () => {
1020
+ invalid = true;
1021
+ } });
1022
+ if (invalid) {
1023
+ javascriptApplicationGraphContentSchema.parse(content);
1024
+ throw new TypeError("Application graph checks disagree with its schema");
1025
+ }
1026
+ return yield* sealValidatedApplicationGraphSteps({
1027
+ ...content,
1028
+ graph_id: `jag_${yield* canonicalJsonDigestSteps(content)}`
1029
+ });
1030
+ }
1031
+ function* sealValidatedApplicationGraphSteps(graph) {
1032
+ yield* freezeOwnedJsonSnapshotSteps(graph);
1033
+ validatedImmutableApplicationGraphs.add(graph);
1034
+ return graph;
1035
+ }
1036
+ var OBSERVATION_IDENTIFIER_STRATEGY, EDGE_IDENTIFIER_STRATEGY, limitKey, normalizeLimits, normalizeEvidence$1, normalizeIdentity, nodeSemantic, nodeId, observationSemantic, observationId, edgeId, sortedUniqueIssue$1, checkEvidenceNormalization, sourceMapObservationMatchesIdentity, observationMatchesIdentity, checkNode, checkGraphContent$1, checkGraphInvariants, javascriptApplicationGraphSchema, javascriptApplicationGraphContentSchema, createJavaScriptApplicationNode, createJavaScriptApplicationEdge, createJavaScriptApplicationGraph, normalizeGraphInput$1, validatedImmutableApplicationGraphs, createImmutableJavaScriptApplicationGraphSteps, applicationGraphShape, applicationGraphContainerSchema, sealTransferredJavaScriptApplicationGraphSteps, isValidatedImmutableJavaScriptApplicationGraph, parseJavaScriptApplicationGraph, computeJavaScriptApplicationGraphSha256, serializeJavaScriptApplicationGraph;
1037
+ function init_javascriptApplicationGraph() {
1038
+ return (init_javascriptApplicationGraph = __esmMin((() => {
1039
+ init_zodCollectionSteps();
1040
+ init_canonicalJsonDigestSteps();
1041
+ init_comparisonSemantics();
1042
+ init_canonicalDigest();
1043
+ init_canonicalOrdering();
1044
+ init_unicodeCodePointOrder();
1045
+ init_immutableJson();
1046
+ init_javascriptApplicationGraphSchemas();
1047
+ OBSERVATION_IDENTIFIER_STRATEGY = {
1048
+ strategy: "semantic-content-sha256",
1049
+ stability: "observation-exact"
1050
+ };
1051
+ EDGE_IDENTIFIER_STRATEGY = {
1052
+ strategy: "semantic-content-sha256",
1053
+ stability: "relationship-exact"
1054
+ };
1055
+ limitKey = (limit) => canonicalJson(limit, "JavaScript Application Graph");
1056
+ normalizeLimits = (limits) => [...new Map(limits.map((limit) => [limitKey(limit), limit])).values()].sort((left, right) => compareUnicodeCodePoints(limitKey(left), limitKey(right)));
1057
+ normalizeEvidence$1 = (evidence) => ({
1058
+ ...evidence,
1059
+ coverage: {
1060
+ ...evidence.coverage,
1061
+ limits: normalizeLimits(evidence.coverage.limits)
1062
+ },
1063
+ limitations: uniqueSorted(evidence.limitations),
1064
+ evidence_ids: uniqueSorted(evidence.evidence_ids)
1065
+ });
1066
+ normalizeIdentity = (identity) => identity.strategy === "structural-fingerprint" ? {
1067
+ ...identity,
1068
+ basis: uniqueSorted(identity.basis)
1069
+ } : identity;
1070
+ nodeSemantic = (node) => ({
1071
+ kind: node.kind,
1072
+ identity: node.identity
1073
+ });
1074
+ nodeId = (node) => `jag_node_${digestCanonicalValue(nodeSemantic(node), "JavaScript Application Graph")}`;
1075
+ observationSemantic = (nodeIdentifier, observation) => ({
1076
+ node_id: nodeIdentifier,
1077
+ ...observation
1078
+ });
1079
+ observationId = (nodeIdentifier, observation) => `jag_observation_${digestCanonicalValue(observationSemantic(nodeIdentifier, observation))}`;
1080
+ edgeId = (edge) => `jag_edge_${digestCanonicalValue(edge, "JavaScript Application Graph")}`;
1081
+ sortedUniqueIssue$1 = (values, path, label, context) => {
1082
+ for (let index = 1; index < values.length; index += 1) {
1083
+ if (compareUnicodeCodePoints(values[index - 1] ?? "", values[index] ?? "") < 0) continue;
1084
+ context.addIssue({
1085
+ code: "custom",
1086
+ message: `${label} must be sorted and unique by Unicode code point`,
1087
+ path: [...path, index]
1088
+ });
1089
+ return;
1090
+ }
1091
+ };
1092
+ checkEvidenceNormalization = (evidence, path, context) => {
1093
+ sortedUniqueIssue$1(evidence.limitations, [...path, "limitations"], "Evidence limitations", context);
1094
+ sortedUniqueIssue$1(evidence.evidence_ids, [...path, "evidence_ids"], "Evidence identifiers", context);
1095
+ sortedUniqueIssue$1(evidence.coverage.limits.map(limitKey), [
1096
+ ...path,
1097
+ "coverage",
1098
+ "limits"
1099
+ ], "Evidence limits", context);
1100
+ const runtimeLocation = evidence.location.available && evidence.location.value.kind === "runtime";
1101
+ const staticAuthority = [
1102
+ "artifact-bytes",
1103
+ "ast-static-analysis",
1104
+ "static-relationship-inference",
1105
+ "native-analysis-provider"
1106
+ ].includes(evidence.authority);
1107
+ if (runtimeLocation && staticAuthority) context.addIssue({
1108
+ code: "custom",
1109
+ message: "Static and native authorities cannot claim a runtime location",
1110
+ path: [...path, "location"]
1111
+ });
1112
+ };
1113
+ sourceMapObservationMatchesIdentity = (identity, observation) => {
1114
+ const { evidence, source_map_reference: reference } = observation;
1115
+ const sourceDigests = [observation.properties.content_sha256, observation.properties.source_sha256];
1116
+ const hasKnownSourceDigest = identity.source_sha256 !== null;
1117
+ const sourceDigestMatches = sourceDigests.every((digest) => digest === undefined || digest === null || digest === identity.source_sha256) && (!hasKnownSourceDigest || sourceDigests.includes(identity.source_sha256));
1118
+ const contentAvailabilityMatches = (observation.properties.content_available !== true || hasKnownSourceDigest) && (observation.properties.content_available !== false || !hasKnownSourceDigest);
1119
+ return sourceDigestMatches && contentAvailabilityMatches && reference !== null && evidence.state === "observed" && evidence.artifact.available && evidence.artifact.sha256 === identity.source_map_sha256 && reference.source_name === identity.original_source && reference.source_root === identity.source_root && evidence.location.available && evidence.location.value.kind === "artifact-path" && reference.map_path === evidence.location.value.path;
1120
+ };
1121
+ observationMatchesIdentity = (node, observation) => {
1122
+ const { identity } = node;
1123
+ const { evidence } = observation;
1124
+ if (identity.strategy === "content-digest") return evidence.state === "observed" && evidence.artifact.available && evidence.artifact.sha256 === identity.sha256;
1125
+ if (identity.strategy === "source-map-original") return sourceMapObservationMatchesIdentity(identity, observation);
1126
+ if (identity.strategy === "canonical-path") return evidence.artifact.available && evidence.artifact.sha256 === identity.artifact_sha256 && evidence.location.available && evidence.location.value.kind === "artifact-path" && evidence.location.value.path === identity.path;
1127
+ if (identity.strategy === "artifact-local-key") return evidence.artifact.available && evidence.artifact.sha256 === identity.artifact_sha256;
1128
+ if (identity.strategy === "runtime-instance") {
1129
+ if (!["passive-cdp-runtime", "controlled-replay"].includes(evidence.authority) || !evidence.location.available || evidence.location.value.kind !== "runtime") return false;
1130
+ const location = evidence.location.value;
1131
+ return location.capture_sha256 === identity.capture_sha256 && [
1132
+ location.target_key,
1133
+ location.frame_key,
1134
+ location.script_key
1135
+ ].includes(identity.runtime_key);
1136
+ }
1137
+ if (identity.strategy === "structural-fingerprint") return evidence.state === "inferred";
1138
+ return evidence.state === "observed";
1139
+ };
1140
+ checkNode = (node, index, context) => {
1141
+ if (node.node_id !== nodeId(node)) context.addIssue({
1142
+ code: "custom",
1143
+ message: "Node identifier does not match its kind and identity",
1144
+ path: [
1145
+ "nodes",
1146
+ index,
1147
+ "node_id"
1148
+ ]
1149
+ });
1150
+ if (node.identity.strategy === "structural-fingerprint" && canonicalJson(node.identity.basis, "JavaScript Application Graph") !== canonicalJson(uniqueSorted(node.identity.basis), "JavaScript Application Graph")) context.addIssue({
1151
+ code: "custom",
1152
+ message: "Structural fingerprint basis must be sorted and unique",
1153
+ path: [
1154
+ "nodes",
1155
+ index,
1156
+ "identity",
1157
+ "basis"
1158
+ ]
1159
+ });
1160
+ sortedUniqueIssue$1(node.observations.map(({ observation_id: id }) => id), [
1161
+ "nodes",
1162
+ index,
1163
+ "observations"
1164
+ ], "Node observations", context);
1165
+ for (const [observationIndex, observation] of node.observations.entries()) {
1166
+ const { observation_id: identifier, ...semantic } = observation;
1167
+ if (identifier !== observationId(node.node_id, semantic)) context.addIssue({
1168
+ code: "custom",
1169
+ message: "Observation identifier does not match its semantic content",
1170
+ path: [
1171
+ "nodes",
1172
+ index,
1173
+ "observations",
1174
+ observationIndex,
1175
+ "observation_id"
1176
+ ]
1177
+ });
1178
+ if (node.identity.strategy === "source-map-original" && !observationMatchesIdentity(node, observation)) context.addIssue({
1179
+ code: "custom",
1180
+ message: "Source-map observation must retain its exact declaration and map location",
1181
+ path: [
1182
+ "nodes",
1183
+ index,
1184
+ "observations",
1185
+ observationIndex,
1186
+ "source_map_reference"
1187
+ ]
1188
+ });
1189
+ checkEvidenceNormalization(observation.evidence, [
1190
+ "nodes",
1191
+ index,
1192
+ "observations",
1193
+ observationIndex,
1194
+ "evidence"
1195
+ ], context);
1196
+ }
1197
+ if (!node.observations.some((observation) => observationMatchesIdentity(node, observation))) context.addIssue({
1198
+ code: "custom",
1199
+ message: "Node identity is not supported by a compatible observation",
1200
+ path: [
1201
+ "nodes",
1202
+ index,
1203
+ "identity"
1204
+ ]
1205
+ });
1206
+ };
1207
+ checkGraphContent$1 = (graph, context) => {
1208
+ const steps = checkGraphContentSteps$1(graph, context);
1209
+ while (steps.next().done !== true);
1210
+ };
1211
+ checkGraphInvariants = (graph, context) => {
1212
+ checkGraphContent$1(graph, context);
1213
+ const { graph_id: identifier, ...semantic } = graph;
1214
+ if (identifier !== `jag_${digestCanonicalValue(semantic, "JavaScript Application Graph")}`) context.addIssue({
1215
+ code: "custom",
1216
+ message: "Graph identifier does not match its semantic content",
1217
+ path: ["graph_id"]
1218
+ });
1219
+ };
1220
+ javascriptApplicationGraphSchema = javascriptApplicationGraphRecordSchema.superRefine(checkGraphInvariants);
1221
+ javascriptApplicationGraphContentSchema = javascriptApplicationGraphInputSchema.superRefine(checkGraphContent$1);
1222
+ createJavaScriptApplicationNode = (input) => {
1223
+ const parsed = applicationNodeInputSchema.parse(input);
1224
+ for (const observation of parsed.observations) freezeJsonSnapshot(observation.properties);
1225
+ const identity = normalizeIdentity(parsed.identity);
1226
+ const identifier = nodeId({
1227
+ kind: parsed.kind,
1228
+ identity
1229
+ });
1230
+ const observations = parsed.observations.map((observation) => {
1231
+ const semantic = {
1232
+ ...observation,
1233
+ evidence: normalizeEvidence$1(observation.evidence),
1234
+ identifier_strategy: OBSERVATION_IDENTIFIER_STRATEGY
1235
+ };
1236
+ return applicationNodeObservationSchema.parse({
1237
+ ...semantic,
1238
+ observation_id: observationId(identifier, semantic)
1239
+ });
1240
+ }).sort((left, right) => compareUnicodeCodePoints(left.observation_id, right.observation_id));
1241
+ return applicationNodeSchema.parse({
1242
+ node_id: identifier,
1243
+ kind: parsed.kind,
1244
+ identity,
1245
+ observations
1246
+ });
1247
+ };
1248
+ createJavaScriptApplicationEdge = (input) => {
1249
+ const parsed = applicationEdgeInputSchema.parse(input);
1250
+ freezeJsonSnapshot(parsed.properties);
1251
+ const semantic = {
1252
+ ...parsed,
1253
+ evidence: normalizeEvidence$1(parsed.evidence),
1254
+ identifier_strategy: EDGE_IDENTIFIER_STRATEGY
1255
+ };
1256
+ return applicationEdgeSchema.parse({
1257
+ ...semantic,
1258
+ edge_id: edgeId(semantic)
1259
+ });
1260
+ };
1261
+ createJavaScriptApplicationGraph = (input) => {
1262
+ const semantic = normalizeGraphInput$1(javascriptApplicationGraphInputSchema.parse(input));
1263
+ const content = javascriptApplicationGraphContentSchema.parse(semantic);
1264
+ return {
1265
+ ...content,
1266
+ graph_id: `jag_${digestCanonicalValue(content, "JavaScript Application Graph")}`
1267
+ };
1268
+ };
1269
+ normalizeGraphInput$1 = (parsed) => ({
1270
+ ...parsed,
1271
+ root_node_ids: uniqueSorted(parsed.root_node_ids),
1272
+ nodes: [...parsed.nodes].sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id)),
1273
+ edges: [...parsed.edges].sort((left, right) => compareUnicodeCodePoints(left.edge_id, right.edge_id)),
1274
+ coverage: {
1275
+ ...parsed.coverage,
1276
+ limits: normalizeLimits(parsed.coverage.limits)
1277
+ },
1278
+ limitations: uniqueSorted(parsed.limitations)
1279
+ });
1280
+ validatedImmutableApplicationGraphs = new WeakSet();
1281
+ createImmutableJavaScriptApplicationGraphSteps = (input) => sealValidatedApplicationGraphSteps(createJavaScriptApplicationGraph(input));
1282
+ applicationGraphShape = javascriptApplicationGraphInputSchema.shape;
1283
+ applicationGraphContainerSchema = javascriptApplicationGraphInputSchema.extend({
1284
+ nodes: arrayContainerSchema(applicationGraphShape.nodes),
1285
+ edges: arrayContainerSchema(applicationGraphShape.edges)
1286
+ });
1287
+ sealTransferredJavaScriptApplicationGraphSteps = (input) => parseAndSealApplicationGraphSteps(applicationGraphContainerSchema.parse(input));
1288
+ isValidatedImmutableJavaScriptApplicationGraph = (value) => typeof value === "object" && value !== null && validatedImmutableApplicationGraphs.has(value);
1289
+ parseJavaScriptApplicationGraph = (input) => javascriptApplicationGraphSchema.parse(input);
1290
+ computeJavaScriptApplicationGraphSha256 = (input) => digestCanonicalValue(parseJavaScriptApplicationGraph(input), "JavaScript Application Graph");
1291
+ serializeJavaScriptApplicationGraph = (input) => canonicalJson(parseJavaScriptApplicationGraph(input), "JavaScript Application Graph");
1292
+ })))();
1293
+ }
1294
+
1295
+ //#endregion
1296
+ //#region dist/domain/javascript/javascriptSemanticGraph.js
1297
+ function* checkCoverageSteps(graph, context) {
1298
+ const omittedUnknowns = graph.coverage.omitted_unknown_occurrences ?? [];
1299
+ sortedUniqueIssue(omittedUnknowns.map(({ family, reason }) => `${family}:${reason}`), ["coverage", "omitted_unknown_occurrences"], "Unknown omission coverage", context);
1300
+ if (omittedUnknowns.length > 0 && (!graph.coverage.truncated || graph.coverage.status !== "partial")) context.addIssue({
1301
+ code: "custom",
1302
+ path: ["coverage"],
1303
+ message: "Omitted unknown occurrences require truncated partial coverage"
1304
+ });
1305
+ const families = graph.coverage.families.map(({ family }) => family);
1306
+ if (canonicalJson(families, "JavaScript semantic graph") !== canonicalJson(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES, "JavaScript semantic graph")) context.addIssue({
1307
+ code: "custom",
1308
+ path: ["coverage", "families"],
1309
+ message: "Coverage must name every semantic relation family once in canonical order"
1310
+ });
1311
+ if (graph.coverage.status === "complete" && (graph.coverage.truncated || graph.coverage.omitted_nodes !== 0 || graph.coverage.omitted_relations !== 0 || graph.coverage.families.some(({ status }) => status !== "complete"))) context.addIssue({
1312
+ code: "custom",
1313
+ path: ["coverage"],
1314
+ message: "Complete graph coverage cannot omit or truncate semantic facts"
1315
+ });
1316
+ if (graph.coverage.truncated && graph.coverage.limits.length === 0) context.addIssue({
1317
+ code: "custom",
1318
+ path: ["coverage", "limits"],
1319
+ message: "Truncated graph coverage must identify an effective limit"
1320
+ });
1321
+ const relationsByFamily = new Map(JAVASCRIPT_SEMANTIC_RELATION_FAMILIES.map((family) => [family, 0]));
1322
+ for (const [index, relation] of graph.relations.entries()) {
1323
+ if (index % 256 === 0) yield;
1324
+ const family = JAVASCRIPT_SEMANTIC_RELATION_FAMILY[relation.relation];
1325
+ relationsByFamily.set(family, (relationsByFamily.get(family) ?? 0) + 1);
1326
+ }
1327
+ const unknownsById = new Map();
1328
+ const unknownFamilies = new Set();
1329
+ for (const [index, unknown] of graph.unknowns.entries()) {
1330
+ if (index % 256 === 0) yield;
1331
+ unknownsById.set(unknown.unknown_id, unknown);
1332
+ unknownFamilies.add(unknown.family);
1333
+ }
1334
+ for (const [index, family] of graph.coverage.families.entries()) {
1335
+ if (family.retained_relations !== relationsByFamily.get(family.family)) context.addIssue({
1336
+ code: "custom",
1337
+ path: [
1338
+ "coverage",
1339
+ "families",
1340
+ index,
1341
+ "retained_relations"
1342
+ ],
1343
+ message: "Family retained relation count does not match graph content"
1344
+ });
1345
+ if (family.unknown_ids.some((identifier) => unknownsById.get(identifier)?.family !== family.family)) context.addIssue({
1346
+ code: "custom",
1347
+ path: [
1348
+ "coverage",
1349
+ "families",
1350
+ index,
1351
+ "unknown_ids"
1352
+ ],
1353
+ message: "Family coverage references an unknown from another family"
1354
+ });
1355
+ if (family.status === "complete" && (family.omitted_relations !== 0 || family.unknown_ids.length > 0 || unknownFamilies.has(family.family) || omittedUnknowns.some((omitted) => omitted.family === family.family))) context.addIssue({
1356
+ code: "custom",
1357
+ path: [
1358
+ "coverage",
1359
+ "families",
1360
+ index
1361
+ ],
1362
+ message: "Complete family coverage cannot omit or retain unknown facts"
1363
+ });
1364
+ }
1365
+ }
1366
+ function* checkEvidenceContextReferencesSteps(graph, context) {
1367
+ const contexts = new Map(graph.evidence_contexts.map((value) => [value.context_id, value]));
1368
+ const referenced = new Set();
1369
+ const validateReferences = function* (entities, entityKind) {
1370
+ for (const [index, { evidence }] of entities.entries()) {
1371
+ if (index % 256 === 0) yield;
1372
+ referenced.add(evidence.context_id);
1373
+ const evidenceContext = contexts.get(evidence.context_id);
1374
+ if (evidenceContext === undefined) {
1375
+ context.addIssue({
1376
+ code: "custom",
1377
+ path: [
1378
+ entityKind,
1379
+ index,
1380
+ "evidence",
1381
+ "context_id"
1382
+ ],
1383
+ message: "Evidence reference names an absent context"
1384
+ });
1385
+ continue;
1386
+ }
1387
+ const { context_id: _contextId, ...evidenceValue } = evidenceContext;
1388
+ if (!applicationGraphEvidenceSchema.safeParse({
1389
+ ...evidenceValue,
1390
+ location: evidence.location
1391
+ }).success) context.addIssue({
1392
+ code: "custom",
1393
+ path: [
1394
+ entityKind,
1395
+ index,
1396
+ "evidence"
1397
+ ],
1398
+ message: "Evidence context is incompatible with its fact location"
1399
+ });
1400
+ }
1401
+ };
1402
+ yield* validateReferences(graph.nodes, "nodes");
1403
+ yield* validateReferences(graph.relations, "relations");
1404
+ yield* validateReferences(graph.unknowns, "unknowns");
1405
+ yield* validateReferences(graph.fingerprints, "fingerprints");
1406
+ for (const [index, evidenceContext] of graph.evidence_contexts.entries()) {
1407
+ if (index % 256 === 0) yield;
1408
+ const { context_id: identifier, ...value } = evidenceContext;
1409
+ if (identifier !== evidenceContextId(value)) context.addIssue({
1410
+ code: "custom",
1411
+ path: [
1412
+ "evidence_contexts",
1413
+ index,
1414
+ "context_id"
1415
+ ],
1416
+ message: "Evidence context identifier is stale"
1417
+ });
1418
+ if (!referenced.has(identifier)) context.addIssue({
1419
+ code: "custom",
1420
+ path: ["evidence_contexts", index],
1421
+ message: "Evidence context is not referenced by a graph fact"
1422
+ });
1423
+ }
1424
+ }
1425
+ function* checkNodesSteps(graph, nodes, context) {
1426
+ for (const [index, node] of graph.nodes.entries()) {
1427
+ if (index % 256 === 0) yield;
1428
+ if (node.node_id !== javaScriptSemanticNodeId(node)) context.addIssue({
1429
+ code: "custom",
1430
+ path: [
1431
+ "nodes",
1432
+ index,
1433
+ "node_id"
1434
+ ],
1435
+ message: "Node identifier is stale"
1436
+ });
1437
+ if (node.function_node_id !== null && nodes.get(node.function_node_id)?.kind !== "function") context.addIssue({
1438
+ code: "custom",
1439
+ path: [
1440
+ "nodes",
1441
+ index,
1442
+ "function_node_id"
1443
+ ],
1444
+ message: "Function owner must name a function node"
1445
+ });
1446
+ }
1447
+ }
1448
+ function* checkRootsSteps(graph, nodes, context) {
1449
+ for (const [index, root] of graph.root_node_ids.entries()) {
1450
+ if (index % 256 === 0) yield;
1451
+ if (!nodes.has(root)) context.addIssue({
1452
+ code: "custom",
1453
+ path: ["root_node_ids"],
1454
+ message: "Root identifier must name a semantic node"
1455
+ });
1456
+ }
1457
+ }
1458
+ function* checkRelationsSteps(graph, nodes, evidenceContexts, context) {
1459
+ for (const [index, relation] of graph.relations.entries()) {
1460
+ if (index % 256 === 0) yield;
1461
+ const { relation_id: identifier, ...semantic } = relation;
1462
+ if (identifier !== "jsrg_relation_" + digestCanonicalValue(semantic, "JavaScript semantic graph")) context.addIssue({
1463
+ code: "custom",
1464
+ path: [
1465
+ "relations",
1466
+ index,
1467
+ "relation_id"
1468
+ ],
1469
+ message: "Relation identifier is stale"
1470
+ });
1471
+ if (!nodes.has(relation.source_node_id) || !nodes.has(relation.target_node_id)) context.addIssue({
1472
+ code: "custom",
1473
+ path: ["relations", index],
1474
+ message: "Relation endpoints must name semantic nodes"
1475
+ });
1476
+ if (relation.source_node_id === relation.target_node_id) context.addIssue({
1477
+ code: "custom",
1478
+ path: ["relations", index],
1479
+ message: "Semantic relations cannot be self-referential"
1480
+ });
1481
+ if (relation.resolution === "candidate" && evidenceContexts.get(relation.evidence.context_id)?.state === "observed") context.addIssue({
1482
+ code: "custom",
1483
+ path: [
1484
+ "relations",
1485
+ index,
1486
+ "evidence",
1487
+ "state"
1488
+ ],
1489
+ message: "Candidate relations cannot claim observed resolution"
1490
+ });
1491
+ }
1492
+ }
1493
+ function* checkUnknownsSteps(graph, nodes, evidenceContexts, context) {
1494
+ for (const [index, unknown] of graph.unknowns.entries()) {
1495
+ if (index % 256 === 0) yield;
1496
+ const { unknown_id: identifier, ...semantic } = unknown;
1497
+ if (identifier !== "jsrg_unknown_" + digestCanonicalValue(semantic, "JavaScript semantic graph")) context.addIssue({
1498
+ code: "custom",
1499
+ path: [
1500
+ "unknowns",
1501
+ index,
1502
+ "unknown_id"
1503
+ ],
1504
+ message: "Unknown frontier identifier is stale"
1505
+ });
1506
+ if (unknown.node_id !== null && !nodes.has(unknown.node_id)) context.addIssue({
1507
+ code: "custom",
1508
+ path: [
1509
+ "unknowns",
1510
+ index,
1511
+ "node_id"
1512
+ ],
1513
+ message: "Unknown frontier node is absent"
1514
+ });
1515
+ if (unknown.candidate_node_ids.some((nodeId) => !nodes.has(nodeId))) context.addIssue({
1516
+ code: "custom",
1517
+ path: [
1518
+ "unknowns",
1519
+ index,
1520
+ "candidate_node_ids"
1521
+ ],
1522
+ message: "Unknown frontier candidate node is absent"
1523
+ });
1524
+ if (unknown.relation_kinds.some((kind) => JAVASCRIPT_SEMANTIC_RELATION_FAMILY[kind] !== unknown.family)) context.addIssue({
1525
+ code: "custom",
1526
+ path: [
1527
+ "unknowns",
1528
+ index,
1529
+ "relation_kinds"
1530
+ ],
1531
+ message: "Unknown relation kinds must belong to their declared family"
1532
+ });
1533
+ const evidenceState = evidenceContexts.get(unknown.evidence.context_id)?.state;
1534
+ if (evidenceState !== "unknown" && evidenceState !== "unavailable") context.addIssue({
1535
+ code: "custom",
1536
+ path: [
1537
+ "unknowns",
1538
+ index,
1539
+ "evidence",
1540
+ "state"
1541
+ ],
1542
+ message: "Unknown frontiers require unknown or unavailable evidence"
1543
+ });
1544
+ }
1545
+ }
1546
+ function* checkFingerprintsSteps(graph, nodes, context) {
1547
+ for (const [index, fingerprint] of graph.fingerprints.entries()) {
1548
+ if (index % 256 === 0) yield;
1549
+ if (nodes.get(fingerprint.function_node_id)?.kind !== "function") context.addIssue({
1550
+ code: "custom",
1551
+ path: [
1552
+ "fingerprints",
1553
+ index,
1554
+ "function_node_id"
1555
+ ],
1556
+ message: "Fingerprint must name a function node"
1557
+ });
1558
+ if (fingerprint.fingerprint_sha256 !== digestCanonicalValue(fingerprint.components, "JavaScript semantic graph")) context.addIssue({
1559
+ code: "custom",
1560
+ path: [
1561
+ "fingerprints",
1562
+ index,
1563
+ "fingerprint_sha256"
1564
+ ],
1565
+ message: "Fingerprint component commitment is stale"
1566
+ });
1567
+ const expectedIdentifier = "jsrg_fingerprint_" + digestCanonicalValue({
1568
+ function_node_id: fingerprint.function_node_id,
1569
+ algorithm: fingerprint.algorithm,
1570
+ fingerprint_sha256: fingerprint.fingerprint_sha256
1571
+ }, "JavaScript semantic graph");
1572
+ if (fingerprint.fingerprint_id !== expectedIdentifier) context.addIssue({
1573
+ code: "custom",
1574
+ path: [
1575
+ "fingerprints",
1576
+ index,
1577
+ "fingerprint_id"
1578
+ ],
1579
+ message: "Fingerprint identifier is stale"
1580
+ });
1581
+ if (fingerprint.status !== "complete" && fingerprint.limitations.length === 0) context.addIssue({
1582
+ code: "custom",
1583
+ path: [
1584
+ "fingerprints",
1585
+ index,
1586
+ "limitations"
1587
+ ],
1588
+ message: "Incomplete fingerprints require a limitation"
1589
+ });
1590
+ }
1591
+ }
1592
+ function* checkGraphContentSteps(graph, context) {
1593
+ checkCanonicalOrder(graph, context);
1594
+ yield* checkEvidenceContextReferencesSteps(graph, context);
1595
+ const evidenceContexts = new Map(graph.evidence_contexts.map((evidenceContext) => [evidenceContext.context_id, evidenceContext]));
1596
+ const nodes = new Map();
1597
+ for (const [index, node] of graph.nodes.entries()) {
1598
+ if (index % 256 === 0) yield;
1599
+ nodes.set(node.node_id, node);
1600
+ }
1601
+ yield* checkNodesSteps(graph, nodes, context);
1602
+ yield* checkRootsSteps(graph, nodes, context);
1603
+ yield* checkRelationsSteps(graph, nodes, evidenceContexts, context);
1604
+ yield* checkUnknownsSteps(graph, nodes, evidenceContexts, context);
1605
+ checkUnknownReferences(graph, context);
1606
+ yield* checkFingerprintsSteps(graph, nodes, context);
1607
+ yield* checkCoverageSteps(graph, context);
1608
+ if (graph.coverage.status !== "complete" && graph.limitations.length === 0) context.addIssue({
1609
+ code: "custom",
1610
+ path: ["limitations"],
1611
+ message: "Non-complete graph coverage requires a limitation"
1612
+ });
1613
+ }
1614
+ function* parseAndSealSemanticGraphSteps(container) {
1615
+ const issues = [];
1616
+ const parsed = {
1617
+ ...container,
1618
+ evidence_contexts: yield* parseElementSteps(semanticGraphShape.evidence_contexts.element, container.evidence_contexts, ["evidence_contexts"], issues),
1619
+ nodes: yield* parseElementSteps(semanticGraphShape.nodes.element, container.nodes, ["nodes"], issues),
1620
+ relations: yield* parseElementSteps(semanticGraphShape.relations.element, container.relations, ["relations"], issues),
1621
+ fingerprints: yield* parseElementSteps(semanticGraphShape.fingerprints.element, container.fingerprints, ["fingerprints"], issues),
1622
+ unknowns: yield* parseElementSteps(semanticGraphShape.unknowns.element, container.unknowns, ["unknowns"], issues)
1623
+ };
1624
+ if (issues.length > 0) throw new z.ZodError(issues);
1625
+ return yield* validateAndSealSemanticGraphSteps(normalizeGraphInput(parsed));
1626
+ }
1627
+ function* validateAndSealSemanticGraphSteps(semantic) {
1628
+ const graph = {
1629
+ ...semantic,
1630
+ graph_id: `jsrg_${yield* canonicalJsonDigestSteps(semantic)}`
1631
+ };
1632
+ const issues = [];
1633
+ yield* checkGraphContentSteps(graph, { addIssue: (issue) => {
1634
+ issues.push(issue);
1635
+ } });
1636
+ if (issues.length > 0) throw new z.ZodError(issues);
1637
+ yield* freezeOwnedJsonSnapshotSteps(graph);
1638
+ validatedImmutableSemanticGraphs.add(graph);
1639
+ return graph;
1640
+ }
1641
+ var normalizeEvidence, evidenceContextId, JavaScriptSemanticEvidenceContextRegistry, javaScriptSemanticNodeId, createJavaScriptSemanticGraphNode, createJavaScriptSemanticGraphRelation, createJavaScriptSemanticGraphUnknown, createJavaScriptSemanticFingerprint, sortedUniqueIssue, checkCanonicalOrder, checkUnknownReferences, checkGraphContent, checkGraph, javaScriptSemanticGraphSchema, resolveJavaScriptSemanticEvidence, normalizeGraphInput, createJavaScriptSemanticGraph, validatedImmutableSemanticGraphs, semanticGraphShape, semanticGraphContainerSchema, createImmutableJavaScriptSemanticGraphSteps, sealTransferredJavaScriptSemanticGraphSteps, isValidatedImmutableJavaScriptSemanticGraph;
1642
+ function init_javascriptSemanticGraph() {
1643
+ return (init_javascriptSemanticGraph = __esmMin((() => {
1644
+ init_comparisonSemantics();
1645
+ init_canonicalDigest();
1646
+ init_canonicalOrdering();
1647
+ init_unicodeCodePointOrder();
1648
+ init_canonicalJsonDigestSteps();
1649
+ init_immutableJson();
1650
+ init_zodCollectionSteps();
1651
+ init_javascriptApplicationEvidenceSchemas();
1652
+ init_javascriptSemanticGraphSchemas();
1653
+ normalizeEvidence = (evidence) => ({
1654
+ ...evidence,
1655
+ coverage: {
1656
+ ...evidence.coverage,
1657
+ limits: [...evidence.coverage.limits].sort((left, right) => compareUnicodeCodePoints(canonicalJson(left, "JavaScript semantic graph"), canonicalJson(right, "JavaScript semantic graph")))
1658
+ },
1659
+ limitations: uniqueSorted(evidence.limitations),
1660
+ evidence_ids: uniqueSorted(evidence.evidence_ids)
1661
+ });
1662
+ evidenceContextId = (context) => `jsrg_evidence_${digestCanonicalValue(context, "JavaScript semantic evidence context")}`;
1663
+ JavaScriptSemanticEvidenceContextRegistry = class {
1664
+ #contexts = new Map();
1665
+ #idsByCanonicalContext = new Map();
1666
+ /** Intern normalized non-location provenance at fact construction. */
1667
+ intern(evidence) {
1668
+ const normalized = normalizeEvidence(evidence);
1669
+ const { location, ...context } = normalized;
1670
+ const canonicalContext = canonicalJson(context, "JavaScript semantic graph");
1671
+ const internedId = this.#idsByCanonicalContext.get(canonicalContext);
1672
+ if (internedId !== undefined) return {
1673
+ context_id: internedId,
1674
+ location
1675
+ };
1676
+ const contextId = evidenceContextId(context);
1677
+ if (this.#contexts.has(contextId)) throw new TypeError("JavaScript semantic evidence context digest collision");
1678
+ this.#contexts.set(contextId, {
1679
+ ...context,
1680
+ context_id: contextId
1681
+ });
1682
+ this.#idsByCanonicalContext.set(canonicalContext, contextId);
1683
+ return {
1684
+ context_id: contextId,
1685
+ location
1686
+ };
1687
+ }
1688
+ /** Resolve one already interned fact reference for derived evidence. */
1689
+ resolve(reference) {
1690
+ const context = this.#contexts.get(reference.context_id);
1691
+ if (context === undefined) throw new TypeError("Semantic evidence reference names an absent context");
1692
+ const { context_id: _contextId, ...evidenceContext } = context;
1693
+ return {
1694
+ ...evidenceContext,
1695
+ location: reference.location
1696
+ };
1697
+ }
1698
+ /** Return the deterministic context table owned by this graph projection. */
1699
+ get contexts() {
1700
+ return [...this.#contexts.values()].sort((left, right) => compareUnicodeCodePoints(left.context_id, right.context_id));
1701
+ }
1702
+ /** Release interned contexts after the owning graph is finalized. */
1703
+ clear() {
1704
+ this.#contexts.clear();
1705
+ this.#idsByCanonicalContext.clear();
1706
+ }
1707
+ /** Validate and intern provenance decoded in this realm from an analysis worker. */
1708
+ adopt(input) {
1709
+ const context = javaScriptSemanticEvidenceContextSchema.parse(input);
1710
+ const { context_id: identifier, ...value } = context;
1711
+ if (identifier !== evidenceContextId(value)) throw new TypeError("Transferred semantic evidence context identifier is stale");
1712
+ const canonical = canonicalJson(value, "JavaScript semantic evidence context");
1713
+ const existing = this.#contexts.get(identifier);
1714
+ if (existing !== undefined) {
1715
+ const { context_id: _existingIdentifier, ...existingValue } = existing;
1716
+ if (canonical !== canonicalJson(existingValue, "JavaScript semantic evidence context")) throw new TypeError("Transferred semantic evidence context digest collision");
1717
+ }
1718
+ this.#contexts.set(identifier, context);
1719
+ this.#idsByCanonicalContext.set(canonical, identifier);
1720
+ }
1721
+ };
1722
+ javaScriptSemanticNodeId = (node) => `jsrg_node_${digestCanonicalValue({
1723
+ kind: node.kind,
1724
+ identity: node.identity
1725
+ }, "JavaScript semantic graph")}`;
1726
+ createJavaScriptSemanticGraphNode = (input, evidenceContexts) => {
1727
+ const parsed = javaScriptSemanticNodeInputSchema.parse(input);
1728
+ const semantic = {
1729
+ ...parsed,
1730
+ application_node_ids: uniqueSorted(parsed.application_node_ids),
1731
+ evidence: evidenceContexts.intern(parsed.evidence)
1732
+ };
1733
+ return {
1734
+ ...semantic,
1735
+ node_id: javaScriptSemanticNodeId(semantic)
1736
+ };
1737
+ };
1738
+ createJavaScriptSemanticGraphRelation = (input, evidenceContexts) => {
1739
+ const parsed = javaScriptSemanticRelationInputSchema.parse(input);
1740
+ const semantic = {
1741
+ ...parsed,
1742
+ evidence: evidenceContexts.intern(parsed.evidence)
1743
+ };
1744
+ return {
1745
+ ...semantic,
1746
+ relation_id: `jsrg_relation_${digestCanonicalValue(semantic, "JavaScript semantic graph")}`
1747
+ };
1748
+ };
1749
+ createJavaScriptSemanticGraphUnknown = (input, evidenceContexts) => {
1750
+ const parsed = javaScriptSemanticUnknownInputSchema.parse(input);
1751
+ const semantic = {
1752
+ ...parsed,
1753
+ relation_kinds: uniqueSorted(parsed.relation_kinds),
1754
+ candidate_node_ids: uniqueSorted(parsed.candidate_node_ids),
1755
+ evidence: evidenceContexts.intern(parsed.evidence)
1756
+ };
1757
+ return {
1758
+ ...semantic,
1759
+ unknown_id: `jsrg_unknown_${digestCanonicalValue(semantic, "JavaScript semantic graph")}`
1760
+ };
1761
+ };
1762
+ createJavaScriptSemanticFingerprint = (input, evidenceContexts) => {
1763
+ const parsed = javaScriptSemanticFingerprintInputSchema.parse(input);
1764
+ const semantic = {
1765
+ ...parsed,
1766
+ components: {
1767
+ ...parsed.components,
1768
+ effects: uniqueSorted(parsed.components.effects)
1769
+ },
1770
+ limitations: uniqueSorted(parsed.limitations),
1771
+ evidence: evidenceContexts.intern(parsed.evidence)
1772
+ };
1773
+ const fingerprintSha256 = digestCanonicalValue(semantic.components, "JavaScript semantic graph");
1774
+ return {
1775
+ ...semantic,
1776
+ fingerprint_sha256: fingerprintSha256,
1777
+ fingerprint_id: `jsrg_fingerprint_${digestCanonicalValue({
1778
+ function_node_id: semantic.function_node_id,
1779
+ algorithm: semantic.algorithm,
1780
+ fingerprint_sha256: fingerprintSha256
1781
+ }, "JavaScript semantic graph")}`
1782
+ };
1783
+ };
1784
+ sortedUniqueIssue = (values, path, label, context) => {
1785
+ for (let index = 1; index < values.length; index += 1) {
1786
+ if (compareUnicodeCodePoints(values[index - 1] ?? "", values[index] ?? "") < 0) continue;
1787
+ context.addIssue({
1788
+ code: "custom",
1789
+ path: [...path, index],
1790
+ message: `${label} must be sorted and unique`
1791
+ });
1792
+ return;
1793
+ }
1794
+ };
1795
+ checkCanonicalOrder = (graph, context) => {
1796
+ sortedUniqueIssue(graph.root_node_ids, ["root_node_ids"], "Root nodes", context);
1797
+ sortedUniqueIssue(graph.evidence_contexts.map(({ context_id }) => context_id), ["evidence_contexts"], "Evidence contexts", context);
1798
+ sortedUniqueIssue(graph.nodes.map(({ node_id }) => node_id), ["nodes"], "Nodes", context);
1799
+ sortedUniqueIssue(graph.relations.map(({ relation_id }) => relation_id), ["relations"], "Relations", context);
1800
+ sortedUniqueIssue(graph.fingerprints.map(({ fingerprint_id }) => fingerprint_id), ["fingerprints"], "Fingerprints", context);
1801
+ sortedUniqueIssue(graph.unknowns.map(({ unknown_id }) => unknown_id), ["unknowns"], "Unknown frontiers", context);
1802
+ sortedUniqueIssue(graph.limitations, ["limitations"], "Limitations", context);
1803
+ };
1804
+ checkUnknownReferences = (graph, context) => {
1805
+ const unknownIds = new Set(graph.unknowns.map(({ unknown_id }) => unknown_id));
1806
+ for (const [index, family] of graph.coverage.families.entries()) if (family.unknown_ids.some((identifier) => !unknownIds.has(identifier))) context.addIssue({
1807
+ code: "custom",
1808
+ path: [
1809
+ "coverage",
1810
+ "families",
1811
+ index,
1812
+ "unknown_ids"
1813
+ ],
1814
+ message: "Family coverage references an absent unknown frontier"
1815
+ });
1816
+ };
1817
+ checkGraphContent = (graph, context) => {
1818
+ const steps = checkGraphContentSteps(graph, context);
1819
+ while (!steps.next().done) {}
1820
+ };
1821
+ checkGraph = (graph, context) => {
1822
+ checkGraphContent(graph, context);
1823
+ const { graph_id: identifier, ...semantic } = graph;
1824
+ if (identifier !== "jsrg_" + digestCanonicalValue(semantic, "JavaScript semantic graph")) context.addIssue({
1825
+ code: "custom",
1826
+ path: ["graph_id"],
1827
+ message: "Graph identifier is stale"
1828
+ });
1829
+ };
1830
+ javaScriptSemanticGraphSchema = javaScriptSemanticGraphRecordSchema.superRefine(checkGraph);
1831
+ resolveJavaScriptSemanticEvidence = (graph, reference) => {
1832
+ const context = graph.evidence_contexts.find(({ context_id }) => context_id === reference.context_id);
1833
+ if (context === undefined) throw new TypeError("Semantic evidence reference names an absent context");
1834
+ const { context_id: _contextId, ...evidenceContext } = context;
1835
+ return {
1836
+ ...evidenceContext,
1837
+ location: reference.location
1838
+ };
1839
+ };
1840
+ normalizeGraphInput = (parsed) => ({
1841
+ ...parsed,
1842
+ root_node_ids: uniqueSorted(parsed.root_node_ids),
1843
+ evidence_contexts: [...parsed.evidence_contexts].sort((left, right) => compareUnicodeCodePoints(left.context_id, right.context_id)),
1844
+ nodes: [...parsed.nodes].sort((left, right) => compareUnicodeCodePoints(left.node_id, right.node_id)),
1845
+ relations: [...parsed.relations].sort((left, right) => compareUnicodeCodePoints(left.relation_id, right.relation_id)),
1846
+ fingerprints: [...parsed.fingerprints].sort((left, right) => compareUnicodeCodePoints(left.fingerprint_id, right.fingerprint_id)),
1847
+ unknowns: [...parsed.unknowns].sort((left, right) => compareUnicodeCodePoints(left.unknown_id, right.unknown_id)),
1848
+ coverage: {
1849
+ ...parsed.coverage,
1850
+ limits: [...parsed.coverage.limits].sort((left, right) => compareUnicodeCodePoints(canonicalJson(left, "JavaScript semantic graph"), canonicalJson(right, "JavaScript semantic graph"))),
1851
+ ...parsed.coverage.omitted_unknown_occurrences === undefined ? {} : { omitted_unknown_occurrences: [...parsed.coverage.omitted_unknown_occurrences].sort((left, right) => compareUnicodeCodePoints(`${left.family}:${left.reason}`, `${right.family}:${right.reason}`)) },
1852
+ families: [...parsed.coverage.families].map((family) => ({
1853
+ ...family,
1854
+ unknown_ids: uniqueSorted(family.unknown_ids)
1855
+ })).sort((left, right) => compareUnicodeCodePoints(left.family, right.family))
1856
+ },
1857
+ limitations: uniqueSorted(parsed.limitations)
1858
+ });
1859
+ createJavaScriptSemanticGraph = (input) => {
1860
+ const semantic = normalizeGraphInput(javaScriptSemanticGraphInputSchema.parse(input));
1861
+ const record = {
1862
+ ...semantic,
1863
+ graph_id: `jsrg_${digestCanonicalValue(semantic, "JavaScript semantic graph")}`
1864
+ };
1865
+ const issues = [];
1866
+ checkGraphContent(record, { addIssue: (issue) => {
1867
+ issues.push(issue);
1868
+ } });
1869
+ if (issues.length > 0) throw new z.ZodError(issues);
1870
+ return record;
1871
+ };
1872
+ validatedImmutableSemanticGraphs = new WeakSet();
1873
+ semanticGraphShape = javaScriptSemanticGraphInputSchema.shape;
1874
+ semanticGraphContainerSchema = javaScriptSemanticGraphInputSchema.extend({
1875
+ evidence_contexts: arrayContainerSchema(semanticGraphShape.evidence_contexts),
1876
+ nodes: arrayContainerSchema(semanticGraphShape.nodes),
1877
+ relations: arrayContainerSchema(semanticGraphShape.relations),
1878
+ fingerprints: arrayContainerSchema(semanticGraphShape.fingerprints),
1879
+ unknowns: arrayContainerSchema(semanticGraphShape.unknowns)
1880
+ });
1881
+ createImmutableJavaScriptSemanticGraphSteps = (input) => validateAndSealSemanticGraphSteps(normalizeGraphInput(javaScriptSemanticGraphInputSchema.parse(input)));
1882
+ sealTransferredJavaScriptSemanticGraphSteps = (input) => parseAndSealSemanticGraphSteps(semanticGraphContainerSchema.parse(input));
1883
+ isValidatedImmutableJavaScriptSemanticGraph = (value) => typeof value === "object" && value !== null && validatedImmutableSemanticGraphs.has(value);
1884
+ })))();
1885
+ }
1886
+
1887
+ //#endregion
1888
+ //#region dist/domain/artifactIntegrityPolicy.js
1889
+ var artifactIntegrityPolicySchema;
1890
+ function init_artifactIntegrityPolicy() {
1891
+ return (init_artifactIntegrityPolicy = __esmMin((() => {
1892
+ artifactIntegrityPolicySchema = z.enum(["fail", "record-and-continue"]).default("fail");
1893
+ })))();
1894
+ }
1895
+
1896
+ //#endregion
1897
+ //#region dist/domain/javascript/javascriptAnalysisResourceControls.js
1898
+ var JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS, JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM, javaScriptAnalysisCoverageLimits, javaScriptAnalysisResourceControlsSchema;
1899
+ function init_javascriptAnalysisResourceControls() {
1900
+ return (init_javascriptAnalysisResourceControls = __esmMin((() => {
1901
+ JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS = {
1902
+ heapMb: 1024,
1903
+ timeoutMs: 3e5,
1904
+ semanticNodes: 1e5,
1905
+ semanticNodesPerFile: 2e4,
1906
+ semanticUnknowns: 1e5,
1907
+ semanticUnknownsPerFile: 2e4
1908
+ };
1909
+ JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM = 1e6;
1910
+ javaScriptAnalysisCoverageLimits = (limits) => {
1911
+ const result = [];
1912
+ for (const key of [
1913
+ "worker_heap_limit_bytes",
1914
+ "worker_process_memory_limit_bytes",
1915
+ "worker_timeout_ms",
1916
+ "parent_result_budget_bytes",
1917
+ "parent_available_result_budget_bytes",
1918
+ "semantic_result_budget_bytes",
1919
+ "transfer_record_bytes",
1920
+ "transfer_file_bytes"
1921
+ ]) {
1922
+ const value = limits?.[key];
1923
+ if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0) continue;
1924
+ result.push({
1925
+ name: `javascript_analysis_${key}`,
1926
+ value,
1927
+ unit: key.endsWith("_ms") ? "milliseconds" : "bytes"
1928
+ });
1929
+ }
1930
+ return result;
1931
+ };
1932
+ javaScriptAnalysisResourceControlsSchema = z.strictObject({
1933
+ max_semantic_nodes: z.number().int().min(1).max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM).optional().describe("Maximum retained semantic nodes across the application; defaults to 100000. Worker heap and parent result admission remain enforced."),
1934
+ max_semantic_nodes_per_file: z.number().int().min(1).max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM).optional().describe("Maximum retained semantic nodes per source file; defaults to 20000, additionally bounded by max_semantic_nodes and memory/transfer limits."),
1935
+ max_semantic_unknowns: z.number().int().min(1).max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM).optional().describe("Maximum retained semantic unknown records across the application; defaults to 100000. Omitted emission occurrences are counted by family and reason."),
1936
+ max_semantic_unknowns_per_file: z.number().int().min(1).max(JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM).optional().describe("Maximum retained semantic unknown records per source file; defaults to 20000, additionally bounded by max_semantic_unknowns and memory/transfer limits."),
1937
+ max_heap_mb: z.number().int().min(128).max(16384).optional().describe("Maximum V8 old-space heap in MiB for the isolated JavaScript source analyzer; defaults to 1024. This does not change the CLI/MCP process heap. When REA runs on Bun, which ignores V8 heap flags, Windows instead limits the analyzer's committed memory to this budget plus a 512 MiB runtime reserve; other Bun hosts enforce no limit."),
1938
+ analysis_timeout_ms: z.number().int().min(1).max(2147483647).optional().describe("Maximum startup, analysis and transfer time per JavaScript source, in milliseconds; defaults to 300000. On timeout, return collected partial Evidence and stop the analysis.")
1939
+ });
1940
+ })))();
1941
+ }
1942
+
1943
+ //#endregion
1944
+ //#region dist/domain/javascript/javascriptApplicationAnalysis.js
1945
+ function* checkApplicationBindingsSteps(result, context) {
1946
+ if (result.semantic_graph.application_graph_id !== result.graph.graph_id) context.addIssue({
1947
+ code: "custom",
1948
+ path: ["semantic_graph", "application_graph_id"],
1949
+ message: "Semantic graph must commit the containing application graph"
1950
+ });
1951
+ if (result.semantic_graph.root_artifact_sha256 !== result.root_artifact_sha256) context.addIssue({
1952
+ code: "custom",
1953
+ path: ["semantic_graph", "root_artifact_sha256"],
1954
+ message: "Semantic graph must commit the containing root artifact"
1955
+ });
1956
+ const applicationNodeIds = new Set();
1957
+ let examined = 0;
1958
+ try {
1959
+ for (const node of result.graph.nodes) {
1960
+ applicationNodeIds.add(node.node_id);
1961
+ if (++examined === 4096) {
1962
+ examined = 0;
1963
+ yield;
1964
+ }
1965
+ }
1966
+ for (const [nodeIndex, node] of result.semantic_graph.nodes.entries()) {
1967
+ if (++examined === 4096) {
1968
+ examined = 0;
1969
+ yield;
1970
+ }
1971
+ for (const [identifierIndex, identifier] of node.application_node_ids.entries()) {
1972
+ if (!applicationNodeIds.has(identifier)) context.addIssue({
1973
+ code: "custom",
1974
+ path: [
1975
+ "semantic_graph",
1976
+ "nodes",
1977
+ nodeIndex,
1978
+ "application_node_ids",
1979
+ identifierIndex
1980
+ ],
1981
+ message: "Semantic node references an absent application node"
1982
+ });
1983
+ if (++examined === 4096) {
1984
+ examined = 0;
1985
+ yield;
1986
+ }
1987
+ }
1988
+ }
1989
+ } finally {
1990
+ applicationNodeIds.clear();
1991
+ }
1992
+ }
1993
+ /** Reuse exact owned graphs while validating metadata and cross-graph bindings. */
1994
+ function* parseOwnedJavaScriptApplicationAnalysisSteps(input) {
1995
+ const prepared = ownedAnalysisResultShape.safeParse(input);
1996
+ if (!prepared.success) return javascriptApplicationAnalysisResultSchema.parse(input);
1997
+ const issues = [];
1998
+ yield* checkApplicationBindingsSteps(prepared.data, { addIssue: (issue) => {
1999
+ issues.push(issue);
2000
+ } });
2001
+ if (issues.length > 0) throw new z.ZodError(issues);
2002
+ return prepared.data;
2003
+ }
2004
+ var countSchema, analyzeJavaScriptApplicationInputSchema, electronBoundarySummarySchema, reconstructionStatisticsSchema, applicationAnalysisResultShape, javascriptApplicationAnalysisResultSchema, ownedAnalysisResultShape;
2005
+ function init_javascriptApplicationAnalysis() {
2006
+ return (init_javascriptApplicationAnalysis = __esmMin((() => {
2007
+ init_javascriptApplicationGraph();
2008
+ init_javascriptSemanticGraph();
2009
+ init_digests();
2010
+ init_artifactGraph();
2011
+ init_artifactIntegrityPolicy();
2012
+ init_localPath();
2013
+ init_javascriptAnalysisResourceControls();
2014
+ init_javascriptSourceSelection();
2015
+ countSchema = z.number().int().min(0);
2016
+ analyzeJavaScriptApplicationInputSchema = z.strictObject({
2017
+ input_path: localPathStringSchema,
2018
+ format: z.enum([
2019
+ "auto",
2020
+ "asar",
2021
+ "directory"
2022
+ ]).default("auto"),
2023
+ integrity_policy: artifactIntegrityPolicySchema,
2024
+ source_paths: javaScriptSourcePathsSchema.optional(),
2025
+ ...javaScriptAnalysisResourceControlsSchema.shape
2026
+ });
2027
+ electronBoundarySummarySchema = z.strictObject({
2028
+ browser_windows: countSchema,
2029
+ explicit_web_preferences: countSchema,
2030
+ preload_entrypoints: countSchema,
2031
+ context_bridge_apis: countSchema,
2032
+ exposed_api_members: countSchema,
2033
+ ipc: z.strictObject({
2034
+ operations: countSchema,
2035
+ literal_channels: countSchema,
2036
+ dynamic_channel_operations: countSchema,
2037
+ renderer_transmissions: countSchema,
2038
+ renderer_listeners: countSchema,
2039
+ main_handlers: countSchema,
2040
+ paired_renderer_transmissions: countSchema,
2041
+ ambiguous_renderer_transmissions: countSchema,
2042
+ unpaired_literal_renderer_transmissions: countSchema
2043
+ }),
2044
+ sender_validation_observations: countSchema,
2045
+ utility_processes: countSchema,
2046
+ resolved_utility_entrypoints: countSchema,
2047
+ native_addon_bindings: countSchema,
2048
+ resolved_native_addon_bindings: countSchema
2049
+ });
2050
+ reconstructionStatisticsSchema = z.strictObject({
2051
+ relevant_files: countSchema,
2052
+ nested_asar_containers: countSchema,
2053
+ text_bytes_read: countSchema,
2054
+ invalid_utf8_files: countSchema,
2055
+ parsed_javascript_files: countSchema,
2056
+ skipped_javascript_files: countSchema.exactOptional(),
2057
+ visited_ast_nodes: countSchema,
2058
+ findings: countSchema,
2059
+ modules: countSchema,
2060
+ parse_failures: countSchema
2061
+ });
2062
+ applicationAnalysisResultShape = z.strictObject({
2063
+ input_path: z.string().min(1),
2064
+ format: z.enum(["asar", "directory"]),
2065
+ root_artifact_sha256: digestSchema,
2066
+ inventory_manifest_id: prefixedDigestSchema("agm"),
2067
+ inventory_graph_sha256: digestSchema,
2068
+ integrity_contradictions: z.array(integrityContradictionSchema),
2069
+ source_selection: javaScriptSourceSelectionSchema.exactOptional(),
2070
+ graph: javascriptApplicationGraphSchema,
2071
+ summary: electronBoundarySummarySchema,
2072
+ statistics: reconstructionStatisticsSchema,
2073
+ limitations: z.array(z.string().min(1)),
2074
+ semantic_graph: javaScriptSemanticGraphSchema
2075
+ });
2076
+ javascriptApplicationAnalysisResultSchema = applicationAnalysisResultShape.superRefine((result, context) => {
2077
+ const steps = checkApplicationBindingsSteps(result, context);
2078
+ while (!steps.next().done) {}
2079
+ });
2080
+ ownedAnalysisResultShape = applicationAnalysisResultShape.extend({
2081
+ graph: z.custom(isValidatedImmutableJavaScriptApplicationGraph),
2082
+ semantic_graph: z.custom(isValidatedImmutableJavaScriptSemanticGraph)
2083
+ });
2084
+ })))();
2085
+ }
2086
+
2087
+ //#endregion
2088
+ export { JAVASCRIPT_ANALYSIS_RESOURCE_DEFAULTS, JAVASCRIPT_APPLICATION_NODE_KINDS, JAVASCRIPT_SEMANTIC_ITEM_MAXIMUM, JAVASCRIPT_SEMANTIC_NODE_KINDS, JAVASCRIPT_SEMANTIC_RELATIONS, JAVASCRIPT_SEMANTIC_RELATION_FAMILIES, JAVASCRIPT_SEMANTIC_RELATION_FAMILY, JavaScriptSemanticEvidenceContextRegistry, analyzeJavaScriptApplicationInputSchema, applicationCoverageSchema, applicationGraphEvidenceSchema, applicationNodeIdentitySchema, applicationNodeObservationSchema, applicationNodeSchema, artifactIntegrityPolicySchema, completeApplicationCoverage, createImmutableJavaScriptApplicationGraphSteps, createJavaScriptApplicationEdge, createJavaScriptApplicationGraph, createJavaScriptApplicationNode, createJavaScriptSemanticFingerprint, createJavaScriptSemanticGraph, createJavaScriptSemanticGraphNode, createJavaScriptSemanticGraphRelation, createJavaScriptSemanticGraphUnknown, init_artifactIntegrityPolicy, init_javascriptAnalysisResourceControls, init_javascriptApplicationAnalysis, init_javascriptApplicationEvidenceSchemas, init_javascriptApplicationGraph, init_javascriptApplicationGraphSchemas, init_javascriptSemanticGraph, init_javascriptSemanticGraphSchemas, init_javascriptSourceMapPaths, init_javascriptSourceSelection, isValidatedImmutableJavaScriptApplicationGraph, javaScriptAnalysisCoverageLimits, javaScriptAnalysisResourceControlsSchema, javaScriptSemanticEvidenceContextSchema, javaScriptSemanticFingerprintSchema, javaScriptSemanticGraphInputSchema, javaScriptSemanticNodeId, javaScriptSemanticNodeSchema, javaScriptSemanticRelationSchema, javaScriptSemanticUnknownOmissionsSchema, javaScriptSemanticUnknownSchema, javaScriptSourcePathsSchema, javaScriptSourceSelectionSchema, javascriptApplicationAnalysisResultSchema, javascriptApplicationGraphSchema, parseOwnedJavaScriptApplicationAnalysisSteps, partialApplicationCoverage, resolveJavaScriptSourceMapReferences, resolveJavaScriptSourceMapUrl, sealTransferredJavaScriptApplicationGraphSteps, sealTransferredJavaScriptSemanticGraphSteps, truncatedApplicationCoverage };