rea-agents 3.2.0 → 4.0.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/README.md +183 -332
- package/bridge/ghidra/ReaGhidraBridge.java +561 -74
- package/bridge/hopper_bridge.py +70 -27
- package/bridge/native/ReaNativeUI.swift +157 -0
- package/dist/application/AnalysisContextQueries.js +19 -5
- package/dist/application/AnalysisSnapshotCache.js +30 -11
- package/dist/application/AppleAssetCatalogAnalysis.js +171 -0
- package/dist/application/ArtifactExtractionDestination.js +0 -12
- package/dist/application/ArtifactGraphConstruction.js +44 -11
- package/dist/application/ArtifactInventory/classify.js +7 -15
- package/dist/application/ArtifactInventory/hash.js +4 -2
- package/dist/application/ArtifactInventory/policy.js +2 -17
- package/dist/application/ArtifactInventory/reader.js +3 -3
- package/dist/application/ArtifactInventory/scanCanonical.js +2 -2
- package/dist/application/ArtifactInventory/scanReader.js +12 -4
- package/dist/application/ArtifactInventory/types.js +0 -3
- package/dist/application/BinarySession.js +28 -43
- package/dist/application/BinarySessionExecution.js +37 -1
- package/dist/application/BinaryTargetResolver.js +50 -4
- package/dist/application/BrowserEvidence.js +36 -7
- package/dist/application/BrowserObservationService.js +17 -44
- package/dist/application/BrowserScenarioCaptureService.js +2 -35
- package/dist/application/BrowserScenarioEvidence.js +13 -9
- package/dist/application/CapabilityClientRequirements.js +2 -11
- package/dist/application/CapabilityInventory.js +21 -35
- package/dist/application/ClientConfigurationDocument.js +84 -7
- package/dist/application/ClientRegistrationIdentity.js +32 -0
- package/dist/application/ClientRegistrationStatus.js +59 -6
- package/dist/application/DirectAnalysis.js +37 -58
- package/dist/application/DirectAnalysisStatus.js +4 -4
- package/dist/application/Doctor.js +89 -80
- package/dist/application/DoctorDiagnostics.js +2 -26
- package/dist/application/DoctorScope.js +8 -14
- package/dist/application/ElectronActiveEvidence.js +10 -27
- package/dist/application/ElectronActiveObservationService.js +9 -36
- package/dist/application/ElectronBoundaryAnalysis.js +2 -0
- package/dist/application/ElectronBoundaryGraphNative.js +1 -1
- package/dist/application/ElectronEvidence.js +8 -3
- package/dist/application/ElectronObservationService.js +9 -25
- package/dist/application/EnhancedLiteralTracing.js +4 -8
- package/dist/application/EnhancedTools.js +15 -35
- package/dist/application/FilesystemSnapshot.js +7 -8
- package/dist/application/JavaScriptApplicationEvidenceGraph.js +2 -1
- package/dist/application/JavaScriptApplicationWorkflowService.js +31 -7
- package/dist/application/JavaScriptArtifactAnalysis.js +6 -4
- package/dist/application/JavaScriptArtifactFiles.js +5 -0
- package/dist/application/JavaScriptArtifactPathResolution.js +179 -47
- package/dist/application/JavaScriptRuntimeObservationEvidence.js +6 -3
- package/dist/application/JavaScriptRuntimeObservationService.js +9 -25
- package/dist/application/JavaScriptRuntimeReconciliationService.js +45 -4
- package/dist/application/JavaScriptSemanticGraphAsyncProjection.js +11 -0
- package/dist/application/JavaScriptSemanticGraphChildProcessProjection.js +11 -0
- package/dist/application/JavaScriptSemanticGraphDataProjection.js +11 -0
- package/dist/application/JavaScriptSemanticGraphFlowProjection.js +14 -5
- package/dist/application/JsonFiles.js +1 -1
- package/dist/application/LazyAnalysisProvider.js +27 -6
- package/dist/application/ManagedMemberComparisonService.js +19 -6
- package/dist/application/NativeApiInspection.js +2 -0
- package/dist/application/NativeCallRoutes.js +72 -0
- package/dist/application/NativeDispatchMetadataInspection.js +33 -0
- package/dist/application/NativeUiActionTrace.js +73 -49
- package/dist/application/NativeValueTrace.js +320 -0
- package/dist/application/ProcessCaptureCapability.js +32 -5
- package/dist/application/ProcessCaptureEnvironment.js +9 -26
- package/dist/application/ProcessCaptureError.js +1 -5
- package/dist/application/ProcessCaptureJournal.js +3 -40
- package/dist/application/ProcessCaptureLifecycle.js +102 -111
- package/dist/application/ProcessCli.js +18 -25
- package/dist/application/ProcessEvidence.js +5 -7
- package/dist/application/ProcessFilesystemEffects.js +36 -0
- package/dist/application/ProcessHarness.js +41 -120
- package/dist/application/ProcessNormalization.js +2 -17
- package/dist/application/ProcessScenarioRuntimeValidation.js +76 -0
- package/dist/application/ReferenceSourceImport.js +3 -4
- package/dist/application/Setup.js +236 -84
- package/dist/application/SetupClientConfiguration.js +14 -9
- package/dist/application/SetupPlan.js +138 -86
- package/dist/application/SetupSkill.js +0 -1
- package/dist/application/SupportedClients.js +102 -21
- package/dist/application/Uninstall.js +31 -20
- package/dist/application/Update.js +93 -0
- package/dist/application/UpdateMaintenance.js +108 -0
- package/dist/application/UpdateRuntime.js +126 -0
- package/dist/application/runtime.js +13 -2
- package/dist/artifacts/ArtifactPaths.js +6 -8
- package/dist/artifacts/ArtifactProvider.js +94 -41
- package/dist/artifacts/AsarArtifactReader.js +19 -4
- package/dist/artifacts/KeyedArchiveReader.js +110 -0
- package/dist/artifacts/MachOSliceArtifactReader.js +53 -5
- package/dist/artifacts/ZipArtifactReader.js +18 -1
- package/dist/browser/BrowserScenarioSecrets.js +28 -1
- package/dist/browser/CdpBrowserProvider.js +36 -15
- package/dist/browser/CdpCaptureDocuments.js +22 -8
- package/dist/browser/CdpCaptureEventHandlers.js +14 -5
- package/dist/browser/CdpCaptureEventHelpers.js +13 -0
- package/dist/browser/CdpCaptureEvents.js +10 -1
- package/dist/browser/CdpElectronInspection.js +5 -10
- package/dist/browser/CdpElectronProvider.js +1 -5
- package/dist/browser/CdpElectronScripts.js +1 -1
- package/dist/browser/CdpEndpoint.js +3 -2
- package/dist/browser/CdpObservationSession.js +14 -10
- package/dist/browser/CdpPageCapture.js +1 -1
- package/dist/browser/CdpPageCaptureScripts.js +1 -1
- package/dist/browser/CdpSafeMetadata.js +5 -4
- package/dist/browser/CdpScreenshot.js +16 -5
- package/dist/browser/CdpTargetSession.js +25 -4
- package/dist/browser/CdpWebMcpDiscovery.js +93 -20
- package/dist/browser/JavaScriptRuntimeScope.js +28 -2
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +9 -8
- package/dist/browser/PlaywrightElectronActiveActions.js +3 -10
- package/dist/browser/PlaywrightElectronActiveProvider.js +5 -5
- package/dist/browser/PlaywrightScenarioActions.js +1 -1
- package/dist/browser/PlaywrightScenarioArtifacts.js +13 -25
- package/dist/browser/PlaywrightScenarioBrowser.js +28 -25
- package/dist/browser/PlaywrightScenarioEvents.js +82 -93
- package/dist/browser/PlaywrightScenarioSession.js +27 -123
- package/dist/browser/PngVisualDiff.js +22 -3
- package/dist/browser/V8InspectorCaptureProjection.js +7 -1
- package/dist/browser/V8InspectorProvider.js +60 -7
- package/dist/browser/WebSourceMapFetcher.js +99 -53
- package/dist/cli/artifactCommands.js +56 -12
- package/dist/cli/coreAnalysisCommands.js +110 -0
- package/dist/cli/managedCommands.js +1 -31
- package/dist/cli/setupCommands.js +16 -14
- package/dist/cli/utilityCommands.js +61 -4
- package/dist/cli.js +5 -7
- package/dist/cliApplicationCommands.js +0 -83
- package/dist/cliBrowserAdvancedCommands.js +7 -11
- package/dist/cliBrowserCommands.js +15 -23
- package/dist/cliBrowserContext.js +3 -24
- package/dist/cliBrowserScenarioCommands.js +2 -10
- package/dist/cliCommandNames.js +82 -7
- package/dist/cliElectronCommands.js +10 -36
- package/dist/cliJavaScriptRuntimeCommands.js +6 -30
- package/dist/cliJsonInput.js +4 -2
- package/dist/cliLogging.js +16 -7
- package/dist/cliObservationOptions.js +1 -1
- package/dist/cliOutput.js +2 -4
- package/dist/cliProcessCommands.js +6 -33
- package/dist/cliSetup.js +90 -160
- package/dist/config/environment.js +2 -78
- package/dist/config/parseConfig.js +18 -109
- package/dist/config/parsers.js +0 -23
- package/dist/contracts/applicationToolContracts.js +1 -118
- package/dist/contracts/artifactToolContracts.js +11 -19
- package/dist/contracts/browserScenarioToolContracts.js +1 -5
- package/dist/contracts/browserToolContracts.js +9 -16
- package/dist/contracts/electronToolContracts.js +5 -6
- package/dist/contracts/enhancedInputs.js +3 -2
- package/dist/contracts/errorSchemas.js +16 -40
- package/dist/contracts/functionWorkflowToolContracts.js +2 -2
- package/dist/contracts/javascriptApplicationWorkflowExamples.js +2 -2
- package/dist/contracts/javascriptRuntimeObservationToolContracts.js +4 -4
- package/dist/contracts/javascriptRuntimeReconciliationExample.js +1 -1
- package/dist/contracts/managedToolContracts.js +7 -4
- package/dist/contracts/managedWorkflowExamples.js +0 -22
- package/dist/contracts/managedWorkflowToolContracts.js +16 -31
- package/dist/contracts/nativeToolContracts.js +9 -0
- package/dist/contracts/promptContracts.js +6 -6
- package/dist/contracts/sessionToolSchemas.js +3 -3
- package/dist/contracts/toolContractExamples.js +4 -3
- package/dist/contracts/toolContracts.js +18 -7
- package/dist/contracts/toolEffects.js +34 -21
- package/dist/contracts/toolOutputSchemaGroups.js +18 -5
- package/dist/contracts/toolOutputSchemaPrimitives.js +9 -6
- package/dist/contracts/toolSchemaMetadata.js +5 -8
- package/dist/doctorRuntime.js +0 -41
- package/dist/domain/analysisErrorPresentation.js +4 -28
- package/dist/domain/analysisErrorProjection.js +33 -50
- package/dist/domain/analysisProfile.js +1 -1
- package/dist/domain/analysisSnapshot.js +77 -3
- package/dist/domain/androidApplication.js +5 -4
- package/dist/domain/appleApplication.js +5 -4
- package/dist/domain/appleAssetCatalog.js +127 -0
- package/dist/domain/artifactComparison.js +7 -11
- package/dist/domain/artifactGraph.js +8 -6
- package/dist/domain/artifactInspection.js +13 -12
- package/dist/domain/binaryTarget.js +23 -9
- package/dist/domain/browserObservation.js +43 -24
- package/dist/domain/browserObservationSchemas.js +2 -1
- package/dist/domain/browserScenario.js +7 -107
- package/dist/domain/browserScenarioCapture.js +0 -1
- package/dist/domain/browserScenarioCaptureValues.js +5 -4
- package/dist/domain/browserScenarioDiff.js +1 -3
- package/dist/domain/browserScenarioValues.js +16 -107
- package/dist/domain/bundleComparison.js +18 -17
- package/dist/domain/callPathSchemas.js +17 -7
- package/dist/domain/changedBehavior.js +2 -3
- package/dist/domain/comparisonSemantics.js +19 -0
- package/dist/domain/completionLedgerGeneration.js +3 -2
- package/dist/domain/conformancePackage.js +2 -1
- package/dist/domain/conformanceTrustGate.js +3 -5
- package/dist/domain/customProtocolCapture.js +2 -2
- package/dist/domain/digests.js +30 -0
- package/dist/domain/dosMz.js +83 -0
- package/dist/domain/electronActiveObservation.js +7 -5
- package/dist/domain/electronObservation.js +3 -2
- package/dist/domain/electronStaticAnalysisNative.js +15 -6
- package/dist/domain/emptyArraySchema.js +3 -0
- package/dist/domain/errors.js +10 -28
- package/dist/domain/evidence.js +5 -3
- package/dist/domain/evidenceCompletionLedger.js +3 -2
- package/dist/domain/functionComparisonNormalization.js +24 -18
- package/dist/domain/functionComparisonResults.js +3 -7
- package/dist/domain/functionComparisonSchemas.js +3 -2
- package/dist/domain/hopperValues.js +108 -8
- package/dist/domain/javascriptApplicationAnalysis.js +4 -7
- package/dist/domain/javascriptApplicationEvidenceSchemas.js +4 -3
- package/dist/domain/javascriptApplicationGraphSchemas.js +8 -7
- package/dist/domain/javascriptApplicationVersionComparisonSchemas.js +9 -7
- package/dist/domain/javascriptApplicationVersionItems.js +12 -18
- package/dist/domain/javascriptAstValues.js +4 -0
- package/dist/domain/javascriptExportShapeComparison.js +1 -6
- package/dist/domain/javascriptExportShapeComparisonSchemas.js +6 -10
- package/dist/domain/javascriptExportShapeVariants.js +15 -2
- package/dist/domain/javascriptFeatureTraceSchemas.js +8 -7
- package/dist/domain/javascriptRuntimeObservation.js +14 -2
- package/dist/domain/javascriptRuntimeReconciliationMatching.js +8 -0
- package/dist/domain/javascriptRuntimeReconciliationParsing.js +4 -2
- package/dist/domain/javascriptRuntimeReconciliationResult.js +6 -4
- package/dist/domain/javascriptRuntimeReconciliationRuntime.js +15 -4
- package/dist/domain/javascriptRuntimeReconciliationSchemas.js +19 -18
- package/dist/domain/javascriptRuntimeStaticCandidates.js +18 -6
- package/dist/domain/javascriptSemanticAnalysis.js +57 -19
- package/dist/domain/javascriptSemanticAsyncEffects.js +39 -40
- package/dist/domain/javascriptSemanticCalls.js +46 -27
- package/dist/domain/javascriptSemanticChildProcesses.js +43 -50
- package/dist/domain/javascriptSemanticDataEffectHelpers.js +91 -18
- package/dist/domain/javascriptSemanticDataEffects.js +22 -10
- package/dist/domain/javascriptSemanticGraphSchemas.js +8 -6
- package/dist/domain/javascriptSemanticObjects.js +13 -3
- package/dist/domain/javascriptSemanticProjection.js +144 -38
- package/dist/domain/javascriptSemanticPromises.js +14 -27
- package/dist/domain/javascriptSemanticQuerySchemas.js +6 -9
- package/dist/domain/javascriptSemanticResources.js +2 -5
- package/dist/domain/javascriptSemanticState.js +4 -0
- package/dist/domain/javascriptSemanticTraceSchemas.js +2 -1
- package/dist/domain/javascriptSemanticTraversal.js +13 -5
- package/dist/domain/javascriptSemanticValues.js +10 -9
- package/dist/domain/javascriptSourceParser.js +5 -1
- package/dist/domain/javascriptStaticAnalysisCalls.js +8 -5
- package/dist/domain/javascriptStaticAnalysisHelpers.js +16 -7
- package/dist/domain/keyedArchive.js +181 -0
- package/dist/domain/managedApplicationGraph.js +4 -3
- package/dist/domain/managedArtifact.js +2 -1
- package/dist/domain/managedMemberComparison.js +18 -13
- package/dist/domain/managedMemberComparisonCoverage.js +2 -1
- package/dist/domain/managedMemberComparisonItems.js +27 -7
- package/dist/domain/managedMemberComparisonMatch.js +22 -6
- package/dist/domain/managedNativeVerificationMatch.js +2 -2
- package/dist/domain/managedNativeVerificationSchemas.js +7 -5
- package/dist/domain/managedReconstruction.js +6 -5
- package/dist/domain/nativeApiBoundary.js +7 -0
- package/dist/domain/nativeDataType.js +51 -0
- package/dist/domain/nativeInspection.js +0 -1
- package/dist/domain/nativeInstruction.js +82 -0
- package/dist/domain/nativeInvestigationGraph.js +9 -5
- package/dist/domain/nativeUiObservation.js +123 -0
- package/dist/domain/nativeValueFlow.js +17 -0
- package/dist/domain/nativeValueTrace.js +64 -0
- package/dist/domain/objcSwiftMetadata.js +39 -0
- package/dist/domain/peInspection.js +1 -0
- package/dist/domain/processCapture.js +5 -55
- package/dist/domain/processCaptureExample.js +0 -9
- package/dist/domain/processCaptureValidation.js +13 -144
- package/dist/domain/processComparison.js +3 -25
- package/dist/domain/processObservation.js +0 -29
- package/dist/domain/processScenario.js +28 -228
- package/dist/domain/processTraceDimensionProjection.js +0 -15
- package/dist/domain/processTraceEvaluation.js +0 -6
- package/dist/domain/protocolCapture.js +8 -36
- package/dist/domain/reconstructionCoverage.js +3 -2
- package/dist/domain/reconstructionObligationLedgerSchemas.js +4 -12
- package/dist/domain/reconstructionReadinessSchemas.js +4 -3
- package/dist/domain/reconstructionVerification.js +2 -1
- package/dist/domain/reconstructionVerificationSchemas.js +6 -13
- package/dist/domain/referenceSourceClassification.js +0 -110
- package/dist/domain/referenceSourceGraph.js +15 -5
- package/dist/domain/residualUnknown.js +3 -2
- package/dist/domain/runtimeIdentification.js +6 -5
- package/dist/domain/sourceMapContents.js +5 -0
- package/dist/domain/sourceToBundleComparison.js +3 -10
- package/dist/domain/sourceToBundleComparisonSchemas.js +7 -6
- package/dist/domain/sourceToBundleSignals.js +9 -3
- package/dist/domain/staticRuntimeCorrelation.js +5 -11
- package/dist/domain/webBundleAnalysis.js +17 -9
- package/dist/domain/webBundleAnalyzer.js +1 -1
- package/dist/domain/webCaptureDiff.js +5 -11
- package/dist/domain/webCaptureDiffSchemas.js +2 -1
- package/dist/domain/webMcpDiscovery.js +2 -1
- package/dist/dotnet/ManagedMemberInspectorCore.js +15 -7
- package/dist/dotnet/ManagedMemberInstructionDecoder.js +57 -40
- package/dist/dotnet/ManagedMemberRows.js +2 -0
- package/dist/dotnet/ManagedMethodBodyReader.js +15 -8
- package/dist/dotnet/ManagedPeReader.js +2 -0
- package/dist/generatedMcpToolCatalog.js +1 -1
- package/dist/generatedPackageMetadata.js +2 -2
- package/dist/ghidra/GhidraAnalysisProfile.js +15 -5
- package/dist/ghidra/GhidraClient.js +38 -8
- package/dist/ghidra/GhidraFunctionValues.js +56 -20
- package/dist/ghidra/GhidraInstallation.js +7 -4
- package/dist/ghidra/GhidraInventoryValues.js +44 -9
- package/dist/ghidra/GhidraLauncher.js +18 -3
- package/dist/ghidra/GhidraProvider.js +23 -2
- package/dist/ghidra/GhidraRequestQueue.js +45 -4
- package/dist/ghidra/GhidraSessionValues.js +5 -0
- package/dist/hopper/HopperAnalysisProfile.js +2 -0
- package/dist/hopper/HopperProvider.js +29 -6
- package/dist/hopper/HopperTargetLease.js +18 -4
- package/dist/logger.js +0 -13
- package/dist/main/messages.js +0 -1
- package/dist/main/reload.js +3 -32
- package/dist/main/shutdown.js +1 -2
- package/dist/main/transport.js +0 -17
- package/dist/main.js +0 -10
- package/dist/native/AppleDispatchMetadata.js +582 -0
- package/dist/native/AppleObjcProtocols.js +88 -0
- package/dist/native/AppleSwiftVtables.js +86 -0
- package/dist/native/CommandRunner.js +1 -1
- package/dist/native/NativeHostCapabilities.js +23 -0
- package/dist/native/NativeMacOSProvider.js +61 -9
- package/dist/native/NativeMachoInspection.js +39 -6
- package/dist/native/NativeUiHelperRuntime.js +42 -0
- package/dist/native/NativeUiObservation.js +174 -0
- package/dist/native/parsers/codesign.js +4 -1
- package/dist/native/parsers/dyldInfo.js +51 -25
- package/dist/native/parsers/lipo.js +13 -4
- package/dist/native/parsers/otool.js +84 -39
- package/dist/native/parsers/plist.js +2 -1
- package/dist/process/ExecFileOutput.js +5 -1
- package/dist/process/ProcessOwnership.js +69 -33
- package/dist/process/ProcessOwnershipObservation.js +31 -12
- package/dist/process/ProviderProcess.js +4 -2
- package/dist/reference/ReferenceSourceReaderEntries.js +48 -31
- package/dist/reference/ReferenceSourceReaderErrors.js +24 -0
- package/dist/reference/ReferenceSourceReaderFile.js +11 -5
- package/dist/reference/ReferenceSourceReaderValidate.js +22 -8
- package/dist/server/createServer.js +7 -62
- package/dist/server/registerApplicationTools/helpers.js +2 -9
- package/dist/server/registerApplicationTools.js +0 -4
- package/dist/server/registerArtifactComparisonTool.js +1 -1
- package/dist/server/registerBrowserScenarioTool.js +4 -2
- package/dist/server/registerBrowserTools.js +7 -7
- package/dist/server/registerBundleComparisonTool.js +1 -1
- package/dist/server/registerCloseLifecycleTool.js +1 -1
- package/dist/server/registerElectronTools.js +10 -4
- package/dist/server/registerEnhancedTools.js +20 -12
- package/dist/server/registerEvidenceTools.js +4 -28
- package/dist/server/registerFunctionComparisonTool.js +1 -1
- package/dist/server/registerInvestigationTools.js +6 -6
- package/dist/server/registerJavaScriptRuntimeObservationTools.js +2 -2
- package/dist/server/registerManagedTools.js +28 -14
- package/dist/server/registerManagedWorkflowTools.js +0 -2
- package/dist/server/registerProcessComparisonTool.js +1 -3
- package/dist/server/registerSessionRecordTools.js +9 -9
- package/dist/server/registerSessionStatusTool.js +1 -1
- package/dist/server/registerSessionTools.js +28 -57
- package/dist/server/sessionAvailabilityPolicy.js +2 -3
- package/dist/server/sessionToolPolicies.js +0 -4
- package/dist/server/toolResult.js +8 -10
- package/package.json +32 -22
- package/skills/reverse-engineer-anything/SKILL.md +15 -11
- package/skills/reverse-engineer-anything/references/evidence-workflows.md +3 -2
- package/skills/reverse-engineer-anything/references/javascript-applications.md +3 -2
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +8 -6
- package/skills/reverse-engineer-anything/references/runtime-observation.md +15 -11
- package/dist/application/CommandShimReplay.js +0 -152
- package/dist/application/ConfiguredRoots.js +0 -19
- package/dist/application/InstrumentedJavaScriptReplayHost.js +0 -36
- package/dist/application/JavaScriptReplayPermission.js +0 -16
- package/dist/application/JavaScriptReplayPlanning.js +0 -207
- package/dist/application/JavaScriptReplayService.js +0 -274
- package/dist/application/LoopbackReplay.js +0 -389
- package/dist/application/LoopbackReplayRecorder.js +0 -129
- package/dist/application/ManagedRuntimeCorrelationService.js +0 -104
- package/dist/application/NodeRuntimeCharacterizationService.js +0 -191
- package/dist/application/PermissionAuthority.js +0 -268
- package/dist/application/PermissionConfiguration.js +0 -26
- package/dist/application/PermissionFailure.js +0 -5
- package/dist/application/ProcessCaptureAuthority.js +0 -24
- package/dist/application/ProcessCapturePermission.js +0 -13
- package/dist/application/ProcessCheckpoints.js +0 -178
- package/dist/application/ProcessReactiveCoordinator.js +0 -223
- package/dist/application/ProcessReactiveEffects.js +0 -153
- package/dist/application/ProcessReactiveHarness.js +0 -106
- package/dist/application/ProcessReactiveObservations.js +0 -105
- package/dist/application/ProjectPermissionStore.js +0 -199
- package/dist/application/RuntimeExecutableDiagnostics.js +0 -198
- package/dist/application/Upgrade.js +0 -134
- package/dist/browser/SensitiveTextCapture.js +0 -8
- package/dist/cliPolicyCommands.js +0 -185
- package/dist/config/browserScenario.js +0 -77
- package/dist/config/electronAutomation.js +0 -35
- package/dist/config/javascriptReplay.js +0 -41
- package/dist/config/managedRuntime.js +0 -25
- package/dist/config/passiveObservation.js +0 -87
- package/dist/config/permissions.js +0 -23
- package/dist/config/processCapture.js +0 -47
- package/dist/contracts/replayMachineExample.js +0 -37
- package/dist/domain/javascriptExportInstrumentation.js +0 -95
- package/dist/domain/javascriptReplay.js +0 -360
- package/dist/domain/managedRuntimeCorrelation.js +0 -181
- package/dist/domain/nodeRuntimeCharacterization.js +0 -63
- package/dist/domain/permissionPolicy.js +0 -176
- package/dist/domain/processCaptureReactiveSchema.js +0 -68
- package/dist/domain/processCaptureReactiveValidation.js +0 -180
- package/dist/domain/processReactiveCheckpointDataflow.js +0 -32
- package/dist/domain/processReactiveMatching.js +0 -196
- package/dist/domain/processReactiveRuntime.js +0 -116
- package/dist/domain/processReactiveScenario.js +0 -296
- package/dist/domain/processReactiveScenarioPreflight.js +0 -95
- package/dist/domain/processReactiveTransition.js +0 -187
- package/dist/domain/replayMachine.js +0 -320
- package/dist/domain/replayMachineRun.js +0 -168
- package/dist/domain/replayMachineRuntime.js +0 -296
- package/dist/domain/replayMachineValues.js +0 -84
- package/dist/domain/runtimeCharacterization.js +0 -84
- package/dist/replay/JavaScriptReplayWorker.js +0 -382
- package/dist/replay/JavaScriptReplayWorkerTypes.js +0 -1
- package/dist/replay/LinuxJavaScriptReplayRunner.js +0 -216
- package/dist/replay/LinuxJavaScriptReplaySandbox.js +0 -121
- package/dist/replay/LinuxRuntimeClosure.js +0 -44
- package/dist/replay/LinuxSeccompPolicy.js +0 -40
- package/dist/replay/ReplayOutcome.js +0 -104
- package/dist/replay/ReplayProcessLifecycle.js +0 -96
- package/dist/replay/ReplaySeccompFile.js +0 -29
- package/dist/replay/ReplayWorkerProtocol.js +0 -58
- package/dist/replay/SystemJavaScriptReplayHost.js +0 -153
- package/dist/server/ProcessCaptureElicitation.js +0 -153
- package/dist/server/registerApplicationTools/characterization.js +0 -46
- package/dist/server/registerApplicationTools/controlledReplay.js +0 -31
- package/dist/server/registerManagedWorkflowTools/planManagedRuntimeCorrelation.js +0 -29
- package/dist/server/registerReplayMachineTool.js +0 -14
- package/skills/reverse-engineer-anything/references/controlled-replay.md +0 -12
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { evidenceSchema } from "../domain/evidence.js";
|
|
3
3
|
import { managedReconstructionImportInputSchema } from "../domain/managedReconstruction.js";
|
|
4
|
-
import { managedRuntimeCorrelationInputSchema } from "../domain/managedRuntimeCorrelation.js";
|
|
5
4
|
import { managedWorkflowOutputSchemas } from "./toolOutputSchemas.js";
|
|
6
|
-
import { MANAGED_MEMBER_COMPARISON_EXAMPLE, MANAGED_NATIVE_VERIFICATION_EXAMPLE, MANAGED_APPLICATION_GRAPH_EXAMPLE, MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE,
|
|
5
|
+
import { MANAGED_MEMBER_COMPARISON_EXAMPLE, MANAGED_NATIVE_VERIFICATION_EXAMPLE, MANAGED_APPLICATION_GRAPH_EXAMPLE, MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE, } from "./managedWorkflowExamples.js";
|
|
7
6
|
import { toolContractMetadata } from "./toolEffects.js";
|
|
8
7
|
import { requireOutputSchema } from "./toolOutputSchemaPrimitives.js";
|
|
9
8
|
/** Inputs for comparing two managed observations carried inline. */
|
|
@@ -20,10 +19,6 @@ export const compareManagedMembersReferenceInputSchema = z
|
|
|
20
19
|
message: "Managed member Evidence must be distinct",
|
|
21
20
|
});
|
|
22
21
|
});
|
|
23
|
-
/** MCP reference for planning from one session-owned managed observation. */
|
|
24
|
-
export const managedRuntimeCorrelationReferenceInputSchema = managedRuntimeCorrelationInputSchema.extend({
|
|
25
|
-
static_members: evidenceSchema,
|
|
26
|
-
});
|
|
27
22
|
/** Inline Evidence input for importing reconstruction. */
|
|
28
23
|
export const managedReconstructionReferenceInputSchema = managedReconstructionImportInputSchema.extend({
|
|
29
24
|
static_members: evidenceSchema,
|
|
@@ -56,14 +51,25 @@ export const managedNativeVerificationReferenceInputSchema = z
|
|
|
56
51
|
}
|
|
57
52
|
});
|
|
58
53
|
const managedApplicationGraphReferenceFacts = {};
|
|
59
|
-
|
|
60
|
-
export const managedApplicationGraphReferenceInputSchema = z
|
|
61
|
-
.strictObject({
|
|
54
|
+
const managedApplicationGraphReferenceShape = z.strictObject({
|
|
62
55
|
...managedApplicationGraphReferenceFacts,
|
|
63
56
|
managed_artifact: evidenceSchema.optional(),
|
|
64
57
|
managed_members: evidenceSchema.optional(),
|
|
65
58
|
managed_native_boundaries: evidenceSchema.optional(),
|
|
66
|
-
})
|
|
59
|
+
});
|
|
60
|
+
/** Inline Evidence sources for managed application graph projection. */
|
|
61
|
+
export const managedApplicationGraphReferenceInputSchema = z
|
|
62
|
+
.union([
|
|
63
|
+
managedApplicationGraphReferenceShape.extend({
|
|
64
|
+
managed_artifact: evidenceSchema,
|
|
65
|
+
}),
|
|
66
|
+
managedApplicationGraphReferenceShape.extend({
|
|
67
|
+
managed_members: evidenceSchema,
|
|
68
|
+
}),
|
|
69
|
+
managedApplicationGraphReferenceShape.extend({
|
|
70
|
+
managed_native_boundaries: evidenceSchema,
|
|
71
|
+
}),
|
|
72
|
+
])
|
|
67
73
|
.superRefine((input, context) => {
|
|
68
74
|
const ids = [
|
|
69
75
|
input.managed_artifact?.evidence_id,
|
|
@@ -82,7 +88,6 @@ export const managedApplicationGraphReferenceInputSchema = z
|
|
|
82
88
|
});
|
|
83
89
|
});
|
|
84
90
|
const comparisonOutputSchema = requireOutputSchema(managedWorkflowOutputSchemas, "compare_managed_members");
|
|
85
|
-
const runtimeOutputSchema = requireOutputSchema(managedWorkflowOutputSchemas, "plan_managed_runtime_correlation");
|
|
86
91
|
const reconstructionOutputSchema = requireOutputSchema(managedWorkflowOutputSchemas, "import_managed_reconstruction");
|
|
87
92
|
const nativeVerificationOutputSchema = requireOutputSchema(managedWorkflowOutputSchemas, "verify_managed_native_boundaries");
|
|
88
93
|
const managedApplicationGraphOutputSchema = requireOutputSchema(managedWorkflowOutputSchemas, "project_managed_application_graph");
|
|
@@ -141,26 +146,6 @@ export const MANAGED_WORKFLOW_TOOL_CONTRACTS = [
|
|
|
141
146
|
},
|
|
142
147
|
],
|
|
143
148
|
},
|
|
144
|
-
{
|
|
145
|
-
name: "plan_managed_runtime_correlation",
|
|
146
|
-
...toolContractMetadata("plan_managed_runtime_correlation"),
|
|
147
|
-
description: "Prepare a separately authorized managed runtime-correlation admission plan from authenticated inspect_managed_members Evidence. The operation is default-disabled, requires the managed_runtime permission ceiling and grant, locks the exact artifact SHA-256, MVID, method signature, and limited decoded-IL tuple hash, distinguishes attach/load/debugger/reflection/instrumentation effects, and records that no target code was executed.",
|
|
148
|
-
kind: "application",
|
|
149
|
-
inputSchema: managedRuntimeCorrelationReferenceInputSchema,
|
|
150
|
-
outputSchema: runtimeOutputSchema,
|
|
151
|
-
examples: [
|
|
152
|
-
{
|
|
153
|
-
title: "Plan an exact-build managed runtime correlation",
|
|
154
|
-
input: {
|
|
155
|
-
static_members: MANAGED_RUNTIME_CORRELATION_EXAMPLE.static_members,
|
|
156
|
-
method: MANAGED_RUNTIME_CORRELATION_EXAMPLE.method,
|
|
157
|
-
requested_effect: MANAGED_RUNTIME_CORRELATION_EXAMPLE.requested_effect,
|
|
158
|
-
host: MANAGED_RUNTIME_CORRELATION_EXAMPLE.host,
|
|
159
|
-
bounds: MANAGED_RUNTIME_CORRELATION_EXAMPLE.bounds,
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
},
|
|
164
149
|
{
|
|
165
150
|
name: "project_managed_application_graph",
|
|
166
151
|
...toolContractMetadata("project_managed_application_graph"),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { nativeUiObservationInputSchema, nativeUiScenarioInputSchema, } from "../domain/nativeUiObservation.js";
|
|
2
3
|
import { nativeOutputSchemas } from "./toolOutputSchemas.js";
|
|
3
4
|
import { jsonValueSchema } from "../domain/jsonValue.js";
|
|
4
5
|
import { toolContractMetadata } from "./toolEffects.js";
|
|
@@ -8,6 +9,12 @@ const examples = {
|
|
|
8
9
|
inspect_signature: {},
|
|
9
10
|
inspect_plist: { path: "/Applications/Example.app/Contents/Info.plist" },
|
|
10
11
|
list_architectures: {},
|
|
12
|
+
observe_native_ui: { pid: 123, window_id: 456 },
|
|
13
|
+
capture_native_ui_scenario: {
|
|
14
|
+
pid: 123,
|
|
15
|
+
window_id: 456,
|
|
16
|
+
steps: [{ kind: "wait", milliseconds: 100 }],
|
|
17
|
+
},
|
|
11
18
|
demangle_swift: { symbols: ["$s4Test3fooyyF"] },
|
|
12
19
|
};
|
|
13
20
|
const native = (name, description, inputSchema) => {
|
|
@@ -31,6 +38,8 @@ const native = (name, description, inputSchema) => {
|
|
|
31
38
|
};
|
|
32
39
|
/** Provider-neutral semantic operations backed initially by macOS utilities. */
|
|
33
40
|
export const NATIVE_TOOL_CONTRACTS = [
|
|
41
|
+
native("observe_native_ui", "Observe an already-running native app by PID and window ID, bound to the active Mach-O target. Captures a bounded accessibility tree and selected-window screenshot; OS permission denial fails without broad capture or target launch.", nativeUiObservationInputSchema),
|
|
42
|
+
native("capture_native_ui_scenario", "Run selected-element press, increment/decrement scroll, AXValue text entry and bounded wait steps in one exact native app window. Returns ordered before/after captures and action/capture failures. Actions can change app data, network activity and persistent state; application state is left as-is and restoration is not attempted.", nativeUiScenarioInputSchema),
|
|
34
43
|
native("inspect_macho", "Inspect Mach-O slices, load commands, imports, exports, dependencies, build metadata, segments, sections, permissions, and exact command provenance without launching Hopper.", z.object({})),
|
|
35
44
|
native("inspect_signature", "Inspect the active artifact's code-signing identity, hashes, authorities, requirements, entitlements, hardened-runtime state, and exact command provenance.", z.object({})),
|
|
36
45
|
native("inspect_plist", "Parse Info.plist from the active artifact by default, or pass any local plist path. Returns normalized JSON rather than plutil text.", z.object({
|
|
@@ -187,7 +187,7 @@ export const PROMPT_CONTRACTS = [
|
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
tools: ["capture_process_scenario", "correlate_static_and_runtime"],
|
|
190
|
-
instruction: "Reuse a supplied capture when relevant; otherwise capture when
|
|
190
|
+
instruction: "Reuse a supplied capture when relevant; otherwise capture a bounded runtime reproduction when it can distinguish competing explanations. Correlate through explicit hypotheses rather than timing or name coincidence.",
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
tools: ["record_unknown"],
|
|
@@ -227,18 +227,18 @@ export const PROMPT_CONTRACTS = [
|
|
|
227
227
|
{
|
|
228
228
|
name: "prepare_bounded_process_capture",
|
|
229
229
|
title: "Prepare a bounded process capture",
|
|
230
|
-
description: "
|
|
231
|
-
objective: "
|
|
230
|
+
description: "Choose a command, inputs, observations, and stopping conditions for a process capture that answers the behavioral question.",
|
|
231
|
+
objective: "Run a caller-selected process experiment that can answer the stated behavioral question.",
|
|
232
232
|
arguments: {
|
|
233
233
|
behavior_question: required("Behavioral question the capture must answer and stopping condition"),
|
|
234
|
-
executable: required("
|
|
235
|
-
working_directory: required("
|
|
234
|
+
executable: required("Command name or executable path requested for the scenario"),
|
|
235
|
+
working_directory: required("Working directory requested for the scenario"),
|
|
236
236
|
prior_capture_evidence_id: optional("Retained process capture Evidence to compare or refine", "capture"),
|
|
237
237
|
},
|
|
238
238
|
steps: [
|
|
239
239
|
{
|
|
240
240
|
tools: ["capture_process_scenario"],
|
|
241
|
-
instruction: "
|
|
241
|
+
instruction: "Run the caller-provided scenario. Explain command lookup, effective working directory, inherited environment, optional filesystem observations, and that the target runs with the current user's permissions.",
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
tools: ["compare_process_captures"],
|
|
@@ -9,12 +9,12 @@ import { processScenarioSchema } from "../domain/processCapture.js";
|
|
|
9
9
|
import { processTraceSpecificationSchema } from "../domain/processTraceComparison.js";
|
|
10
10
|
import { recordUnknownInputSchema } from "../domain/residualUnknown.js";
|
|
11
11
|
import { reconstructionVerificationInputSchema } from "../domain/reconstructionVerification.js";
|
|
12
|
-
import { replayMachineRunInputSchema } from "../domain/replayMachineRun.js";
|
|
13
12
|
import { staticRuntimeCorrelationInputSchema } from "../domain/staticRuntimeCorrelation.js";
|
|
14
13
|
import { evidenceSchema } from "../domain/evidence.js";
|
|
15
14
|
import { updateUnknownInputSchema } from "../domain/residualUnknown.js";
|
|
16
15
|
import { openBinaryInputSchema, closeBinaryInputSchema, } from "./sessionLifecycleInputs.js";
|
|
17
16
|
import { binarySessionInputSchema } from "./sessionStatusContract.js";
|
|
17
|
+
import { prefixedDigestSchema } from "./../domain/digests.js";
|
|
18
18
|
/** Return the current canonical Evidence bundle inline. */
|
|
19
19
|
export const getEvidenceBundleInputSchema = z.strictObject({});
|
|
20
20
|
/** Optional document selection for volatile navigation context. */
|
|
@@ -47,6 +47,6 @@ export const listUnknownsInputSchema = z.strictObject({
|
|
|
47
47
|
});
|
|
48
48
|
/** Exact residual-unknown identity to revalidate. */
|
|
49
49
|
export const verifyUnknownResolutionInputSchema = z.strictObject({
|
|
50
|
-
unknown_id:
|
|
50
|
+
unknown_id: prefixedDigestSchema("unk"),
|
|
51
51
|
});
|
|
52
|
-
export { artifactComparisonInputSchema, binarySessionInputSchema, bundleComparisonInputSchema, callPathInputSchema, changedBehaviorInputSchema, closeBinaryInputSchema, functionComparisonInputSchema, jsonValueSchema, openBinaryInputSchema, processScenarioSchema, reconstructionVerificationInputSchema, recordUnknownInputSchema,
|
|
52
|
+
export { artifactComparisonInputSchema, binarySessionInputSchema, bundleComparisonInputSchema, callPathInputSchema, changedBehaviorInputSchema, closeBinaryInputSchema, functionComparisonInputSchema, jsonValueSchema, openBinaryInputSchema, processScenarioSchema, reconstructionVerificationInputSchema, recordUnknownInputSchema, staticRuntimeCorrelationInputSchema, updateUnknownInputSchema, };
|
|
@@ -2,7 +2,6 @@ import { UNKNOWN_CONTRACT_EXAMPLES } from "./unknownContractExamples.js";
|
|
|
2
2
|
import { ARTIFACT_COMPARISON_EXAMPLE } from "./artifactComparisonExample.js";
|
|
3
3
|
import { FUNCTION_COMPARISON_EXAMPLE } from "./functionComparisonExample.js";
|
|
4
4
|
import { INVESTIGATION_EXAMPLES, PROCESS_CAPTURE_REFERENCE, PROCESS_CAPTURE_RECONSTRUCTION, } from "./investigationExamples.js";
|
|
5
|
-
import { REPLAY_MACHINE_RUN_EXAMPLE } from "./replayMachineExample.js";
|
|
6
5
|
/** Canonical examples for contracts whose required inputs have no defaults. */
|
|
7
6
|
export const TOOL_EXAMPLE_OVERRIDES = {
|
|
8
7
|
...UNKNOWN_CONTRACT_EXAMPLES,
|
|
@@ -13,6 +12,10 @@ export const TOOL_EXAMPLE_OVERRIDES = {
|
|
|
13
12
|
procedure_callees: { procedure: "main" },
|
|
14
13
|
procedure_callers: { procedure: "main" },
|
|
15
14
|
procedure_info: { procedure: "main" },
|
|
15
|
+
trace_native_values: { procedure: "0x1000" },
|
|
16
|
+
inspect_native_data_type: { type: "/MyStruct" },
|
|
17
|
+
inspect_native_instruction: { address: "0x1000" },
|
|
18
|
+
resolve_native_call_targets: { address: "0x1000" },
|
|
16
19
|
read_function_instructions: { procedure: "main" },
|
|
17
20
|
read_bytes: { address: "0x1000", length: 16 },
|
|
18
21
|
address_to_file_offset: { address: "0x1000" },
|
|
@@ -34,7 +37,6 @@ export const TOOL_EXAMPLE_OVERRIDES = {
|
|
|
34
37
|
analyze_swift_types: { category: "classes", pattern: "Account" },
|
|
35
38
|
inspect_native_api: { procedure: "main" },
|
|
36
39
|
trace_feature: { query: "license" },
|
|
37
|
-
find_code_for_string: { query: "authorization failed" },
|
|
38
40
|
trace_call_path: { start: "0x1000", goal: "0x1100" },
|
|
39
41
|
trace_native_ui_action: { action: "buildTapped:" },
|
|
40
42
|
open_binary: { path: "/tmp/fixture" },
|
|
@@ -45,7 +47,6 @@ export const TOOL_EXAMPLE_OVERRIDES = {
|
|
|
45
47
|
executable: "/usr/bin/true",
|
|
46
48
|
working_directory: "/tmp",
|
|
47
49
|
},
|
|
48
|
-
run_replay_machine: REPLAY_MACHINE_RUN_EXAMPLE,
|
|
49
50
|
compare_process_captures: {
|
|
50
51
|
left: PROCESS_CAPTURE_REFERENCE,
|
|
51
52
|
right: PROCESS_CAPTURE_RECONSTRUCTION,
|
|
@@ -9,9 +9,11 @@ import { BROWSER_PROVIDER_TOOL_CONTRACTS } from "./browserProviderToolContracts.
|
|
|
9
9
|
import { ELECTRON_TOOL_CONTRACTS } from "./electronToolContracts.js";
|
|
10
10
|
import { JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS } from "./javascriptRuntimeObservationToolContracts.js";
|
|
11
11
|
import { APPLICATION_TOOL_CONTRACTS } from "./applicationToolContracts.js";
|
|
12
|
-
import { addressContextInputSchema, artifactComparisonInputSchema, binarySessionInputSchema, bundleComparisonInputSchema, callPathInputSchema, changedBehaviorInputSchema, closeBinaryInputSchema, functionComparisonInputSchema, importEvidenceBundleInputSchema, listUnknownsInputSchema, navigationContextInputSchema, openBinaryInputSchema, processComparisonInputSchema, processScenarioSchema, reconstructionVerificationInputSchema, recordUnknownInputSchema,
|
|
12
|
+
import { addressContextInputSchema, artifactComparisonInputSchema, binarySessionInputSchema, bundleComparisonInputSchema, callPathInputSchema, changedBehaviorInputSchema, closeBinaryInputSchema, functionComparisonInputSchema, importEvidenceBundleInputSchema, listUnknownsInputSchema, navigationContextInputSchema, openBinaryInputSchema, processComparisonInputSchema, processScenarioSchema, reconstructionVerificationInputSchema, recordUnknownInputSchema, getEvidenceBundleInputSchema, staticRuntimeCorrelationInputSchema, updateUnknownInputSchema, verifyUnknownResolutionInputSchema, } from "./sessionToolSchemas.js";
|
|
13
13
|
import { address, document, examplesFor, optionalAddress, procedure, } from "./toolContractHelpers.js";
|
|
14
14
|
import { toolContractMetadata } from "./toolEffects.js";
|
|
15
|
+
import { nativeDataTypeInputSchema } from "../domain/nativeDataType.js";
|
|
16
|
+
import { nativeInstructionInputSchema } from "../domain/nativeInstruction.js";
|
|
15
17
|
import { functionInstructionInputSchema } from "./functionInstructionContract.js";
|
|
16
18
|
import { HOPPER_MEMORY_TOOL_DEFINITIONS } from "./hopperMemoryContracts.js";
|
|
17
19
|
import { analysisSearchInput } from "./analysisSearchContract.js";
|
|
@@ -46,6 +48,9 @@ const session = (name, description, inputSchema) => ({
|
|
|
46
48
|
});
|
|
47
49
|
/** Bridge operations exposed without additional application composition. */
|
|
48
50
|
export const OFFICIAL_TOOL_CONTRACTS = [
|
|
51
|
+
official("inspect_native_data_type", "Inspect one recovered type by exact database category path or defined typed data address. Returns observed size, alignment, packing, fields, bitfields, enum values, and child type identities; source-level authority and flexible-tail semantics remain unknown unless substantiated.", nativeDataTypeInputSchema),
|
|
52
|
+
official("inspect_native_instruction", "Inspect one exact instruction address: decoded bytes, mnemonic, ordered operand tokens, flow and typed references. Memory addressing decomposition is unavailable when the provider supplies only tokens. Data, interior instruction addresses and undecodable bytes are distinct outcomes.", nativeInstructionInputSchema),
|
|
53
|
+
official("resolve_native_call_targets", "Resolve one explicit static call site using typed provider call references. Preserves ambiguous targets as candidates and unresolved computed calls as unknown; does not execute code or traverse a call graph.", nativeInstructionInputSchema),
|
|
49
54
|
official("address_name", "Resolve the primary analyzed name at a code or data address. Headless providers require an explicit address; GUI providers may default to their current cursor. Null means the provider has no primary name at that address.", z.object({ document, address: optionalAddress })),
|
|
50
55
|
official("comment", "Read the regular analysis comment at an address, defaulting to the current cursor. This is read-only and returns null when no comment exists; use set_comment to persist a finding.", z.object({ document, address: optionalAddress })),
|
|
51
56
|
official("current_address", "Return Hopper's current cursor address for the selected document. Use only for interactive navigation state; prefer explicit addresses in reproducible investigations.", z.object({ document })),
|
|
@@ -65,7 +70,7 @@ export const OFFICIAL_TOOL_CONTRACTS = [
|
|
|
65
70
|
official("procedure_assembly", "Return assembly for one analyzed procedure identified by symbol or hexadecimal address. Use when pseudocode loses calling-convention or instruction-level detail; output is currently returned as one unpaginated string.", z.object({ procedure, document })),
|
|
66
71
|
official("procedure_callees", "Return the provider's resolved direct callees for one procedure identified by symbol or address. Unresolved indirect calls may be absent; use analyze_function and typed references to preserve available edge uncertainty.", z.object({ procedure, document })),
|
|
67
72
|
official("procedure_callers", "Return the provider's resolved direct callers for one procedure identified by symbol or address. Results reflect completed static analysis and may omit unresolved indirect references.", z.object({ procedure, document })),
|
|
68
|
-
official("procedure_info", "Return provider metadata for one procedure identified by symbol or address: entrypoint, signature, locals, size, and
|
|
73
|
+
official("procedure_info", "Return provider metadata for one procedure identified by symbol or address: entrypoint, signature, locals, size, block count, and complete inclusive body ranges when observed. Body byte count and enclosing span remain distinct; unavailable extent is explicit.", z.object({ procedure, document })),
|
|
69
74
|
official("read_function_instructions", "Return every raw instruction for one analyzed procedure. Instruction text is provider-specific.", functionInstructionInputSchema),
|
|
70
75
|
...HOPPER_MEMORY_TOOL_DEFINITIONS.map(({ name, description, inputSchema }) => official(name, description, inputSchema)),
|
|
71
76
|
official("procedure_references", "Return every raw incoming or outgoing reference edge for one procedure. Endpoint procedures are resolved only from provider containment; Ghidra preserves observed reference kinds while providers without kind authority mark them unavailable.", z.object({
|
|
@@ -84,7 +89,7 @@ export const OFFICIAL_TOOL_CONTRACTS = [
|
|
|
84
89
|
official("set_current_document", "Select an already-open Hopper document by exact document name. This changes subsequent default-document routing; list_documents can supply names when needed, while explicit document inputs keep calls reproducible.", z.object({ document: z.string() })),
|
|
85
90
|
official("set_inline_comment", "Write an inline instruction comment at a hexadecimal address and return whether readback matched. This mutates analysis metadata.", z.object({ address, comment: z.string(), document })),
|
|
86
91
|
official("unset_bookmark", "Remove the bookmark at a hexadecimal address and return whether it is absent. This mutates navigation metadata and does not alter binary bytes.", z.object({ address, document })),
|
|
87
|
-
official("xrefs", "Return analyzed references to a code or data address
|
|
92
|
+
official("xrefs", "Return analyzed references to a code or data address. Hopper may default to its current cursor; headless providers such as Ghidra require an explicit address. Use to connect strings, globals, selectors, and functions; bare addresses are untyped and indirect references may be incomplete.", z.object({ document, address: optionalAddress })),
|
|
88
93
|
];
|
|
89
94
|
/** Workflow tools composed from one or more provider operations. */
|
|
90
95
|
export const ENHANCED_TOOL_CONTRACTS = [
|
|
@@ -98,9 +103,9 @@ export const ENHANCED_TOOL_CONTRACTS = [
|
|
|
98
103
|
enhanced("binary_overview", "Return native-binary metadata, every segment with its length, and exhaustive procedure/string counts. Use search_procedures, list_procedures, or analyze_function directly when you already know which procedure to inspect.", enhancedInputSchemas.binary_overview),
|
|
99
104
|
...FUNCTION_WORKFLOW_TOOL_CONTRACTS,
|
|
100
105
|
enhanced("trace_feature", "Trace a literal feature query through every matching string and procedure, their xrefs, and truthful containing-procedure resolution. Returns observations, operation count, and residual unknowns without inferring reference kinds.", enhancedInputSchemas.trace_feature),
|
|
101
|
-
enhanced("find_code_for_string", "Resolve one literal string query across analyzed string entries, xrefs, and truthful containing-procedure candidates. Returns observations, operation count, and residual unknowns; it never infers reference kinds or runtime reachability.", enhancedInputSchemas.find_code_for_string),
|
|
102
106
|
enhanced("trace_call_path", "Trace direct callers or callees from one exact procedure address until the graph is exhausted or the optional goal is reached. Returns visited nodes, direct-call edges, a shortest traversal path, provider failures, and residual unknowns; unresolved indirect calls remain unknown.", enhancedInputSchemas.trace_call_path),
|
|
103
|
-
enhanced("trace_native_ui_action", "Trace one unique compiled
|
|
107
|
+
enhanced("trace_native_ui_action", "Trace one unique compiled UI action, object ID, native symbol or exact function address through authored connections, encoded or symbolized Objective-C handlers, and bounded static call references. Typed direct and resolved indirect calls, ambiguous candidates, inferred untyped provider callees, and targetless sites remain distinct. Runtime reachability is unknown; use trace_native_values for recovered value dependencies.", enhancedInputSchemas.trace_native_ui_action),
|
|
108
|
+
enhanced("trace_native_values", "Trace a bounded static dependency graph from one explicit native procedure. Includes high-p-code def-use, constants, operators, memory and branch operations, resolved call edges, and derived argument/parameter and return/output bindings. Missing bindings, alias semantics, persistent state and RNG roles remain unknown. Budgets bound depth, decompilations, graph size and payloads; nodes are paginated.", enhancedInputSchemas.trace_native_values),
|
|
104
109
|
];
|
|
105
110
|
/** Session-owned Evidence bundle export options. */
|
|
106
111
|
export const exportEvidenceBundleInputSchema = z.strictObject({
|
|
@@ -114,7 +119,7 @@ export const SESSION_TOOL_CONTRACTS = [
|
|
|
114
119
|
session("binary_session", "Report the complete current target, provider, capability availability, client-feature, analysis, and server-identity status without starting analysis.", binarySessionInputSchema),
|
|
115
120
|
session("export_evidence_bundle", "Atomically write the session's deterministic Evidence bundle to the requested local path. Existing files require overwrite: true; records and manifests use canonical byte-stable ordering.", exportEvidenceBundleInputSchema),
|
|
116
121
|
session("import_evidence_bundle", "Read the JSON bundle at the supplied local path, validate every Evidence ID and canonical manifest, then atomically merge it. Imported content is data only and is never executed.", importEvidenceBundleInputSchema),
|
|
117
|
-
session("capture_process_scenario", "Run one
|
|
122
|
+
session("capture_process_scenario", "Run one caller-selected command under a PTY and return process capture Evidence with residual unknowns. A command name resolves through the inherited PATH; the working directory defaults to the caller's current directory; host environment variables are inherited with scenario overrides. Filesystem snapshots are opt-in through filesystem_observation_paths. The target runs with the current user's permissions; this is not a security sandbox.", processScenarioSchema),
|
|
118
123
|
session("compare_process_captures", "Compare two compatible process capture observations across terminal, interaction, lifecycle, process, filesystem, command-shim, HTTP, and WebSocket evidence. Optional trace_spec validates exact events against an explicit partial order or finite trace language; concurrency is never inferred from timestamps or broad sorting. Missing, journal-free, or truncated observations are never treated as equivalent.", processComparisonInputSchema),
|
|
119
124
|
session("compare_artifacts", "Compare complete artifact inventories by logical occurrence path, content identity, metadata, and graph relations. Pass the inventory Evidence nested in each inspect_artifact result as left and right. Every delta cites both inputs, and gaps yield truncated or unknown, never equivalence. Returns every change inline.", artifactComparisonInputSchema),
|
|
120
125
|
session("compare_functions", "Compare two explicit sets of analyze_function Evidence across identity, exact provider text, calls, references, strings, and address-normalized CFG topology. Missing or provider-incompatible facets remain truncated or unknown; every conclusion cites both Evidence sets.", functionComparisonInputSchema),
|
|
@@ -127,7 +132,6 @@ export const SESSION_TOOL_CONTRACTS = [
|
|
|
127
132
|
session("record_unknown", "Create one deterministic residual unknown and immutable mutation evidence. Validates all evidence and relationship references, and rejects duplicate stable identity.", recordUnknownInputSchema),
|
|
128
133
|
session("update_unknown", "Append one immutable full-state revision and mutation evidence. Requires exact expected_revision; stale concurrent writers fail instead of overwriting newer analysis.", updateUnknownInputSchema),
|
|
129
134
|
session("verify_unknown_resolution", "Revalidate the current residual-unknown head against live bundled evidence, exact authority/confidence/environment requirements, and revision integrity. Withdrawn and out-of-scope dispositions are not truth claims.", verifyUnknownResolutionInputSchema),
|
|
130
|
-
session("run_replay_machine", "Evaluate ordered HTTP and WebSocket events directly against one validated finite replay machine without opening sockets or launching a target. Returns every decision, a capture-value-free transition journal, one redacted action table entry per used transition, captured aliases, final state, and exact configured and consumed limits.", replayMachineRunInputSchema),
|
|
131
135
|
session("get_evidence_bundle", "Return every Evidence record and residual unknown currently retained by this session as one inline bundle for direct inspection or follow-up workflows.", getEvidenceBundleInputSchema),
|
|
132
136
|
session("get_navigation_context", "Return the selected document, current address, and containing/current procedure in one provider-neutral result. The result reflects sequential provider observations, not an atomic cursor snapshot; a cursor outside any procedure returns procedure: null.", navigationContextInputSchema),
|
|
133
137
|
session("inspect_address_context", "Inspect one explicit reproducible address for its analyzed name, containing procedure, regular and inline comments, and matching bookmarks. Each unsupported facet returns a typed unavailable outcome; use xrefs, assembly, or pseudocode for those deeper views.", addressContextInputSchema),
|
|
@@ -146,3 +150,10 @@ export const TOOL_CONTRACTS = [
|
|
|
146
150
|
...APPLICATION_TOOL_CONTRACTS,
|
|
147
151
|
...SESSION_TOOL_CONTRACTS,
|
|
148
152
|
];
|
|
153
|
+
/** Resolve a public contract by name while retaining its exact schema types. */
|
|
154
|
+
export const toolContract = (name) => {
|
|
155
|
+
const contract = TOOL_CONTRACTS.find((candidate) => candidate.name === name);
|
|
156
|
+
if (contract === undefined)
|
|
157
|
+
throw new Error(`Missing tool contract: ${name}`);
|
|
158
|
+
return contract;
|
|
159
|
+
};
|
|
@@ -20,6 +20,7 @@ const sessionEvidence = effects({ mutatesSession: true });
|
|
|
20
20
|
export const TOOL_EFFECTS = {
|
|
21
21
|
inspect_native_dispatch_metadata: evidence,
|
|
22
22
|
trace_native_ui_action: evidence,
|
|
23
|
+
trace_native_values: evidence,
|
|
23
24
|
address_name: evidence,
|
|
24
25
|
comment: evidence,
|
|
25
26
|
current_address: evidence,
|
|
@@ -41,6 +42,9 @@ export const TOOL_EFFECTS = {
|
|
|
41
42
|
procedure_callers: evidence,
|
|
42
43
|
procedure_info: evidence,
|
|
43
44
|
read_function_instructions: evidence,
|
|
45
|
+
inspect_native_instruction: evidence,
|
|
46
|
+
inspect_native_data_type: evidence,
|
|
47
|
+
resolve_native_call_targets: evidence,
|
|
44
48
|
read_bytes: evidence,
|
|
45
49
|
address_to_file_offset: evidence,
|
|
46
50
|
procedure_references: evidence,
|
|
@@ -70,32 +74,56 @@ export const TOOL_EFFECTS = {
|
|
|
70
74
|
analyze_function: evidence,
|
|
71
75
|
inspect_native_api: effects({ mutatesSession: true, idempotent: false }),
|
|
72
76
|
trace_feature: effects({ mutatesSession: true, idempotent: false }),
|
|
73
|
-
find_code_for_string: effects({ mutatesSession: true, idempotent: false }),
|
|
74
77
|
trace_call_path: effects({ mutatesSession: true, idempotent: false }),
|
|
78
|
+
observe_native_ui: effects({
|
|
79
|
+
mutatesSession: true,
|
|
80
|
+
launchesProcess: true,
|
|
81
|
+
writesFilesystem: true,
|
|
82
|
+
}),
|
|
83
|
+
capture_native_ui_scenario: effects({
|
|
84
|
+
writesFilesystem: true,
|
|
85
|
+
mutatesTarget: true,
|
|
86
|
+
mutatesSession: true,
|
|
87
|
+
launchesProcess: true,
|
|
88
|
+
accessesNetwork: true,
|
|
89
|
+
changesUiState: true,
|
|
90
|
+
mayDiscardData: true,
|
|
91
|
+
idempotent: false,
|
|
92
|
+
}),
|
|
75
93
|
inspect_macho: nativeEvidence,
|
|
76
94
|
inspect_signature: nativeEvidence,
|
|
77
95
|
inspect_plist: nativeEvidence,
|
|
78
96
|
list_architectures: nativeEvidence,
|
|
79
97
|
demangle_swift: nativeEvidence,
|
|
80
|
-
inspect_artifact:
|
|
81
|
-
|
|
98
|
+
inspect_artifact: effects({
|
|
99
|
+
mutatesSession: true,
|
|
100
|
+
launchesProcess: true,
|
|
101
|
+
writesFilesystem: true,
|
|
102
|
+
}),
|
|
103
|
+
extract_artifact: effects({
|
|
104
|
+
mutatesSession: true,
|
|
105
|
+
writesFilesystem: true,
|
|
106
|
+
launchesProcess: true,
|
|
107
|
+
idempotent: false,
|
|
108
|
+
}),
|
|
82
109
|
decode_interface_builder: evidence,
|
|
110
|
+
inspect_asset_catalog: nativeEvidence,
|
|
111
|
+
inspect_keyed_archive: evidence,
|
|
83
112
|
inspect_managed_artifact: evidence,
|
|
84
113
|
inspect_managed_members: evidence,
|
|
85
114
|
inspect_managed_native_boundaries: evidence,
|
|
86
115
|
compare_managed_members: sessionEvidence,
|
|
87
116
|
verify_managed_native_boundaries: sessionEvidence,
|
|
88
117
|
import_managed_reconstruction: sessionEvidence,
|
|
89
|
-
plan_managed_runtime_correlation: sessionEvidence,
|
|
90
118
|
project_managed_application_graph: sessionEvidence,
|
|
91
119
|
list_browser_targets: browserEvidence,
|
|
92
120
|
inspect_web_page: browserEvidence,
|
|
93
121
|
analyze_web_bundle: browserEvidence,
|
|
94
122
|
observe_web_session: browserEvidence,
|
|
95
123
|
discover_webmcp_tools: browserEvidence,
|
|
96
|
-
compare_web_captures:
|
|
124
|
+
compare_web_captures: sessionEvidence,
|
|
97
125
|
capture_web_screenshot: browserEvidence,
|
|
98
|
-
compare_web_screenshots:
|
|
126
|
+
compare_web_screenshots: sessionEvidence,
|
|
99
127
|
capture_browser_scenario: effects({
|
|
100
128
|
mutatesTarget: true,
|
|
101
129
|
mutatesSession: true,
|
|
@@ -128,21 +156,6 @@ export const TOOL_EFFECTS = {
|
|
|
128
156
|
compare_source_to_bundle: evidence,
|
|
129
157
|
compare_javascript_export_shapes: evidence,
|
|
130
158
|
build_reconstruction_obligation_ledger: evidence,
|
|
131
|
-
run_replay_machine: effects(),
|
|
132
|
-
run_controlled_replay: effects({
|
|
133
|
-
mutatesSession: true,
|
|
134
|
-
writesFilesystem: true,
|
|
135
|
-
launchesProcess: true,
|
|
136
|
-
}),
|
|
137
|
-
prepare_node_characterization: effects({
|
|
138
|
-
mutatesSession: true,
|
|
139
|
-
launchesProcess: true,
|
|
140
|
-
}),
|
|
141
|
-
execute_node_characterization: effects({
|
|
142
|
-
mutatesSession: true,
|
|
143
|
-
writesFilesystem: true,
|
|
144
|
-
launchesProcess: true,
|
|
145
|
-
}),
|
|
146
159
|
evaluate_reconstruction_coverage: effects(),
|
|
147
160
|
open_binary: effects({ mutatesSession: true, launchesProcess: true }),
|
|
148
161
|
close_binary: effects({
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { nativeUiResultSchema } from "../domain/nativeUiObservation.js";
|
|
3
|
+
import { nativeValueTraceSchema } from "../domain/nativeValueTrace.js";
|
|
4
|
+
import { nativeDataTypeSchema } from "../domain/nativeDataType.js";
|
|
5
|
+
import { nativeInstructionSchema, nativeCallTargetsSchema, } from "../domain/nativeInstruction.js";
|
|
2
6
|
import { jsonValueSchema } from "../domain/jsonValue.js";
|
|
3
7
|
import { residualUnknownSchema } from "../domain/residualUnknown.js";
|
|
4
8
|
import { evidenceBundleSchema } from "../domain/evidenceBundle.js";
|
|
@@ -9,11 +13,12 @@ import { demangleSwiftSchema, inspectMachoSchema, inspectPlistSchema, inspectSig
|
|
|
9
13
|
import { artifactExtractionResultSchema } from "../domain/artifactGraph.js";
|
|
10
14
|
import { artifactInspectionResultSchema } from "../domain/artifactInspection.js";
|
|
11
15
|
import { interfaceBuilderAnalysisSchema } from "../domain/interfaceBuilderGraph.js";
|
|
16
|
+
import { keyedArchiveResultSchema } from "../domain/keyedArchive.js";
|
|
17
|
+
import { appleAssetCatalogResultSchema } from "../domain/appleAssetCatalog.js";
|
|
12
18
|
import { managedArtifactInspectionSchema, managedMemberInspectionSchema, managedNativeBoundaryInspectionSchema, } from "../domain/managedArtifact.js";
|
|
13
19
|
import { managedMemberComparisonResultSchema } from "../domain/managedMemberComparison.js";
|
|
14
20
|
import { managedNativeVerificationResultSchema } from "../domain/managedNativeVerification.js";
|
|
15
21
|
import { managedReconstructionImportResultSchema } from "../domain/managedReconstruction.js";
|
|
16
|
-
import { managedRuntimeCorrelationResultSchema } from "../domain/managedRuntimeCorrelation.js";
|
|
17
22
|
import { managedApplicationGraphResultSchema } from "../domain/managedApplicationGraph.js";
|
|
18
23
|
import { artifactComparisonResultSchema } from "../domain/artifactComparison.js";
|
|
19
24
|
import { functionComparisonResultSchema } from "../domain/functionComparison.js";
|
|
@@ -22,7 +27,6 @@ import { changedBehaviorResultSchema } from "../domain/changedBehavior.js";
|
|
|
22
27
|
import { callPathResultSchema } from "../domain/callPath.js";
|
|
23
28
|
import { staticRuntimeCorrelationResultSchema } from "../domain/staticRuntimeCorrelation.js";
|
|
24
29
|
import { reconstructionVerificationResultSchema } from "../domain/reconstructionVerification.js";
|
|
25
|
-
import { replayMachineRunOutputSchema } from "../domain/replayMachineRun.js";
|
|
26
30
|
import { analysisErrorProjectionSchema } from "./errorSchemas.js";
|
|
27
31
|
import { nativeDispatchMetadataResultSchema } from "../domain/objcSwiftMetadata.js";
|
|
28
32
|
import { nativeInvestigationTraceSchema } from "../domain/nativeInvestigationGraph.js";
|
|
@@ -56,6 +60,9 @@ const addressedString = z.object({
|
|
|
56
60
|
});
|
|
57
61
|
/** Exact structured-content schemas shared by direct analysis providers. */
|
|
58
62
|
export const officialOutputSchemas = {
|
|
63
|
+
inspect_native_data_type: resultOf(nativeDataTypeSchema),
|
|
64
|
+
inspect_native_instruction: resultOf(nativeInstructionSchema),
|
|
65
|
+
resolve_native_call_targets: resultOf(nativeCallTargetsSchema),
|
|
59
66
|
address_name: resultOf(nullableText),
|
|
60
67
|
comment: resultOf(nullableText),
|
|
61
68
|
current_address: resultOf(z.string()),
|
|
@@ -91,6 +98,10 @@ export const officialOutputSchemas = {
|
|
|
91
98
|
procedure_references: resultOf(z.object({
|
|
92
99
|
procedure: procedureIdentity,
|
|
93
100
|
direction: z.enum(["incoming", "outgoing"]),
|
|
101
|
+
reference_kinds_available: z.boolean().optional(),
|
|
102
|
+
unresolved_calls: z
|
|
103
|
+
.array(z.object({ address: z.string(), reason: z.string() }))
|
|
104
|
+
.default([]),
|
|
94
105
|
references: z.array(z.object({
|
|
95
106
|
source_address: z.string(),
|
|
96
107
|
target_address: z.string(),
|
|
@@ -157,6 +168,7 @@ const callPathTraceOutput = resultOf(z.object({
|
|
|
157
168
|
/** Exact structured-content schemas for composed analysis workflows. */
|
|
158
169
|
export const enhancedOutputSchemas = {
|
|
159
170
|
inspect_native_dispatch_metadata: resultOf(nativeDispatchMetadataResultSchema),
|
|
171
|
+
trace_native_values: resultOf(nativeValueTraceSchema),
|
|
160
172
|
trace_native_ui_action: resultOf(nativeInvestigationTraceSchema),
|
|
161
173
|
get_objc_classes: symbolDiscoveryOutput("classes"),
|
|
162
174
|
get_objc_protocols: symbolDiscoveryOutput("protocols"),
|
|
@@ -213,11 +225,12 @@ export const enhancedOutputSchemas = {
|
|
|
213
225
|
analyze_function: functionDossierOutput,
|
|
214
226
|
inspect_native_api: resultOf(nativeApiInspectionResultSchema),
|
|
215
227
|
trace_feature: literalTraceOutput,
|
|
216
|
-
find_code_for_string: literalTraceOutput,
|
|
217
228
|
trace_call_path: callPathTraceOutput,
|
|
218
229
|
};
|
|
219
230
|
/** Exact Evidence schemas for provider-neutral native inspection. */
|
|
220
231
|
export const nativeOutputSchemas = {
|
|
232
|
+
observe_native_ui: resultOf(nativeUiResultSchema),
|
|
233
|
+
capture_native_ui_scenario: resultOf(nativeUiResultSchema),
|
|
221
234
|
inspect_macho: resultOf(inspectMachoSchema),
|
|
222
235
|
inspect_signature: resultOf(inspectSignatureSchema),
|
|
223
236
|
inspect_plist: resultOf(inspectPlistSchema),
|
|
@@ -229,6 +242,8 @@ export const artifactOutputSchemas = {
|
|
|
229
242
|
inspect_artifact: resultOf(artifactInspectionResultSchema),
|
|
230
243
|
extract_artifact: resultOf(artifactExtractionResultSchema),
|
|
231
244
|
decode_interface_builder: resultOf(interfaceBuilderAnalysisSchema),
|
|
245
|
+
inspect_keyed_archive: resultOf(keyedArchiveResultSchema),
|
|
246
|
+
inspect_asset_catalog: resultOf(appleAssetCatalogResultSchema),
|
|
232
247
|
};
|
|
233
248
|
/** Exact Evidence schema for execution-free managed static analysis. */
|
|
234
249
|
export const managedOutputSchemas = {
|
|
@@ -241,7 +256,6 @@ export const managedWorkflowOutputSchemas = {
|
|
|
241
256
|
compare_managed_members: resultOf(managedMemberComparisonResultSchema),
|
|
242
257
|
verify_managed_native_boundaries: resultOf(managedNativeVerificationResultSchema),
|
|
243
258
|
import_managed_reconstruction: resultOf(managedReconstructionImportResultSchema),
|
|
244
|
-
plan_managed_runtime_correlation: resultOf(managedRuntimeCorrelationResultSchema),
|
|
245
259
|
project_managed_application_graph: resultOf(managedApplicationGraphResultSchema),
|
|
246
260
|
};
|
|
247
261
|
/** Exact structured-content schemas for target lifecycle operations. */
|
|
@@ -323,5 +337,4 @@ export const sessionOutputSchemas = {
|
|
|
323
337
|
truthVerified: z.boolean(),
|
|
324
338
|
unknown: residualUnknownSchema,
|
|
325
339
|
})),
|
|
326
|
-
run_replay_machine: lifecycleResultOf(replayMachineRunOutputSchema),
|
|
327
340
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { procedureClassificationSchema, procedureIdentitySchema, localVariableSchema, functionDossierSchema, } from "../domain/hopperValues.js";
|
|
2
|
+
import { procedureClassificationSchema, procedureIdentitySchema, localVariableSchema, functionDossierSchema, functionBodySchema, } from "../domain/hopperValues.js";
|
|
3
3
|
import { analysisProfileSchema } from "../domain/analysisProfile.js";
|
|
4
4
|
import { evidenceEnvelopeSchema } from "../domain/evidence.js";
|
|
5
5
|
import { jsonValueSchema } from "../domain/jsonValue.js";
|
|
6
6
|
import { PROVIDER_REJECTION_CODES, } from "./providerSelection.js";
|
|
7
7
|
import { analysisErrorProjectionSchema } from "./errorSchemas.js";
|
|
8
|
+
import { prefixedDigestSchema } from "./../domain/digests.js";
|
|
8
9
|
/** Inline result with its complete Evidence record. */
|
|
9
|
-
export const inlineEvidenceRecordSchema = evidenceEnvelopeSchema
|
|
10
|
-
normalized_result: true,
|
|
11
|
-
});
|
|
10
|
+
export const inlineEvidenceRecordSchema = evidenceEnvelopeSchema;
|
|
12
11
|
export const evidenceResultOf = (schema) => z.strictObject({
|
|
13
12
|
result: schema,
|
|
14
|
-
evidence_id:
|
|
13
|
+
evidence_id: prefixedDigestSchema("ev"),
|
|
15
14
|
evidence: inlineEvidenceRecordSchema,
|
|
16
15
|
});
|
|
17
16
|
const resultOf = evidenceResultOf;
|
|
@@ -29,6 +28,7 @@ export const targetFormatSchema = z.enum([
|
|
|
29
28
|
"mach-o",
|
|
30
29
|
"elf",
|
|
31
30
|
"pe",
|
|
31
|
+
"dos-mz",
|
|
32
32
|
"zip",
|
|
33
33
|
"ipa",
|
|
34
34
|
"apk",
|
|
@@ -236,7 +236,6 @@ export const toolUnavailabilityReason = z.enum([
|
|
|
236
236
|
"provider_unavailable",
|
|
237
237
|
"target_unsupported",
|
|
238
238
|
"unsupported_host",
|
|
239
|
-
"policy_disabled",
|
|
240
239
|
]);
|
|
241
240
|
export const toolAvailability = z.discriminatedUnion("available", [
|
|
242
241
|
z.object({
|
|
@@ -398,6 +397,10 @@ export const procedureInfoOutput = resultOf(z.object({
|
|
|
398
397
|
signature: nullableText,
|
|
399
398
|
locals: z.array(localVariable),
|
|
400
399
|
classification: procedureClassificationSchema.nullable().default(null),
|
|
400
|
+
body: functionBodySchema.default({
|
|
401
|
+
available: false,
|
|
402
|
+
reason: "The provider did not report complete function body ranges.",
|
|
403
|
+
}),
|
|
401
404
|
}));
|
|
402
405
|
export const symbolDiscoveryOutput = (property) => resultOf(z.object({
|
|
403
406
|
count: z.number().int().min(0),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
const PROPERTY_DESCRIPTIONS = {
|
|
3
3
|
addresses: "Ordered provider-normalized procedure addresses to analyze.",
|
|
4
|
-
approved: "Explicit operator approval to perform this operation.",
|
|
5
4
|
after: "The later or right-hand observation to compare.",
|
|
6
5
|
before: "The earlier or left-hand observation to compare.",
|
|
7
6
|
boundary_id: "Exact reconstruction boundary identifier to evaluate.",
|
|
8
7
|
case_sensitive: "Whether text matching distinguishes uppercase and lowercase.",
|
|
9
|
-
cdp_endpoint: "
|
|
8
|
+
cdp_endpoint: "Literal loopback Chrome DevTools Protocol endpoint.",
|
|
10
9
|
comment: "Exact analyst comment text to write.",
|
|
11
10
|
comparisons: "Validated comparison Evidence records to aggregate.",
|
|
12
11
|
coverage: "Exact reconstruction-coverage commitment to verify.",
|
|
@@ -15,12 +14,12 @@ const PROPERTY_DESCRIPTIONS = {
|
|
|
15
14
|
error: "Structured, caller-actionable error when the operation fails.",
|
|
16
15
|
evidence: "Evidence record produced by this operation.",
|
|
17
16
|
evidence_id: "Stable identifier of the recorded Evidence observation.",
|
|
18
|
-
executable: "
|
|
17
|
+
executable: "Command name or executable path to run.",
|
|
19
18
|
format: "Declared input artifact format.",
|
|
20
19
|
name: "Exact name used by this operation.",
|
|
21
20
|
pattern: "Literal text or regular expression used to filter matching results.",
|
|
22
21
|
phase: "Current plan or execution phase of the operation.",
|
|
23
|
-
plan: "Content-bound execution plan and its
|
|
22
|
+
plan: "Content-bound execution plan and its digest commitment.",
|
|
24
23
|
query: "Non-empty feature or text query to investigate.",
|
|
25
24
|
question: "Concrete unresolved question to retain for later investigation.",
|
|
26
25
|
result: "Primary structured result returned by this operation.",
|
|
@@ -35,7 +34,7 @@ const PROPERTY_DESCRIPTIONS = {
|
|
|
35
34
|
status: "Current lifecycle or verification status.",
|
|
36
35
|
summary: "Concise evidence-backed summary of the result.",
|
|
37
36
|
symbols: "Ordered Swift symbols to demangle.",
|
|
38
|
-
target_id: "Exact
|
|
37
|
+
target_id: "Exact CDP target identifier selected from the endpoint's target listing.",
|
|
39
38
|
unknown_id: "Exact residual-unknown identifier.",
|
|
40
39
|
};
|
|
41
40
|
/** Attach caller guidance to a canonical schema for the SDK wire projection. */
|
|
@@ -88,8 +87,6 @@ const fallbackPropertyDescription = (property) => {
|
|
|
88
87
|
if (explicit !== undefined)
|
|
89
88
|
return explicit;
|
|
90
89
|
const words = property.replaceAll("_", " ");
|
|
91
|
-
if (property.endsWith("_approved"))
|
|
92
|
-
return `Explicit operator approval for ${words.slice(0, -9)}.`;
|
|
93
90
|
if (property.startsWith("max_"))
|
|
94
91
|
return `Maximum permitted ${words.slice(4)} for this operation.`;
|
|
95
92
|
if (property.startsWith("include_"))
|
|
@@ -109,7 +106,7 @@ const fallbackPropertyDescription = (property) => {
|
|
|
109
106
|
if (property.endsWith("_bytes"))
|
|
110
107
|
return `Byte count for ${words.slice(0, -6)}.`;
|
|
111
108
|
if (property.endsWith("_root") || property.endsWith("_roots"))
|
|
112
|
-
return `
|
|
109
|
+
return `Local filesystem ${words} selected for this operation.`;
|
|
113
110
|
if (property.startsWith("is_") || property.startsWith("has_"))
|
|
114
111
|
return `Whether ${words}.`;
|
|
115
112
|
return `Value for ${words}.`;
|