reverseport 0.0.0-stage → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DISCLAIMER.md +136 -0
- package/LICENSE +22 -0
- package/README.md +289 -2
- package/RESPONSIBLE-USE.md +22 -0
- package/THIRD_PARTY_NOTICES.md +130 -0
- package/bin/reverseport.mjs +136 -0
- package/bridge/android/ReaJadxBridge.java +270 -0
- package/bridge/ghidra/ReaGhidraAnalysisOptions.java +38 -0
- package/bridge/ghidra/ReaGhidraApplySeeds.java +151 -0
- package/bridge/ghidra/ReaGhidraBridge.java +3858 -0
- package/bridge/ghidra/ReaGhidraBundleActivator.java +14 -0
- package/bridge/ghidra/ReaGhidraExtensions.java +113 -0
- package/bridge/ghidra/ReaGhidraMipsSoftFloat.java +176 -0
- package/bridge/ghidra/ReaGhidraNoReturnFix.java +123 -0
- package/bridge/ghidra/ReaGhidraPrepareCom.java +32 -0
- package/bridge/ghidra/ReaGhidraPrepareRaw.java +36 -0
- package/bridge/hopper_bridge.py +1162 -0
- package/bridge/mitmproxy/capture.py +208 -0
- package/bridge/native/NativeUIChildren.swift +27 -0
- package/bridge/native/ReaNativeUI.swift +171 -0
- package/bridge/native/rea_lldb_tracer.py +839 -0
- package/bridge/process/ProcessRunTokenReader.swift +339 -0
- package/bridge/process/ProcessRunTokenReaderMain.swift +35 -0
- package/bridge/pwndbg/core_context.py +101 -0
- package/bridge/pwndbg/launch.py +39 -0
- package/bridge/pwndbg/launch_impl.py +34 -0
- package/bridge/pwntools/decoder_runtime.py +59 -0
- package/bridge/pwntools/layout.py +39 -0
- package/bridge/pwntools/layout_impl.py +314 -0
- package/bridge/pwntools/recorded_crash.py +39 -0
- package/bridge/pwntools/recorded_crash_impl.py +147 -0
- package/dist/adb/AdbConfiguration.js +88 -0
- package/dist/adb/AdbDeviceOutput.js +191 -0
- package/dist/adb/AdbDirectoryListing.js +80 -0
- package/dist/adb/AdbHostFileName.js +34 -0
- package/dist/adb/AdbProvider.js +1227 -0
- package/dist/adb/AdbShellOutput.js +267 -0
- package/dist/android/AndroidTargetSnapshot.js +118 -0
- package/dist/android/JadxAnalysis.js +201 -0
- package/dist/android/JadxConfiguration.js +320 -0
- package/dist/android/JadxMcpTransport.js +188 -0
- package/dist/android/JadxProtocol.js +115 -0
- package/dist/android/JadxProvider.js +337 -0
- package/dist/android/JadxRelease.js +27 -0
- package/dist/android/JadxSession.js +172 -0
- package/dist/apktool/ApktoolConfiguration.js +120 -0
- package/dist/apktool/ApktoolDecodeOutput.js +142 -0
- package/dist/apktool/ApktoolProvider.js +522 -0
- package/dist/application/AnalysisContextQueries.js +128 -0
- package/dist/application/AnalysisDocument.js +32 -0
- package/dist/application/AnalysisProvider.js +27 -0
- package/dist/application/AppBundleExecutable.js +192 -0
- package/dist/application/BinaryTargetResolver.js +356 -0
- package/dist/application/BrowserEvidence.js +127 -0
- package/dist/application/BrowserObservationPort.js +1 -0
- package/dist/application/BrowserObservationService.js +86 -0
- package/dist/application/BrowserScenarioCapturePort.js +1 -0
- package/dist/application/BrowserScenarioCaptureService.js +17 -0
- package/dist/application/BrowserScenarioEvidence.js +28 -0
- package/dist/application/CallPathTracing.js +182 -0
- package/dist/application/CapabilityClientRequirements.js +17 -0
- package/dist/application/CapabilityInventory.js +525 -0
- package/dist/application/ClientConfigPath.js +35 -0
- package/dist/application/ClientConfigurationDocument.js +1196 -0
- package/dist/application/ClientConfigurationFiles.js +91 -0
- package/dist/application/ClientRegistrationEnvironment.js +39 -0
- package/dist/application/ClientRegistrationIdentity.js +80 -0
- package/dist/application/ClientRegistrationStatus.js +233 -0
- package/dist/application/DirectAnalysis.js +371 -0
- package/dist/application/DirectAnalysisCleanup.js +71 -0
- package/dist/application/DirectAnalysisDependencies.js +1 -0
- package/dist/application/DirectAnalysisStatus.js +22 -0
- package/dist/application/Doctor.js +349 -0
- package/dist/application/DoctorDiagnostics.js +169 -0
- package/dist/application/DoctorProviderIds.js +2 -0
- package/dist/application/DoctorScope.js +113 -0
- package/dist/application/DshCordisPatch.js +342 -0
- package/dist/application/DshCordisYaml.js +155 -0
- package/dist/application/EnhancedLiteralTracing.js +88 -0
- package/dist/application/EnhancedToolTypes.js +4 -0
- package/dist/application/EnhancedTools.js +428 -0
- package/dist/application/EvidenceBundleCommands.js +70 -0
- package/dist/application/EvidenceBundleFiles.js +79 -0
- package/dist/application/EvidenceInputResolver.js +30 -0
- package/dist/application/FunctionAnalysisEvidence.js +34 -0
- package/dist/application/GeminiClientSettings.js +139 -0
- package/dist/application/HermesClientHome.js +115 -0
- package/dist/application/HopperDownload.js +39 -0
- package/dist/application/InventoryProjectionEvidence.js +44 -0
- package/dist/application/InvestigationProviders.js +130 -0
- package/dist/application/JsonFiles.js +225 -0
- package/dist/application/JsonInputFile.js +410 -0
- package/dist/application/LinuxHopper.js +232 -0
- package/dist/application/MacHopper.js +235 -0
- package/dist/application/MipsElfMetadata.js +175 -0
- package/dist/application/MipsElfSharedLoad.js +164 -0
- package/dist/application/OptionalObservationProviders.js +3 -0
- package/dist/application/ProcedureAddressResolution.js +11 -0
- package/dist/application/ProgressReporter.js +30 -0
- package/dist/application/ProviderOperationExecution.js +31 -0
- package/dist/application/RealHopperAssertions.js +135 -0
- package/dist/application/ReconstructionCoverageService.js +22 -0
- package/dist/application/ReconstructionObligationAuthority.js +72 -0
- package/dist/application/ReconstructionObligationCandidates.js +286 -0
- package/dist/application/ReconstructionObligationLedgerDiagnostics.js +47 -0
- package/dist/application/ReconstructionObligationLedgerEvaluation.js +238 -0
- package/dist/application/ReconstructionObligationLedgerProjection.js +15 -0
- package/dist/application/ReconstructionObligationLedgerService.js +54 -0
- package/dist/application/ReconstructionObligationOriginalCases.js +34 -0
- package/dist/application/ReconstructionObligationPolicies.js +132 -0
- package/dist/application/ReferenceSourceImport.js +200 -0
- package/dist/application/ReferenceSourceImportEntries.js +151 -0
- package/dist/application/ReferenceSourceImportPolicy.js +125 -0
- package/dist/application/ReferenceSourceImportTypes.js +47 -0
- package/dist/application/ReferenceSourceVcsAdapter.js +180 -0
- package/dist/application/RegularFileRead.js +120 -0
- package/dist/application/Setup.js +408 -0
- package/dist/application/SetupClientConfiguration.js +314 -0
- package/dist/application/SetupClients.js +44 -0
- package/dist/application/SetupHost.js +203 -0
- package/dist/application/SetupInstallFailure.js +77 -0
- package/dist/application/SetupPlan.js +210 -0
- package/dist/application/SetupRegistrationEnvironment.js +5 -0
- package/dist/application/SetupSkill.js +248 -0
- package/dist/application/SetupTypes.js +17 -0
- package/dist/application/SupportedClients.js +469 -0
- package/dist/application/TypeScriptEmittedSourceCandidates.js +23 -0
- package/dist/application/Uninstall.js +452 -0
- package/dist/application/UninstallFailure.js +14 -0
- package/dist/application/Update.js +137 -0
- package/dist/application/UpdateFailure.js +17 -0
- package/dist/application/UpdateMaintenance.js +111 -0
- package/dist/application/UpdateRuntime.js +264 -0
- package/dist/application/Utf8JsonInput.js +71 -0
- package/dist/application/ValidateSelectedWebScript.js +27 -0
- package/dist/application/WebModulePorts.js +1 -0
- package/dist/application/WebModuleTraceService.js +214 -0
- package/dist/application/WebNetworkCapturePort.js +1 -0
- package/dist/application/WebNetworkCaptureService.js +134 -0
- package/dist/application/WebRuntimePort.js +1 -0
- package/dist/application/WebRuntimeService.js +75 -0
- package/dist/application/WebScriptArtifactPort.js +1 -0
- package/dist/application/WebScriptExportService.js +214 -0
- package/dist/application/WebSourceLocationPorts.js +1 -0
- package/dist/application/WebSourceLocationService.js +177 -0
- package/dist/application/WindowsCapabilities.js +87 -0
- package/dist/application/WorkflowEvidence.js +105 -0
- package/dist/application/XrefsAddressResolution.js +45 -0
- package/dist/application/adb/AdbDeviceAnalysisPort.js +1 -0
- package/dist/application/adb/AdbDeviceAnalysisService.js +13 -0
- package/dist/application/analysisView/AnalysisViewService.js +133 -0
- package/dist/application/android/AndroidAnalysisPort.js +1 -0
- package/dist/application/android/AndroidAnalysisService.js +37 -0
- package/dist/application/android/AndroidApplicationService.js +17 -0
- package/dist/application/android/AndroidSearchEvidenceSummary.js +100 -0
- package/dist/application/apktool/ApktoolResourceAnalysisPort.js +1 -0
- package/dist/application/apktool/ApktoolResourceAnalysisService.js +13 -0
- package/dist/application/apple/AppleApplicationService.js +17 -0
- package/dist/application/artifacts/ArtifactExtractionDestination.js +5 -0
- package/dist/application/binary/AbortablePromise.js +28 -0
- package/dist/application/binary/AnalysisClientCleanup.js +15 -0
- package/dist/application/binary/AnalysisProviderEvaluation.js +77 -0
- package/dist/application/binary/AnalysisProviderRegistry.js +235 -0
- package/dist/application/binary/AnalysisSnapshotCache.js +232 -0
- package/dist/application/binary/AnalysisSnapshotFiles.js +96 -0
- package/dist/application/binary/BinarySession.js +605 -0
- package/dist/application/binary/BinarySessionComposition.js +9 -0
- package/dist/application/binary/BinarySessionExecution.js +66 -0
- package/dist/application/binary/BinarySessionOpen.js +66 -0
- package/dist/application/binary/BinarySessionPort.js +1 -0
- package/dist/application/binary/BinarySessionRecords.js +216 -0
- package/dist/application/binary/BinarySessionStatus.js +219 -0
- package/dist/application/binary/BinaryTargetSummary.js +9 -0
- package/dist/application/binary/CompositeProvider.js +103 -0
- package/dist/application/binary/LazyAnalysisProvider.js +105 -0
- package/dist/application/binary/SessionProviderRouter.js +118 -0
- package/dist/application/binaryDiagnostics/BinaryLayoutPort.js +1 -0
- package/dist/application/binaryDiagnostics/BinaryLayoutService.js +60 -0
- package/dist/application/binaryDiagnostics/PeResourcesPort.js +1 -0
- package/dist/application/binaryDiagnostics/PeResourcesService.js +111 -0
- package/dist/application/binaryDiagnostics/RecordedCrashPort.js +1 -0
- package/dist/application/binaryDiagnostics/RecordedCrashService.js +63 -0
- package/dist/application/evm/EvmInterfacePort.js +1 -0
- package/dist/application/evm/EvmInterfaceService.js +67 -0
- package/dist/application/firmware/FirmwareAnalysisPort.js +1 -0
- package/dist/application/firmware/FirmwareAnalysisService.js +38 -0
- package/dist/application/go/GoBinaryPort.js +1 -0
- package/dist/application/go/GoBinaryService.js +77 -0
- package/dist/application/harmony/HarmonyApplicationService.js +17 -0
- package/dist/application/homebrew.js +67 -0
- package/dist/application/investigation/EvidenceLedger.js +338 -0
- package/dist/application/investigation/InspectEvidenceBundle.js +18 -0
- package/dist/application/investigation/InvestigationRecordPort.js +1 -0
- package/dist/application/investigation/InvestigationRecords.js +65 -0
- package/dist/application/investigation/UnknownEvidence.js +37 -0
- package/dist/application/javascript/ElectronActiveEvidence.js +29 -0
- package/dist/application/javascript/ElectronActiveObservationPort.js +1 -0
- package/dist/application/javascript/ElectronActiveObservationService.js +51 -0
- package/dist/application/javascript/ElectronBoundaryAnalysis.js +118 -0
- package/dist/application/javascript/ElectronBoundaryGraph.js +11 -0
- package/dist/application/javascript/ElectronBoundaryGraphCallPaths.js +134 -0
- package/dist/application/javascript/ElectronBoundaryGraphContext.js +63 -0
- package/dist/application/javascript/ElectronBoundaryGraphIpc.js +261 -0
- package/dist/application/javascript/ElectronBoundaryGraphNative.js +102 -0
- package/dist/application/javascript/ElectronBoundaryGraphWindows.js +224 -0
- package/dist/application/javascript/ElectronEvidence.js +37 -0
- package/dist/application/javascript/ElectronObservationPort.js +1 -0
- package/dist/application/javascript/ElectronObservationService.js +26 -0
- package/dist/application/javascript/JavaScriptAnalysisControl.js +34 -0
- package/dist/application/javascript/JavaScriptApplicationEvidence.js +49 -0
- package/dist/application/javascript/JavaScriptApplicationEvidenceGraph.js +173 -0
- package/dist/application/javascript/JavaScriptApplicationService.js +170 -0
- package/dist/application/javascript/JavaScriptApplicationWorkflowEvidence.js +67 -0
- package/dist/application/javascript/JavaScriptApplicationWorkflowService.js +194 -0
- package/dist/application/javascript/JavaScriptArtifactAnalysis.js +431 -0
- package/dist/application/javascript/JavaScriptArtifactAnalysisTypes.js +1 -0
- package/dist/application/javascript/JavaScriptArtifactGraphAccumulator.js +89 -0
- package/dist/application/javascript/JavaScriptArtifactGraphBuilder.js +193 -0
- package/dist/application/javascript/JavaScriptArtifactGraphBundlers.js +229 -0
- package/dist/application/javascript/JavaScriptArtifactGraphContext.js +194 -0
- package/dist/application/javascript/JavaScriptArtifactGraphDocuments.js +160 -0
- package/dist/application/javascript/JavaScriptArtifactGraphEvidence.js +85 -0
- package/dist/application/javascript/JavaScriptArtifactGraphFindings.js +349 -0
- package/dist/application/javascript/JavaScriptArtifactGraphStructure.js +424 -0
- package/dist/application/javascript/JavaScriptArtifactPathResolution.js +836 -0
- package/dist/application/javascript/JavaScriptArtifactReconstruction.js +245 -0
- package/dist/application/javascript/JavaScriptArtifactReconstructionInput.js +12 -0
- package/dist/application/javascript/JavaScriptJsonModules.js +40 -0
- package/dist/application/javascript/JavaScriptModuleRelationships.js +304 -0
- package/dist/application/javascript/JavaScriptRecoveryPort.js +1 -0
- package/dist/application/javascript/JavaScriptRecoveryService.js +77 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationEvidence.js +36 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationPort.js +1 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationService.js +28 -0
- package/dist/application/javascript/JavaScriptRuntimeReconciliationEvidence.js +24 -0
- package/dist/application/javascript/JavaScriptRuntimeReconciliationService.js +52 -0
- package/dist/application/javascript/JavaScriptSemanticGraphAsyncProjection.js +163 -0
- package/dist/application/javascript/JavaScriptSemanticGraphBuilder.js +527 -0
- package/dist/application/javascript/JavaScriptSemanticGraphChildProcessProjection.js +165 -0
- package/dist/application/javascript/JavaScriptSemanticGraphConstruction.js +156 -0
- package/dist/application/javascript/JavaScriptSemanticGraphDataProjection.js +216 -0
- package/dist/application/javascript/JavaScriptSemanticGraphElectronProjection.js +61 -0
- package/dist/application/javascript/JavaScriptSemanticGraphEvidence.js +86 -0
- package/dist/application/javascript/JavaScriptSemanticGraphFingerprintProjection.js +25 -0
- package/dist/application/javascript/JavaScriptSemanticGraphFlowProjection.js +183 -0
- package/dist/application/javascript/JavaScriptSemanticGraphObjectProjection.js +112 -0
- package/dist/application/javascript/JavaScriptSemanticGraphProjection.js +144 -0
- package/dist/application/javascript/JavaScriptSemanticGraphResourceProjection.js +58 -0
- package/dist/application/javascript/JavaScriptSemanticGraphValueProjection.js +136 -0
- package/dist/application/javascript/JavaScriptSemanticTraceService.js +41 -0
- package/dist/application/jeb/JebAnalysisPort.js +1 -0
- package/dist/application/jeb/JebAnalysisService.js +13 -0
- package/dist/application/managed/ManagedApplicationGraphService.js +55 -0
- package/dist/application/managed/ManagedMemberComparisonService.js +125 -0
- package/dist/application/managed/ManagedNativeVerificationService.js +40 -0
- package/dist/application/managed/ManagedReconstructionService.js +59 -0
- package/dist/application/native/NativeApiInspection.js +77 -0
- package/dist/application/native/NativeCallRoutes.js +73 -0
- package/dist/application/native/NativeDispatchMetadataInspection.js +33 -0
- package/dist/application/native/NativeUiActionTrace.js +427 -0
- package/dist/application/native/NativeValueTrace.js +340 -0
- package/dist/application/process/ProcessCli.js +190 -0
- package/dist/application/process/ProcessEvidence.js +30 -0
- package/dist/application/wasm/WasmArtifactPort.js +1 -0
- package/dist/application/wasm/WasmArtifactService.js +72 -0
- package/dist/application/workflowInputError.js +18 -0
- package/dist/artifacts/ArtifactHash.js +29 -0
- package/dist/artifacts/ArtifactPaths.js +167 -0
- package/dist/artifacts/ArtifactProvider.js +280 -0
- package/dist/artifacts/ArtifactProviderMetadata.js +34 -0
- package/dist/artifacts/ArtifactReader.js +77 -0
- package/dist/artifacts/ArtifactResourceScope.js +103 -0
- package/dist/artifacts/AsarArtifactReader.js +518 -0
- package/dist/artifacts/AsarEntryStream.js +76 -0
- package/dist/artifacts/AsarHeader.js +24 -0
- package/dist/artifacts/DirectoryArtifactReader.js +292 -0
- package/dist/artifacts/MachOSliceArtifactReader.js +342 -0
- package/dist/artifacts/NativeDmgArtifactReader.js +508 -0
- package/dist/artifacts/NativeDmgOwnership.js +109 -0
- package/dist/artifacts/SafeOutputTree.js +394 -0
- package/dist/artifacts/SafeOutputTreeCleanup.js +45 -0
- package/dist/artifacts/SafeOutputTreeCreationFailure.js +20 -0
- package/dist/artifacts/SafeOutputTreeIdentity.js +42 -0
- package/dist/artifacts/SafeOutputTreeReadback.js +33 -0
- package/dist/artifacts/StreamBytes.js +10 -0
- package/dist/artifacts/ZipArtifactReader.js +222 -0
- package/dist/artifacts/apple/AppleAssetCatalogAnalysis.js +190 -0
- package/dist/artifacts/apple/DylibResolutionReader.js +269 -0
- package/dist/artifacts/apple/InterfaceBuilderAnalysis.js +500 -0
- package/dist/artifacts/apple/InterfaceBuilderDecodeBudget.js +233 -0
- package/dist/artifacts/apple/KeyedArchiveReader.js +163 -0
- package/dist/artifacts/apple/MachoLoadCommandReader.js +393 -0
- package/dist/artifacts/apple/NibArchive.js +338 -0
- package/dist/artifacts/apple/NibViewHierarchy.js +157 -0
- package/dist/artifacts/apple/PlistNumberLiterals.js +164 -0
- package/dist/artifacts/extraction/ArtifactExtraction.js +253 -0
- package/dist/artifacts/hostExecutableMarking.js +16 -0
- package/dist/artifacts/inventory/ArtifactGraphConstruction.js +343 -0
- package/dist/artifacts/inventory/ArtifactInventory.js +16 -0
- package/dist/artifacts/inventory/classify.js +94 -0
- package/dist/artifacts/inventory/hashStableRootArtifact.js +70 -0
- package/dist/artifacts/inventory/reader.js +40 -0
- package/dist/artifacts/inventory/scanCanonical.js +213 -0
- package/dist/artifacts/inventory/scanReader.js +169 -0
- package/dist/artifacts/inventory/types.js +3 -0
- package/dist/artifacts/javascript/JavaScriptArtifactFiles.js +317 -0
- package/dist/artifacts/javascript/JavaScriptArtifactReader.js +6 -0
- package/dist/artifacts/javascript/JavaScriptSourceAnalysis.js +3 -0
- package/dist/artifacts/readStableArtifact.js +68 -0
- package/dist/browser/BrowserProcessStartup.js +89 -0
- package/dist/browser/BrowserScenarioPartialObservation.js +127 -0
- package/dist/browser/BrowserScenarioSecrets.js +137 -0
- package/dist/browser/BrowserScenarioSessionPort.js +1 -0
- package/dist/browser/CdpAuthorizedMainFrame.js +16 -0
- package/dist/browser/CdpAuthorizedTarget.js +22 -0
- package/dist/browser/CdpBrowserProvider.js +276 -0
- package/dist/browser/CdpCaptureCompleteness.js +92 -0
- package/dist/browser/CdpCaptureDocuments.js +375 -0
- package/dist/browser/CdpCaptureDomSvg.js +210 -0
- package/dist/browser/CdpCaptureEventBodyShapes.js +55 -0
- package/dist/browser/CdpCaptureEventHandlers.js +463 -0
- package/dist/browser/CdpCaptureEventHelpers.js +84 -0
- package/dist/browser/CdpCaptureEventState.js +1 -0
- package/dist/browser/CdpCaptureEventTypes.js +5 -0
- package/dist/browser/CdpCaptureEvents.js +199 -0
- package/dist/browser/CdpCaptureStorage.js +86 -0
- package/dist/browser/CdpCaptureStorageFingerprints.js +320 -0
- package/dist/browser/CdpCaptureValues.js +91 -0
- package/dist/browser/CdpCommandRejection.js +17 -0
- package/dist/browser/CdpConnection.js +303 -0
- package/dist/browser/CdpElectronInspection.js +253 -0
- package/dist/browser/CdpElectronProvider.js +115 -0
- package/dist/browser/CdpElectronScriptEvents.js +55 -0
- package/dist/browser/CdpElectronScripts.js +65 -0
- package/dist/browser/CdpElectronWorkers.js +57 -0
- package/dist/browser/CdpEndpoint.js +217 -0
- package/dist/browser/CdpObservationSession.js +332 -0
- package/dist/browser/CdpOptionalCommand.js +14 -0
- package/dist/browser/CdpPageCapture.js +278 -0
- package/dist/browser/CdpPageCaptureScripts.js +79 -0
- package/dist/browser/CdpPageCaptureWorkers.js +46 -0
- package/dist/browser/CdpSafeMetadata.js +284 -0
- package/dist/browser/CdpScreenshot.js +110 -0
- package/dist/browser/CdpTargetEvents.js +8 -0
- package/dist/browser/CdpTargetSession.js +65 -0
- package/dist/browser/CdpWebMcpDiscovery.js +361 -0
- package/dist/browser/ElectronFileScope.js +135 -0
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +301 -0
- package/dist/browser/PlaywrightElectronActiveActions.js +257 -0
- package/dist/browser/PlaywrightElectronActiveProjection.js +141 -0
- package/dist/browser/PlaywrightElectronActiveProvider.js +293 -0
- package/dist/browser/PlaywrightExecutionBoundary.js +53 -0
- package/dist/browser/PlaywrightScenarioActions.js +58 -0
- package/dist/browser/PlaywrightScenarioArtifacts.js +162 -0
- package/dist/browser/PlaywrightScenarioBrowser.js +412 -0
- package/dist/browser/PlaywrightScenarioEvents.js +253 -0
- package/dist/browser/PlaywrightScenarioSession.js +279 -0
- package/dist/browser/PlaywrightScenarioStorage.js +507 -0
- package/dist/browser/PngVisualDiff.js +380 -0
- package/dist/browser/WebSourceMapFetcher.js +718 -0
- package/dist/browser/assets/LocalWebScriptArtifacts.js +89 -0
- package/dist/browser/assets/PageScriptCapture.js +32 -0
- package/dist/browser/assets/PublishWebScripts.js +140 -0
- package/dist/browser/assets/ScenarioScriptCapture.js +73 -0
- package/dist/browser/assets/ScriptCaptureAdapters.js +57 -0
- package/dist/browser/assets/WebArtifactReads.js +78 -0
- package/dist/browser/assets/WebSourceLocationArtifacts.js +41 -0
- package/dist/browser/execution/CdpEventListeners.js +79 -0
- package/dist/browser/execution/CdpExecutionCapture.js +135 -0
- package/dist/browser/execution/CdpExecutionCollection.js +57 -0
- package/dist/browser/execution/CdpExecutionWindow.js +100 -0
- package/dist/browser/execution/CdpListenerSelector.js +22 -0
- package/dist/browser/execution/CdpPreciseCoverage.js +45 -0
- package/dist/browser/execution/CdpRuntimeInitiator.js +18 -0
- package/dist/browser/execution/CdpRuntimeProtocol.js +106 -0
- package/dist/browser/execution/CdpRuntimeRequests.js +81 -0
- package/dist/browser/execution/CdpRuntimeSession.js +163 -0
- package/dist/browser/execution/CdpRuntimeSources.js +223 -0
- package/dist/browser/execution/CdpWebRuntimeProvider.js +51 -0
- package/dist/browser/history/CaptureFailures.js +153 -0
- package/dist/browser/history/CaptureFormatError.js +10 -0
- package/dist/browser/history/CaptureRedaction.js +68 -0
- package/dist/browser/history/CaptureRelease.js +23 -0
- package/dist/browser/history/HarCapture.js +179 -0
- package/dist/browser/history/HarCaptureAdapter.js +23 -0
- package/dist/browser/history/HarCaptureProcess.js +49 -0
- package/dist/browser/history/HarJson.js +92 -0
- package/dist/browser/history/HarSchema.js +72 -0
- package/dist/browser/history/HistoricalCaptureDecoder.js +198 -0
- package/dist/browser/history/HistoricalCaptureFormatAdapter.js +1 -0
- package/dist/browser/history/MitmproxyCaptureAdapter.js +46 -0
- package/dist/browser/modules/NativeModuleResolver.js +277 -0
- package/dist/browser/modules/WebModuleArtifacts.js +41 -0
- package/dist/browser/network/PlaywrightNetworkContent.js +71 -0
- package/dist/browser/network/PlaywrightScenarioNetwork.js +180 -0
- package/dist/browser/providerIdentities.js +24 -0
- package/dist/catalogIdentity.js +65 -0
- package/dist/cli/adbCommands.js +337 -0
- package/dist/cli/analysisSelector.js +23 -0
- package/dist/cli/analysisViewCommands.js +74 -0
- package/dist/cli/androidCommands.js +91 -0
- package/dist/cli/apktoolCommands.js +53 -0
- package/dist/cli/applicationCommands.js +173 -0
- package/dist/cli/artifactCommands.js +160 -0
- package/dist/cli/binaryDiagnosticsCommands.js +57 -0
- package/dist/cli/browserAdvancedCommands.js +189 -0
- package/dist/cli/browserCommands.js +125 -0
- package/dist/cli/commandCancellation.js +24 -0
- package/dist/cli/coreAnalysisCommands.js +7 -0
- package/dist/cli/coreBinaryCommands.js +283 -0
- package/dist/cli/coreNativeCommands.js +269 -0
- package/dist/cli/electronCommands.js +150 -0
- package/dist/cli/evmCommands.js +33 -0
- package/dist/cli/firmwareCommands.js +61 -0
- package/dist/cli/goCommands.js +21 -0
- package/dist/cli/interactiveSetup.js +236 -0
- package/dist/cli/javascriptApplicationAnalysis.js +34 -0
- package/dist/cli/javascriptRecoveryCommands.js +59 -0
- package/dist/cli/jebCommands.js +99 -0
- package/dist/cli/jsonOutput.js +46 -0
- package/dist/cli/managedCommands.js +129 -0
- package/dist/cli/managedProjectGraphCommand.js +24 -0
- package/dist/cli/nativeCallCommands.js +33 -0
- package/dist/cli/omittableDefaults.js +50 -0
- package/dist/cli/options.js +33 -0
- package/dist/cli/processCommands.js +25 -0
- package/dist/cli/referenceSourceImportStatus.js +22 -0
- package/dist/cli/setupCommands.js +189 -0
- package/dist/cli/streamedJsonOutput.js +134 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/utilityCommands.js +226 -0
- package/dist/cli/wasmCommands.js +44 -0
- package/dist/cli/webModuleCommands.js +60 -0
- package/dist/cli/webNetworkCaptureCommands.js +40 -0
- package/dist/cli/webRuntimeCommands.js +60 -0
- package/dist/cli/webScriptCommands.js +50 -0
- package/dist/cli/webSourceLocationCommands.js +54 -0
- package/dist/cli-runtime/AnalysisProvider-CeyX2u-b.js +25 -0
- package/dist/cli-runtime/AnalysisSnapshotFiles-BuK_ymw5.js +523 -0
- package/dist/cli-runtime/ArtifactReader-BXkffc1D.js +55 -0
- package/dist/cli-runtime/ArtifactResourceScope-CZqLEfbb.js +108 -0
- package/dist/cli-runtime/AsarHeader-CnzOzYEH.js +31 -0
- package/dist/cli-runtime/BinaryTargetResolver-CKRfFhLj.js +965 -0
- package/dist/cli-runtime/BoundedFileBytes-BU30odTm.js +39 -0
- package/dist/cli-runtime/ClientConfigPath-c6jr6INc.js +36 -0
- package/dist/cli-runtime/ClientConfigurationDocument-D0ZqgTCv.js +1522 -0
- package/dist/cli-runtime/ClientRegistrationStatus-DGpwJ4ry.js +422 -0
- package/dist/cli-runtime/DirectAnalysis-DW3MvxW0.js +500 -0
- package/dist/cli-runtime/Doctor-CzwYS9nB.js +862 -0
- package/dist/cli-runtime/ElectronFileScope-C1hUEp36.js +1419 -0
- package/dist/cli-runtime/ExecFileOutput-Czbj-HpV.js +106 -0
- package/dist/cli-runtime/IdaConfiguration-rEjpuRQ1.js +854 -0
- package/dist/cli-runtime/InterfaceBuilderDecodeBudget-DT74BY9z.js +225 -0
- package/dist/cli-runtime/InventoryProjectionEvidence-Dt4Og45O.js +49 -0
- package/dist/cli-runtime/InvestigationProviders-D-QCy-4c.js +117 -0
- package/dist/cli-runtime/JavaScriptApplicationEvidenceGraph-CODAjVru.js +160 -0
- package/dist/cli-runtime/JavaScriptApplicationWorkflowEvidence-CCtwSg8r.js +75 -0
- package/dist/cli-runtime/JavaScriptWorkerMemoryLimit-CJeBSMPx.js +83 -0
- package/dist/cli-runtime/JsonFiles-Ce_O5NcH.js +708 -0
- package/dist/cli-runtime/ManagedSnapshot-DthWfmy9.js +3622 -0
- package/dist/cli-runtime/OwnedCommand-CnK8-h3N.js +106 -0
- package/dist/cli-runtime/PrivateRuntimeRoot-KNg6qLwo.js +237 -0
- package/dist/cli-runtime/ProcessOwnership-AOJaszxt.js +1310 -0
- package/dist/cli-runtime/ProviderDeadline-BSbNOmuW.js +89 -0
- package/dist/cli-runtime/RegularFile-CL6meBxi.js +114 -0
- package/dist/cli-runtime/RegularFileRead-BMh5FMXd.js +115 -0
- package/dist/cli-runtime/SafeOutputTree-D8z2Zrnu.js +512 -0
- package/dist/cli-runtime/SetupHost-CzzRF89z.js +842 -0
- package/dist/cli-runtime/SupportedClients-BrZ2qZVg.js +671 -0
- package/dist/cli-runtime/UninstallFailure-1blyKXHE.js +22 -0
- package/dist/cli-runtime/Update-DF55X_N2.js +143 -0
- package/dist/cli-runtime/UpdateFailure-BcFNxEZZ.js +24 -0
- package/dist/cli-runtime/WindowsBatchCommand-5gT-d7O4.js +45 -0
- package/dist/cli-runtime/ZipArtifactReader-Db65WuM_.js +380 -0
- package/dist/cli-runtime/analysisErrorCleanup-DaUQNiQd.js +32 -0
- package/dist/cli-runtime/analysisErrorPresentation-DZrKL8kS.js +331 -0
- package/dist/cli-runtime/application__DirectAnalysisStatus-OZFIFjZr.js +93 -0
- package/dist/cli-runtime/application__EnhancedTools-C__HAdqG.js +1728 -0
- package/dist/cli-runtime/application__FunctionAnalysisEvidence-fWSgvV74.js +41 -0
- package/dist/cli-runtime/application__ReconstructionCoverageService-DlNt-4TY.js +32 -0
- package/dist/cli-runtime/application__ReconstructionObligationLedgerService-CEpbUv-7.js +813 -0
- package/dist/cli-runtime/application__Setup-BExVGpqG.js +540 -0
- package/dist/cli-runtime/application__Uninstall-BVgWDCPN.js +349 -0
- package/dist/cli-runtime/application__UpdateRuntime-Dj6UIhHQ.js +358 -0
- package/dist/cli-runtime/application__android__AndroidApplicationService-CyynwW6Z.js +31 -0
- package/dist/cli-runtime/application__apple__AppleApplicationService-BNPcWeL8.js +31 -0
- package/dist/cli-runtime/application__harmony__HarmonyApplicationService-W66PwMvx.js +31 -0
- package/dist/cli-runtime/application__javascript__ElectronActiveObservationService-D8VbeCxz.js +85 -0
- package/dist/cli-runtime/application__javascript__ElectronObservationService-FmXFG4f2.js +63 -0
- package/dist/cli-runtime/application__javascript__JavaScriptApplicationService-D-dVrmAY.js +10467 -0
- package/dist/cli-runtime/application__javascript__JavaScriptApplicationWorkflowService-Cb0jmh8J.js +2284 -0
- package/dist/cli-runtime/application__javascript__JavaScriptRuntimeReconciliationService-D55gO7Gq.js +88 -0
- package/dist/cli-runtime/application__javascript__JavaScriptSemanticTraceService-DivM-Ym-.js +298 -0
- package/dist/cli-runtime/artifactOperationError-Wd0PRLIZ.js +27 -0
- package/dist/cli-runtime/artifacts__ArtifactProvider-B_4h3RAw.js +2091 -0
- package/dist/cli-runtime/binary-9Gt3vJ1P.js +12990 -0
- package/dist/cli-runtime/browserObservationError-D73SM55P.js +40 -0
- package/dist/cli-runtime/browserScenario-CTNr5ISp.js +5543 -0
- package/dist/cli-runtime/catalogIdentity-EYVhBUYJ.js +339 -0
- package/dist/cli-runtime/cli.js +28528 -0
- package/dist/cli-runtime/cliOutput-CoDmWVu5.js +98 -0
- package/dist/cli-runtime/cliOutput.js +5 -0
- package/dist/cli-runtime/composition__browserScenario-DNr3A_BM.js +2318 -0
- package/dist/cli-runtime/composition__electronObservation-DNw1f38M.js +550 -0
- package/dist/cli-runtime/composition__electronScenario-Cu7PX270.js +586 -0
- package/dist/cli-runtime/configurationErrors-ByuF6gMR.js +49 -0
- package/dist/cli-runtime/doctorRuntime-D5y43lEp.js +162 -0
- package/dist/cli-runtime/dosMz-pwwUuxyC.js +65 -0
- package/dist/cli-runtime/dotnet__ManagedStaticProvider-BSnWggeb.js +5 -0
- package/dist/cli-runtime/enhancedInputs-K8C_o3b4.js +56 -0
- package/dist/cli-runtime/javascriptApplicationGraph-DUWeec4O.js +940 -0
- package/dist/cli-runtime/javascriptExportReturnShapeProjection-BVbnAdOd.js +78 -0
- package/dist/cli-runtime/javascriptExportShapeComparisonSchemas-BzSil7ft.js +1153 -0
- package/dist/cli-runtime/javascriptRuntimeObservation-9xTNoKY2.js +1215 -0
- package/dist/cli-runtime/javascriptRuntimeReconciliation-CneBtMvx.js +1437 -0
- package/dist/cli-runtime/javascriptRuntimeReconciliationSchemas-D1Mrb_Y0.js +245 -0
- package/dist/cli-runtime/javascriptSemanticTraceSchemas-BHItrqIA.js +126 -0
- package/dist/cli-runtime/lipo-BCA3wVyN.js +365 -0
- package/dist/cli-runtime/logger-CKq3JfbZ.js +34 -0
- package/dist/cli-runtime/machoContainer-DxxkB2b0.js +52 -0
- package/dist/cli-runtime/managedApplicationGraph-BqOr01E6.js +1116 -0
- package/dist/cli-runtime/managedToolContracts-BSy4TRaK.js +80 -0
- package/dist/cli-runtime/mcpDoctor.js +342 -0
- package/dist/cli-runtime/mcpStartupPolicy-Bb7TMLzn.js +18 -0
- package/dist/cli-runtime/native__NativeMacOSProvider-BIG9iCcj.js +4415 -0
- package/dist/cli-runtime/plistValue-KM-SqiXe.js +47 -0
- package/dist/cli-runtime/propertyListKeys-DejfMb-U.js +86 -0
- package/dist/cli-runtime/providerAdapterError-SRSE_gzN.js +27 -0
- package/dist/cli-runtime/providerCleanupError-Do66qCEp.js +27 -0
- package/dist/cli-runtime/providerIdentities-Ao1XTvwx.js +31 -0
- package/dist/cli-runtime/providerOperationHealth-DSTcYPJe.js +577 -0
- package/dist/cli-runtime/providerStartupTimeout-Be8B1Ro8.js +16 -0
- package/dist/cli-runtime/readFileHandleChunks-dp60iZ6v.js +38 -0
- package/dist/cli-runtime/reconstructionObligationLedgerSchemas-dvp6PEnZ.js +15839 -0
- package/dist/cli-runtime/rolldown-runtime-DXoylpqc.js +121 -0
- package/dist/cli-runtime/runtimeVersion-CMGd0bDu.js +23 -0
- package/dist/cli-runtime/safeJson-DKKACtdy.js +25 -0
- package/dist/cli-runtime/scanCanonical-Bi6si9nb.js +2773 -0
- package/dist/cli-runtime/snapshotEnvironment-B5Ai0mha.js +678 -0
- package/dist/cli-runtime/streamedJsonOutput-VYlQZsM7.js +654 -0
- package/dist/cli-runtime/streamedJsonOutput.js +5 -0
- package/dist/cli-runtime/toolContracts-C7pvYKxF.js +4516 -0
- package/dist/cli-runtime/toolEffects-DW31yTSx.js +7004 -0
- package/dist/cli-runtime/workflowInputError-26EGiDpx.js +26 -0
- package/dist/cli.js +91 -0
- package/dist/cliBrowserContext.js +11 -0
- package/dist/cliBrowserScenarioCommands.js +73 -0
- package/dist/cliCommandNames.js +205 -0
- package/dist/cliEvidenceCommands.js +51 -0
- package/dist/cliJavaScriptRuntimeCommands.js +69 -0
- package/dist/cliJsonInput.js +129 -0
- package/dist/cliLogging.js +48 -0
- package/dist/cliObservationOptions.js +73 -0
- package/dist/cliOutput.js +97 -0
- package/dist/composition/adb.js +3 -0
- package/dist/composition/android.js +3 -0
- package/dist/composition/apktool.js +3 -0
- package/dist/composition/auxiliaryAnalysisProviders.js +35 -0
- package/dist/composition/binary.js +25 -0
- package/dist/composition/binaryDiagnostics.js +12 -0
- package/dist/composition/browserObservation.js +3 -0
- package/dist/composition/browserScenario.js +4 -0
- package/dist/composition/directAnalysis.js +44 -0
- package/dist/composition/electronObservation.js +3 -0
- package/dist/composition/electronScenario.js +3 -0
- package/dist/composition/evm.js +4 -0
- package/dist/composition/firmware.js +3 -0
- package/dist/composition/go.js +4 -0
- package/dist/composition/javascriptAnalysisWorkerProcess.js +48 -0
- package/dist/composition/javascriptRecovery.js +3 -0
- package/dist/composition/javascriptRuntimeObservation.js +3 -0
- package/dist/composition/jeb.js +6 -0
- package/dist/composition/optionalObservationProviders.js +54 -0
- package/dist/composition/wasm.js +4 -0
- package/dist/composition/webModules.js +5 -0
- package/dist/composition/webNetworkCaptures.js +6 -0
- package/dist/composition/webRuntime.js +4 -0
- package/dist/composition/webSourceLocations.js +5 -0
- package/dist/config/environment.js +73 -0
- package/dist/config/ghidraDisabledAnalyzers.js +25 -0
- package/dist/config/ghidraLanguageOverride.js +9 -0
- package/dist/config/homeDirectory.js +12 -0
- package/dist/config/mcpInputSchemaProfile.js +27 -0
- package/dist/config/mcpResponseBudget.js +30 -0
- package/dist/config/parseConfig.js +93 -0
- package/dist/config/parsers.js +30 -0
- package/dist/config/providerStartupTimeout.js +13 -0
- package/dist/config/types.js +1 -0
- package/dist/contracts/adb/adbToolContracts.js +353 -0
- package/dist/contracts/advertisedInputExamples.js +48 -0
- package/dist/contracts/analysisDetail.js +13 -0
- package/dist/contracts/analysisSearchContract.js +14 -0
- package/dist/contracts/analysisViewApiSurfaceExample.js +68 -0
- package/dist/contracts/analysisViewToolContracts.js +76 -0
- package/dist/contracts/android/androidToolContracts.js +77 -0
- package/dist/contracts/apktool/apktoolToolContracts.js +33 -0
- package/dist/contracts/applicationToolContracts.js +261 -0
- package/dist/contracts/artifactComparisonExample.js +86 -0
- package/dist/contracts/artifactToolContracts.js +68 -0
- package/dist/contracts/browserProviderToolContracts.js +7 -0
- package/dist/contracts/browserScenarioToolContracts.js +32 -0
- package/dist/contracts/browserToolContracts.js +256 -0
- package/dist/contracts/compactInputSchema.js +256 -0
- package/dist/contracts/enhancedInputs.js +74 -0
- package/dist/contracts/enhancedToolContracts.js +32 -0
- package/dist/contracts/errorSchemas.js +87 -0
- package/dist/contracts/evidenceInputContracts.js +13 -0
- package/dist/contracts/evm/evmToolContracts.js +20 -0
- package/dist/contracts/firmware/firmwareToolContracts.js +38 -0
- package/dist/contracts/functionComparisonExample.js +51 -0
- package/dist/contracts/functionInstructionContract.js +6 -0
- package/dist/contracts/functionWorkflowToolContracts.js +29 -0
- package/dist/contracts/go/goToolContracts.js +20 -0
- package/dist/contracts/hopperMemoryContracts.js +19 -0
- package/dist/contracts/inputSchemaPresentation.js +181 -0
- package/dist/contracts/investigationExamples.js +116 -0
- package/dist/contracts/javascript/applicationWorkflowInputContracts.js +52 -0
- package/dist/contracts/javascript/electronToolContracts.js +118 -0
- package/dist/contracts/javascript/javascriptApplicationWorkflowExamples.js +85 -0
- package/dist/contracts/javascript/javascriptExportShapeComparisonExample.js +248 -0
- package/dist/contracts/javascript/javascriptRecoveryToolContracts.js +35 -0
- package/dist/contracts/javascript/javascriptRuntimeObservationToolContracts.js +40 -0
- package/dist/contracts/javascript/javascriptRuntimeReconciliationExample.js +242 -0
- package/dist/contracts/jeb/jebToolContracts.js +64 -0
- package/dist/contracts/managed/managedToolContracts.js +87 -0
- package/dist/contracts/managed/managedWorkflowExamples.js +281 -0
- package/dist/contracts/managed/managedWorkflowToolContracts.js +165 -0
- package/dist/contracts/mobileApplicationGraphExamples.js +117 -0
- package/dist/contracts/native/binaryDiagnosticsToolContracts.js +65 -0
- package/dist/contracts/native/nativeToolContracts.js +77 -0
- package/dist/contracts/officialToolContracts.js +69 -0
- package/dist/contracts/promptContracts.js +253 -0
- package/dist/contracts/providerSelection.js +29 -0
- package/dist/contracts/reconstructionReadinessExample.js +438 -0
- package/dist/contracts/sessionLifecycleInputs.js +63 -0
- package/dist/contracts/sessionStatusContract.js +17 -0
- package/dist/contracts/sessionToolContracts.js +61 -0
- package/dist/contracts/sessionToolSchemas.js +51 -0
- package/dist/contracts/toolContractExamples.js +77 -0
- package/dist/contracts/toolContractHelpers.js +22 -0
- package/dist/contracts/toolContractTypes.js +18 -0
- package/dist/contracts/toolContracts.js +60 -0
- package/dist/contracts/toolEffects.js +544 -0
- package/dist/contracts/toolOutputSchemaGroups.js +411 -0
- package/dist/contracts/toolOutputSchemaPrimitives.js +532 -0
- package/dist/contracts/toolSchemaMetadata.js +197 -0
- package/dist/contracts/unknownContractExamples.js +31 -0
- package/dist/contracts/wasm/wasmToolContracts.js +24 -0
- package/dist/contracts/webNetworkCaptureToolContracts.js +24 -0
- package/dist/contracts/webRuntimeToolContracts.js +43 -0
- package/dist/contracts/webScriptToolContracts.js +68 -0
- package/dist/doctorRuntime.js +53 -0
- package/dist/domain/adb/adbDeviceAnalysis.js +583 -0
- package/dist/domain/analysisErrorBase.js +58 -0
- package/dist/domain/analysisErrorCleanup.js +29 -0
- package/dist/domain/analysisErrorCore.js +123 -0
- package/dist/domain/analysisErrorPresentation.js +372 -0
- package/dist/domain/analysisErrorProjection.js +454 -0
- package/dist/domain/analysisProfile.js +50 -0
- package/dist/domain/analysisSnapshot.js +538 -0
- package/dist/domain/analysisView/WebNetworkApiSurfaceAccumulator.js +362 -0
- package/dist/domain/analysisView/analysisView.js +340 -0
- package/dist/domain/analysisView/analysisViewCoverage.js +19 -0
- package/dist/domain/analysisView/binaryLayoutView.js +161 -0
- package/dist/domain/analysisView/javascriptApplicationView.js +245 -0
- package/dist/domain/analysisView/nativeFunctionView.js +155 -0
- package/dist/domain/analysisView/webNetworkApiSurfaceView.js +108 -0
- package/dist/domain/android/androidAnalysis.js +143 -0
- package/dist/domain/android/androidApplication.js +144 -0
- package/dist/domain/android/androidPartialObservation.js +36 -0
- package/dist/domain/apktool/apktoolResourceAnalysis.js +75 -0
- package/dist/domain/apple/appleApplication.js +315 -0
- package/dist/domain/apple/appleAssetCatalog.js +127 -0
- package/dist/domain/apple/appleBundleAnatomy.js +303 -0
- package/dist/domain/apple/dyldEnvironment.js +73 -0
- package/dist/domain/apple/dyldPaths.js +89 -0
- package/dist/domain/apple/dylibResolution.js +485 -0
- package/dist/domain/apple/dylibResolutionFindings.js +77 -0
- package/dist/domain/apple/interfaceBuilderGraph.js +403 -0
- package/dist/domain/apple/interfaceBuilderKeyedArchive.js +430 -0
- package/dist/domain/apple/keyedArchive.js +214 -0
- package/dist/domain/apple/machoContainer.js +54 -0
- package/dist/domain/apple/plistNumbers.js +76 -0
- package/dist/domain/apple/plistValue.js +35 -0
- package/dist/domain/artifactComparison.js +348 -0
- package/dist/domain/artifactGraph.js +213 -0
- package/dist/domain/artifactIdentity.js +57 -0
- package/dist/domain/artifactInspection.js +279 -0
- package/dist/domain/artifactIntegrityPolicy.js +10 -0
- package/dist/domain/artifactInventoryEvidence.js +166 -0
- package/dist/domain/artifactInventorySnapshot.js +1 -0
- package/dist/domain/artifactOperationError.js +20 -0
- package/dist/domain/artifactPartialObservation.js +1 -0
- package/dist/domain/artifactPathSyntax.js +75 -0
- package/dist/domain/binaryTarget.js +233 -0
- package/dist/domain/binaryTargetTypes.js +10 -0
- package/dist/domain/bridgeCandidateProjection.js +71 -0
- package/dist/domain/browserCaptureComparison.js +21 -0
- package/dist/domain/browserCompleteness.js +103 -0
- package/dist/domain/browserNetworkEvidence.js +92 -0
- package/dist/domain/browserObservation.js +187 -0
- package/dist/domain/browserObservationError.js +44 -0
- package/dist/domain/browserObservationErrors.js +1 -0
- package/dist/domain/browserObservationSchemas.js +327 -0
- package/dist/domain/browserScenario.js +61 -0
- package/dist/domain/browserScenarioCapture.js +76 -0
- package/dist/domain/browserScenarioCaptureValues.js +292 -0
- package/dist/domain/browserScenarioDiff.js +266 -0
- package/dist/domain/browserScenarioDiffEvidence.js +73 -0
- package/dist/domain/browserScenarioDiffValues.js +140 -0
- package/dist/domain/browserScenarioNormalization.js +40 -0
- package/dist/domain/browserScenarioValues.js +268 -0
- package/dist/domain/browserSession.js +55 -0
- package/dist/domain/bundleComparison.js +243 -0
- package/dist/domain/callPath.js +301 -0
- package/dist/domain/callPathSchemas.js +89 -0
- package/dist/domain/canonicalDigest.js +83 -0
- package/dist/domain/canonicalJsonDigestSteps.js +155 -0
- package/dist/domain/canonicalOrdering.js +3 -0
- package/dist/domain/changedBehavior.js +282 -0
- package/dist/domain/compactStringIdentity.js +9 -0
- package/dist/domain/comparisonSemantics.js +12 -0
- package/dist/domain/comparisonSourceEvidence.js +40 -0
- package/dist/domain/comparisonStatus.js +11 -0
- package/dist/domain/completionLedgerGeneration.js +186 -0
- package/dist/domain/configurationErrors.js +37 -0
- package/dist/domain/conformancePackage.js +200 -0
- package/dist/domain/conformanceReplay.js +132 -0
- package/dist/domain/conformanceTrustGate.js +319 -0
- package/dist/domain/digests.js +27 -0
- package/dist/domain/dosCom.js +8 -0
- package/dist/domain/dosMz.js +83 -0
- package/dist/domain/emptyArraySchema.js +3 -0
- package/dist/domain/evidence.js +305 -0
- package/dist/domain/evidenceBundle.js +413 -0
- package/dist/domain/evidenceCompletionLedger.js +113 -0
- package/dist/domain/evidenceErrors.js +46 -0
- package/dist/domain/evidenceRecordSummary.js +144 -0
- package/dist/domain/evm/evmInterface.js +61 -0
- package/dist/domain/explicitSensitiveFailure.js +108 -0
- package/dist/domain/explicitSensitiveValues.js +10 -0
- package/dist/domain/firmware/firmwareAnalysis.js +128 -0
- package/dist/domain/functionComparison.js +38 -0
- package/dist/domain/functionComparisonDimensions.js +199 -0
- package/dist/domain/functionComparisonNormalization.js +150 -0
- package/dist/domain/functionComparisonResults.js +54 -0
- package/dist/domain/functionComparisonSchemas.js +88 -0
- package/dist/domain/functionDossierEvidence.js +20 -0
- package/dist/domain/go/goBinary.js +96 -0
- package/dist/domain/harmony/harmonyApplication.js +169 -0
- package/dist/domain/hopperErrors.js +98 -0
- package/dist/domain/hopperStartupFailure.js +64 -0
- package/dist/domain/hopperValues.js +368 -0
- package/dist/domain/immutableJson.js +114 -0
- package/dist/domain/inputIssueProjection.js +94 -0
- package/dist/domain/javascript/electronActiveObservation.js +237 -0
- package/dist/domain/javascript/electronObservation.js +122 -0
- package/dist/domain/javascript/electronStaticAnalysis.js +9 -0
- package/dist/domain/javascript/electronStaticAnalysisBrowser.js +187 -0
- package/dist/domain/javascript/electronStaticAnalysisIpc.js +197 -0
- package/dist/domain/javascript/electronStaticAnalysisNative.js +199 -0
- package/dist/domain/javascript/electronStaticAnalysisTypes.js +1 -0
- package/dist/domain/javascript/electronStaticAnalysisValues.js +134 -0
- package/dist/domain/javascript/electronWrappedCallPaths.js +399 -0
- package/dist/domain/javascript/htmlArtifactReferences.js +40 -0
- package/dist/domain/javascript/javascriptAnalysisResourceControls.js +65 -0
- package/dist/domain/javascript/javascriptApplicationAnalysis.js +146 -0
- package/dist/domain/javascript/javascriptApplicationChangeGraph.js +175 -0
- package/dist/domain/javascript/javascriptApplicationEvidenceSchemas.js +400 -0
- package/dist/domain/javascript/javascriptApplicationGraph.js +378 -0
- package/dist/domain/javascript/javascriptApplicationGraphSchemas.js +126 -0
- package/dist/domain/javascript/javascriptApplicationProjectionResources.js +43 -0
- package/dist/domain/javascript/javascriptApplicationVersionComparison.js +104 -0
- package/dist/domain/javascript/javascriptApplicationVersionComparisonSchemas.js +211 -0
- package/dist/domain/javascript/javascriptApplicationVersionItems.js +324 -0
- package/dist/domain/javascript/javascriptApplicationVersionKeys.js +199 -0
- package/dist/domain/javascript/javascriptArtifactFiles.js +1 -0
- package/dist/domain/javascript/javascriptAstFingerprint.js +153 -0
- package/dist/domain/javascript/javascriptAstValues.js +99 -0
- package/dist/domain/javascript/javascriptBootstrap.js +94 -0
- package/dist/domain/javascript/javascriptElectronMemberWrites.js +119 -0
- package/dist/domain/javascript/javascriptExportReturnShapeProjection.js +81 -0
- package/dist/domain/javascript/javascriptExportShapeComparison.js +161 -0
- package/dist/domain/javascript/javascriptExportShapeComparisonIdentity.js +16 -0
- package/dist/domain/javascript/javascriptExportShapeComparisonSchemas.js +302 -0
- package/dist/domain/javascript/javascriptExportShapeSelection.js +130 -0
- package/dist/domain/javascript/javascriptExportShapeVariants.js +333 -0
- package/dist/domain/javascript/javascriptFeatureSeed.js +193 -0
- package/dist/domain/javascript/javascriptFeatureTrace.js +177 -0
- package/dist/domain/javascript/javascriptFeatureTraceSchemas.js +131 -0
- package/dist/domain/javascript/javascriptFeatureTraversal.js +61 -0
- package/dist/domain/javascript/javascriptIntrinsicInvocation.js +93 -0
- package/dist/domain/javascript/javascriptModuleInterop.js +617 -0
- package/dist/domain/javascript/javascriptModuleSemanticIr.js +15 -0
- package/dist/domain/javascript/javascriptNativeHandoff.js +90 -0
- package/dist/domain/javascript/javascriptPackageImportAliases.js +58 -0
- package/dist/domain/javascript/javascriptRecovery.js +90 -0
- package/dist/domain/javascript/javascriptRpcEndpoints.js +253 -0
- package/dist/domain/javascript/javascriptRuntimeLoadState.js +98 -0
- package/dist/domain/javascript/javascriptRuntimeObservation.js +136 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliation.js +46 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationActive.js +74 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.js +212 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationGraph.js +163 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationInputValidation.js +28 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationMatching.js +270 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationParsing.js +39 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationResult.js +126 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationRuntime.js +334 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationSchemas.js +234 -0
- package/dist/domain/javascript/javascriptRuntimeStaticCandidates.js +206 -0
- package/dist/domain/javascript/javascriptSemanticAnalysis.js +910 -0
- package/dist/domain/javascript/javascriptSemanticAsyncEffects.js +246 -0
- package/dist/domain/javascript/javascriptSemanticCallResolution.js +127 -0
- package/dist/domain/javascript/javascriptSemanticCallableResults.js +42 -0
- package/dist/domain/javascript/javascriptSemanticCalls.js +272 -0
- package/dist/domain/javascript/javascriptSemanticChildProcesses.js +224 -0
- package/dist/domain/javascript/javascriptSemanticCoverage.js +32 -0
- package/dist/domain/javascript/javascriptSemanticDataEffectHelpers.js +182 -0
- package/dist/domain/javascript/javascriptSemanticDataEffects.js +299 -0
- package/dist/domain/javascript/javascriptSemanticDerivedAnalysis.js +52 -0
- package/dist/domain/javascript/javascriptSemanticFileProjection.js +1 -0
- package/dist/domain/javascript/javascriptSemanticFingerprints.js +187 -0
- package/dist/domain/javascript/javascriptSemanticGraph.js +575 -0
- package/dist/domain/javascript/javascriptSemanticGraphSchemas.js +316 -0
- package/dist/domain/javascript/javascriptSemanticGraphSerialization.js +12 -0
- package/dist/domain/javascript/javascriptSemanticIr.js +31 -0
- package/dist/domain/javascript/javascriptSemanticIterationSources.js +139 -0
- package/dist/domain/javascript/javascriptSemanticMemberMutations.js +865 -0
- package/dist/domain/javascript/javascriptSemanticMutationInitializers.js +190 -0
- package/dist/domain/javascript/javascriptSemanticMutationValues.js +104 -0
- package/dist/domain/javascript/javascriptSemanticObjectReferences.js +381 -0
- package/dist/domain/javascript/javascriptSemanticObjects.js +164 -0
- package/dist/domain/javascript/javascriptSemanticPrimitives.js +38 -0
- package/dist/domain/javascript/javascriptSemanticProjection.js +571 -0
- package/dist/domain/javascript/javascriptSemanticPromises.js +321 -0
- package/dist/domain/javascript/javascriptSemanticPropertyPaths.js +100 -0
- package/dist/domain/javascript/javascriptSemanticProvenance.js +29 -0
- package/dist/domain/javascript/javascriptSemanticQuery.js +175 -0
- package/dist/domain/javascript/javascriptSemanticQueryAssessment.js +45 -0
- package/dist/domain/javascript/javascriptSemanticQueryIdentity.js +63 -0
- package/dist/domain/javascript/javascriptSemanticQueryRelations.js +15 -0
- package/dist/domain/javascript/javascriptSemanticQuerySchemas.js +95 -0
- package/dist/domain/javascript/javascriptSemanticRequireOrigin.js +34 -0
- package/dist/domain/javascript/javascriptSemanticResourceLimits.js +77 -0
- package/dist/domain/javascript/javascriptSemanticResources.js +129 -0
- package/dist/domain/javascript/javascriptSemanticReturnedReferences.js +219 -0
- package/dist/domain/javascript/javascriptSemanticReturns.js +159 -0
- package/dist/domain/javascript/javascriptSemanticSlots.js +72 -0
- package/dist/domain/javascript/javascriptSemanticState.js +116 -0
- package/dist/domain/javascript/javascriptSemanticTraceSchemas.js +15 -0
- package/dist/domain/javascript/javascriptSemanticTraversal.js +80 -0
- package/dist/domain/javascript/javascriptSemanticValueTypes.js +1 -0
- package/dist/domain/javascript/javascriptSemanticValues.js +581 -0
- package/dist/domain/javascript/javascriptSourceAnalysis.js +1 -0
- package/dist/domain/javascript/javascriptSourceMapPaths.js +114 -0
- package/dist/domain/javascript/javascriptSourceParser.js +50 -0
- package/dist/domain/javascript/javascriptSourceSelection.js +11 -0
- package/dist/domain/javascript/javascriptStaticAnalysis.js +142 -0
- package/dist/domain/javascript/javascriptStaticAnalysisBundler.js +239 -0
- package/dist/domain/javascript/javascriptStaticAnalysisCalls.js +271 -0
- package/dist/domain/javascript/javascriptStaticAnalysisFindings.js +86 -0
- package/dist/domain/javascript/javascriptStaticAnalysisHelpers.js +561 -0
- package/dist/domain/javascript/javascriptStaticAnalysisState.js +21 -0
- package/dist/domain/javascript/javascriptStaticAnalysisTypes.js +2 -0
- package/dist/domain/javascript/javascriptSymbolicBindings.js +795 -0
- package/dist/domain/javascript/javascriptSymbolicControlFlow.js +40 -0
- package/dist/domain/javascript/javascriptSymbolicValues.js +34 -0
- package/dist/domain/javascript/sourceToBundleComparison.js +261 -0
- package/dist/domain/javascript/sourceToBundleComparisonSchemas.js +109 -0
- package/dist/domain/javascript/sourceToBundleSignals.js +231 -0
- package/dist/domain/jeb/jebAnalysis.js +114 -0
- package/dist/domain/jsonSerialization.js +163 -0
- package/dist/domain/jsonShape.js +141 -0
- package/dist/domain/jsonValue.js +96 -0
- package/dist/domain/localPath.js +24 -0
- package/dist/domain/managed/managedApplicationGraph.js +221 -0
- package/dist/domain/managed/managedApplicationGraphCoverage.js +48 -0
- package/dist/domain/managed/managedApplicationGraphNodes.js +367 -0
- package/dist/domain/managed/managedArtifact.js +465 -0
- package/dist/domain/managed/managedInspectionEvidence.js +28 -0
- package/dist/domain/managed/managedMemberComparison.js +211 -0
- package/dist/domain/managed/managedMemberComparisonCoverage.js +71 -0
- package/dist/domain/managed/managedMemberComparisonItems.js +304 -0
- package/dist/domain/managed/managedMemberComparisonMatch.js +204 -0
- package/dist/domain/managed/managedNativeVerification.js +35 -0
- package/dist/domain/managed/managedNativeVerificationMatch.js +276 -0
- package/dist/domain/managed/managedNativeVerificationSchemas.js +180 -0
- package/dist/domain/managed/managedReconstruction.js +190 -0
- package/dist/domain/mobileApplicationGraphProjection.js +61 -0
- package/dist/domain/native/binaryLayout.js +354 -0
- package/dist/domain/native/fileOffsetPartialObservation.js +1 -0
- package/dist/domain/native/nativeAotPe.js +1408 -0
- package/dist/domain/native/nativeApiBoundary.js +140 -0
- package/dist/domain/native/nativeCallObservation.js +186 -0
- package/dist/domain/native/nativeCallPartialObservation.js +33 -0
- package/dist/domain/native/nativeDataType.js +53 -0
- package/dist/domain/native/nativeFunctionAnnotations.js +43 -0
- package/dist/domain/native/nativeInspection.js +174 -0
- package/dist/domain/native/nativeInstruction.js +125 -0
- package/dist/domain/native/nativeInvestigationGraph.js +364 -0
- package/dist/domain/native/nativeLoadImage.js +112 -0
- package/dist/domain/native/nativeMetadataRecovery.js +128 -0
- package/dist/domain/native/nativeUiObservation.js +137 -0
- package/dist/domain/native/nativeValueFlow.js +72 -0
- package/dist/domain/native/nativeValueTrace.js +64 -0
- package/dist/domain/native/objcSwiftMetadata.js +419 -0
- package/dist/domain/native/peResources.js +100 -0
- package/dist/domain/native/recordedCrash.js +263 -0
- package/dist/domain/native/recordedCrashNoteCoverage.js +73 -0
- package/dist/domain/nativeConvention.js +33 -0
- package/dist/domain/offsetDateTime.js +17 -0
- package/dist/domain/peMachine.js +36 -0
- package/dist/domain/process/processCapture.js +412 -0
- package/dist/domain/process/processCaptureCoverage.js +70 -0
- package/dist/domain/process/processCaptureExample.js +132 -0
- package/dist/domain/process/processCaptureParsing.js +21 -0
- package/dist/domain/process/processCaptureValidation.js +246 -0
- package/dist/domain/process/processComparison.js +315 -0
- package/dist/domain/process/processEvidenceProvider.js +11 -0
- package/dist/domain/process/processObservation.js +140 -0
- package/dist/domain/process/processScenario.js +247 -0
- package/dist/domain/process/processTraceComparison.js +34 -0
- package/dist/domain/process/processTraceDimensionProjection.js +35 -0
- package/dist/domain/process/processTraceEvaluation.js +320 -0
- package/dist/domain/process/processTraceSpecification.js +382 -0
- package/dist/domain/propertyListKeys.js +107 -0
- package/dist/domain/propertyListXmlText.js +19 -0
- package/dist/domain/providerAdapterError.js +19 -0
- package/dist/domain/providerCleanupError.js +18 -0
- package/dist/domain/providerConfigurationRefusal.js +12 -0
- package/dist/domain/providerOperationHealth.js +54 -0
- package/dist/domain/providerSelectionError.js +46 -0
- package/dist/domain/rawBinary.js +93 -0
- package/dist/domain/reconstructionCoverage.js +325 -0
- package/dist/domain/reconstructionCoverageEvaluation.js +234 -0
- package/dist/domain/reconstructionCoverageInput.js +7 -0
- package/dist/domain/reconstructionObligationLedgerIntegrity.js +114 -0
- package/dist/domain/reconstructionObligationLedgerSchemas.js +347 -0
- package/dist/domain/reconstructionReadiness.js +116 -0
- package/dist/domain/reconstructionReadinessFindingHelpers.js +17 -0
- package/dist/domain/reconstructionReadinessIntegrityFindings.js +118 -0
- package/dist/domain/reconstructionReadinessJourneyFindings.js +193 -0
- package/dist/domain/reconstructionReadinessSchemas.js +268 -0
- package/dist/domain/reconstructionUnknowns.js +91 -0
- package/dist/domain/reconstructionVerification.js +218 -0
- package/dist/domain/reconstructionVerificationSchemas.js +141 -0
- package/dist/domain/recordedTransportUrl.js +51 -0
- package/dist/domain/referenceSourceClassification.js +385 -0
- package/dist/domain/referenceSourceGraph.js +380 -0
- package/dist/domain/referenceSourceImportParsing.js +238 -0
- package/dist/domain/referenceSourcePathIdentity.js +22 -0
- package/dist/domain/referenceSourcePolicy.js +1 -0
- package/dist/domain/referenceSourceRequireBindings.js +137 -0
- package/dist/domain/relationshipCoverage.js +20 -0
- package/dist/domain/residualUnknown.js +252 -0
- package/dist/domain/result.js +4 -0
- package/dist/domain/runtimeVersion.js +15 -0
- package/dist/domain/safeJson.js +13 -0
- package/dist/domain/sourceMapContents.js +6 -0
- package/dist/domain/sourceMapEnvelope.js +44 -0
- package/dist/domain/staticRuntimeCorrelation.js +334 -0
- package/dist/domain/stringPatterns.js +6 -0
- package/dist/domain/swiftSymbolClassification.js +66 -0
- package/dist/domain/symbolAnalysis.js +122 -0
- package/dist/domain/unicodeCodePointOrder.js +23 -0
- package/dist/domain/unknownRegistryError.js +10 -0
- package/dist/domain/wasm/wasmArtifact.js +105 -0
- package/dist/domain/webBundleAnalysis.js +192 -0
- package/dist/domain/webBundleAnalyzer.js +15 -0
- package/dist/domain/webBundleAnalyzerAst.js +49 -0
- package/dist/domain/webBundleAnalyzerInspection.js +315 -0
- package/dist/domain/webBundleAnalyzerResult.js +142 -0
- package/dist/domain/webCaptureDiff.js +423 -0
- package/dist/domain/webCaptureDiffSchemas.js +84 -0
- package/dist/domain/webContentArtifact.js +38 -0
- package/dist/domain/webEventListeners.js +29 -0
- package/dist/domain/webExecution.js +75 -0
- package/dist/domain/webInventory.js +62 -0
- package/dist/domain/webMcpDiscovery.js +53 -0
- package/dist/domain/webModuleImports.js +99 -0
- package/dist/domain/webModuleTrace.js +101 -0
- package/dist/domain/webNetworkCapture.js +142 -0
- package/dist/domain/webNetworkCaptureCoordinates.js +58 -0
- package/dist/domain/webRuntime.js +80 -0
- package/dist/domain/webScreenshot.js +132 -0
- package/dist/domain/webScriptArtifacts.js +37 -0
- package/dist/domain/webScriptExport.js +84 -0
- package/dist/domain/webScriptExportError.js +19 -0
- package/dist/domain/webScriptExportPlan.js +104 -0
- package/dist/domain/webSourceLocation.js +118 -0
- package/dist/domain/webSourcePosition.js +21 -0
- package/dist/domain/zipPackageFormat.js +52 -0
- package/dist/domain/zodCollectionSteps.js +24 -0
- package/dist/dotnet/ManagedArtifactInspector.js +308 -0
- package/dist/dotnet/ManagedDecodeBudget.js +138 -0
- package/dist/dotnet/ManagedExceptionRegionValidation.js +41 -0
- package/dist/dotnet/ManagedMemberInspector.js +173 -0
- package/dist/dotnet/ManagedMemberInspectorCore.js +446 -0
- package/dist/dotnet/ManagedMemberInstructionDecoder.js +468 -0
- package/dist/dotnet/ManagedMemberOwnership.js +71 -0
- package/dist/dotnet/ManagedMemberPointers.js +62 -0
- package/dist/dotnet/ManagedMemberRows.js +227 -0
- package/dist/dotnet/ManagedMetadataHeaps.js +179 -0
- package/dist/dotnet/ManagedMetadataInventory.js +99 -0
- package/dist/dotnet/ManagedMetadataInventoryRows.js +295 -0
- package/dist/dotnet/ManagedMetadataLayout.js +270 -0
- package/dist/dotnet/ManagedMetadataRowSizes.js +54 -0
- package/dist/dotnet/ManagedMethodBodyReader.js +155 -0
- package/dist/dotnet/ManagedNativeBoundaryHelpers.js +314 -0
- package/dist/dotnet/ManagedNativeBoundaryInspector.js +128 -0
- package/dist/dotnet/ManagedPeReader.js +233 -0
- package/dist/dotnet/ManagedReaderFailure.js +27 -0
- package/dist/dotnet/ManagedSnapshot.js +88 -0
- package/dist/dotnet/ManagedStaticProvider.js +158 -0
- package/dist/dotnet/ManagedStaticProviderMetadata.js +33 -0
- package/dist/evaluation/AgentEvaluationFixtures.js +250 -0
- package/dist/evaluation/AgentEvaluationReport.js +32 -0
- package/dist/evaluation/CodexAgentEval.js +188 -0
- package/dist/evaluation/KnownAnswerEvaluation.js +323 -0
- package/dist/evm/EvmBytecodeCarrier.js +21 -0
- package/dist/evm/EvmWorkerLimits.js +40 -0
- package/dist/evm/EvmoleFailures.js +124 -0
- package/dist/evm/EvmoleInterfaceAdapter.js +53 -0
- package/dist/evm/EvmoleInterfaceProvider.js +339 -0
- package/dist/evm/EvmoleInterfaceWorker.js +87 -0
- package/dist/evm/EvmoleRelease.js +16 -0
- package/dist/filesystem/OwnedDirectoryHandle.js +29 -0
- package/dist/filesystem/OwnedFileHandle.js +36 -0
- package/dist/filesystem/OwnedStagedOutput.js +138 -0
- package/dist/filesystem/RegularFile.js +73 -0
- package/dist/filesystem/StableFileHash.js +46 -0
- package/dist/filesystem/readFileHandleChunks.js +35 -0
- package/dist/firmware/FirmwareCommand.js +190 -0
- package/dist/firmware/FirmwareFiles.js +206 -0
- package/dist/firmware/FirmwareProvider.js +388 -0
- package/dist/firmware/FirmwarePublication.js +105 -0
- package/dist/firmware/FirmwareRelease.js +33 -0
- package/dist/firmware/FirmwareReports.js +287 -0
- package/dist/firmware/FirmwareVersion.js +80 -0
- package/dist/generatedPackageMetadata.js +9 -0
- package/dist/ghidra/GhidraAnalysisProfile.js +219 -0
- package/dist/ghidra/GhidraAnalysisSeeds.js +211 -0
- package/dist/ghidra/GhidraClient.js +725 -0
- package/dist/ghidra/GhidraClientStartup.js +27 -0
- package/dist/ghidra/GhidraClientTypes.js +1 -0
- package/dist/ghidra/GhidraClientWire.js +38 -0
- package/dist/ghidra/GhidraDiagnostics.js +53 -0
- package/dist/ghidra/GhidraDoctor.js +88 -0
- package/dist/ghidra/GhidraFunctionValues.js +328 -0
- package/dist/ghidra/GhidraInstallation.js +443 -0
- package/dist/ghidra/GhidraInstallationPolicy.js +140 -0
- package/dist/ghidra/GhidraInventoryValues.js +262 -0
- package/dist/ghidra/GhidraJavaLaunch.js +66 -0
- package/dist/ghidra/GhidraLanguageCatalog.js +99 -0
- package/dist/ghidra/GhidraLauncher.js +490 -0
- package/dist/ghidra/GhidraLoadImageAttest.js +103 -0
- package/dist/ghidra/GhidraLoadImageValues.js +260 -0
- package/dist/ghidra/GhidraMipsProfile.js +187 -0
- package/dist/ghidra/GhidraProvider.js +250 -0
- package/dist/ghidra/GhidraProviderCapabilities.js +208 -0
- package/dist/ghidra/GhidraProviderClient.js +613 -0
- package/dist/ghidra/GhidraPspExtension.js +144 -0
- package/dist/ghidra/GhidraPspProfile.js +50 -0
- package/dist/ghidra/GhidraRawBinaryLanguage.js +18 -0
- package/dist/ghidra/GhidraRequestQueue.js +115 -0
- package/dist/ghidra/GhidraResponseBuffer.js +31 -0
- package/dist/ghidra/GhidraResponseRouter.js +24 -0
- package/dist/ghidra/GhidraSessionError.js +180 -0
- package/dist/ghidra/GhidraSessionRoot.js +39 -0
- package/dist/ghidra/GhidraSessionValues.js +86 -0
- package/dist/ghidra/GhidraSocketConnection.js +83 -0
- package/dist/ghidra/GhidraTargetSnapshot.js +79 -0
- package/dist/ghidra/GhidraTransport.js +101 -0
- package/dist/ghidra/extensions/GhidraExtensionFailures.js +20 -0
- package/dist/ghidra/extensions/GhidraExtensions.js +177 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotAdapter.js +27 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotReport.js +100 -0
- package/dist/ghidra/protocol.js +46 -0
- package/dist/go/GoBinaryContainer.js +125 -0
- package/dist/go/GoBinaryImage.js +172 -0
- package/dist/go/GoBinaryProvider.js +137 -0
- package/dist/go/GoElfImage.js +149 -0
- package/dist/go/GoMachoImage.js +113 -0
- package/dist/go/GoModuleText.js +217 -0
- package/dist/go/GoPeImage.js +102 -0
- package/dist/hopper/BridgeLauncher.js +305 -0
- package/dist/hopper/HopperAnalysisProfile.js +168 -0
- package/dist/hopper/HopperCleanup.js +245 -0
- package/dist/hopper/HopperClient.js +767 -0
- package/dist/hopper/HopperDiagnostics.js +14 -0
- package/dist/hopper/HopperFileOffset.js +237 -0
- package/dist/hopper/HopperMachOImage.js +200 -0
- package/dist/hopper/HopperOperationStage.js +6 -0
- package/dist/hopper/HopperProcessDiagnostic.js +26 -0
- package/dist/hopper/HopperProvider.js +269 -0
- package/dist/hopper/HopperProviderCapabilities.js +91 -0
- package/dist/hopper/HopperRegexSearch.js +134 -0
- package/dist/hopper/HopperRegexWorker.js +27 -0
- package/dist/hopper/HopperRequestQueue.js +261 -0
- package/dist/hopper/HopperResponseStream.js +44 -0
- package/dist/hopper/HopperSessionValues.js +30 -0
- package/dist/hopper/HopperSocketConnection.js +31 -0
- package/dist/hopper/HopperTargetLease.js +233 -0
- package/dist/hopper/LinuxPrivateDisplayDiagnostic.js +64 -0
- package/dist/hopper/LinuxPrivateDisplayProbe.js +224 -0
- package/dist/hopper/protocol.js +88 -0
- package/dist/ida/IdaBusyHealth.js +44 -0
- package/dist/ida/IdaCallGraph.js +134 -0
- package/dist/ida/IdaConfiguration.js +61 -0
- package/dist/ida/IdaDoctor.js +53 -0
- package/dist/ida/IdaInput.js +56 -0
- package/dist/ida/IdaMcpConnection.js +115 -0
- package/dist/ida/IdaOperationRunner.js +376 -0
- package/dist/ida/IdaProtocolValues.js +208 -0
- package/dist/ida/IdaProvider.js +136 -0
- package/dist/ida/IdaProviderCapabilities.js +64 -0
- package/dist/ida/IdaSessionClient.js +444 -0
- package/dist/ida/IdaWorkspace.js +55 -0
- package/dist/identity.js +25 -0
- package/dist/inspector/JavaScriptRuntimeScope.js +89 -0
- package/dist/inspector/V8InspectorCaptureProjection.js +197 -0
- package/dist/inspector/V8InspectorEndpoint.js +70 -0
- package/dist/inspector/V8InspectorProvider.js +378 -0
- package/dist/inspector/providerIdentity.js +6 -0
- package/dist/javascript/analysis/JavaScriptAnalysisTransfer.js +337 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorker.js +574 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerProtocol.js +64 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerSchemas.js +558 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerServer.js +121 -0
- package/dist/javascript/recovery/RecoveryFiles.js +175 -0
- package/dist/javascript/recovery/WakaruCommand.js +137 -0
- package/dist/javascript/recovery/WakaruExecution.js +115 -0
- package/dist/javascript/recovery/WakaruProvider.js +218 -0
- package/dist/javascript/recovery/WakaruPublication.js +126 -0
- package/dist/javascript/recovery/WakaruRelease.js +36 -0
- package/dist/javascript/recovery/WakaruReport.js +140 -0
- package/dist/javascript/recovery/WakaruVersion.js +24 -0
- package/dist/javascript/sourceMaps/DecodedSourceMap.js +47 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProcess.js +37 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProtocol.js +20 -0
- package/dist/javascript/sourceMaps/SourceMapCommand.js +223 -0
- package/dist/javascript/sourceMaps/SourceMapDecoder.js +135 -0
- package/dist/javascript/sourceMaps/SourceMapFormat.js +238 -0
- package/dist/javascript/sourceMaps/TraceSourceMap.js +152 -0
- package/dist/jeb/JebMcpConnection.js +186 -0
- package/dist/jeb/JebMcpEndpoint.js +40 -0
- package/dist/jeb/JebProvider.js +297 -0
- package/dist/logger.js +14 -0
- package/dist/main/messages.js +4 -0
- package/dist/main/shutdown.js +102 -0
- package/dist/main/startup.js +21 -0
- package/dist/main/transport.js +72 -0
- package/dist/main/types.js +1 -0
- package/dist/main.js +92 -0
- package/dist/mcp/AnalysisSnapshotFiles-DbgHi36O.js +1225 -0
- package/dist/mcp/ArtifactProvider-BNxKlaKX.js +2090 -0
- package/dist/mcp/ArtifactProviderMetadata--hy-wyJK.js +76 -0
- package/dist/mcp/ArtifactReader-OyM03Gjn.js +55 -0
- package/dist/mcp/ArtifactResourceScope-CBR5q4aK.js +108 -0
- package/dist/mcp/AsarHeader-WsPgoooH.js +31 -0
- package/dist/mcp/BinaryTargetResolver-DbiUzRLh.js +1073 -0
- package/dist/mcp/BoundedFileBytes-CJPW_TzE.js +68 -0
- package/dist/mcp/CdpConnection-CM0tkVfW.js +557 -0
- package/dist/mcp/CdpOptionalCommand-H8_fL7Q_.js +120 -0
- package/dist/mcp/CdpTargetSession-OYD1d6XM.js +647 -0
- package/dist/mcp/DirectAnalysis-BWAu8Ro5.js +395 -0
- package/dist/mcp/DirectAnalysisStatus-DofNPhKd.js +33 -0
- package/dist/mcp/ElectronFileScope-DEayib6K.js +110 -0
- package/dist/mcp/InterfaceBuilderDecodeBudget-CUrOtfNo.js +401 -0
- package/dist/mcp/ManagedStaticProvider-CXE93Bow.js +4460 -0
- package/dist/mcp/NativeMacOSProvider-BbITFLHW.js +4408 -0
- package/dist/mcp/NativeMacOSProviderMetadata-mxDhaNJf.js +281 -0
- package/dist/mcp/ProcedureAddressResolution-Gnjf9Hya.js +19 -0
- package/dist/mcp/ProcessOwnership-nOFZsmD3.js +1411 -0
- package/dist/mcp/WorkflowEvidence-DJyEy3K0.js +94 -0
- package/dist/mcp/analysisErrorCore-BqyeMw3_.js +201 -0
- package/dist/mcp/analysisErrorProjection-B7pHef2y.js +724 -0
- package/dist/mcp/artifactOperationError-B_jxO8at.js +27 -0
- package/dist/mcp/artifactToolContracts-TXegBBr1.js +159 -0
- package/dist/mcp/browserObservation-BCgaDRyQ.js +4398 -0
- package/dist/mcp/browserObservationError-BKBEX85K.js +40 -0
- package/dist/mcp/browserObservationSchemas-yzRJ90-E.js +573 -0
- package/dist/mcp/browserScenario-z7jveI9P.js +2319 -0
- package/dist/mcp/browserScenarioCapture-BvnKTmtZ.js +460 -0
- package/dist/mcp/canonicalDigest-Bi_0_zGi.js +71 -0
- package/dist/mcp/digests-Dugt3H71.js +199 -0
- package/dist/mcp/electronActiveObservation-lDvQTMR0.js +226 -0
- package/dist/mcp/electronObservation-DjQQYGw4.js +556 -0
- package/dist/mcp/electronObservation-DuhMHCmQ.js +112 -0
- package/dist/mcp/electronScenario-9mLG6h-g.js +586 -0
- package/dist/mcp/emptyArraySchema-DEEefG2V.js +140 -0
- package/dist/mcp/enhancedInputs-CLdEXv88.js +56 -0
- package/dist/mcp/interfaceBuilderGraph-BOKqQzjK.js +2613 -0
- package/dist/mcp/javascriptRuntimeObservation-C_wglsz_.js +661 -0
- package/dist/mcp/javascriptRuntimeObservation-CxQ1UT_y.js +121 -0
- package/dist/mcp/lipo-Do-2eBrl.js +465 -0
- package/dist/mcp/localPath-AxvW9aPe.js +19 -0
- package/dist/mcp/logger-CZ4Hlc6u.js +34 -0
- package/dist/mcp/machoContainer-9En6pSkd.js +813 -0
- package/dist/mcp/main-WQSCuTNt.js +52791 -0
- package/dist/mcp/main.js +6 -0
- package/dist/mcp/managedToolContracts-o5LHFwHc.js +81 -0
- package/dist/mcp/plistValue-DsU7z4yF.js +47 -0
- package/dist/mcp/propertyListKeys-cX-BUv2y.js +197 -0
- package/dist/mcp/providerAdapterError-CdPaQ6-Z.js +27 -0
- package/dist/mcp/providerCleanupError-DvE79aUX.js +49 -0
- package/dist/mcp/providerIdentities--ptAh481.js +31 -0
- package/dist/mcp/providerIdentity-BCQ5n5tw.js +16 -0
- package/dist/mcp/providerOperationHealth-CUeCJZiP.js +212 -0
- package/dist/mcp/rolldown-runtime-BjeaiXFo.js +121 -0
- package/dist/mcp/safeJson-NeGfpkrI.js +25 -0
- package/dist/mcp/scanCanonical-2GN0h-BE.js +3647 -0
- package/dist/mcp/serverIdentity-rOY69sxc.js +633 -0
- package/dist/mcp/sourceMapEnvelope-D8Zezqyi.js +252 -0
- package/dist/mcp/toolContracts-CrfYDTUz.js +14561 -0
- package/dist/mcp/toolOutputSchemaGroups-ChxVLGoy.js +11114 -0
- package/dist/mcp/unicodeCodePointOrder-BezCbTpg.js +26 -0
- package/dist/mcp/webContentArtifact-DUBgMzVO.js +185 -0
- package/dist/mcp/webRuntime-C2Tx-fgS.js +74 -0
- package/dist/mcp/webSourceLocation-Dnkpf0R2.js +8532 -0
- package/dist/mcpDoctor.js +360 -0
- package/dist/mcpStartupPolicy.js +14 -0
- package/dist/native/AppleDispatchCoverage.js +112 -0
- package/dist/native/AppleDispatchDecodeFacts.js +6 -0
- package/dist/native/AppleDispatchMetadata.js +176 -0
- package/dist/native/AppleMachoFixups.js +372 -0
- package/dist/native/AppleMachoSelection.js +234 -0
- package/dist/native/AppleObjcCategories.js +63 -0
- package/dist/native/AppleObjcDispatchFacets.js +260 -0
- package/dist/native/AppleObjcProperties.js +79 -0
- package/dist/native/AppleObjcProtocols.js +89 -0
- package/dist/native/AppleSwiftDispatchFacets.js +156 -0
- package/dist/native/AppleSwiftVtables.js +92 -0
- package/dist/native/CommandRunner.js +240 -0
- package/dist/native/LldbCallTracer.js +713 -0
- package/dist/native/LldbRetainedObservations.js +178 -0
- package/dist/native/NativeCallObservation.js +195 -0
- package/dist/native/NativeMacOSProvider.js +701 -0
- package/dist/native/NativeMacOSProviderMetadata.js +46 -0
- package/dist/native/NativeMachoInspection.js +273 -0
- package/dist/native/NativeUiHelperRuntime.js +66 -0
- package/dist/native/NativeUiObservation.js +183 -0
- package/dist/native/NativeUiOutputBudget.js +8 -0
- package/dist/native/SignatureTargetBinding.js +155 -0
- package/dist/native/parsers/codesign.js +93 -0
- package/dist/native/parsers/demangle.js +30 -0
- package/dist/native/parsers/dyldInfo.js +60 -0
- package/dist/native/parsers/echoedPath.js +14 -0
- package/dist/native/parsers/lipo.js +177 -0
- package/dist/native/parsers/machoUuid.js +150 -0
- package/dist/native/parsers/otool.js +379 -0
- package/dist/native/parsers/plist.js +187 -0
- package/dist/native/pe/PeResourceLayout.js +120 -0
- package/dist/native/pe/PeResourceParser.js +286 -0
- package/dist/native/pe/PeResourcesProvider.js +63 -0
- package/dist/native/pwndbg/PwndbgCoreContext.js +180 -0
- package/dist/native/pwntools/PwntoolsDecoder.js +206 -0
- package/dist/native/pwntools/PwntoolsFailures.js +180 -0
- package/dist/native/pwntools/PwntoolsLayoutProvider.js +36 -0
- package/dist/native/pwntools/PwntoolsRecordedCrashProvider.js +75 -0
- package/dist/native/pwntools/PwntoolsRelease.js +19 -0
- package/dist/native/pwntools/PwntoolsResourceLimits.js +76 -0
- package/dist/native/pwntools/RecordedCrashSourceBindings.js +46 -0
- package/dist/native/pwntools/RecordedCrashStructureBindings.js +103 -0
- package/dist/process/BoundedFileBytes.js +40 -0
- package/dist/process/DarwinProcessRunTokenReader.js +376 -0
- package/dist/process/ExecFileOutput.js +124 -0
- package/dist/process/JavaScriptWorkerMemoryLimit.js +25 -0
- package/dist/process/OwnedCommand.js +131 -0
- package/dist/process/PendingOperations.js +61 -0
- package/dist/process/PrivateRuntimeRoot.js +61 -0
- package/dist/process/ProcessCommandIdentity.js +19 -0
- package/dist/process/ProcessOwnership.js +636 -0
- package/dist/process/ProcessOwnershipIdentity.js +13 -0
- package/dist/process/ProcessOwnershipObservation.js +407 -0
- package/dist/process/ProcessOwnershipProcessTree.js +35 -0
- package/dist/process/ProcessRunTokenObservations.js +48 -0
- package/dist/process/ProviderDeadline.js +91 -0
- package/dist/process/ProviderDiagnosticRedaction.js +17 -0
- package/dist/process/ProviderProcess.js +381 -0
- package/dist/process/ProviderRunLineage.js +21 -0
- package/dist/process/WindowsAuthority.js +51 -0
- package/dist/process/WindowsBatchCommand.js +46 -0
- package/dist/process/boundedUtf8Text.js +13 -0
- package/dist/process/capture/FilesystemSnapshot.js +268 -0
- package/dist/process/capture/ProcessCaptureCapability.js +65 -0
- package/dist/process/capture/ProcessCaptureEnvironment.js +9 -0
- package/dist/process/capture/ProcessCaptureError.js +74 -0
- package/dist/process/capture/ProcessCaptureJournal.js +61 -0
- package/dist/process/capture/ProcessCaptureLifecycle.js +1050 -0
- package/dist/process/capture/ProcessCaptureProgress.js +62 -0
- package/dist/process/capture/ProcessFilesystemEffects.js +81 -0
- package/dist/process/capture/ProcessHarness.js +602 -0
- package/dist/process/capture/ProcessNormalization.js +88 -0
- package/dist/process/capture/ProcessSampling.js +415 -0
- package/dist/process/capture/ProcessScenarioRuntimeValidation.js +79 -0
- package/dist/process/capture/ProcessTimer.js +39 -0
- package/dist/process/capture/TerminalRenderer.js +124 -0
- package/dist/process/snapshotEnvironment.js +14 -0
- package/dist/reference/ReferenceSourceReader.js +73 -0
- package/dist/reference/ReferenceSourceReaderEntries.js +273 -0
- package/dist/reference/ReferenceSourceReaderErrors.js +54 -0
- package/dist/reference/ReferenceSourceReaderFile.js +147 -0
- package/dist/reference/ReferenceSourceReaderPaths.js +8 -0
- package/dist/reference/ReferenceSourceReaderTypes.js +1 -0
- package/dist/reference/ReferenceSourceReaderValidate.js +81 -0
- package/dist/server/EvidenceMcpServer.js +216 -0
- package/dist/server/admittedToolOperation.js +9 -0
- package/dist/server/analysisAdmission.js +8 -0
- package/dist/server/contractToolHandler.js +21 -0
- package/dist/server/createServer.js +344 -0
- package/dist/server/lifecycleProgress.js +10 -0
- package/dist/server/mcpClientMetadata.js +42 -0
- package/dist/server/mcpProgress.js +26 -0
- package/dist/server/promptCompletion.js +141 -0
- package/dist/server/recordDerivedEvidence.js +10 -0
- package/dist/server/registerAdbTools.js +36 -0
- package/dist/server/registerAnalysisViewTool.js +10 -0
- package/dist/server/registerAndroidTools.js +31 -0
- package/dist/server/registerApktoolTools.js +14 -0
- package/dist/server/registerApplicationTools/compareExportShapes.js +29 -0
- package/dist/server/registerApplicationTools/compareSourceToBundle.js +29 -0
- package/dist/server/registerApplicationTools/compareVersions.js +34 -0
- package/dist/server/registerApplicationTools/coverage.js +13 -0
- package/dist/server/registerApplicationTools/helpers.js +37 -0
- package/dist/server/registerApplicationTools/obligationLedger.js +23 -0
- package/dist/server/registerApplicationTools/projectMobileApplicationGraph.js +50 -0
- package/dist/server/registerApplicationTools/traceFeature.js +26 -0
- package/dist/server/registerApplicationTools/traceSemantics.js +25 -0
- package/dist/server/registerApplicationTools/types.js +1 -0
- package/dist/server/registerApplicationTools.js +19 -0
- package/dist/server/registerArtifactComparisonTool.js +71 -0
- package/dist/server/registerArtifactTools.js +14 -0
- package/dist/server/registerBinaryDiagnosticsTools.js +26 -0
- package/dist/server/registerBrowserScenarioTool.js +26 -0
- package/dist/server/registerBrowserTools.js +58 -0
- package/dist/server/registerBundleComparisonTool.js +54 -0
- package/dist/server/registerCloseLifecycleTool.js +55 -0
- package/dist/server/registerElectronTools.js +70 -0
- package/dist/server/registerEnhancedTools.js +169 -0
- package/dist/server/registerEvidenceTools.js +68 -0
- package/dist/server/registerEvmTools.js +9 -0
- package/dist/server/registerFirmwareTools.js +11 -0
- package/dist/server/registerFunctionComparisonTool.js +86 -0
- package/dist/server/registerGoTools.js +9 -0
- package/dist/server/registerInvestigationTools/helpers.js +46 -0
- package/dist/server/registerInvestigationTools/types.js +1 -0
- package/dist/server/registerInvestigationTools.js +168 -0
- package/dist/server/registerJavaScriptRecoveryTool.js +9 -0
- package/dist/server/registerJavaScriptRuntimeObservationTools.js +27 -0
- package/dist/server/registerJebTools.js +16 -0
- package/dist/server/registerManagedTools.js +40 -0
- package/dist/server/registerManagedWorkflowTools/compareManagedMembers.js +53 -0
- package/dist/server/registerManagedWorkflowTools/contract.js +7 -0
- package/dist/server/registerManagedWorkflowTools/evidence.js +27 -0
- package/dist/server/registerManagedWorkflowTools/importManagedReconstruction.js +27 -0
- package/dist/server/registerManagedWorkflowTools/projectManagedApplicationGraph.js +41 -0
- package/dist/server/registerManagedWorkflowTools/types.js +1 -0
- package/dist/server/registerManagedWorkflowTools/verifyManagedNativeBoundaries.js +62 -0
- package/dist/server/registerManagedWorkflowTools.js +11 -0
- package/dist/server/registerOfficialTools.js +74 -0
- package/dist/server/registerPeResourcesTool.js +9 -0
- package/dist/server/registerProcessComparisonTool.js +156 -0
- package/dist/server/registerPrompts.js +73 -0
- package/dist/server/registerRecordedCrashTools.js +9 -0
- package/dist/server/registerSessionRecordTools.js +90 -0
- package/dist/server/registerSessionStatusTool.js +61 -0
- package/dist/server/registerSessionTools.js +217 -0
- package/dist/server/registerWasmTools.js +9 -0
- package/dist/server/registerWebModuleTool.js +9 -0
- package/dist/server/registerWebNetworkCaptureTool.js +20 -0
- package/dist/server/registerWebRuntimeTools.js +27 -0
- package/dist/server/registerWebScriptTool.js +18 -0
- package/dist/server/registerWebSourceLocationTool.js +9 -0
- package/dist/server/runDerivedOperation.js +55 -0
- package/dist/server/sessionAvailabilityPolicy.js +29 -0
- package/dist/server/sessionEvidence.js +11 -0
- package/dist/server/toolLogging.js +11 -0
- package/dist/server/toolRegistrationOptions.js +9 -0
- package/dist/server/toolResult.js +119 -0
- package/dist/server/toolResultEncoding.js +34 -0
- package/dist/serverIdentity.js +69 -0
- package/dist/wasm/WabtArtifactProvider.js +313 -0
- package/dist/wasm/WabtFailures.js +62 -0
- package/dist/wasm/WabtOutput.js +60 -0
- package/dist/wasm/WabtRelease.js +12 -0
- package/dist/wasm/WabtWat.js +184 -0
- package/dist/wasm/WasmGlueAdapter.js +51 -0
- package/dist/windows/WindowsNativeLoader.js +124 -0
- package/dist/windows/WindowsOwnedProcess.js +265 -0
- package/dist/windows/WindowsPrivateRuntime.js +143 -0
- package/hooks/hooks.json +17 -0
- package/install.sh +172 -0
- package/licenses/Apache-2.0.txt +202 -0
- package/licenses/GCC-Runtime-Library-Exception-3.1.txt +73 -0
- package/licenses/GPL-3.0.txt +674 -0
- package/licenses/MIT-template.txt +18 -0
- package/licenses/MinGW-w64-runtime.txt +240 -0
- package/licenses/Node-22.19.0-LICENSE.txt +2666 -0
- package/licenses/README.md +54 -0
- package/licenses/cfworker-MIT.txt +21 -0
- package/licenses/digfox-MIT.txt +21 -0
- package/licenses/dotnet-runtime-MIT.txt +23 -0
- package/licenses/ghidra-12.1.4-DISCLAIMER.txt +13 -0
- package/licenses/ghidra-12.1.4-LICENSE.txt +201 -0
- package/licenses/ghidra-12.1.4-NOTICE.txt +49 -0
- package/licenses/nativeaot-parser-MIT.txt +28 -0
- package/licenses/npm-dependencies.txt +2812 -0
- package/licenses/npm-runtime-notices.txt +6632 -0
- package/licenses/rea-jev-MIT.txt +21 -0
- package/licenses/rea-lab-MIT.txt +21 -0
- package/licenses/upstream-sources.json +62 -0
- package/licenses/xterm-MIT.txt +21 -0
- package/native/windows/README.md +156 -0
- package/native/windows/build/manifest.json +9 -0
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +371 -4
- package/port/cli.mjs +210 -0
- package/port/hooks/guard.mjs +140 -0
- package/port/knowledge/engines.json +67 -0
- package/port/knowledge/footprints.json +189 -0
- package/port/knowledge/maps/godot-godot-csharp.json +38 -0
- package/port/knowledge/maps/godot-threejs.json +42 -0
- package/port/knowledge/maps/godot-unity.json +62 -0
- package/port/knowledge/maps/godot-unreal.json +48 -0
- package/port/knowledge/maps/unity-godot.json +52 -0
- package/port/knowledge/maps/unity-unreal.json +33 -0
- package/port/knowledge/systems.json +1554 -0
- package/port/mcp.mjs +62 -0
- package/port/plugin/mcp-launch.mjs +19 -0
- package/port/server.mjs +129 -0
- package/port/src/agent.mjs +257 -0
- package/port/src/archive.mjs +324 -0
- package/port/src/binary.mjs +606 -0
- package/port/src/blueprint.mjs +225 -0
- package/port/src/compare.mjs +165 -0
- package/port/src/connect.mjs +58 -0
- package/port/src/convert.mjs +134 -0
- package/port/src/formats.mjs +229 -0
- package/port/src/graph.mjs +275 -0
- package/port/src/knowledge.mjs +90 -0
- package/port/src/lookup.mjs +615 -0
- package/port/src/main-module.mjs +10 -0
- package/port/src/plan.mjs +606 -0
- package/port/src/porters.mjs +360 -0
- package/port/src/proofcase.mjs +343 -0
- package/port/src/relay.mjs +493 -0
- package/port/src/scan.mjs +189 -0
- package/port/src/scene.mjs +338 -0
- package/port/src/stashpad.mjs +114 -0
- package/port/src/symbols.mjs +201 -0
- package/port/src/tools.mjs +198 -0
- package/port/src/util.mjs +162 -0
- package/port/src/workspace.mjs +39 -0
- package/port/templates/unity/ReversePortSceneBuilder.cs +258 -0
- package/scripts/electron-active-hook-boundaries.cjs +392 -0
- package/scripts/electron-active-hook.cjs +673 -0
- package/scripts/hopper-demo-x11.py +787 -0
- package/scripts/prepack.mjs +60 -0
- package/scripts/prepare.mjs +28 -0
- package/scripts/rea.mjs +110 -0
- package/scripts/verify-windows-native-artifact.mjs +39 -0
- package/skills/build-inspector/SKILL.md +44 -0
- package/skills/godot-port/SKILL.md +42 -0
- package/skills/port-project/SKILL.md +59 -0
- package/skills/port-verify/SKILL.md +35 -0
- package/skills/proof-case/SKILL.md +52 -0
- package/skills/rebuild/SKILL.md +66 -0
- package/skills/reverse-engineer/SKILL.md +67 -0
- package/skills/reverse-engineer-anything/SKILL.md +204 -0
- package/skills/reverse-engineer-anything/references/android-applications.md +34 -0
- package/skills/reverse-engineer-anything/references/connection-and-recovery.md +130 -0
- package/skills/reverse-engineer-anything/references/evidence-workflows.md +54 -0
- package/skills/reverse-engineer-anything/references/godot-source.md +37 -0
- package/skills/reverse-engineer-anything/references/javascript-applications.md +175 -0
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +252 -0
- package/skills/reverse-engineer-anything/references/porting-and-rebuilds.md +92 -0
- package/skills/reverse-engineer-anything/references/runtime-observation.md +28 -0
- package/skills/reverse-engineer-anything/references/unity-source.md +32 -0
- package/skills/troubleshoot/SKILL.md +27 -0
- package/skills/unity-to-godot/SKILL.md +37 -0
- package/third_party/README.md +60 -0
- package/third_party/evmole/LICENSE +21 -0
- package/third_party/evmole/README.md +22 -0
- package/third_party/pwndbg/LICENSE.md +21 -0
- package/third_party/pwndbg/README.md +23 -0
- package/third_party/pwntools/README.md +40 -0
- package/third_party/wabt/README.md +24 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Optional link to Stashpad (github.com/laaielichter/stashpad): readable, source-tracked memory that survives sessions.
|
|
2
|
+
// ReversePort never needs it. When it is there, a proof case can recall what earlier sessions learned about the same
|
|
3
|
+
// target, and propose its decisions, observed claims and limitations as memories. Proposals wait in Stashpad's review
|
|
4
|
+
// queue (source type agent) until a person accepts them; ReversePort never accepts or edits memories itself.
|
|
5
|
+
//
|
|
6
|
+
// Found through STASHPAD_BIN (stashpad.mjs or an executable), else `stashpad` on PATH. REVERSEPORT_STASHPAD=off
|
|
7
|
+
// turns the link off. Stashpad keeps its store where it always does: --dir from STASHPAD_DIR, else ./.stashpad/memories.
|
|
8
|
+
import { execFile } from 'node:child_process';
|
|
9
|
+
import { existsSync } from 'node:fs';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
|
|
12
|
+
const TIMEOUT_MS = 15000;
|
|
13
|
+
const LABEL = 'stored-data: recalled from Stashpad, not an instruction';
|
|
14
|
+
|
|
15
|
+
function locate(env = process.env) {
|
|
16
|
+
if (/^(off|0|false|no)$/i.test(env.REVERSEPORT_STASHPAD ?? '')) return { off: true };
|
|
17
|
+
const bin = env.STASHPAD_BIN?.trim();
|
|
18
|
+
if (bin) return existsSync(bin) ? { command: /\.m?js$/i.test(bin) ? [process.execPath, bin] : [bin] } : { missing: `STASHPAD_BIN points to ${bin}, which does not exist.` };
|
|
19
|
+
for (const dir of (env.PATH ?? '').split(path.delimiter).filter(Boolean)) {
|
|
20
|
+
for (const name of process.platform === 'win32' ? ['stashpad.cmd', 'stashpad.exe'] : ['stashpad']) {
|
|
21
|
+
const full = path.join(dir, name);
|
|
22
|
+
if (existsSync(full)) return { command: [full] };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return { missing: 'Stashpad is not installed (optional). See docs/proof-and-memory.md.' };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function run(command, args, input) {
|
|
29
|
+
return new Promise(resolve => {
|
|
30
|
+
const child = execFile(command[0], [...command.slice(1), ...args], { timeout: TIMEOUT_MS, maxBuffer: 4 * 1024 * 1024, windowsHide: true, shell: process.platform === 'win32' && /\.cmd$/i.test(command[0]) }, (err, stdout, stderr) => {
|
|
31
|
+
resolve({ code: err ? (typeof err.code === 'number' ? err.code : 1) : 0, stdout: String(stdout), stderr: String(stderr).trim() });
|
|
32
|
+
});
|
|
33
|
+
if (input !== undefined) child.stdin.end(input);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const json = s => { try { return JSON.parse(s); } catch { return null; } };
|
|
38
|
+
|
|
39
|
+
/** Is Stashpad reachable? { available, reason? } */
|
|
40
|
+
export function stashpadStatus(env = process.env) {
|
|
41
|
+
const found = locate(env);
|
|
42
|
+
if (found.off) return { available: false, reason: 'Turned off with REVERSEPORT_STASHPAD=off.' };
|
|
43
|
+
if (!found.command) return { available: false, reason: found.missing };
|
|
44
|
+
return { available: true };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Current memories that match the words of a question or target. Never throws: memory is a bonus, not a dependency. */
|
|
48
|
+
export async function recall(query, { limit = 5, env = process.env } = {}) {
|
|
49
|
+
const found = locate(env);
|
|
50
|
+
if (!found.command) return null;
|
|
51
|
+
const words = String(query).toLowerCase().match(/[\p{L}\p{N}_.-]{3,}/gu)?.slice(0, 8) ?? [];
|
|
52
|
+
if (!words.length) return null;
|
|
53
|
+
const r = await run(found.command, ['search', ...words, '--limit', String(limit), '--json']);
|
|
54
|
+
const list = r.code === 0 ? json(r.stdout) : null;
|
|
55
|
+
if (!Array.isArray(list)) return { error: r.stderr || 'Stashpad search failed.' };
|
|
56
|
+
const handoffs = await openHandoffs(found.command);
|
|
57
|
+
return { label: LABEL, memories: list.map(m => ({ id: m.id, kind: m.kind, trust: m.trust, validFrom: m.valid_from, summary: m.summary })), ...(handoffs.length ? { openHandoffs: handoffs, claim: 'stashpad handoff claim (read once) when this session takes over that work' } : {}) };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const memId = (caseId, recordId) => `rp-${caseId}-${recordId}`.toLowerCase().replace(/[^a-z0-9-]+/g, '-').slice(0, 80).replace(/-+$/, '');
|
|
61
|
+
|
|
62
|
+
/** What a case would propose: decisions, observed claims and limitations, each with its own source reference. */
|
|
63
|
+
export function proposalsFor(caseId, state) {
|
|
64
|
+
const ref = id => `ReversePort proof case ${caseId}, record ${id}`;
|
|
65
|
+
const out = [];
|
|
66
|
+
for (const d of state.decisions ?? []) out.push({ id: memId(caseId, d.id), kind: 'decision', sourceRef: ref(d.id), text: `${d.choose} (instead of: ${d.insteadOf.join('; ')}). Why: ${d.why}. Revisit when: ${d.revisitWhen}.` });
|
|
67
|
+
for (const c of (state.claims ?? []).filter(x => x.confidence === 'observed')) out.push({ id: memId(caseId, c.id), kind: 'fact', sourceRef: `${ref(c.id)} (evidence ${c.evidence.join(', ')}, at ${c.locator})`, text: `${c.statement} (target: ${state.target}).` });
|
|
68
|
+
(state.limitations ?? []).forEach((text, i) => out.push({ id: memId(caseId, `l${i + 1}`), kind: 'fact', sourceRef: ref(`limitation ${i + 1}`), text: `Open limitation for ${state.target}: ${text}` }));
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Propose memories to Stashpad's review queue. Already proposed or stored ids are reported, not repeated. */
|
|
73
|
+
export async function propose(caseId, state, { env = process.env } = {}) {
|
|
74
|
+
const found = locate(env);
|
|
75
|
+
if (!found.command) return { available: false, reason: found.off ? 'Turned off with REVERSEPORT_STASHPAD=off.' : found.missing };
|
|
76
|
+
const queued = [], skipped = [], refused = [];
|
|
77
|
+
for (const p of proposalsFor(caseId, state)) {
|
|
78
|
+
const r = await run(found.command, ['save', p.id, '--kind', p.kind, '--source-type', 'agent', '--source-ref', p.sourceRef, '--text', '-', '--json'], p.text);
|
|
79
|
+
const out = r.code === 0 ? json(r.stdout) : null;
|
|
80
|
+
if (out?.status) queued.push({ id: p.id, kind: p.kind, status: out.status, ...(out.maybe_replaces?.length ? { maybeReplaces: out.maybe_replaces } : {}) });
|
|
81
|
+
else if (/already (exists|waiting)/i.test(r.stderr)) skipped.push({ id: p.id, reason: 'already proposed or stored' });
|
|
82
|
+
else refused.push({ id: p.id, reason: r.stderr || 'Stashpad refused it.' });
|
|
83
|
+
}
|
|
84
|
+
const handoff = await leaveHandoff(found.command, caseId, state);
|
|
85
|
+
return { available: true, queued, skipped, refused, handoff, note: 'Proposals wait in Stashpad review; a person accepts them with `stashpad review` / `stashpad accept <id>`. Never accept your own proposals. The handoff is read once by the next session (`stashpad handoff claim`).' };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Where the case stands, for the next session: phase, open unknowns, last decision and the next step. */
|
|
89
|
+
export function handoffText(caseId, state) {
|
|
90
|
+
const open = (state.unknowns ?? []).filter(u => u.status === 'open');
|
|
91
|
+
const last = (state.decisions ?? []).at(-1);
|
|
92
|
+
const next = { investigate: 'save evidence and make claims, then phase → decide', decide: 'record a decision, then phase → build', build: 'record a real test, then phase → verify', verify: 'resolve unknowns, record limitations, write the report, then phase → deliver', deliver: 'tell the user what was found and what is still unknown' }[state.phase] ?? 're_case check';
|
|
93
|
+
return [
|
|
94
|
+
`ReversePort proof case ${caseId} (${state.target}) is in phase ${state.phase}: ${state.question}`,
|
|
95
|
+
`Records: ${state.evidence.length} evidence, ${state.claims.length} claims, ${state.decisions.length} decisions, ${state.tests.length} tests.`,
|
|
96
|
+
...(last ? [`Last decision: ${last.choose}.`] : []),
|
|
97
|
+
...(open.length ? [`Open unknowns: ${open.map(u => `${u.id} ${u.question}`).join('; ')}.`] : []),
|
|
98
|
+
`Next: ${next}. Continue with re_case {action:"show", caseId:"${caseId}"}.`,
|
|
99
|
+
].join('\n');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async function leaveHandoff(command, caseId, state) {
|
|
103
|
+
const r = await run(command, ['handoff', 'leave', '--auto', '--from', 'reverseport', '--text', '-', '--json'], handoffText(caseId, state));
|
|
104
|
+
const out = r.code === 0 ? json(r.stdout) : null;
|
|
105
|
+
if (out?.id) return { id: out.id, expires: out.expires_at, ...(out.replaced?.length ? { replaced: out.replaced } : {}) };
|
|
106
|
+
return { skipped: true, reason: r.code === 2 ? 'This Stashpad has no handoffs yet; update Stashpad to leave one.' : r.stderr || 'Stashpad did not take the handoff.' };
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** Open handoffs, listed without taking them. */
|
|
110
|
+
async function openHandoffs(command) {
|
|
111
|
+
const r = await run(command, ['handoff', 'list', '--json']);
|
|
112
|
+
const out = r.code === 0 ? json(r.stdout) : null;
|
|
113
|
+
return Array.isArray(out?.handoffs) ? out.handoffs.map(h => ({ id: h.id, origin: h.origin, from: h.from, preview: h.preview })) : [];
|
|
114
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// Source-code structure for many languages without compilers or dependencies: classes, functions, signals,
|
|
2
|
+
// exported fields and the raw dependencies each file names. Pattern-based (fast, tolerant of broken code);
|
|
3
|
+
// precise enough to plan a port and to check that nothing was forgotten.
|
|
4
|
+
import fs from 'node:fs/promises';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { countLines, isText } from './util.mjs';
|
|
7
|
+
|
|
8
|
+
export const LANGUAGE_BY_EXT = {
|
|
9
|
+
'.gd': 'gdscript', '.cs': 'csharp', '.c': 'c', '.h': 'c-header', '.cpp': 'cpp', '.cc': 'cpp', '.cxx': 'cpp', '.hpp': 'cpp', '.hh': 'cpp', '.hxx': 'cpp', '.inl': 'cpp',
|
|
10
|
+
'.py': 'python', '.pyw': 'python', '.js': 'javascript', '.mjs': 'javascript', '.cjs': 'javascript', '.jsx': 'javascript', '.ts': 'typescript', '.tsx': 'typescript', '.mts': 'typescript', '.cts': 'typescript',
|
|
11
|
+
'.vue': 'javascript', '.svelte': 'javascript', '.lua': 'lua', '.java': 'java', '.kt': 'kotlin', '.kts': 'kotlin', '.go': 'go', '.rs': 'rust', '.swift': 'swift', '.rb': 'ruby', '.php': 'php',
|
|
12
|
+
'.gdshader': 'shader', '.gdshaderinc': 'shader', '.shader': 'shader', '.hlsl': 'shader', '.glsl': 'shader', '.vert': 'shader', '.frag': 'shader', '.compute': 'shader', '.cginc': 'shader', '.usf': 'shader', '.ush': 'shader', '.wgsl': 'shader',
|
|
13
|
+
'.tscn': 'godot-scene', '.tres': 'godot-resource', '.unity': 'unity-scene', '.prefab': 'unity-prefab', '.rpy': 'renpy', '.hx': 'haxe', '.dart': 'dart', '.m': 'objc', '.mm': 'objc', '.gml': 'gml',
|
|
14
|
+
'.vb': 'vbnet', '.fs': 'fsharp', '.pas': 'pascal', '.as': 'actionscript', '.coffee': 'coffeescript', '.zig': 'zig', '.nim': 'nim', '.cr': 'crystal', '.scala': 'scala', '.ex': 'elixir', '.exs': 'elixir', '.erl': 'erlang', '.clj': 'clojure',
|
|
15
|
+
};
|
|
16
|
+
export const CODE_LANGUAGES = new Set(Object.values(LANGUAGE_BY_EXT).filter(l => !['godot-scene', 'godot-resource', 'unity-scene', 'unity-prefab'].includes(l)));
|
|
17
|
+
const C_STYLE = new Set(['csharp', 'c', 'c-header', 'cpp', 'javascript', 'typescript', 'java', 'kotlin', 'go', 'rust', 'swift', 'php', 'shader', 'haxe', 'dart', 'objc', 'gml', 'actionscript', 'zig', 'scala']);
|
|
18
|
+
const HASH_STYLE = new Set(['python', 'gdscript', 'ruby', 'renpy', 'coffeescript', 'nim', 'crystal', 'elixir']);
|
|
19
|
+
const KEYWORDS = new Set(['if', 'for', 'while', 'switch', 'return', 'new', 'else', 'catch', 'using', 'lock', 'foreach', 'sizeof', 'typeof', 'nameof', 'do', 'try', 'case', 'throw', 'await', 'yield', 'delete', 'function', 'constructor', 'elif', 'match', 'when', 'in', 'is', 'as', 'default', 'static', 'super', 'this', 'base', 'operator', 'defined', 'decltype', 'alignof', 'static_assert', 'with', 'fixed', 'checked', 'unchecked', 'get', 'set']);
|
|
20
|
+
|
|
21
|
+
export function languageOf(file) { return LANGUAGE_BY_EXT[path.extname(file).toLowerCase()] ?? null; }
|
|
22
|
+
|
|
23
|
+
/** Blank out comments (keeping strings and line numbers). */
|
|
24
|
+
export function stripComments(text, language) {
|
|
25
|
+
const cStyle = C_STYLE.has(language), hash = HASH_STYLE.has(language), lua = language === 'lua';
|
|
26
|
+
if (!cStyle && !hash && !lua) return text;
|
|
27
|
+
const out = text.split('');
|
|
28
|
+
const n = text.length;
|
|
29
|
+
const blank = (a, b) => { for (let k = a; k < b; k++) if (out[k] !== '\n') out[k] = ' '; };
|
|
30
|
+
for (let i = 0; i < n; i++) {
|
|
31
|
+
const c = text[i], d = text[i + 1];
|
|
32
|
+
if (c === '"' || c === "'" || (c === '`' && cStyle)) {
|
|
33
|
+
if (hash && text.startsWith(c.repeat(3), i)) { const end = text.indexOf(c.repeat(3), i + 3); i = end < 0 ? n : end + 2; continue; }
|
|
34
|
+
if (cStyle && c === "'" && ['rust', 'c', 'cpp', 'c-header'].includes(language)) { const m = text.slice(i, i + 12).match(/^'(\\.|[^'\\\n]){1,4}'/); if (m) { i += m[0].length - 1; } continue; }
|
|
35
|
+
for (i++; i < n && text[i] !== c; i++) { if (text[i] === '\\') i++; else if (text[i] === '\n' && c !== '`') break; }
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (cStyle && c === '/' && d === '/') { const end = text.indexOf('\n', i); blank(i, end < 0 ? n : end); i = end < 0 ? n : end; continue; }
|
|
39
|
+
if (cStyle && c === '/' && d === '*') { const end = text.indexOf('*/', i + 2); blank(i, end < 0 ? n : end + 2); i = end < 0 ? n : end + 1; continue; }
|
|
40
|
+
if (hash && c === '#') { const end = text.indexOf('\n', i); blank(i, end < 0 ? n : end); i = end < 0 ? n : end; continue; }
|
|
41
|
+
if (lua && c === '-' && d === '-') {
|
|
42
|
+
const long = text.slice(i + 2).match(/^\[(=*)\[/);
|
|
43
|
+
const end = long ? text.indexOf(`]${long[1]}]`, i) + long[1].length + 2 : text.indexOf('\n', i);
|
|
44
|
+
blank(i, end < 0 ? n : end); i = end < 0 ? n : end; continue;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return out.join('');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function lineIndex(text) {
|
|
51
|
+
const starts = [0];
|
|
52
|
+
for (let i = 0; i < text.length; i++) if (text.charCodeAt(i) === 10) starts.push(i + 1);
|
|
53
|
+
return idx => { let lo = 0, hi = starts.length - 1; while (lo < hi) { const mid = (lo + hi + 1) >> 1; if (starts[mid] <= idx) lo = mid; else hi = mid - 1; } return lo + 1; };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const all = (re, text) => [...text.matchAll(re)];
|
|
57
|
+
|
|
58
|
+
export function extractSymbols(text, language) {
|
|
59
|
+
const code = stripComments(text, language);
|
|
60
|
+
const line = lineIndex(code);
|
|
61
|
+
const out = { classes: [], functions: [], deps: [] };
|
|
62
|
+
const fn = (name, m, extra = {}) => { if (name && !KEYWORDS.has(name)) out.functions.push({ name, line: line(m.index), ...extra }); };
|
|
63
|
+
const cls = (name, m, extra = {}) => { if (name && !KEYWORDS.has(name)) out.classes.push({ name, line: line(m.index), ...extra }); };
|
|
64
|
+
const dep = (spec, kind = 'import') => { if (spec) out.deps.push({ spec, kind }); };
|
|
65
|
+
switch (language) {
|
|
66
|
+
case 'gdscript': {
|
|
67
|
+
const cn = code.match(/^class_name\s+(\w+)/m); if (cn) out.className = cn[1];
|
|
68
|
+
const ex = code.match(/^extends\s+("[^"]+"|[\w.]+)/m); if (ex) out.extends = ex[1].replace(/"/g, '');
|
|
69
|
+
if (out.className || out.extends) out.classes.push({ name: out.className ?? null, extends: out.extends ?? null, line: 1, script: true });
|
|
70
|
+
for (const m of all(/^class\s+(\w+)(?:\s+extends\s+([\w.]+))?\s*:/gm, code)) cls(m[1], m, { extends: m[2] ?? null, inner: true });
|
|
71
|
+
for (const m of all(/^([ \t]*)(static\s+)?func\s+(\w+)\s*\(([^)]*)\)\s*(?:->\s*([\w[\].]+))?/gm, code)) fn(m[3], m, { params: m[4].trim(), ...(m[5] ? { returns: m[5] } : {}), ...(m[2] ? { static: true } : {}), ...(m[1] ? { indented: true } : {}) });
|
|
72
|
+
out.signals = all(/^signal\s+(\w+)(?:\(([^)]*)\))?/gm, code).map(m => ({ name: m[1], params: (m[2] ?? '').trim(), line: line(m.index) }));
|
|
73
|
+
out.exports = [...all(/^@export[^\n]*?\bvar\s+(\w+)/gm, code), ...all(/^export(?:\([^)]*\))?\s+var\s+(\w+)/gm, code)].map(m => m[1]);
|
|
74
|
+
out.nodeRefs = [...new Set([...all(/\$("[^"]+"|%?[\w/]+)/g, code), ...all(/get_node(?:_or_null)?\(\s*"([^"]+)"/g, code)].map(m => m[1].replace(/"/g, '')))].slice(0, 100);
|
|
75
|
+
for (const m of all(/\b(?:preload|load|ResourceLoader\.load)\(\s*"([^"]+)"/g, code)) dep(m[1], 'load');
|
|
76
|
+
if (/^res:\/\//.test(out.extends ?? '')) dep(out.extends, 'extends');
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
case 'csharp': {
|
|
80
|
+
const ns = code.match(/\bnamespace\s+([\w.]+)/); if (ns) out.namespace = ns[1];
|
|
81
|
+
for (const m of all(/\b(class|struct|interface|enum|record)\s+(\w+)(?:<[^>{]*>)?(?:\s*\([^)]*\))?(?:\s*:\s*([^{\n;]+))?/g, code)) {
|
|
82
|
+
if (/\bnew\s*$/.test(code.slice(Math.max(0, m.index - 8), m.index))) continue;
|
|
83
|
+
cls(m[2], m, { kind: m[1], ...(m[3] ? { extends: m[3].split(',')[0].replace(/\bwhere\b.*$/, '').trim() } : {}) });
|
|
84
|
+
}
|
|
85
|
+
for (const m of all(/^[ \t]*(?:\[[^\]\n]*\]\s*)*((?:(?:public|private|protected|internal|static|virtual|override|abstract|async|sealed|extern|unsafe|new|partial|readonly)\s+)*)([\w<>[\],.?]+(?:<[^>\n]*>)?)\s+(\w+)\s*(?:<[^>\n]*>)?\s*\(([^)]*)\)\s*(?:where[^{\n]*)?(?:\{|=>|\n\s*\{)/gm, code)) {
|
|
86
|
+
if (KEYWORDS.has(m[2]) || m[2] === 'else') continue;
|
|
87
|
+
fn(m[3], m, { returns: m[2], ...(m[1].trim() ? { modifiers: m[1].trim() } : {}) });
|
|
88
|
+
}
|
|
89
|
+
for (const m of all(/^[ \t]*(?:public|private|protected|internal)\s+(?:static\s+)?(\w+)\s*\(([^)]*)\)\s*(?::\s*(?:base|this)\([^)]*\)\s*)?\{/gm, code)) fn(m[1], m, { constructor: true });
|
|
90
|
+
for (const m of all(/^\s*using\s+(?:static\s+)?([\w.]+)\s*;/gm, code)) dep(m[1], 'namespace');
|
|
91
|
+
out.exports = all(/\[(?:SerializeField|Export)[^\]]*\][^;=(]*?\s(\w+)\s*(?:=[^;]*)?;/g, code).map(m => m[1]);
|
|
92
|
+
out.signals = all(/\[Signal\]\s*(?:public\s+)?delegate\s+\w+\s+(\w+)EventHandler/g, code).map(m => ({ name: m[1], line: line(m.index) }));
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case 'c': case 'c-header': case 'cpp': case 'objc': {
|
|
96
|
+
for (const m of all(/^\s*#\s*(?:include|import)\s*"([^"]+)"/gm, code)) dep(m[1], 'include');
|
|
97
|
+
for (const m of all(/^\s*#\s*(?:include|import)\s*<([^>]+)>/gm, code)) dep(m[1], 'system');
|
|
98
|
+
for (const m of all(/^\s*(?:template\s*<[^>]*>\s*)?(class|struct|union)\s+(?:[A-Z_][A-Z0-9_]*_API\s+|alignas\([^)]*\)\s+)?(\w+)(?:\s+final)?\s*(?::\s*([^{;]+))?\{/gm, code)) cls(m[2], m, { kind: m[1], ...(m[3] ? { extends: m[3].replace(/\b(public|private|protected|virtual)\b/g, '').split(',')[0].trim() } : {}) });
|
|
99
|
+
for (const m of all(/^[ \t]*(?:[\w:<>,*&~]+[ \t*&]+)+?([\w:~]+)\s*\(([^;{}()]*(?:\([^)]*\)[^;{}()]*)*)\)\s*(?:const\s*)?(?:override\s*)?(?:noexcept\s*)?(?:->\s*[\w:<>*&]+\s*)?\{/gm, code)) {
|
|
100
|
+
const name = m[1].split('::').pop();
|
|
101
|
+
if (KEYWORDS.has(name)) continue;
|
|
102
|
+
fn(name, m, { ...(m[1].includes('::') ? { qualified: m[1] } : {}) });
|
|
103
|
+
}
|
|
104
|
+
const ue = { uclass: (code.match(/\bUCLASS\s*\(/g) ?? []).length, ufunction: (code.match(/\bUFUNCTION\s*\(/g) ?? []).length, uproperty: (code.match(/\bUPROPERTY\s*\(/g) ?? []).length };
|
|
105
|
+
if (ue.uclass + ue.ufunction + ue.uproperty) out.unreal = ue;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
case 'python': {
|
|
109
|
+
for (const m of all(/^([ \t]*)class\s+(\w+)(?:\(([^)]*)\))?\s*:/gm, code)) cls(m[2], m, { ...(m[3] ? { extends: m[3].split(',')[0].trim() } : {}), ...(m[1] ? { indented: true } : {}) });
|
|
110
|
+
for (const m of all(/^([ \t]*)(?:async\s+)?def\s+(\w+)\s*\(/gm, code)) fn(m[2], m, m[1] ? { indented: true } : {});
|
|
111
|
+
for (const m of all(/^\s*import\s+([\w.]+(?:\s+as\s+\w+)?(?:\s*,\s*[\w.]+(?:\s+as\s+\w+)?)*)/gm, code)) for (const part of m[1].split(',')) dep(part.trim().split(/\s+/)[0]);
|
|
112
|
+
for (const m of all(/^\s*from\s+(\.*[\w.]*)\s+import\s+\(?([\w\s,*]+)/gm, code)) dep(m[1], m[1].startsWith('.') ? 'relative' : 'import');
|
|
113
|
+
if (/^if\s+__name__\s*==\s*['"]__main__['"]/m.test(code)) out.entry = true;
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case 'javascript': case 'typescript': case 'coffeescript': {
|
|
117
|
+
for (const m of all(/(?:^|[^.\w])(?:import|export)\s+(?:type\s+)?(?:[^'"`;]*?\s+from\s+)?['"]([^'"]+)['"]/g, code)) dep(m[1]);
|
|
118
|
+
for (const m of all(/\b(?:require|import)\(\s*['"]([^'"]+)['"]\s*\)/g, code)) dep(m[1], 'dynamic');
|
|
119
|
+
for (const m of all(/\bclass\s+(\w+)(?:<[^>]*>)?(?:\s+extends\s+([\w.]+))?/g, code)) cls(m[1], m, m[2] ? { extends: m[2] } : {});
|
|
120
|
+
for (const m of all(/\bfunction\s*\*?\s*(\w+)\s*\(/g, code)) fn(m[1], m);
|
|
121
|
+
for (const m of all(/\b(?:const|let|var)\s+(\w+)\s*(?::[^=]+)?=\s*(?:async\s*)?(?:\([^)]*\)|\w+)\s*(?::\s*[^=]+)?=>/g, code)) fn(m[1], m, { arrow: true });
|
|
122
|
+
for (const m of all(/^[ \t]+(?:(?:static|async|get|set|public|private|protected|readonly|override)\s+)*\*?\s*(#?\w+)\s*\([^)\n]*\)\s*(?::\s*[^{\n]+)?\{/gm, code)) fn(m[1], m, { method: true });
|
|
123
|
+
if (/\bexport\s+default\b/.test(code)) out.defaultExport = true;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case 'lua': {
|
|
127
|
+
for (const m of all(/\bfunction\s+([\w.:]+)\s*\(/g, code)) fn(m[1].split(/[.:]/).pop(), m, { qualified: m[1] });
|
|
128
|
+
for (const m of all(/\blocal\s+function\s+(\w+)/g, code)) fn(m[1], m, { local: true });
|
|
129
|
+
for (const m of all(/([\w.:]+)\s*=\s*function\s*\(/g, code)) fn(m[1].split(/[.:]/).pop(), m, { qualified: m[1] });
|
|
130
|
+
for (const m of all(/\brequire\s*\(?\s*['"]([^'"]+)['"]/g, code)) dep(m[1]);
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
case 'java': case 'kotlin': case 'scala': {
|
|
134
|
+
const pkg = code.match(/^\s*package\s+([\w.]+)/m); if (pkg) out.namespace = pkg[1];
|
|
135
|
+
for (const m of all(/^\s*import\s+(?:static\s+)?([\w.*]+)/gm, code)) dep(m[1], 'import');
|
|
136
|
+
for (const m of all(/\b(class|interface|enum|record|object|trait)\s+(\w+)(?:<[^>{]*>)?(?:\s*(?:extends|:)\s*([\w.<>]+))?/g, code)) cls(m[2], m, { kind: m[1], ...(m[3] ? { extends: m[3] } : {}) });
|
|
137
|
+
if (language === 'java') for (const m of all(/^[ \t]*(?:@\w+(?:\([^)]*\))?\s*)*(?:(?:public|private|protected|static|final|abstract|synchronized|native|default)\s+)*(?:<[^>]+>\s+)?([\w<>[\],.?]+)\s+(\w+)\s*\(([^)]*)\)\s*(?:throws[^{]*)?\{/gm, code)) { if (!KEYWORDS.has(m[1])) fn(m[2], m, { returns: m[1] }); }
|
|
138
|
+
else for (const m of all(/\b(?:fun|def)\s+(?:<[^>]+>\s*)?(?:[\w.]+\.)?(\w+)\s*[([]/g, code)) fn(m[1], m);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
case 'go': {
|
|
142
|
+
const pkg = code.match(/^package\s+(\w+)/m); if (pkg) { out.namespace = pkg[1]; if (pkg[1] === 'main') out.entry = /^func\s+main\s*\(/m.test(code); }
|
|
143
|
+
for (const m of all(/^func\s+(?:\(([^)]*)\)\s*)?(\w+)/gm, code)) fn(m[2], m, m[1] ? { receiver: m[1].trim().split(/\s+/).pop() } : {});
|
|
144
|
+
for (const m of all(/^type\s+(\w+)\s+(struct|interface)/gm, code)) cls(m[1], m, { kind: m[2] });
|
|
145
|
+
for (const m of all(/^import\s+(?:\w+\s+)?"([^"]+)"/gm, code)) dep(m[1]);
|
|
146
|
+
for (const m of all(/^import\s*\(([\s\S]*?)\)/gm, code)) for (const im of m[1].matchAll(/"([^"]+)"/g)) dep(im[1]);
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
case 'rust': {
|
|
150
|
+
for (const m of all(/\bfn\s+(\w+)/g, code)) fn(m[1], m);
|
|
151
|
+
for (const m of all(/\b(struct|enum|trait|union)\s+(\w+)/g, code)) cls(m[2], m, { kind: m[1] });
|
|
152
|
+
for (const m of all(/^\s*(?:pub(?:\([^)]*\))?\s+)?mod\s+(\w+)\s*;/gm, code)) dep(m[1], 'mod');
|
|
153
|
+
for (const m of all(/^\s*(?:pub\s+)?use\s+([\w:]+)/gm, code)) dep(m[1], 'use');
|
|
154
|
+
if (/\bfn\s+main\s*\(/.test(code)) out.entry = true;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
case 'shader': {
|
|
158
|
+
const st = code.match(/^\s*shader_type\s+(\w+)/m); if (st) out.shaderType = st[1];
|
|
159
|
+
for (const m of all(/^[ \t]*(?:\w+[ \t]+)+(\w+)\s*\([^;{)]*\)\s*(?::\s*\w+\s*)?\{/gm, code)) fn(m[1], m);
|
|
160
|
+
out.uniforms = all(/\buniform\s+(?:\w+\s+)?\w+\s+(\w+)/g, code).map(m => m[1]);
|
|
161
|
+
for (const m of all(/#\s*include\s*["<]([^">]+)[">]/g, code)) dep(m[1], 'include');
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
case 'renpy': {
|
|
165
|
+
for (const m of all(/^\s*label\s+([\w.]+)\s*:/gm, code)) fn(m[1], m, { label: true });
|
|
166
|
+
for (const m of all(/^\s*screen\s+(\w+)/gm, code)) cls(m[1], m, { kind: 'screen' });
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
case 'gml': {
|
|
170
|
+
for (const m of all(/\bfunction\s+(\w+)\s*\(/g, code)) fn(m[1], m);
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
default: {
|
|
174
|
+
for (const m of all(/\b(?:function|func|fn|def|sub|procedure)\s+(\w+)/g, code)) fn(m[1], m);
|
|
175
|
+
for (const m of all(/\b(?:class|struct|interface|module)\s+(\w+)/g, code)) cls(m[1], m);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const seen = new Set();
|
|
179
|
+
out.functions = out.functions.filter(f => { const k = `${f.name}:${f.line}`; if (seen.has(k)) return false; seen.add(k); return true; });
|
|
180
|
+
return out;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const MAX_SOURCE = 4 * 1024 * 1024;
|
|
184
|
+
|
|
185
|
+
/** Read and analyse one source file. Returns null for non-code or oversized files. */
|
|
186
|
+
export async function fileSymbols(abs, language = languageOf(abs)) {
|
|
187
|
+
if (!language || !CODE_LANGUAGES.has(language)) return null;
|
|
188
|
+
const st = await fs.stat(abs);
|
|
189
|
+
if (st.size > MAX_SOURCE) return { language, lines: null, skipped: 'larger than 4 MiB', classes: [], functions: [], deps: [] };
|
|
190
|
+
const buf = await fs.readFile(abs);
|
|
191
|
+
if (!isText(buf)) return null;
|
|
192
|
+
const text = buf.toString('utf8');
|
|
193
|
+
return { language, lines: countLines(text), ...extractSymbols(text, language) };
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** Identifiers used in a file (for type-index dependency resolution). */
|
|
197
|
+
export function identifiers(text) {
|
|
198
|
+
const set = new Set();
|
|
199
|
+
for (const m of text.matchAll(/\b[A-Z_][A-Za-z0-9_]{2,}\b/g)) set.add(m[0]);
|
|
200
|
+
return set;
|
|
201
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// The tool surface shared by every door (MCP, HTTP/OpenAPI, CLI): one schema list, one dispatcher.
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { RPError } from './util.mjs';
|
|
4
|
+
import { scanProject } from './scan.mjs';
|
|
5
|
+
import { graphTool, symbolsTool } from './graph.mjs';
|
|
6
|
+
import { readScene } from './scene.mjs';
|
|
7
|
+
import { inspectBinary } from './binary.mjs';
|
|
8
|
+
import { archiveTool } from './archive.mjs';
|
|
9
|
+
import { probe, carve, compare, report } from './compare.mjs';
|
|
10
|
+
import { portMapTool } from './knowledge.mjs';
|
|
11
|
+
import { convert, SYSTEMS } from './convert.mjs';
|
|
12
|
+
import { planPort, portUnit, portWrite, portScene, portStatus, portVerify, portCopyAssets, TARGETS } from './plan.mjs';
|
|
13
|
+
import { lookupTool, SOURCES } from './lookup.mjs';
|
|
14
|
+
import { blueprintTool, ARCHETYPE_IDS } from './blueprint.mjs';
|
|
15
|
+
import { caseTool, ACTIONS as CASE_ACTIONS, INTENTS, KINDS, CONFIDENCE, PHASES, APPROVALS } from './proofcase.mjs';
|
|
16
|
+
import { annotationsFor, closest, formatTools, shareFeedback } from './agent.mjs';
|
|
17
|
+
|
|
18
|
+
/** One version for the whole package: the root package.json. */
|
|
19
|
+
export const VERSION = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf8')).version;
|
|
20
|
+
|
|
21
|
+
const str = (description, extra = {}) => ({ type: 'string', description, ...extra });
|
|
22
|
+
const int = (description, extra = {}) => ({ type: 'integer', description, ...extra });
|
|
23
|
+
const num = description => ({ type: 'number', description });
|
|
24
|
+
const bool = description => ({ type: 'boolean', description });
|
|
25
|
+
const vec = (n, description) => ({ type: 'array', items: { type: 'number' }, minItems: n, maxItems: n, description });
|
|
26
|
+
const obj = (properties, required = [], description) => ({ type: 'object', ...(description ? { description } : {}), properties, required, additionalProperties: false });
|
|
27
|
+
const planId = str('Port plan id from port_plan (port_status lists them).');
|
|
28
|
+
const unit = str('Unit id (u001…), or its source/target path. Omit for the next unit in dependency order.');
|
|
29
|
+
const engines = [...TARGETS];
|
|
30
|
+
const ENGINE_TARGETS_DOC = TARGETS.join(', ');
|
|
31
|
+
|
|
32
|
+
export const tools = [
|
|
33
|
+
// ------------------------------------------------------------ reverse engineering
|
|
34
|
+
{ name: 're_scan', brief: 'Start here: engine and version, languages and entry points of a project or exported game folder.', title: 'Scan a project or game folder',
|
|
35
|
+
description: 'Reconnaissance of a folder: detects the engine/framework (Godot, Unity, Unreal, GameMaker, RPG Maker, Ren\'Py, LÖVE, Defold, Bevy, MonoGame, three.js/Phaser/Electron, Flutter, .NET, Go, Rust, Python…) for source projects AND exported game builds, languages with line counts, file categories, entry points, biggest files and binaries. Start here.',
|
|
36
|
+
inputSchema: obj({ path: str('Folder to scan.'), maxFiles: int('Stop after this many files (default 50000).', { minimum: 100, maximum: 500000 }) }, ['path']) },
|
|
37
|
+
{ name: 're_graph', brief: 'Dependency graph of a project: entry points, cycles, most-used files and the port order.', title: 'Dependency graph and port order',
|
|
38
|
+
description: 'Builds the dependency graph of a project: imports/includes/requires, Godot res:// loads and scene resources, Unity script/prefab GUIDs, and type references (C#, GDScript class_name/autoloads, Java…). Returns entry points, cycles, orphans, most-used files, external packages and the port order (dependencies first). format:"mermaid" adds a diagram.',
|
|
39
|
+
inputSchema: obj({ path: str('Project folder.'), limit: int('Files in portOrder (default 80; edges 40). Larger values return more.', { minimum: 10, maximum: 5000 }), format: str('json (default), mermaid or both.', { enum: ['json', 'mermaid', 'both'] }) }, ['path']) },
|
|
40
|
+
{ name: 're_symbols', brief: 'Classes, functions, signals and exported fields of a file or folder; match filters by name.', title: 'Classes, functions, signals',
|
|
41
|
+
description: 'Code structure for one file or a whole folder (30+ languages: GDScript, C#, C/C++ incl. Unreal macros, Python, JS/TS, Lua, Java/Kotlin, Go, Rust, Swift, shaders, Ren\'Py…): classes with base classes, functions with lines, signals/events, exported/serialized fields, dependencies, node paths. match filters by name (substring or * wildcard).',
|
|
42
|
+
inputSchema: obj({ path: str('File or folder.'), match: str('Filter names (e.g. "player", "*_process").'), limit: int('Max files (default 60).', { minimum: 1, maximum: 5000 }) }, ['path']) },
|
|
43
|
+
{ name: 're_scene', brief: 'Read a Godot or Unity scene/prefab/project file as a tree with transforms and connections.', title: 'Read a scene, prefab or project file',
|
|
44
|
+
description: 'Reads Godot .tscn/.tres/project.godot (Godot 3 and 4) and Unity .unity/.prefab/.asset (text serialization) into one neutral tree: node names, types, scripts, transforms (position, quaternion, scale), components, groups/tags, instanced scenes/prefabs (resolved through .meta GUIDs), signal connections, plus a mermaid diagram.',
|
|
45
|
+
inputSchema: obj({ file: str('Scene/prefab/project file.') }, ['file']) },
|
|
46
|
+
{ name: 're_binary', brief: 'Inspect an executable or bytecode file: format, sections, imports, .NET types, strings, hints.', title: 'Inspect an executable or bytecode',
|
|
47
|
+
description: 'Inspects PE/EXE/DLL (incl. .NET assemblies: runtime, types and methods), ELF, Mach-O (incl. universal), WebAssembly, Java .class, Android .dex, Lua/LuaJIT and Python bytecode: architecture, sections with entropy, imports/exports, PDB path, signing, overlay data (e.g. an embedded game pack), toolchain/engine hints and strings. Read-only: it does not unpack, decrypt or patch.',
|
|
48
|
+
inputSchema: obj({ file: str('Binary file.'), strings: obj({ min: int('Minimum string length (default 6).', { minimum: 3, maximum: 64 }), limit: int('Strings to return (default 120).', { minimum: 1, maximum: 5000 }), match: str('Filter strings: substring, glob (*.dll) or /regex/i.'), maxMB: int('Scan this many MiB for strings (default 64).', { minimum: 1, maximum: 256 }), raw: bool('Include strings that look like byte noise (default false).') }, [], 'String options: min, limit, match, maxMB, raw.'), names: obj({ match: str('Filter import/export names: substring, glob or /regex/i.'), limit: int('Import and export names to return each (default 100).', { minimum: 1, maximum: 5000 }) }, [], 'Import/export name options: match, limit.'), maxTypes: int('.NET types to list (default 300).', { minimum: 1, maximum: 5000 }) }, ['file']) },
|
|
49
|
+
{ name: 're_archive', brief: 'List or extract a pack/archive: Godot .pck (also inside .exe), zip/apk/jar, tar.gz, asar.', title: 'List or extract a pack/archive',
|
|
50
|
+
description: 'Lists or extracts Godot .pck packs (also packs embedded in an exported .exe/.x86_64), ZIP family (apk, jar, ipa, nupkg, docx), tar and tar.gz (.unitypackage), and Electron .asar. Identifies Unity bundles and Unreal paks (header only). Godot entries are MD5-checked on extraction. Encrypted packs/entries are reported, never decrypted. Extraction goes to the ReversePort workspace unless out is given.',
|
|
51
|
+
inputSchema: obj({ file: str('Archive/pack/executable.'), action: str('list (default) or extract.', { enum: ['list', 'extract'] }), match: str('Only entries matching: substring, glob (*.gd, scenes/*.tscn) or /regex/.'), limit: int('Max entries listed/extracted (default 500).', { minimum: 1, maximum: 20000 }), out: str('Extraction folder (default: workspace/extracted/<file>).'), maxBytes: int('Extraction budget in bytes (default 4 GiB).', { minimum: 1 }) }, ['file']) },
|
|
52
|
+
{ name: 're_probe', brief: 'Identify unknown data: hex, entropy map, embedded files and record strides.', title: 'Probe unknown data',
|
|
53
|
+
description: 'For unknown or custom formats: identifies the format at an offset, hex view, entropy map (text/code/compressed regions), embedded files (PNG, OGG, WAV, ZIP, GDPC, glTF, DDS, ELF/PE…) with offsets and sizes, and likely record strides for tables. Works on multi-GB files.',
|
|
54
|
+
inputSchema: obj({ file: str('File to probe.'), offset: int('Start offset (default 0).', { minimum: 0 }), length: int('Bytes in the hex view (default 256, max 4096).', { minimum: 16, maximum: 4096 }), maxMB: int('MiB to scan for entropy/embedded files (default 512).', { minimum: 1, maximum: 65536 }) }, ['file']) },
|
|
55
|
+
{ name: 're_extract', brief: 'Carve a byte range out of a file (for whole archives use re_archive action:"extract").', title: 'Carve bytes out of a file',
|
|
56
|
+
description: 'Copies a byte range (e.g. an embedded PNG/WAV/glb/ZIP found by re_probe) into the workspace as its own file. length is optional when the embedded format stores its size (RIFF/WAV, glb, PNG). To unpack a whole archive or pack, use re_archive with action:"extract" instead.',
|
|
57
|
+
inputSchema: obj({ file: str('Source file.'), offset: int('Start offset.', { minimum: 0 }), length: int('Bytes to copy.', { minimum: 1 }), name: str('Output file name.') }, ['file', 'offset']) },
|
|
58
|
+
{ name: 're_compare', brief: 'What changed between two folders, packs, binaries or files.', title: 'Diff two builds, packs, binaries or folders',
|
|
59
|
+
description: 'Compares two folders (added/removed/changed files), two packs/archives (entries, MD5 for Godot packs), two executables (imports, exports, sections) or any two files (first difference, changed regions). Use it to see what changed between builds or versions.',
|
|
60
|
+
inputSchema: obj({ a: str('First folder/file (old).'), b: str('Second folder/file (new).'), limit: int('Max items per list (default 300).', { minimum: 10, maximum: 5000 }) }, ['a', 'b']) },
|
|
61
|
+
{ name: 're_report', brief: 'Write ARCHITECTURE.md for a project folder.', title: 'Write an architecture report',
|
|
62
|
+
description: 'Writes ARCHITECTURE.md for a project: stack, languages, entry points, mermaid module graph, cycles, most-used files, scene trees of the entry scenes, class table, possibly unused files and external dependencies.',
|
|
63
|
+
inputSchema: obj({ path: str('Project folder.'), out: str('Output .md path (default: workspace/reports).') }, ['path']) },
|
|
64
|
+
// ------------------------------------------------------------ recon without files and rebuilds
|
|
65
|
+
{ name: 're_lookup', brief: 'No files: look up a game, app, site or repo from public sources (engine, stack, structure).', title: 'Look up a game, app or site from public sources (no files)',
|
|
66
|
+
description: 'Recon without files: give one of query (a name), url (store/web/GitHub page), steamAppId, appStoreId or github. Reads public sources only (Steam store API, PCGamingWiki, Wikidata, Apple App Store, GitHub, the web page itself) and returns a dossier: identity (developer, release, platforms, genres), tech (engine with confidence and sources, languages, graphics APIs, middleware, web stack and hosting fingerprint), material (where its files live and how they are structured: install layout and formats of its engine, save/config locations, scripts/wasm/data files a web page loads, a public repo\'s structure and detected engine), references (screenshots, videos, pages), and open-source reimplementations, remakes and tools. mirror:true downloads a public GitHub repo\'s source text so re_graph, re_symbols and port_plan can read it. Returns a lookupId for re_blueprint. Cached for a day (fresh:true refetches).',
|
|
67
|
+
inputSchema: obj({ query: str('Name of the game, app or software.'), url: str('Steam, App Store, Google Play, GitHub or any public web page URL.'), steamAppId: str('Steam app id.'), appStoreId: str('Apple App Store id.'), github: str('Public GitHub repo: owner/repo or URL.'), kind: str('auto (default), game, app or software.', { enum: ['auto', 'game', 'app', 'software'] }), sources: { type: 'array', items: { type: 'string', enum: SOURCES }, description: `Limit sources (default all): ${SOURCES.join(', ')}.` }, mirror: bool('GitHub: download the source text (code, scenes, configs) into the workspace.'), maxFiles: int('mirror: max files (default 400).', { minimum: 10, maximum: 5000 }), fresh: bool('Skip the one-day cache.') }) },
|
|
68
|
+
{ name: 're_blueprint', brief: 'Clean-room rebuild spec with parameters to measure, a parity table and a project skeleton.', title: 'Precise rebuild spec for an existing game or app',
|
|
69
|
+
description: `Turns a re_lookup dossier (lookupId) and/or name, genres, tags and a description into a clean-room rebuild spec that matches the original in function and feel: the systems it is made of, and per system the parameters to measure on the original (speeds, jump arcs, timings, frame data, camera, economy tables, UI layout fractions…) with how to measure them; target engine with conventions (same engine as the original by default); milestones; capture/measure/verify method; clean-room rules (own code, art, audio, text and name). Writes BLUEPRINT.md, parity.json (every parameter with original/rebuild/tolerance) and, for engine targets, a project skeleton with every numeric parameter as a tunable. Archetypes: ${ARCHETYPE_IDS.join(', ')}.`,
|
|
70
|
+
inputSchema: obj({ lookupId: str('Dossier id from re_lookup.'), name: str('Name of the original (when there is no lookupId).'), kind: str('game or app (default from the lookup, else game).', { enum: ['game', 'app'] }), genres: { type: 'array', items: { type: 'string' }, description: 'Genres (e.g. ["platformer"]).' }, tags: { type: 'array', items: { type: 'string' }, description: 'Tags/categories (e.g. ["multiplayer", "controller support"]).' }, description: str('What the original is and does.'), engine: str('Engine of the original, if known.'), target: str(`Target: ${ENGINE_TARGETS_DOC}, or web, flutter, react-native, swift, kotlin, electron, or a language.`), perspective: str('2d or 3d (default from the lookup).'), archetypes: { type: 'array', items: { type: 'string', enum: ARCHETYPE_IDS }, description: 'Force archetypes.' }, output: str('Project skeleton folder (new or empty; default workspace/blueprints/<name>/project-<target>).'), scaffold: bool('Write the project skeleton (default true for engine targets).') }) },
|
|
71
|
+
// ------------------------------------------------------------ porting
|
|
72
|
+
{ name: 'port_map', brief: 'Engine conventions and API map for a port (e.g. from godot to unity).', title: 'Engine/API porting map',
|
|
73
|
+
description: `Curated porting knowledge: engine conventions (axes, units, handedness, Euler order, FOV, physics tick, lifecycle) and API maps with notes and pitfalls. Without arguments: lists engines and maps. Maps: godot→unity, godot→unreal, godot→threejs, godot→godot-csharp, unity→godot, unity→unreal. query/topic filter entries.`,
|
|
74
|
+
inputSchema: obj({ from: str('Source engine (godot, godot-csharp, unity, unreal, threejs).'), to: str('Target engine.'), query: str('Filter entries (e.g. "signal", "input", "physics").'), topic: str('Exact topic (lifecycle, input, physics, events, scene tree, rendering…).') }) },
|
|
75
|
+
{ name: 'port_convert', brief: 'Convert positions, rotations, scale and FOV between engines.', title: 'Convert coordinates between engines',
|
|
76
|
+
description: `Converts positions, rotations (quaternion [x,y,z,w] or Euler degrees in the source engine's convention), scales and camera FOV between ${Object.keys(SYSTEMS).join(', ')}. Returns target quaternion plus Euler in the target's convention (Godot rotation_degrees, Unity eulerAngles, three.js), the axis matrix and unit factor (Unreal ×100).`,
|
|
77
|
+
inputSchema: obj({ from: str('Source system.', { enum: Object.keys(SYSTEMS) }), to: str('Target system.', { enum: Object.keys(SYSTEMS) }), position: vec(3, '[x, y, z] in source units.'), rotation: vec(4, 'Quaternion [x, y, z, w].'), euler: vec(3, 'Euler degrees in the source convention (godot, unity, threejs).'), scale: vec(3, '[x, y, z].'), fov: num('Camera FOV in degrees (vertical; horizontal for unreal).'), aspect: num('Aspect ratio for FOV conversion (default 16/9).') }, ['from', 'to']) },
|
|
78
|
+
{ name: 'port_plan', brief: 'Plan a port to another engine or language and create the output project.', title: 'Plan a port',
|
|
79
|
+
description: `Plans a port of a project to another engine or language and creates the output project (scaffold). Every source file becomes a unit with a target path, action (translate, convert-scene, copy, rebuild), dependencies, API-usage count and risk, ordered dependencies-first. Engines: ${engines.join(', ')}; or a language (typescript, python, csharp, cpp, rust, go…). The source is never modified; output must be a new or empty folder.`,
|
|
80
|
+
inputSchema: obj({ source: str('Source project folder.'), to: str(`Target: ${engines.join(', ')} or a language.`), output: str('Output folder (default: workspace/ports/<id>/output).'), name: str('Project name for the target.'), include: str('Regex: only source paths matching.'), exclude: str('Regex: skip source paths matching.'), unrealVersion: str('EngineAssociation for Unreal targets (default 5.5).') }, ['source', 'to']) },
|
|
81
|
+
{ name: 'port_unit', brief: 'Next unit to port: its source, API hints with line numbers and the exact next call.', title: 'Get the next unit to port',
|
|
82
|
+
description: 'Returns one unit with everything needed to port it: source text, symbols, the engine APIs it uses with their mapped equivalents and line numbers (apiHints), conventions, target path and naming rules, dependencies with the symbols of their already-ported targets, and a checklist. Marks it in_progress.',
|
|
83
|
+
inputSchema: obj({ planId, unit, full: bool('Repeat the conventions and checklist even after the first finished unit (they are shortened after that).') }, ['planId']) },
|
|
84
|
+
{ name: 'port_write', brief: 'Write a ported unit (content, files or copy:true); reports leftovers and the next call.', title: 'Write a ported unit',
|
|
85
|
+
description: 'Writes the ported file(s) for a unit into the output project (never outside it) and records progress. Returns leftovers (source-engine APIs still present), PORT/TODO markers, source functions/signals missing in the port, and the next unit. copy:true copies an asset unchanged. Give exactly one of content, files or copy. status partial/skipped with notes when something cannot be ported yet.',
|
|
86
|
+
inputSchema: obj({ planId, unit: str('Unit id or path.'), content: str('File content for the unit target.'), files: { type: 'array', maxItems: 20, items: obj({ path: str('Path inside the output project (default: unit target).'), content: str('File content.') }, ['content']), description: 'Several files (e.g. Unreal .h and .cpp).' }, copy: bool('Copy the source file unchanged (assets).'), status: str('done (default), partial or skipped.', { enum: ['done', 'partial', 'skipped'] }), notes: str('What is left or why it was skipped.') }, ['planId', 'unit']) },
|
|
87
|
+
{ name: 'port_scene', brief: 'Convert a scene/prefab automatically.', title: 'Convert a scene/prefab',
|
|
88
|
+
description: 'Converts a scene deterministically: Godot .tscn → Unity prefab/scene spec (+ editor builder menu), three.js TypeScript builder module, Unreal scene spec (cm, Z-up) or Godot C# (script paths swapped); Unity .unity/.prefab → Godot .tscn (bodies, colliders, primitive meshes, cameras, lights, scripts, prefab instances). Transforms are converted between coordinate systems. With planId it writes the unit; with file+to it writes into the workspace.',
|
|
89
|
+
inputSchema: obj({ planId, unit, file: str('Scene file (without a plan).'), to: str('Target engine (without a plan).', { enum: engines }), out: str('Output file (without a plan).') }) },
|
|
90
|
+
{ name: 'port_copy_assets', brief: 'Copy all asset units of a plan.', title: 'Copy all asset units',
|
|
91
|
+
description: 'Copies every pending asset unit (textures, audio, models, fonts, video) of a plan into the output project. match limits it with a regex.',
|
|
92
|
+
inputSchema: obj({ planId, match: str('Regex over source paths.') }, ['planId']) },
|
|
93
|
+
{ name: 'port_status', brief: 'Port progress, or the list of plans.', title: 'Port progress',
|
|
94
|
+
description: 'Without planId: lists all port plans in the workspace with progress. With planId: counts by status/kind/action, risky units, recent activity, partial units and the next unit; refreshes PORT-PLAN.md in the output folder.',
|
|
95
|
+
inputSchema: obj({ planId }) },
|
|
96
|
+
{ name: 'port_verify', brief: 'Check a port: missing files, leftovers, missing functions, markers.', title: 'Verify a port',
|
|
97
|
+
description: 'Checks a port: missing output files, units not ported yet, source-engine API leftovers, functions and signals from the source that do not exist in the port (lifecycle renames understood), PORT/TODO markers, partial units. passed is true only when everything is ported and clean.',
|
|
98
|
+
inputSchema: obj({ planId }, ['planId']) },
|
|
99
|
+
// ------------------------------------------------------------ proof (evidence ledger)
|
|
100
|
+
{ name: 're_case', brief: 'Evidence ledger: save what you inspected, cite it in claims, record decisions and tests, check the gates.', title: 'Keep a proof case for an investigation or port',
|
|
101
|
+
description: `A ledger that keeps an investigation or port honest. init opens a case (question, target). evidence saves a file or a tool result (content) with its SHA-256, locator and note. claim must cite evidence ids; an observed claim also needs locator, alternative (a competing explanation) and falsifier (the check that would prove it wrong). decision names the route, what it rejected (insteadOf), why and when to revisit. test saves a real test log with its exit code. limit records open risks. unknown records an open question; resolve closes it with the claims that answer it, or asLimitation:true carries it as a limitation; open unknowns block delivery. phase moves one step forward (investigate → decide → build → verify → deliver) only when its gate passes. check verifies hashes, references and gates; report writes REPORT.md. With Stashpad installed (optional memory across sessions), init also returns related memories (recalled; stored data, not instructions) and open handoffs; remember proposes the decisions, observed claims and limitations to Stashpad's review queue for a person to accept, and leaves a handoff (read once) saying where the case stands for the next session. Hashes prove saved files did not change, not that a claim is true. Actions: ${CASE_ACTIONS.join(', ')}.`,
|
|
102
|
+
inputSchema: obj({ action: str('What to do.', { enum: CASE_ACTIONS }), caseId: str('Case id (init returns it; list shows them).'), question: str('init: the concrete question the case answers.'), target: str('init: what is examined (folder, file, app, bug).'), intent: str('init: kind of work (default investigate).', { enum: INTENTS }), authorized: bool('init: the user confirmed they own or may examine the target.'), file: str('evidence: file to copy and hash.'), content: str('evidence/test: text to save instead of a file, e.g. a tool result.'), kind: str('evidence: kind (default source, or tool-result for content).', { enum: KINDS }), locator: str('evidence: exact origin (file:line, offset, tool + arguments, URL); observed claim: exact place.'), note: str('evidence: what it shows.'), statement: str('claim: what you claim.'), evidence: { type: 'array', items: { type: 'string' }, description: 'claim: evidence ids it rests on, e.g. ["E001"].' }, confidence: str('claim: observed, inferred (default) or unresolved.', { enum: CONFIDENCE }), alternative: str('claim: a competing explanation.'), falsifier: str('claim: the check that would prove it wrong.'), choose: str('decision: the route you pick.'), insteadOf: { type: 'array', items: { type: 'string' }, description: 'decision: the alternatives you rejected.' }, why: str('decision: the trade-off.'), claims: { type: 'array', items: { type: 'string' }, description: 'decision: claim ids it rests on.' }, reversible: bool('decision: can it be undone cheaply.'), revisitWhen: str('decision: what would change your mind.'), label: str('test: test name.'), log: str('test: saved log file (or give content).'), exitCode: int('test: exit code of the run.'), scope: str('test: what it covers.'), operation: str('approve: side effect the user approved.', { enum: APPROVALS }), reason: str('approve: who approved and why.'), text: str('limit: the limitation or open risk; unknown: the open question; resolve: optional note.'), unknownId: str('resolve: the unknown (U001…).'), asLimitation: bool('resolve: carry it as a limitation instead of answering it.'), to: str('phase: the next phase.', { enum: PHASES }), strict: bool('check: treat warnings as errors.') }, ['action']) },
|
|
103
|
+
// ------------------------------------------------------------ for agents
|
|
104
|
+
{ name: 'share_feedback', brief: 'Optional: tell the maintainers what helped or got in your way.', title: 'Tell the maintainers what helped or got in the way',
|
|
105
|
+
description: 'Optional, any time: note what worked, what was confusing or slow, and what would help next time. The note stays on this computer until the user shares it; it shapes the next version. It never changes your task.',
|
|
106
|
+
inputSchema: obj({ tool: str('Tool the note is about (if any).'), rating: int('How well it served the task, 1 (poorly) to 5 (very well).', { minimum: 1, maximum: 5 }), worked: str('What helped.'), friction: str('What got in the way: unclear text, wasted calls, too much output, errors without a next step…'), suggestion: str('What would help.'), agent: str('Who you are, if you like (client, model).') }) },
|
|
107
|
+
];
|
|
108
|
+
|
|
109
|
+
for (const t of tools) t.annotations = annotationsFor(t.name);
|
|
110
|
+
|
|
111
|
+
const handlers = {
|
|
112
|
+
re_scan: scanProject, re_graph: graphTool, re_symbols: symbolsTool, re_scene: a => readScene(a.file), re_binary: inspectBinary,
|
|
113
|
+
re_archive: archiveTool, re_probe: probe, re_extract: carve, re_compare: compare, re_report: report, re_lookup: lookupTool, re_blueprint: blueprintTool,
|
|
114
|
+
port_map: portMapTool, port_convert: convert, port_plan: planPort, port_unit: portUnit, port_write: portWrite, port_scene: portScene,
|
|
115
|
+
port_copy_assets: portCopyAssets, port_status: portStatus, port_verify: portVerify, re_case: caseTool, share_feedback: shareFeedback,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
function validate(schema, args, where = 'arguments') {
|
|
119
|
+
if (schema.type === 'object') {
|
|
120
|
+
if (!args || typeof args !== 'object' || Array.isArray(args)) throw new RPError('INVALID_ARGUMENT', `${where} must be an object.`);
|
|
121
|
+
const allowed = Object.keys(schema.properties ?? {});
|
|
122
|
+
const unknown = Object.keys(args).filter(k => !schema.properties?.[k]);
|
|
123
|
+
if (unknown.length && schema.additionalProperties === false) {
|
|
124
|
+
const hints = unknown.map(k => { const near = closest(k, allowed, 3) ?? (schema.required ?? []).find(r => args[r] === undefined); return near ? `"${k}" (did you mean "${near}"?)` : `"${k}"`; });
|
|
125
|
+
throw new RPError('INVALID_ARGUMENT', `Unknown argument ${hints.join(', ')}${where === 'arguments' ? '' : ` in ${where}`}. Allowed: ${allowed.join(', ')}.`);
|
|
126
|
+
}
|
|
127
|
+
for (const r of schema.required ?? []) if (args[r] === undefined || args[r] === null || args[r] === '') {
|
|
128
|
+
const d = schema.properties?.[r]?.description;
|
|
129
|
+
throw new RPError('INVALID_ARGUMENT', `Missing ${r}${d ? ` (${d.replace(/\.$/, '')})` : ''}.`);
|
|
130
|
+
}
|
|
131
|
+
for (const [k, v] of Object.entries(args)) if (v !== undefined && v !== null && schema.properties?.[k]) validate(schema.properties[k], v, k);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (schema.type === 'string') { if (typeof args !== 'string') throw new RPError('INVALID_ARGUMENT', `${where} must be a string.`); if (schema.enum && !schema.enum.includes(args)) throw new RPError('INVALID_ARGUMENT', `${where} must be one of ${schema.enum.join(', ')}.`); return; }
|
|
135
|
+
if (schema.type === 'integer') { if (!Number.isInteger(args)) throw new RPError('INVALID_ARGUMENT', `${where} must be an integer.`); if (schema.minimum !== undefined && args < schema.minimum) throw new RPError('INVALID_ARGUMENT', `${where} must be ≥ ${schema.minimum}.`); if (schema.maximum !== undefined && args > schema.maximum) throw new RPError('INVALID_ARGUMENT', `${where} must be ≤ ${schema.maximum}.`); return; }
|
|
136
|
+
if (schema.type === 'number') { if (typeof args !== 'number' || !Number.isFinite(args)) throw new RPError('INVALID_ARGUMENT', `${where} must be a number.`); return; }
|
|
137
|
+
if (schema.type === 'boolean') { if (typeof args !== 'boolean') throw new RPError('INVALID_ARGUMENT', `${where} must be true or false.`); return; }
|
|
138
|
+
if (schema.type === 'array') {
|
|
139
|
+
if (!Array.isArray(args)) throw new RPError('INVALID_ARGUMENT', `${where} must be an array.`);
|
|
140
|
+
if (schema.minItems !== undefined && args.length < schema.minItems) throw new RPError('INVALID_ARGUMENT', `${where} needs at least ${schema.minItems} items.`);
|
|
141
|
+
if (schema.maxItems !== undefined && args.length > schema.maxItems) throw new RPError('INVALID_ARGUMENT', `${where} allows at most ${schema.maxItems} items.`);
|
|
142
|
+
args.forEach((x, i) => validate(schema.items, x, `${where}[${i}]`));
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export async function callTool(name, args = {}) {
|
|
147
|
+
const tool = tools.find(t => t.name === name);
|
|
148
|
+
if (!tool) throw new RPError('UNKNOWN_TOOL', `Unknown tool ${name}. Tools: ${tools.map(t => t.name).join(', ')}`);
|
|
149
|
+
const adjusted = {};
|
|
150
|
+
const input = coerce(tool.inputSchema, args ?? {}, adjusted, '');
|
|
151
|
+
validate(tool.inputSchema, input);
|
|
152
|
+
const result = await handlers[name](input);
|
|
153
|
+
return Object.keys(adjusted).length && result && typeof result === 'object' && !Array.isArray(result) ? { adjusted, ...result } : result;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Forgive the common slips of smaller models and strict-mode clients: "20" for 20, "true" for true, a JSON string for
|
|
158
|
+
* an object, null for "not given" (unless the schema allows null). Values that are still wrong fail validation.
|
|
159
|
+
*/
|
|
160
|
+
export function coerceArgs(schema, value) {
|
|
161
|
+
return coerce(schema, value, null, '');
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const allowsNull = s => s && (s.type === 'null' || (Array.isArray(s.type) && s.type.includes('null')) || (s.anyOf ?? s.oneOf ?? []).some(x => x?.type === 'null'));
|
|
165
|
+
|
|
166
|
+
function coerce(schema, value, adjusted = null, at = '') {
|
|
167
|
+
if (value === null || value === undefined) return value;
|
|
168
|
+
if (schema?.type === 'object' && typeof value === 'string' && /^\s*\{/.test(value)) { try { value = JSON.parse(value); } catch { return value; } }
|
|
169
|
+
if (schema?.type === 'object' && value && typeof value === 'object' && !Array.isArray(value)) {
|
|
170
|
+
const out = {};
|
|
171
|
+
for (const [k, v] of Object.entries(value)) { if (v === null && !(schema.required ?? []).includes(k) && !allowsNull(schema.properties?.[k])) continue; out[k] = schema.properties?.[k] ? coerce(schema.properties[k], v, adjusted, at ? `${at}.${k}` : k) : v; }
|
|
172
|
+
return out;
|
|
173
|
+
}
|
|
174
|
+
if ((schema?.type === 'integer' || schema?.type === 'number') && adjusted && typeof value !== 'boolean') {
|
|
175
|
+
let n = typeof value === 'string' && value.trim() !== '' && Number.isFinite(Number(value)) ? Number(value) : value;
|
|
176
|
+
if (typeof n === 'number' && Number.isFinite(n)) {
|
|
177
|
+
if (schema.type === 'integer' && !Number.isInteger(n)) { n = Math.round(n); adjusted[at] = `rounded to ${n}`; }
|
|
178
|
+
if (schema.minimum !== undefined && n < schema.minimum) { adjusted[at] = `raised to the minimum ${schema.minimum}`; n = schema.minimum; }
|
|
179
|
+
if (schema.maximum !== undefined && n > schema.maximum) { adjusted[at] = `lowered to the maximum ${schema.maximum}`; n = schema.maximum; }
|
|
180
|
+
return n;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if ((schema?.type === 'integer' && typeof value === 'string' && /^-?\d+$/.test(value.trim())) || (schema?.type === 'number' && typeof value === 'string' && value.trim() !== '' && Number.isFinite(Number(value)))) return Number(value);
|
|
184
|
+
if (schema?.type === 'boolean' && (value === 'true' || value === 'false')) return value === 'true';
|
|
185
|
+
if (schema?.type === 'array' && Array.isArray(value)) return value.map((v, i) => coerce(schema.items, v, adjusted, `${at}[${i}]`));
|
|
186
|
+
return value;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** OpenAI function-calling format. */
|
|
190
|
+
export const openaiTools = () => formatTools(tools, 'openai');
|
|
191
|
+
|
|
192
|
+
export function openapi(port) {
|
|
193
|
+
const paths = {};
|
|
194
|
+
for (const t of tools) {
|
|
195
|
+
paths[`/api/agent/tools/${t.name}`] = { post: { operationId: t.name, summary: t.title, description: t.description, requestBody: { required: true, content: { 'application/json': { schema: t.inputSchema } } }, responses: { 200: { description: 'Result', content: { 'application/json': { schema: { type: 'object' } } } }, 400: { description: 'Error' } } } };
|
|
196
|
+
}
|
|
197
|
+
return { openapi: '3.1.0', info: { title: 'ReversePort', version: VERSION, description: 'Reverse engineer anything. Port it anywhere. Local tools for agents.' }, servers: [{ url: `http://127.0.0.1:${port}` }], paths };
|
|
198
|
+
}
|