@eyeauras/insight-cli 0.8.4 → 0.9.1
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/.cli-package-build.json +1 -1
- package/README.md +16 -23
- package/SKILL.md +6 -44
- package/dist/src/activity-audit.d.ts +33 -46
- package/dist/src/activity-audit.js +120 -195
- package/dist/src/analysis-default.d.ts +10 -2
- package/dist/src/analysis-default.js +62 -47
- package/dist/src/analysis-storage.d.ts +13 -13
- package/dist/src/analysis-storage.js +127 -258
- package/dist/src/artifacts.d.ts +5 -1
- package/dist/src/artifacts.js +31 -46
- package/dist/src/audit-commands.d.ts +6 -1
- package/dist/src/audit-commands.js +9 -2
- package/dist/src/audit-retention.d.ts +5 -23
- package/dist/src/audit-retention.js +37 -150
- package/dist/src/binary.js +4 -13
- package/dist/src/budgets.d.ts +2 -2
- package/dist/src/budgets.js +7 -9
- package/dist/src/capture.js +17 -30
- package/dist/src/cli.d.ts +9 -4
- package/dist/src/cli.js +288 -473
- package/dist/src/code-references.d.ts +2 -13
- package/dist/src/code-references.js +7 -99
- package/dist/src/context-diagnostics.d.ts +1 -23
- package/dist/src/context-diagnostics.js +1 -83
- package/dist/src/core/coordinator.d.ts +298 -0
- package/dist/src/core/coordinator.js +591 -0
- package/dist/src/core/layout.d.ts +51 -0
- package/dist/src/core/layout.js +55 -0
- package/dist/src/core/legacy-import.d.ts +55 -0
- package/dist/src/core/legacy-import.js +193 -0
- package/dist/src/cross-results.d.ts +3 -3
- package/dist/src/cross-results.js +4 -42
- package/dist/src/cross.js +2 -3
- package/dist/src/debugger-results.d.ts +1 -6
- package/dist/src/debugger-results.js +21 -153
- package/dist/src/debugger.d.ts +21 -11
- package/dist/src/debugger.js +106 -168
- package/dist/src/decode-results.d.ts +2 -1
- package/dist/src/decode-results.js +4 -20
- package/dist/src/diagnostic-error.d.ts +1 -1
- package/dist/src/diagnostic-error.js +4 -23
- package/dist/src/die.js +1 -23
- package/dist/src/dnspy-runtime.js +5 -12
- package/dist/src/dnspy.js +13 -28
- package/dist/src/dotnet-diagnostics.js +1 -1
- package/dist/src/extensions.d.ts +2 -3
- package/dist/src/extensions.js +14 -91
- package/dist/src/frida-worker.js +0 -20
- package/dist/src/frida.js +3 -26
- package/dist/src/function-boundaries.d.ts +2 -2
- package/dist/src/function-boundaries.js +9 -61
- package/dist/src/function-entries.d.ts +2 -2
- package/dist/src/function-entries.js +6 -36
- package/dist/src/function-inspection.d.ts +2 -2
- package/dist/src/function-inspection.js +17 -33
- package/dist/src/function-results.d.ts +1 -3
- package/dist/src/function-results.js +2 -13
- package/dist/src/hub/admin.d.ts +101 -0
- package/dist/src/hub/admin.js +314 -0
- package/dist/src/hub/autostart.d.ts +111 -0
- package/dist/src/hub/autostart.js +207 -0
- package/dist/src/hub/bundle.d.ts +33 -0
- package/dist/src/hub/bundle.js +25 -0
- package/dist/src/hub/client.d.ts +90 -0
- package/dist/src/hub/client.js +256 -0
- package/dist/src/hub/commands.d.ts +13 -0
- package/dist/src/hub/commands.js +280 -0
- package/dist/src/hub/contract.d.ts +87 -0
- package/dist/src/hub/contract.js +3 -0
- package/dist/src/hub/extensions.d.ts +41 -0
- package/dist/src/hub/extensions.js +3 -0
- package/dist/src/hub/ghidra.d.ts +70 -0
- package/dist/src/hub/ghidra.js +197 -0
- package/dist/src/hub/index.d.ts +6 -0
- package/dist/src/hub/index.js +7 -0
- package/dist/src/{work/store.d.ts → hub/ledger-store.d.ts} +57 -94
- package/dist/src/hub/ledger-store.js +919 -0
- package/dist/src/hub/ledger.d.ts +4 -0
- package/dist/src/hub/ledger.js +173 -0
- package/dist/src/hub/lock.d.ts +7 -0
- package/dist/src/hub/lock.js +53 -0
- package/dist/src/hub/repository.d.ts +45 -0
- package/dist/src/hub/repository.js +130 -0
- package/dist/src/hub/server.d.ts +86 -0
- package/dist/src/hub/server.js +414 -0
- package/dist/src/hub/settings.d.ts +36 -0
- package/dist/src/hub/settings.js +112 -0
- package/dist/src/hub/storage.d.ts +13 -0
- package/dist/src/hub/storage.js +46 -0
- package/dist/src/hub/store.d.ts +75 -0
- package/dist/src/hub/store.js +188 -0
- package/dist/src/ilspy.js +1 -1
- package/dist/src/internal-timing.d.ts +2 -9
- package/dist/src/internal-timing.js +2 -95
- package/dist/src/lldb.js +3 -15
- package/dist/src/llvm.js +0 -9
- package/dist/src/managed-heap.js +3 -7
- package/dist/src/managed-metadata.js +2 -5
- package/dist/src/memory-inputs.d.ts +1 -4
- package/dist/src/memory-inputs.js +10 -40
- package/dist/src/mitmproxy.d.ts +35 -4
- package/dist/src/mitmproxy.js +59 -40
- package/dist/src/model.d.ts +0 -73
- package/dist/src/model.js +0 -45
- package/dist/src/mutations.d.ts +1 -1
- package/dist/src/mutations.js +5 -10
- package/dist/src/native/contract.d.ts +130 -0
- package/dist/src/native/ghidra.d.ts +58 -0
- package/dist/src/native/ghidra.js +77 -0
- package/dist/src/native/host.d.ts +71 -0
- package/dist/src/native/host.js +265 -0
- package/dist/src/native/index.d.ts +13 -0
- package/dist/src/native/index.js +19 -0
- package/dist/src/native/jvm.d.ts +54 -0
- package/dist/src/native/jvm.js +47 -0
- package/dist/src/native/worker.d.ts +70 -0
- package/dist/src/native/worker.js +240 -0
- package/dist/src/native-inputs.d.ts +9 -14
- package/dist/src/native-inputs.js +22 -110
- package/dist/src/native-merge-patches.d.ts +2 -2
- package/dist/src/native-merge-patches.js +14 -14
- package/dist/src/persistent-client.js +53 -25
- package/dist/src/procmon.js +17 -31
- package/dist/src/program-files.d.ts +42 -0
- package/dist/src/program-files.js +148 -0
- package/dist/src/queries.js +2 -15
- package/dist/src/query-policy.d.ts +0 -2
- package/dist/src/query-policy.js +1 -14
- package/dist/src/research.d.ts +59 -238
- package/dist/src/research.js +212 -906
- package/dist/src/runtime-identity.d.ts +8 -0
- package/dist/src/runtime-identity.js +26 -0
- package/dist/src/runtime-manager.d.ts +1 -11
- package/dist/src/runtime-manager.js +10 -145
- package/dist/src/runtime-selection.d.ts +1 -1
- package/dist/src/runtime-selection.js +5 -37
- package/dist/src/saved-materials.js +8 -51
- package/dist/src/scripts.d.ts +1 -1
- package/dist/src/scripts.js +15 -15
- package/dist/src/sdk-contracts.js +2 -2
- package/dist/src/sdk.js +8 -8
- package/dist/src/sevenzip.js +1 -3
- package/dist/src/strace.js +0 -3
- package/dist/src/string-anchors.d.ts +2 -3
- package/dist/src/string-anchors.js +8 -101
- package/dist/src/text-window.d.ts +5 -4
- package/dist/src/text-window.js +4 -4
- package/dist/src/tool-runtime/archives.d.ts +1 -1
- package/dist/src/tool-runtime/archives.js +11 -20
- package/dist/src/tool-runtime/catalog.js +2 -5
- package/dist/src/tool-runtime/commands.js +1 -3
- package/dist/src/tool-runtime/deadline.js +2 -7
- package/dist/src/tool-runtime/definition.js +1 -31
- package/dist/src/tool-runtime/identity.js +6 -87
- package/dist/src/tool-runtime/installer.d.ts +2 -6
- package/dist/src/tool-runtime/installer.js +14 -76
- package/dist/src/tool-runtime/java-arguments.js +4 -10
- package/dist/src/tool-runtime/launch-worker.js +2 -8
- package/dist/src/tool-runtime/run.d.ts +2 -0
- package/dist/src/tool-runtime/run.js +20 -8
- package/dist/src/tool-runtime/store.d.ts +3 -3
- package/dist/src/tool-runtime/store.js +21 -83
- package/dist/src/tool-runtime/supervisor.d.ts +6 -11
- package/dist/src/tool-runtime/supervisor.js +155 -214
- package/dist/src/tool-runtime/windows-helper.d.ts +5 -0
- package/dist/src/tool-runtime/windows-helper.js +13 -0
- package/dist/src/tool-runtime/windows-job.d.ts +5 -5
- package/dist/src/tool-runtime/windows-job.js +13 -31
- package/dist/src/tshark.js +14 -27
- package/dist/src/ui-results.d.ts +3 -2
- package/dist/src/ui-results.js +16 -53
- package/dist/src/ui.d.ts +12 -13
- package/dist/src/ui.js +32 -70
- package/dist/src/version-tracking.d.ts +25 -39
- package/dist/src/version-tracking.js +70 -174
- package/dist/src/windbg.d.ts +1 -1
- package/dist/src/windbg.js +2 -8
- package/dist/src/work/client.d.ts +63 -0
- package/dist/src/work/client.js +163 -0
- package/dist/src/work/commands.d.ts +3 -1
- package/dist/src/work/commands.js +158 -184
- package/dist/src/work/dashboard.d.ts +2 -2
- package/dist/src/work/dashboard.js +7 -8
- package/dist/src/work/legacy.d.ts +8 -0
- package/dist/src/work/legacy.js +70 -0
- package/dist/src/work/model.d.ts +0 -3
- package/dist/src/work/model.js +0 -10
- package/dist/src/work/timing.d.ts +3 -3
- package/dist/src/work/timing.js +21 -25
- package/dist/src/workspace.d.ts +4 -250
- package/dist/src/workspace.js +11 -699
- package/node_modules/@eyeauras/cli-factory/README.md +6 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/cli.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/cli.js +76 -28
- package/node_modules/@eyeauras/cli-factory/dist/src/cli.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/command.d.ts +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/command.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/command.js +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/command.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/errors.d.ts +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/errors.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/errors.js +18 -6
- package/node_modules/@eyeauras/cli-factory/dist/src/errors.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/file-publication.d.ts +44 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/file-publication.d.ts.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/{profile-file.js → file-publication.js} +41 -113
- package/node_modules/@eyeauras/cli-factory/dist/src/file-publication.js.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/help.d.ts +5 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/help.d.ts.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/help.js +17 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/help.js.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/index.d.ts +9 -4
- package/node_modules/@eyeauras/cli-factory/dist/src/index.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/index.js +5 -2
- package/node_modules/@eyeauras/cli-factory/dist/src/index.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/json-rpc.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/json-rpc.js +11 -18
- package/node_modules/@eyeauras/cli-factory/dist/src/json-rpc.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/output-write.d.ts +10 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/output-write.d.ts.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/output-write.js +69 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/output-write.js.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/output.d.ts +3 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/output.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/output.js +74 -14
- package/node_modules/@eyeauras/cli-factory/dist/src/output.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/pagination.d.ts +3 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/pagination.d.ts.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/pagination.js +9 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/pagination.js.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/permissions.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/permissions.js +3 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/permissions.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/stream-result.d.ts +16 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/stream-result.d.ts.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/stream-result.js +83 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/stream-result.js.map +1 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/types.d.ts +5 -0
- package/node_modules/@eyeauras/cli-factory/dist/src/types.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/view.d.ts +49 -7
- package/node_modules/@eyeauras/cli-factory/dist/src/view.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/view.js +83 -6
- package/node_modules/@eyeauras/cli-factory/dist/src/view.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory/package.json +1 -1
- package/node_modules/@eyeauras/cli-factory-ipc/dist/cli-host.proto +19 -19
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/build.d.ts +7 -1
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/build.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/build.js +9 -4
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/build.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/host.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/host.js +5 -4
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/host.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/package-build.d.ts +11 -1
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/package-build.d.ts.map +1 -1
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/package-build.js +85 -57
- package/node_modules/@eyeauras/cli-factory-ipc/dist/src/package-build.js.map +1 -1
- package/node_modules/@eyeauras/cli-factory-ipc/package.json +2 -2
- package/package.json +4 -5
- package/references/native/InsightAnalyzerOptions.java +10 -0
- package/references/native/InsightAnchorScan.java +1 -11
- package/references/native/InsightCodeReferences.java +2 -3
- package/references/native/InsightCopyType.java +24 -0
- package/references/native/InsightFunctionBoundaries.java +0 -1
- package/references/native/InsightFunctionDatabases.java +20 -16
- package/references/native/InsightHelperCall.java +17 -0
- package/references/native/InsightHubServer.java +214 -0
- package/references/native/InsightNativeHost.java +112 -0
- package/references/native/InsightPlugins.java +0 -1
- package/references/native/InsightPythonWheels.java +3 -2
- package/references/native/InsightResearchQueries.java +3 -4
- package/references/native/InsightResearchView.java +4 -10
- package/references/native/InsightSdkFiles.java +7 -15
- package/references/native/InsightSdkScript.java +1 -4
- package/references/native/InsightSdkTools.java +36 -97
- package/references/native/InsightSdkTypes.java +13 -43
- package/references/native/InsightStringAnchors.java +1 -3
- package/references/native/InsightTraceState.java +13 -96
- package/references/native/InsightTraceTools.java +3 -5
- package/references/native/InsightVersionTracking.java +0 -6
- package/references/native/{HeadlessProgramMergeManager.java → InsightWcMerge.java} +17 -24
- package/references/native/InsightWcOps.java +449 -0
- package/references/native/InsightWcWorker.java +142 -0
- package/references/native/NATIVE-MERGE-NOTICE.txt +4 -8
- package/runtime/GhidraMCP-7.0.0.jar +0 -0
- package/runtime/managed/insight-heap/README.md +3 -3
- package/runtime/managed/insight-managed/README.md +3 -3
- package/runtime/native/binary/README.md +5 -4
- package/runtime/native/windows/DirectoryAlias.cs +24 -0
- package/runtime/native/windows/Insight.Windows.csproj +27 -0
- package/runtime/native/windows/Native.cs +36 -0
- package/runtime/native/windows/OwnedJob.cs +86 -0
- package/runtime/native/windows/Program.cs +50 -0
- package/runtime/native/windows/RegistryRedirect.cs +42 -0
- package/runtime/native/windows/insight-windows-x64.exe +0 -0
- package/runtime/native/windows/packages.lock.json +35 -0
- package/runtime/native/windows/provenance.json +17 -0
- package/runtime/research-view.provenance.json +6 -7
- package/runtime/toolbox.json +33 -114
- package/skill-bundle/insight-artifacts/SKILL.md +5 -19
- package/skill-bundle/insight-binary/SKILL.md +5 -35
- package/skill-bundle/insight-capture/SKILL.md +5 -45
- package/skill-bundle/insight-cli/SKILL.md +6 -44
- package/skill-bundle/insight-die/SKILL.md +5 -38
- package/skill-bundle/insight-dnspy/SKILL.md +5 -54
- package/skill-bundle/insight-dotnet-dump/SKILL.md +5 -35
- package/skill-bundle/insight-dotnet-stack/SKILL.md +5 -28
- package/skill-bundle/insight-dotnet-trace/SKILL.md +5 -34
- package/skill-bundle/insight-frida/SKILL.md +5 -56
- package/skill-bundle/insight-ghidra/SKILL.md +14 -113
- package/skill-bundle/insight-ilspy/SKILL.md +5 -34
- package/skill-bundle/insight-interop/SKILL.md +5 -43
- package/skill-bundle/insight-lldb/SKILL.md +5 -43
- package/skill-bundle/insight-llvm/SKILL.md +5 -45
- package/skill-bundle/insight-managed-heap/SKILL.md +5 -32
- package/skill-bundle/insight-managed-metadata/SKILL.md +5 -41
- package/skill-bundle/insight-mitmproxy/SKILL.md +5 -51
- package/skill-bundle/insight-overview/SKILL.md +5 -68
- package/skill-bundle/insight-procmon/SKILL.md +5 -38
- package/skill-bundle/insight-re/SKILL.md +10 -127
- package/skill-bundle/insight-sevenzip/SKILL.md +5 -31
- package/skill-bundle/insight-strace/SKILL.md +5 -35
- package/skill-bundle/insight-tshark/SKILL.md +5 -38
- package/skill-bundle/insight-windbg/SKILL.md +5 -35
- package/skill-bundle/manifest.json +1 -1
- package/skills/insight-artifacts/SKILL.md +5 -19
- package/skills/insight-binary/SKILL.md +5 -35
- package/skills/insight-capture/SKILL.md +5 -45
- package/skills/insight-die/SKILL.md +5 -38
- package/skills/insight-dnspy/SKILL.md +5 -54
- package/skills/insight-dotnet-dump/SKILL.md +5 -35
- package/skills/insight-dotnet-stack/SKILL.md +5 -28
- package/skills/insight-dotnet-trace/SKILL.md +5 -34
- package/skills/insight-frida/SKILL.md +5 -56
- package/skills/insight-ghidra/SKILL.md +14 -113
- package/skills/insight-ilspy/SKILL.md +5 -34
- package/skills/insight-interop/SKILL.md +5 -43
- package/skills/insight-lldb/SKILL.md +5 -43
- package/skills/insight-llvm/SKILL.md +5 -45
- package/skills/insight-managed-heap/SKILL.md +5 -32
- package/skills/insight-managed-metadata/SKILL.md +5 -41
- package/skills/insight-mitmproxy/SKILL.md +5 -51
- package/skills/insight-overview/SKILL.md +5 -68
- package/skills/insight-procmon/SKILL.md +5 -38
- package/skills/insight-re/SKILL.md +10 -127
- package/skills/insight-sevenzip/SKILL.md +5 -31
- package/skills/insight-strace/SKILL.md +5 -35
- package/skills/insight-tshark/SKILL.md +5 -38
- package/skills/insight-windbg/SKILL.md +5 -35
- package/dist/src/administration-results.d.ts +0 -1
- package/dist/src/administration-results.js +0 -84
- package/dist/src/administration.d.ts +0 -14
- package/dist/src/administration.js +0 -134
- package/dist/src/archive-contract.d.ts +0 -6
- package/dist/src/archive-contract.js +0 -108
- package/dist/src/archive.d.ts +0 -12
- package/dist/src/archive.js +0 -116
- package/dist/src/comment-effects.d.ts +0 -3
- package/dist/src/comment-effects.js +0 -55
- package/dist/src/context-credential.d.ts +0 -18
- package/dist/src/context-credential.js +0 -44
- package/dist/src/contexts.d.ts +0 -387
- package/dist/src/contexts.js +0 -2805
- package/dist/src/coordinator.d.ts +0 -41
- package/dist/src/coordinator.js +0 -160
- package/dist/src/cross-peer.d.ts +0 -20
- package/dist/src/cross-peer.js +0 -53
- package/dist/src/data-effects.d.ts +0 -3
- package/dist/src/data-effects.js +0 -103
- package/dist/src/debugger-caller.d.ts +0 -17
- package/dist/src/debugger-caller.js +0 -129
- package/dist/src/debugger-launch.d.ts +0 -2
- package/dist/src/debugger-launch.js +0 -17
- package/dist/src/debugger-supervisor.js +0 -179
- package/dist/src/directory-identity.d.ts +0 -6
- package/dist/src/directory-identity.js +0 -45
- package/dist/src/documentation-effects.d.ts +0 -5
- package/dist/src/documentation-effects.js +0 -56
- package/dist/src/function-effects.d.ts +0 -4
- package/dist/src/function-effects.js +0 -112
- package/dist/src/ghidra-processes.d.ts +0 -6
- package/dist/src/ghidra-processes.js +0 -138
- package/dist/src/ghidra.d.ts +0 -50
- package/dist/src/ghidra.js +0 -468
- package/dist/src/initial-model.d.ts +0 -7
- package/dist/src/initial-model.js +0 -115
- package/dist/src/initial-progress.d.ts +0 -4
- package/dist/src/initial-progress.js +0 -74
- package/dist/src/inline-script.d.ts +0 -15
- package/dist/src/inline-script.js +0 -61
- package/dist/src/legacy-migration.d.ts +0 -37
- package/dist/src/legacy-migration.js +0 -238
- package/dist/src/lifecycle.d.ts +0 -77
- package/dist/src/lifecycle.js +0 -315
- package/dist/src/merge.d.ts +0 -29
- package/dist/src/merge.js +0 -66
- package/dist/src/mutation-effects.d.ts +0 -4
- package/dist/src/mutation-effects.js +0 -321
- package/dist/src/native-queries.d.ts +0 -2
- package/dist/src/native-queries.js +0 -24
- package/dist/src/native-service.d.ts +0 -40
- package/dist/src/native-service.js +0 -406
- package/dist/src/projects.d.ts +0 -31
- package/dist/src/projects.js +0 -302
- package/dist/src/prototype-cli.d.ts +0 -8
- package/dist/src/prototype-cli.js +0 -155
- package/dist/src/query-results.d.ts +0 -2
- package/dist/src/query-results.js +0 -224
- package/dist/src/research-view.d.ts +0 -6
- package/dist/src/research-view.js +0 -9
- package/dist/src/sdk-files.d.ts +0 -29
- package/dist/src/sdk-files.js +0 -249
- package/dist/src/server.d.ts +0 -102
- package/dist/src/server.js +0 -663
- package/dist/src/storage-gc.d.ts +0 -23
- package/dist/src/storage-gc.js +0 -600
- package/dist/src/store.d.ts +0 -33
- package/dist/src/store.js +0 -178
- package/dist/src/sync-policy.d.ts +0 -22
- package/dist/src/sync-policy.js +0 -129
- package/dist/src/timed-backend.d.ts +0 -3
- package/dist/src/timed-backend.js +0 -24
- package/dist/src/timing-report.d.ts +0 -32
- package/dist/src/timing-report.js +0 -74
- package/dist/src/tool-runtime/native-process-proof.d.ts +0 -2
- package/dist/src/tool-runtime/native-process-proof.js +0 -26
- package/dist/src/transport.d.ts +0 -60
- package/dist/src/transport.js +0 -223
- package/dist/src/unresolved-guidance.d.ts +0 -46
- package/dist/src/unresolved-guidance.js +0 -55
- package/dist/src/work/backup.d.ts +0 -66
- package/dist/src/work/backup.js +0 -446
- package/dist/src/work/store.js +0 -1107
- package/dist/src/worker-lease.d.ts +0 -17
- package/dist/src/worker-lease.js +0 -50
- package/node_modules/@eyeauras/cli-factory/dist/src/profile-file.d.ts +0 -37
- package/node_modules/@eyeauras/cli-factory/dist/src/profile-file.d.ts.map +0 -1
- package/node_modules/@eyeauras/cli-factory/dist/src/profile-file.js.map +0 -1
- package/references/InsightRepositoryProbe.java +0 -55
- package/references/administration.md +0 -34
- package/references/agent-execution.md +0 -36
- package/references/agent-setup.md +0 -60
- package/references/archive.md +0 -32
- package/references/artifacts.md +0 -52
- package/references/debugger.md +0 -64
- package/references/extensions-and-sync.md +0 -125
- package/references/ilspy.md +0 -33
- package/references/managed-runtime.md +0 -162
- package/references/native/InsightArchivePayloads.java +0 -36
- package/references/native/InsightBlockTransfer.java +0 -57
- package/references/native/InsightGuiMain.java +0 -33
- package/references/native/InsightHeadlessMain.java +0 -18
- package/references/native/InsightImportProgress.java +0 -60
- package/references/native/InsightInitialImport.java +0 -48
- package/references/native/InsightInitialJournal.java +0 -57
- package/references/native/InsightInitialPublication.java +0 -142
- package/references/native/InsightInitialRecovery.java +0 -131
- package/references/native/InsightInlineExecutor.java +0 -143
- package/references/native/InsightInlineScript.java +0 -14
- package/references/native/InsightNativeCheckout.java +0 -487
- package/references/native/InsightNativeFingerprint.java +0 -80
- package/references/native/InsightNativeMigration.java +0 -155
- package/references/native/InsightNativeRead.java +0 -80
- package/references/native/InsightNativeReceipt.java +0 -31
- package/references/native/InsightNativeService.java +0 -43
- package/references/native/InsightNativeView.java +0 -40
- package/references/native/InsightOfflineAuthenticator.java +0 -20
- package/references/native/InsightOwnedScripts.java +0 -170
- package/references/native/InsightProjectFiles.java +0 -92
- package/references/native/InsightPublicationRecovery.java +0 -63
- package/references/native/InsightServerAdministration.java +0 -82
- package/references/native/InsightServerInit.java +0 -62
- package/references/native/InsightServerMain.java +0 -43
- package/references/native/InsightServerProbe.java +0 -29
- package/references/native/InsightSnapshotFields.java +0 -74
- package/references/native/InsightSnapshotInspect.java +0 -191
- package/references/native/InsightSnapshotPublisher.java +0 -123
- package/references/native/InsightStopDebugger.java +0 -20
- package/references/native/InsightTraceInspect.java +0 -24
- package/references/native/InsightWorkerLease.java +0 -132
- package/references/native-workflows.md +0 -124
- package/references/persistent-client.mjs +0 -147
- package/references/persistent.md +0 -90
- package/references/query-semantics.md +0 -109
- package/references/recovery.md +0 -235
- package/references/research.md +0 -296
- package/references/setup.md +0 -135
- package/references/sparse-navigation.md +0 -173
- package/references/storage.md +0 -139
- package/references/work-tracking.md +0 -261
- package/runtime/native/file-version.ps1 +0 -7
- package/runtime/native/mitmproxy/bridge.py +0 -180
- package/runtime/native/windows-job/DirectoryAlias.cs +0 -24
- package/runtime/native/windows-job/Insight.WindowsJob.csproj +0 -1
- package/runtime/native/windows-job/Insight.WindowsJob.dll +0 -0
- package/runtime/native/windows-job/OwnedJob.cs +0 -79
- package/runtime/native/windows-job/RegistryRedirect.cs +0 -45
- package/runtime/native/windows-job/packages.lock.json +0 -21
- package/runtime/native/windows-job/provenance.json +0 -16
- package/runtime/native/windows-job/windows-job.ps1 +0 -8
- package/skill-bundle/insight-artifacts/references/agent-execution.md +0 -36
- package/skill-bundle/insight-artifacts/references/artifacts.md +0 -52
- package/skill-bundle/insight-artifacts/references/recovery.md +0 -235
- package/skill-bundle/insight-artifacts/references/storage.md +0 -139
- package/skill-bundle/insight-binary/references/agent-execution.md +0 -36
- package/skill-bundle/insight-capture/references/agent-execution.md +0 -36
- package/skill-bundle/insight-cli/references/agent-execution.md +0 -36
- package/skill-bundle/insight-cli/references/agent-setup.md +0 -60
- package/skill-bundle/insight-cli/references/archive.md +0 -32
- package/skill-bundle/insight-cli/references/managed-runtime.md +0 -162
- package/skill-bundle/insight-cli/references/persistent-client.mjs +0 -147
- package/skill-bundle/insight-cli/references/persistent.md +0 -90
- package/skill-bundle/insight-cli/references/recovery.md +0 -235
- package/skill-bundle/insight-cli/references/setup.md +0 -135
- package/skill-bundle/insight-cli/references/storage.md +0 -139
- package/skill-bundle/insight-die/references/agent-execution.md +0 -36
- package/skill-bundle/insight-dnspy/references/agent-execution.md +0 -36
- package/skill-bundle/insight-dotnet-dump/references/agent-execution.md +0 -36
- package/skill-bundle/insight-dotnet-stack/references/agent-execution.md +0 -36
- package/skill-bundle/insight-dotnet-trace/references/agent-execution.md +0 -36
- package/skill-bundle/insight-frida/references/agent-execution.md +0 -36
- package/skill-bundle/insight-ghidra/references/administration.md +0 -34
- package/skill-bundle/insight-ghidra/references/agent-execution.md +0 -36
- package/skill-bundle/insight-ghidra/references/archive.md +0 -32
- package/skill-bundle/insight-ghidra/references/artifacts.md +0 -52
- package/skill-bundle/insight-ghidra/references/debugger.md +0 -64
- package/skill-bundle/insight-ghidra/references/extensions-and-sync.md +0 -125
- package/skill-bundle/insight-ghidra/references/managed-runtime.md +0 -162
- package/skill-bundle/insight-ghidra/references/native-workflows.md +0 -124
- package/skill-bundle/insight-ghidra/references/persistent-client.mjs +0 -147
- package/skill-bundle/insight-ghidra/references/persistent.md +0 -90
- package/skill-bundle/insight-ghidra/references/query-semantics.md +0 -109
- package/skill-bundle/insight-ghidra/references/recovery.md +0 -235
- package/skill-bundle/insight-ghidra/references/research.md +0 -296
- package/skill-bundle/insight-ghidra/references/setup.md +0 -135
- package/skill-bundle/insight-ghidra/references/sparse-navigation.md +0 -173
- package/skill-bundle/insight-ghidra/references/storage.md +0 -139
- package/skill-bundle/insight-ilspy/references/agent-execution.md +0 -36
- package/skill-bundle/insight-ilspy/references/ilspy.md +0 -33
- package/skill-bundle/insight-interop/references/agent-execution.md +0 -36
- package/skill-bundle/insight-lldb/references/agent-execution.md +0 -36
- package/skill-bundle/insight-llvm/references/agent-execution.md +0 -36
- package/skill-bundle/insight-managed-heap/references/agent-execution.md +0 -36
- package/skill-bundle/insight-managed-metadata/references/agent-execution.md +0 -36
- package/skill-bundle/insight-mitmproxy/references/agent-execution.md +0 -36
- package/skill-bundle/insight-overview/references/agent-execution.md +0 -36
- package/skill-bundle/insight-procmon/references/agent-execution.md +0 -36
- package/skill-bundle/insight-re/references/agent-execution.md +0 -36
- package/skill-bundle/insight-re/references/artifacts.md +0 -52
- package/skill-bundle/insight-re/references/persistent-client.mjs +0 -147
- package/skill-bundle/insight-re/references/persistent.md +0 -90
- package/skill-bundle/insight-re/references/recovery.md +0 -235
- package/skill-bundle/insight-re/references/storage.md +0 -139
- package/skill-bundle/insight-re/references/work-tracking.md +0 -261
- package/skill-bundle/insight-sevenzip/references/agent-execution.md +0 -36
- package/skill-bundle/insight-strace/references/agent-execution.md +0 -36
- package/skill-bundle/insight-tshark/references/agent-execution.md +0 -36
- package/skill-bundle/insight-windbg/references/agent-execution.md +0 -36
- package/skills/insight-artifacts/references/agent-execution.md +0 -36
- package/skills/insight-artifacts/references/artifacts.md +0 -52
- package/skills/insight-artifacts/references/recovery.md +0 -235
- package/skills/insight-artifacts/references/storage.md +0 -139
- package/skills/insight-binary/references/agent-execution.md +0 -36
- package/skills/insight-capture/references/agent-execution.md +0 -36
- package/skills/insight-die/references/agent-execution.md +0 -36
- package/skills/insight-dnspy/references/agent-execution.md +0 -36
- package/skills/insight-dotnet-dump/references/agent-execution.md +0 -36
- package/skills/insight-dotnet-stack/references/agent-execution.md +0 -36
- package/skills/insight-dotnet-trace/references/agent-execution.md +0 -36
- package/skills/insight-frida/references/agent-execution.md +0 -36
- package/skills/insight-ghidra/references/administration.md +0 -34
- package/skills/insight-ghidra/references/agent-execution.md +0 -36
- package/skills/insight-ghidra/references/archive.md +0 -32
- package/skills/insight-ghidra/references/artifacts.md +0 -52
- package/skills/insight-ghidra/references/debugger.md +0 -64
- package/skills/insight-ghidra/references/extensions-and-sync.md +0 -125
- package/skills/insight-ghidra/references/managed-runtime.md +0 -162
- package/skills/insight-ghidra/references/native-workflows.md +0 -124
- package/skills/insight-ghidra/references/persistent-client.mjs +0 -147
- package/skills/insight-ghidra/references/persistent.md +0 -90
- package/skills/insight-ghidra/references/query-semantics.md +0 -109
- package/skills/insight-ghidra/references/recovery.md +0 -235
- package/skills/insight-ghidra/references/research.md +0 -296
- package/skills/insight-ghidra/references/setup.md +0 -135
- package/skills/insight-ghidra/references/sparse-navigation.md +0 -173
- package/skills/insight-ghidra/references/storage.md +0 -139
- package/skills/insight-ilspy/references/agent-execution.md +0 -36
- package/skills/insight-ilspy/references/ilspy.md +0 -33
- package/skills/insight-interop/references/agent-execution.md +0 -36
- package/skills/insight-lldb/references/agent-execution.md +0 -36
- package/skills/insight-llvm/references/agent-execution.md +0 -36
- package/skills/insight-managed-heap/references/agent-execution.md +0 -36
- package/skills/insight-managed-metadata/references/agent-execution.md +0 -36
- package/skills/insight-mitmproxy/references/agent-execution.md +0 -36
- package/skills/insight-overview/references/agent-execution.md +0 -36
- package/skills/insight-procmon/references/agent-execution.md +0 -36
- package/skills/insight-re/references/agent-execution.md +0 -36
- package/skills/insight-re/references/artifacts.md +0 -52
- package/skills/insight-re/references/persistent-client.mjs +0 -147
- package/skills/insight-re/references/persistent.md +0 -90
- package/skills/insight-re/references/recovery.md +0 -235
- package/skills/insight-re/references/storage.md +0 -139
- package/skills/insight-re/references/work-tracking.md +0 -261
- package/skills/insight-sevenzip/references/agent-execution.md +0 -36
- package/skills/insight-strace/references/agent-execution.md +0 -36
- package/skills/insight-tshark/references/agent-execution.md +0 -36
- package/skills/insight-windbg/references/agent-execution.md +0 -36
- /package/dist/src/{debugger-supervisor.d.ts → native/contract.js} +0 -0
- /package/runtime/native/{windows-job → windows}/NuGet.Config +0 -0
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
import { address } from './research.js';
|
|
2
|
-
import { object, fail } from './model.js';
|
|
3
|
-
import { verifyFunctionMutation } from './function-effects.js';
|
|
4
|
-
import { verifyComments } from './comment-effects.js';
|
|
5
|
-
import { verifyDataMutation } from './data-effects.js';
|
|
6
|
-
import { verifyDocumentation } from './documentation-effects.js';
|
|
7
|
-
import { verifyMemoryCreation } from './memory-inputs.js';
|
|
8
|
-
const equal = (actual, expected, label) => { if (actual !== expected)
|
|
9
|
-
fail('partial', `Saved ${label} does not match the requested effect.`); };
|
|
10
|
-
const normalized = (value) => address(String(value));
|
|
11
|
-
const category = (value) => '/' + String(value).replace(/^\/+|\/+$/g, '');
|
|
12
|
-
/** Effect assertions run against an immutable saved program, not the response's success flag. */
|
|
13
|
-
export async function verifyMutation(backend, snapshot, path, p, response) {
|
|
14
|
-
if (path.startsWith('/sdk/')) {
|
|
15
|
-
if (!backend.inspect)
|
|
16
|
-
fail('configuration', 'Native SDK edits require immutable saved-state inspection.');
|
|
17
|
-
return backend.inspect(snapshot, { kind: 'sdk', operation: path.slice(5), parameters: p });
|
|
18
|
-
}
|
|
19
|
-
if (path === '/create_memory_block')
|
|
20
|
-
return verifyMemoryCreation(backend, snapshot, p);
|
|
21
|
-
if (path === '/set_function_prototype') {
|
|
22
|
-
if (!backend.inspect)
|
|
23
|
-
fail('configuration', 'Prototype edits require saved-state inspection.');
|
|
24
|
-
const value = await backend.inspect(snapshot, { kind: 'function', address: p.function_address, prototype: p.prototype });
|
|
25
|
-
equal(value.exists, true, 'function presence');
|
|
26
|
-
const expected = object(value.expectedPrototype);
|
|
27
|
-
equal(value.returnType, expected.returnType, 'prototype return type');
|
|
28
|
-
if (!Array.isArray(value.parameters) || !Array.isArray(expected.parameters))
|
|
29
|
-
fail('partial', 'Saved prototype parameters are absent.');
|
|
30
|
-
const actual = value.parameters.filter(v => !v.auto);
|
|
31
|
-
equal(actual.length, expected.parameters.length, 'prototype parameter count');
|
|
32
|
-
for (let i = 0; i < actual.length; i++)
|
|
33
|
-
equal(actual[i].type, object(expected.parameters[i]).type, 'prototype parameter type');
|
|
34
|
-
const convention = p.calling_convention || expected.inlineCallingConvention;
|
|
35
|
-
if (convention === 'default') {
|
|
36
|
-
if (!['default', value.defaultCallingConvention].includes(value.callingConvention))
|
|
37
|
-
fail('partial', 'Saved prototype default convention differs from the compiler specification.');
|
|
38
|
-
}
|
|
39
|
-
else if (convention)
|
|
40
|
-
equal(value.callingConvention, convention, 'prototype convention');
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
if (['/import_data_types', '/apply_data_classification', '/set_global', '/set_function_this_type', '/clear_flow_and_repair'].includes(path))
|
|
44
|
-
return verifyDataMutation(backend, snapshot, path, p, response);
|
|
45
|
-
if (path === '/apply_function_documentation')
|
|
46
|
-
return verifyDocumentation(backend, snapshot, p);
|
|
47
|
-
if (['/batch_set_comments', '/clear_function_comments'].includes(path))
|
|
48
|
-
return verifyComments(backend, snapshot, path, p);
|
|
49
|
-
if (path === '/batch_apply_documentation') {
|
|
50
|
-
if (!Array.isArray(response.errors) || response.errors.length)
|
|
51
|
-
fail('partial', 'Documentation batch has incomplete steps.');
|
|
52
|
-
const comments = await verifyComments(backend, snapshot, path, p);
|
|
53
|
-
if (!backend.inspect)
|
|
54
|
-
fail('configuration', 'Documentation requires saved-state inspection.');
|
|
55
|
-
const functionState = await backend.inspect(snapshot, { kind: 'function', address: p.address, ...(p.prototype ? { prototype: p.prototype } : {}) });
|
|
56
|
-
equal(functionState.exists, true, 'documented function presence');
|
|
57
|
-
if (p.name)
|
|
58
|
-
equal(functionState.name, p.name, 'documented function name');
|
|
59
|
-
const variables = functionState.variables;
|
|
60
|
-
if (!Array.isArray(variables))
|
|
61
|
-
fail('partial', 'Saved documented variables are absent.');
|
|
62
|
-
const renames = object(p.variable_renames ?? {}), types = object(p.variable_types ?? {});
|
|
63
|
-
for (const [oldName, newName] of Object.entries(renames))
|
|
64
|
-
if (!variables.some(v => object(v).name === newName))
|
|
65
|
-
fail('partial', 'Saved variable rename is absent.');
|
|
66
|
-
for (const [name, typeName] of Object.entries(types)) {
|
|
67
|
-
const saved = variables.find(v => object(v).name === (renames[name] ?? name));
|
|
68
|
-
if (!saved)
|
|
69
|
-
fail('partial', 'Saved documented variable is absent.');
|
|
70
|
-
const wanted = await backend.inspect(snapshot, { kind: 'resolve_type', name: typeName });
|
|
71
|
-
equal(wanted.exists, true, 'documented variable type');
|
|
72
|
-
equal(object(saved).type, object(wanted.type).name, 'documented variable type');
|
|
73
|
-
}
|
|
74
|
-
if (p.prototype) {
|
|
75
|
-
const expected = object(functionState.expectedPrototype);
|
|
76
|
-
equal(functionState.returnType, expected.returnType, 'documented return type');
|
|
77
|
-
const actual = functionState.parameters;
|
|
78
|
-
if (!Array.isArray(actual) || !Array.isArray(expected.parameters))
|
|
79
|
-
fail('partial', 'Saved signature parameters are absent.');
|
|
80
|
-
equal(actual.length, expected.parameters.length, 'documented parameter count');
|
|
81
|
-
for (let i = 0; i < actual.length; i++)
|
|
82
|
-
equal(object(actual[i]).type, object(expected.parameters[i]).type, 'documented parameter type');
|
|
83
|
-
}
|
|
84
|
-
if (p.calling_convention)
|
|
85
|
-
equal(functionState.callingConvention, p.calling_convention, 'documented calling convention');
|
|
86
|
-
return { function: functionState, ...comments };
|
|
87
|
-
}
|
|
88
|
-
if (path === '/run_script_inline' || path === '/run_ghidra_script') {
|
|
89
|
-
// Output describes execution, while the snapshot captures the resulting complete program state.
|
|
90
|
-
// Scripts can have external effects, so an unknown response cannot be reconciled from DB state alone.
|
|
91
|
-
if (response.success !== true || typeof response.console_output !== 'string' && response.output_captured !== false)
|
|
92
|
-
fail('partial', 'Script execution lacks a complete successful outcome.');
|
|
93
|
-
if (!backend.inspect)
|
|
94
|
-
fail('configuration', 'Script execution requires saved-state inspection.');
|
|
95
|
-
const metadata = await backend.inspect(snapshot, { kind: 'metadata' });
|
|
96
|
-
if (typeof metadata.sha256 !== 'string' || !metadata.sha256)
|
|
97
|
-
fail('partial', 'Saved script state lacks its input identity.');
|
|
98
|
-
return { success: true, ...(typeof response.console_output === 'string' ? { output: response.console_output } : {}),
|
|
99
|
-
outputCaptured: response.output_captured !== false, ...(path === '/run_ghidra_script' ? { script: p.script_name } : {}) };
|
|
100
|
-
}
|
|
101
|
-
if (['/create_function', '/delete_function', '/clear_instruction_flow_override', '/disassemble_bytes', '/add_function_tag', '/remove_function_tag',
|
|
102
|
-
'/delete_function_tag', '/set_function_tag_comment', '/set_function_no_return', '/set_variable_type', '/set_variable_storage',
|
|
103
|
-
'/rename_variables', '/batch_rename_function_components', '/set_variables'].includes(path))
|
|
104
|
-
return verifyFunctionMutation(backend, snapshot, path, p, response);
|
|
105
|
-
if (!backend.inspect)
|
|
106
|
-
fail('configuration', 'Structural operations require saved-state inspection.');
|
|
107
|
-
const inspect = (kind, parameters = {}) => backend.inspect(snapshot, { kind, ...parameters });
|
|
108
|
-
if (path === '/run_analysis' || path === '/reanalyze') {
|
|
109
|
-
const value = await inspect('metadata');
|
|
110
|
-
equal(value.analyzed, true, 'completed analysis flag');
|
|
111
|
-
if (response.success !== true)
|
|
112
|
-
fail('partial', 'Analysis completion was not established.');
|
|
113
|
-
if (response.total_functions !== undefined)
|
|
114
|
-
equal(value.functionCount, response.total_functions, 'analyzed function count');
|
|
115
|
-
return value;
|
|
116
|
-
}
|
|
117
|
-
if (path === '/configure_analyzer') {
|
|
118
|
-
const value = await inspect('option', { name: p.name, group: 'Analyzers' });
|
|
119
|
-
equal(value.exists, true, 'analyzer option presence');
|
|
120
|
-
if (p.enabled !== undefined)
|
|
121
|
-
equal(value.value, String(p.enabled), 'analyzer enabled flag');
|
|
122
|
-
return value;
|
|
123
|
-
}
|
|
124
|
-
const type = async (name) => { const value = await inspect('type', { name }); equal(value.exists, true, 'type presence'); return object(value.type); };
|
|
125
|
-
const structure = async (name) => { const value = await type(name); if (!Array.isArray(value.fields))
|
|
126
|
-
fail('partial', 'Saved composite layout is absent.'); return value; };
|
|
127
|
-
if (['/clone_data_type', '/create_derived_type', '/rename_data_type'].includes(path)) {
|
|
128
|
-
const name = p.new_name ?? p.name ?? response.name;
|
|
129
|
-
const value = await type(name);
|
|
130
|
-
equal(value.name, name, 'type name');
|
|
131
|
-
if (path === '/clone_data_type' && p.source_type !== p.new_name) {
|
|
132
|
-
const original = await type(p.source_type);
|
|
133
|
-
equal(original.size, value.size, 'copied type size');
|
|
134
|
-
if (original.fields !== undefined)
|
|
135
|
-
equal(JSON.stringify(original.fields), JSON.stringify(value.fields), 'copied layout');
|
|
136
|
-
}
|
|
137
|
-
return value;
|
|
138
|
-
}
|
|
139
|
-
if (path === '/create_function_signature') {
|
|
140
|
-
const value = await type(p.name);
|
|
141
|
-
equal(value.name, p.name, 'signature type name');
|
|
142
|
-
const parameters = typeof p.parameters === 'string' ? JSON.parse(p.parameters) : p.parameters;
|
|
143
|
-
if (!Array.isArray(parameters) || !Array.isArray(value.arguments))
|
|
144
|
-
fail('partial', 'Saved function signature arguments are absent.');
|
|
145
|
-
equal(value.arguments.length, parameters.length, 'signature argument count');
|
|
146
|
-
for (let i = 0; i < parameters.length; i++) {
|
|
147
|
-
const resolved = await inspect('resolve_type', { name: object(parameters[i]).type });
|
|
148
|
-
equal(resolved.exists, true, 'signature argument type');
|
|
149
|
-
equal(value.arguments[i], object(resolved.type).name, 'signature argument type');
|
|
150
|
-
}
|
|
151
|
-
const result = await inspect('resolve_type', { name: p.return_type });
|
|
152
|
-
equal(result.exists, true, 'signature return type');
|
|
153
|
-
equal(value.returnType, object(result.type).name, 'signature return type');
|
|
154
|
-
return value;
|
|
155
|
-
}
|
|
156
|
-
if (path === '/create_data_type_category') {
|
|
157
|
-
const value = await inspect('category', { name: category(p.category_path) });
|
|
158
|
-
equal(value.exists, true, 'category presence');
|
|
159
|
-
return value;
|
|
160
|
-
}
|
|
161
|
-
if (path === '/delete_data_type') {
|
|
162
|
-
const value = await inspect('type', { name: p.type_name });
|
|
163
|
-
equal(value.exists, false, 'deleted type absence');
|
|
164
|
-
return value;
|
|
165
|
-
}
|
|
166
|
-
if (path === '/move_data_type_to_category') {
|
|
167
|
-
const value = await type(p.type_name);
|
|
168
|
-
equal(value.category, category(p.category_path), 'type category');
|
|
169
|
-
return value;
|
|
170
|
-
}
|
|
171
|
-
if (path === '/create_enum') {
|
|
172
|
-
const value = await type(p.name), members = object(value.values), expected = object(p.values);
|
|
173
|
-
equal(value.size, p.size ?? 4, 'enum size');
|
|
174
|
-
equal(Object.keys(members).length, Object.keys(expected).length, 'enum member count');
|
|
175
|
-
for (const [name, item] of Object.entries(expected)) {
|
|
176
|
-
let wanted;
|
|
177
|
-
try {
|
|
178
|
-
wanted = BigInt(String(item)).toString();
|
|
179
|
-
}
|
|
180
|
-
catch {
|
|
181
|
-
fail('invalid', 'Enum values must be exact integers.');
|
|
182
|
-
}
|
|
183
|
-
equal(members[name], wanted, 'enum member ' + name);
|
|
184
|
-
}
|
|
185
|
-
return value;
|
|
186
|
-
}
|
|
187
|
-
if (path === '/create_union' || path === '/recreate_struct') {
|
|
188
|
-
const value = await structure(p.name), fields = value.fields;
|
|
189
|
-
if (!Array.isArray(p.fields))
|
|
190
|
-
fail('invalid', 'Composite fields must be an array.');
|
|
191
|
-
equal(fields.length, p.fields.length, 'composite field count');
|
|
192
|
-
for (let i = 0; i < fields.length; i++) {
|
|
193
|
-
const wanted = object(p.fields[i]);
|
|
194
|
-
equal(fields[i].name, wanted.name, 'composite field name');
|
|
195
|
-
if (wanted.offset !== undefined && path === '/recreate_struct')
|
|
196
|
-
equal(fields[i].offset, wanted.offset, 'composite field offset');
|
|
197
|
-
}
|
|
198
|
-
if (path === '/recreate_struct' && Number(p.size ?? -1) > 0)
|
|
199
|
-
equal(value.size, p.size, 'structure size');
|
|
200
|
-
return value;
|
|
201
|
-
}
|
|
202
|
-
if (['/add_struct_field', '/modify_struct_field', '/remove_struct_field'].includes(path)) {
|
|
203
|
-
const value = await structure(p.struct_name), fields = value.fields;
|
|
204
|
-
const selector = String(p.field_name ?? ''), byOffset = selector.startsWith('offset:') ? Number(selector.slice(7)) : undefined;
|
|
205
|
-
const target = fields.find(f => byOffset === undefined ? f.name === (p.new_name || selector) : f.offset === byOffset);
|
|
206
|
-
if (path === '/remove_struct_field') {
|
|
207
|
-
if (fields.some(f => f.name === selector))
|
|
208
|
-
fail('partial', 'Removed field remains in the saved structure.');
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
if (!target)
|
|
212
|
-
fail('partial', 'Edited field is absent from the saved structure.');
|
|
213
|
-
if (path === '/add_struct_field' && Number(p.offset ?? -1) >= 0)
|
|
214
|
-
equal(target.offset, p.offset, 'field offset');
|
|
215
|
-
if (p.new_name)
|
|
216
|
-
equal(target.name, p.new_name, 'field name');
|
|
217
|
-
const expected = p.new_type ?? p.field_type;
|
|
218
|
-
if (expected) {
|
|
219
|
-
const resolved = await inspect('resolve_type', { name: expected });
|
|
220
|
-
equal(resolved.exists, true, 'resolved field type');
|
|
221
|
-
equal(String(target.type).replace(/\s+/g, ''), String(object(resolved.type).name).replace(/\s+/g, ''), 'field type');
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return value;
|
|
225
|
-
}
|
|
226
|
-
if (path === '/resize_struct') {
|
|
227
|
-
const value = await structure(p.name);
|
|
228
|
-
equal(value.size, p.new_size, 'structure size');
|
|
229
|
-
return value;
|
|
230
|
-
}
|
|
231
|
-
if (path === '/resolve_duplicate_type') {
|
|
232
|
-
const value = await type(p.type_name);
|
|
233
|
-
if (Number(value.size) <= 1)
|
|
234
|
-
fail('partial', 'Canonical type is still a placeholder.');
|
|
235
|
-
return value;
|
|
236
|
-
}
|
|
237
|
-
if (path === '/apply_data_type') {
|
|
238
|
-
// The acknowledgment carries the resolved type; the saved type must exist with that size.
|
|
239
|
-
const resolved = await inspect('resolve_type', { name: p.type_name });
|
|
240
|
-
equal(resolved.exists, true, 'resolved applied type');
|
|
241
|
-
const value = object(resolved.type);
|
|
242
|
-
if (Number(value.size) <= 0)
|
|
243
|
-
fail('partial', 'Applied type has no defined size.');
|
|
244
|
-
const observed = await inspect('data', { address: p.address });
|
|
245
|
-
equal(observed.exists, true, 'defined data presence');
|
|
246
|
-
equal(observed.type, value.name, 'applied data type');
|
|
247
|
-
return observed;
|
|
248
|
-
}
|
|
249
|
-
if (['/create_property_map', '/delete_property_map', '/set_property', '/remove_property'].includes(path)) {
|
|
250
|
-
const value = await inspect('property', { name: p.name ?? p.map, ...(p.address ? { address: p.address } : {}) });
|
|
251
|
-
equal(value.exists, path !== '/delete_property_map', 'property map presence');
|
|
252
|
-
if (path === '/set_property') {
|
|
253
|
-
equal(value.hasValue, true, 'property presence');
|
|
254
|
-
if (value.value !== null)
|
|
255
|
-
equal(value.value, String(p.value ?? ''), 'property value');
|
|
256
|
-
}
|
|
257
|
-
if (path === '/remove_property')
|
|
258
|
-
equal(value.hasValue, false, 'removed property absence');
|
|
259
|
-
return value;
|
|
260
|
-
}
|
|
261
|
-
if (path === '/set_program_option' || path === '/remove_program_option') {
|
|
262
|
-
const value = await inspect('option', { name: p.name, group: p.group });
|
|
263
|
-
equal(value.exists, path === '/set_program_option', 'program option presence');
|
|
264
|
-
if (path === '/set_program_option')
|
|
265
|
-
equal(value.value, String(p.value), 'program option value');
|
|
266
|
-
return value;
|
|
267
|
-
}
|
|
268
|
-
if (path === '/set_image_base') {
|
|
269
|
-
const value = await inspect('metadata');
|
|
270
|
-
equal(normalized(value.imageBase), normalized(p.address), 'image base');
|
|
271
|
-
return value;
|
|
272
|
-
}
|
|
273
|
-
if (path === '/set_memory_block') {
|
|
274
|
-
const value = await inspect('memory', { name: p.block ?? '', address: p.address ?? '' });
|
|
275
|
-
equal(value.exists, true, 'memory block presence');
|
|
276
|
-
for (const flag of ['read', 'write', 'execute', 'volatile'])
|
|
277
|
-
if (p[flag] !== undefined)
|
|
278
|
-
equal(value[flag], p[flag], 'memory ' + flag);
|
|
279
|
-
return value;
|
|
280
|
-
}
|
|
281
|
-
if (path === '/set_bookmark' || path === '/delete_bookmark') {
|
|
282
|
-
const value = await inspect('bookmarks', { address: p.address }), marks = value.bookmarks;
|
|
283
|
-
if (!Array.isArray(marks))
|
|
284
|
-
fail('partial', 'Saved bookmark inventory is absent.');
|
|
285
|
-
const selected = marks.filter(mark => object(mark).category === String(p.category ?? ''));
|
|
286
|
-
if (path === '/set_bookmark') {
|
|
287
|
-
if (!selected.some(mark => object(mark).comment === String(p.comment ?? '')))
|
|
288
|
-
fail('partial', 'Saved bookmark does not contain the requested comment.');
|
|
289
|
-
}
|
|
290
|
-
else if (p.category ? selected.length : marks.length)
|
|
291
|
-
fail('partial', 'Deleted bookmark remains in saved state.');
|
|
292
|
-
return value;
|
|
293
|
-
}
|
|
294
|
-
if (path === '/create_label' || path === '/delete_label') {
|
|
295
|
-
const edits = Array.isArray(p.labels) && p.labels.length ? p.labels : [{ address: p.address, name: p.name }];
|
|
296
|
-
const verified = [];
|
|
297
|
-
for (const item of edits) {
|
|
298
|
-
const label = object(item), value = await inspect('symbols', { address: label.address });
|
|
299
|
-
if (!Array.isArray(value.symbols))
|
|
300
|
-
fail('partial', 'Saved symbol inventory is absent.');
|
|
301
|
-
equal(value.symbols.some(s => object(s).name === label.name), path === '/create_label', 'label presence');
|
|
302
|
-
verified.push(value);
|
|
303
|
-
}
|
|
304
|
-
return { labels: verified };
|
|
305
|
-
}
|
|
306
|
-
if (path === '/rename_symbol') {
|
|
307
|
-
const value = await inspect('symbols', { name: p.new_name });
|
|
308
|
-
if (!Array.isArray(value.symbols) || !value.symbols.length)
|
|
309
|
-
fail('partial', 'Renamed symbol is absent from saved state.');
|
|
310
|
-
return value;
|
|
311
|
-
}
|
|
312
|
-
if (path === '/add_memory_reference' || path === '/remove_reference') {
|
|
313
|
-
const value = await inspect('references', { address: p.from_address });
|
|
314
|
-
if (!Array.isArray(value.references))
|
|
315
|
-
fail('partial', 'Saved reference inventory is absent.');
|
|
316
|
-
const found = value.references.filter(ref => normalized(object(ref).to) === normalized(p.to_address) && object(ref).operand === (p.operand_index ?? -1));
|
|
317
|
-
equal(found.length > 0, path === '/add_memory_reference', 'reference presence');
|
|
318
|
-
return value;
|
|
319
|
-
}
|
|
320
|
-
fail('schema', 'Mutation lacks its saved effect contract.');
|
|
321
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { object, fail } from './model.js';
|
|
2
|
-
export async function nativeQuery(http, program, operation, parameters, write = false) {
|
|
3
|
-
const base = operation === '/code_references' ? 'InsightCodeReferences' : operation.startsWith('/sdk/') ? 'InsightSdkScript' : operation.startsWith('/emulate_') ? 'InsightEmulation' : 'InsightResearchQueries';
|
|
4
|
-
const response = object(await http.script(program, base, Buffer.from(JSON.stringify({ operation, parameters, ...(write ? { write: true } : {}) }), 'utf8').toString('base64')));
|
|
5
|
-
if (response.success !== true || typeof response.console_output !== 'string')
|
|
6
|
-
fail('partial', 'Native research helper did not complete.');
|
|
7
|
-
const matches = [...response.console_output.matchAll(/^INSIGHT_QUERY:(.+)$/gm)];
|
|
8
|
-
if (matches.length !== 1)
|
|
9
|
-
fail('partial', 'Native research helper omitted its unique result.');
|
|
10
|
-
let result;
|
|
11
|
-
try {
|
|
12
|
-
result = object(JSON.parse(matches[0][1]));
|
|
13
|
-
}
|
|
14
|
-
catch {
|
|
15
|
-
fail('partial', 'Native research helper returned malformed JSON.');
|
|
16
|
-
}
|
|
17
|
-
if (result.error) {
|
|
18
|
-
const error = object(result.error), code = String(error.code);
|
|
19
|
-
fail(['invalid', 'unsupported', 'limit', ...(operation.startsWith('/sdk/') ? ['rejected'] : [])].includes(code) ? code : 'partial', typeof error.message === 'string' ? error.message.slice(0, 500) : 'Native research failed.');
|
|
20
|
-
}
|
|
21
|
-
if (!Object.hasOwn(result, 'value'))
|
|
22
|
-
fail('partial', 'Native research helper omitted its value.');
|
|
23
|
-
return result.value;
|
|
24
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export type ServiceRole = 'publisher' | 'reader';
|
|
2
|
-
export interface ServiceLaunch {
|
|
3
|
-
directory: string;
|
|
4
|
-
installation: string;
|
|
5
|
-
executable: string;
|
|
6
|
-
arguments: string[];
|
|
7
|
-
environment: Record<string, string | undefined>;
|
|
8
|
-
root: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ServiceOptions {
|
|
11
|
-
readyMs?: number;
|
|
12
|
-
queueMs?: number;
|
|
13
|
-
terminateMs?: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Long-lived native services of one profile owner: per role and credential key at most two services, requests
|
|
17
|
-
* per service in order. Undefined from `call` means nothing was sent and a one-shot helper must run it.
|
|
18
|
-
*/
|
|
19
|
-
export declare class NativeServices {
|
|
20
|
-
private readonly options;
|
|
21
|
-
private readonly pools;
|
|
22
|
-
private readonly starting;
|
|
23
|
-
private closed;
|
|
24
|
-
private failures;
|
|
25
|
-
private disabledUntil;
|
|
26
|
-
/** Services out of rotation (dead, draining) whose exit is not proved yet; still tracked until it is. */
|
|
27
|
-
private readonly retired;
|
|
28
|
-
constructor(options?: ServiceOptions);
|
|
29
|
-
call(role: ServiceRole, key: string, launch: () => Promise<ServiceLaunch>, requestFile: string, timeoutMs: number, signal: AbortSignal): Promise<Record<string, unknown> | undefined>;
|
|
30
|
-
private pick;
|
|
31
|
-
/**
|
|
32
|
-
* Stop idle services now and await their proved exit; true only when nothing remains running or starting.
|
|
33
|
-
* Busy services are left untouched (no draining), so a refused maintenance attempt costs nothing later.
|
|
34
|
-
*/
|
|
35
|
-
/** Process IDs of this owner's services that are tracked and still serving; every other service must prove its exit. */
|
|
36
|
-
servingPids(role: ServiceRole): Set<number>;
|
|
37
|
-
stopIdle(): Promise<boolean>;
|
|
38
|
-
/** Close for good: no further requests are accepted and every service terminates. */
|
|
39
|
-
stop(): Promise<void>;
|
|
40
|
-
}
|