@eyeauras/insight-cli 0.2.0 → 0.2.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 +25 -0
- package/SKILL.md +38 -54
- package/dist/src/binary.d.ts +3 -0
- package/dist/src/binary.js +74 -0
- package/dist/src/capture.d.ts +3 -0
- package/dist/src/capture.js +220 -0
- package/dist/src/cli.js +57 -12
- package/dist/src/contexts.d.ts +5 -0
- package/dist/src/contexts.js +42 -16
- package/dist/src/debugger-caller.d.ts +17 -0
- package/dist/src/debugger-caller.js +129 -0
- package/dist/src/debugger-launch.d.ts +2 -0
- package/dist/src/debugger-launch.js +17 -0
- package/dist/src/debugger-results.d.ts +1 -0
- package/dist/src/debugger-results.js +8 -0
- package/dist/src/debugger-supervisor.js +56 -13
- package/dist/src/debugger.js +16 -7
- package/dist/src/die.d.ts +12 -0
- package/dist/src/die.js +127 -0
- package/dist/src/dnspy-runtime.d.ts +8 -0
- package/dist/src/dnspy-runtime.js +46 -0
- package/dist/src/dnspy.d.ts +22 -0
- package/dist/src/dnspy.js +160 -0
- package/dist/src/dotnet-diagnostics.d.ts +13 -0
- package/dist/src/dotnet-diagnostics.js +101 -0
- package/dist/src/frida-worker.d.ts +1 -0
- package/dist/src/frida-worker.js +125 -0
- package/dist/src/frida.d.ts +16 -0
- package/dist/src/frida.js +125 -0
- package/dist/src/ghidra-debugger-runtime.d.ts +7 -0
- package/dist/src/ghidra-debugger-runtime.js +31 -0
- package/dist/src/ghidra-processes.d.ts +6 -0
- package/dist/src/ghidra-processes.js +121 -0
- package/dist/src/ghidra.js +6 -6
- package/dist/src/ilspy.d.ts +7 -0
- package/dist/src/ilspy.js +122 -0
- package/dist/src/lldb.d.ts +10 -0
- package/dist/src/lldb.js +99 -0
- package/dist/src/llvm.d.ts +6 -0
- package/dist/src/llvm.js +133 -0
- package/dist/src/managed-heap.d.ts +4 -0
- package/dist/src/managed-heap.js +73 -0
- package/dist/src/managed-metadata.d.ts +11 -0
- package/dist/src/managed-metadata.js +66 -0
- package/dist/src/mitmproxy.d.ts +55 -0
- package/dist/src/mitmproxy.js +172 -0
- package/dist/src/native-inputs.d.ts +3 -2
- package/dist/src/native-inputs.js +9 -4
- package/dist/src/package-version.d.ts +1 -0
- package/dist/src/package-version.js +3 -0
- package/dist/src/procmon-config.d.ts +2 -0
- package/dist/src/procmon-config.js +15 -0
- package/dist/src/procmon-events.d.ts +13 -0
- package/dist/src/procmon-events.js +82 -0
- package/dist/src/procmon.d.ts +4 -0
- package/dist/src/procmon.js +107 -0
- package/dist/src/research.d.ts +11 -2
- package/dist/src/research.js +5 -3
- package/dist/src/runtime-catalog.d.ts +5 -10
- package/dist/src/runtime-catalog.js +4 -5
- package/dist/src/runtime-manager.d.ts +27 -3
- package/dist/src/runtime-manager.js +100 -159
- package/dist/src/runtime-selection.js +21 -4
- package/dist/src/server.d.ts +13 -0
- package/dist/src/server.js +21 -45
- package/dist/src/sevenzip.d.ts +15 -0
- package/dist/src/sevenzip.js +119 -0
- package/dist/src/strace.d.ts +10 -0
- package/dist/src/strace.js +71 -0
- package/dist/src/text-window.d.ts +11 -0
- package/dist/src/text-window.js +6 -0
- package/dist/src/tool-runtime/archives.d.ts +10 -0
- package/dist/src/{runtime-archives.js → tool-runtime/archives.js} +91 -24
- package/dist/src/tool-runtime/catalog.d.ts +3 -0
- package/dist/src/tool-runtime/catalog.js +13 -0
- package/dist/src/tool-runtime/commands.d.ts +9 -0
- package/dist/src/tool-runtime/commands.js +39 -0
- package/dist/src/tool-runtime/deadline.d.ts +11 -0
- package/dist/src/tool-runtime/deadline.js +32 -0
- package/dist/src/tool-runtime/definition.d.ts +73 -0
- package/dist/src/tool-runtime/definition.js +49 -0
- package/dist/src/tool-runtime/dotnet.d.ts +4 -0
- package/dist/src/tool-runtime/dotnet.js +22 -0
- package/dist/src/tool-runtime/identity.d.ts +6 -0
- package/dist/src/tool-runtime/identity.js +50 -0
- package/dist/src/tool-runtime/installer.d.ts +101 -0
- package/dist/src/tool-runtime/installer.js +180 -0
- package/dist/src/tool-runtime/launch-worker.d.ts +1 -0
- package/dist/src/tool-runtime/launch-worker.js +58 -0
- package/dist/src/tool-runtime/run.d.ts +51 -0
- package/dist/src/tool-runtime/run.js +159 -0
- package/dist/src/tool-runtime/store.d.ts +15 -0
- package/dist/src/tool-runtime/store.js +219 -0
- package/dist/src/tool-runtime/supervisor.d.ts +57 -0
- package/dist/src/tool-runtime/supervisor.js +266 -0
- package/dist/src/tool-runtime/windows-job.d.ts +22 -0
- package/dist/src/tool-runtime/windows-job.js +43 -0
- package/dist/src/toolbox.d.ts +84 -0
- package/dist/src/toolbox.js +35 -0
- package/dist/src/tshark.d.ts +23 -0
- package/dist/src/tshark.js +174 -0
- package/dist/src/windbg.d.ts +14 -0
- package/dist/src/windbg.js +119 -0
- package/dist/src/workspace.d.ts +1 -0
- package/dist/src/workspace.js +6 -0
- package/package.json +5 -4
- package/references/agent-execution.md +36 -0
- package/references/agent-setup.md +61 -0
- package/references/artifacts.md +5 -0
- package/references/debugger.md +22 -0
- package/references/ilspy.md +33 -0
- package/references/managed-runtime.md +48 -7
- package/references/native/InsightPythonWheels.java +283 -2
- package/references/native/InsightTraceState.java +28 -13
- package/references/setup.md +2 -1
- package/runtime/managed/insight-heap/Azure.Core.dll +0 -0
- package/runtime/managed/insight-heap/Azure.Identity.dll +0 -0
- package/runtime/managed/insight-heap/Insight.Heap.csproj +1 -0
- package/runtime/managed/insight-heap/Insight.Heap.deps.json +391 -0
- package/runtime/managed/insight-heap/Insight.Heap.dll +0 -0
- package/runtime/managed/insight-heap/Insight.Heap.runtimeconfig.json +13 -0
- package/runtime/managed/insight-heap/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Diagnostics.NETCore.Client.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Diagnostics.Runtime.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Extensions.Configuration.Abstractions.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Extensions.Diagnostics.Abstractions.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Extensions.FileProviders.Abstractions.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Extensions.Hosting.Abstractions.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Extensions.Options.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Extensions.Primitives.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Identity.Client.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.IdentityModel.Abstractions.dll +0 -0
- package/runtime/managed/insight-heap/Microsoft.Security.AntiSSRF.dll +0 -0
- package/runtime/managed/insight-heap/NuGet.Config +1 -0
- package/runtime/managed/insight-heap/Program.cs +20 -0
- package/runtime/managed/insight-heap/README.md +16 -0
- package/runtime/managed/insight-heap/System.ClientModel.dll +0 -0
- package/runtime/managed/insight-heap/System.Memory.Data.dll +0 -0
- package/runtime/managed/insight-heap/System.Security.Cryptography.ProtectedData.dll +0 -0
- package/runtime/managed/insight-heap/dependencies.json +436 -0
- package/runtime/managed/insight-heap/notices/Azure.Core-LICENSE.txt +21 -0
- package/runtime/managed/insight-heap/notices/Azure.Identity-LICENSE.txt +21 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Bcl.AsyncInterfaces-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Bcl.AsyncInterfaces-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Diagnostics.NETCore.Client-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Diagnostics.Runtime-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Configuration.Abstractions-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Configuration.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.DependencyInjection.Abstractions-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.DependencyInjection.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Diagnostics.Abstractions-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Diagnostics.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.FileProviders.Abstractions-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.FileProviders.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Hosting.Abstractions-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Hosting.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Logging.Abstractions-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Logging.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Options-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Options-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Primitives-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Primitives-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Identity.Client-LICENSE.txt +21 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Identity.Client.Extensions.Msal-LICENSE.txt +21 -0
- package/runtime/managed/insight-heap/notices/Microsoft.IdentityModel.Abstractions-LICENSE.txt +21 -0
- package/runtime/managed/insight-heap/notices/Microsoft.Security.AntiSSRF-LICENSE.txt +21 -0
- package/runtime/managed/insight-heap/notices/System.ClientModel-LICENSE.txt +21 -0
- package/runtime/managed/insight-heap/notices/System.Memory.Data-LICENSE.txt +23 -0
- package/runtime/managed/insight-heap/notices/System.Memory.Data-THIRD-PARTY-NOTICES.TXT +1418 -0
- package/runtime/managed/insight-heap/notices/System.Security.Cryptography.ProtectedData-LICENSE.TXT +23 -0
- package/runtime/managed/insight-heap/notices/System.Security.Cryptography.ProtectedData-THIRD-PARTY-NOTICES.TXT +309 -0
- package/runtime/managed/insight-heap/packages.lock.json +165 -0
- package/runtime/managed/insight-heap/provenance.json +146 -0
- package/runtime/managed/insight-heap/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll +0 -0
- package/runtime/managed/insight-managed/Insight.Managed.csproj +4 -0
- package/runtime/managed/insight-managed/Insight.Managed.deps.json +41 -0
- package/runtime/managed/insight-managed/Insight.Managed.dll +0 -0
- package/runtime/managed/insight-managed/Insight.Managed.runtimeconfig.json +13 -0
- package/runtime/managed/insight-managed/LICENSE.dnlib.txt +20 -0
- package/runtime/managed/insight-managed/NuGet.Config +1 -0
- package/runtime/managed/insight-managed/Program.cs +31 -0
- package/runtime/managed/insight-managed/README.md +16 -0
- package/runtime/managed/insight-managed/dnlib.dll +0 -0
- package/runtime/managed/insight-managed/packages.lock.json +13 -0
- package/runtime/managed/insight-managed/provenance.json +40 -0
- package/runtime/native/binary/README.md +22 -0
- package/runtime/native/binary/dependencies.json +166 -0
- package/runtime/native/binary/helper.cpp +44 -0
- package/runtime/native/binary/insight-binary-darwin-arm64 +0 -0
- package/runtime/native/binary/notices/Catch2-3.12.0--Catch2-3.12.0__LICENSE.txt +23 -0
- package/runtime/native/binary/notices/LIEF-LICENSE.txt +202 -0
- package/runtime/native/binary/notices/LIEF-attribution.txt +37 -0
- package/runtime/native/binary/notices/Melkor_ELF_Fuzzer-ac2495b--elf_fuzzer-master__LICENSE.txt +674 -0
- package/runtime/native/binary/notices/expected-1.3.1--expected-1.3.1__COPYING +121 -0
- package/runtime/native/binary/notices/frozen-61dce5a--frozen-61dce5ae18ca59931e27675c468e64118aba8744__AUTHORS +3 -0
- package/runtime/native/binary/notices/frozen-61dce5a--frozen-61dce5ae18ca59931e27675c468e64118aba8744__LICENSE +202 -0
- package/runtime/native/binary/notices/json-LICENSE.MIT +21 -0
- package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--LICENSE +553 -0
- package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--framework__LICENSE +553 -0
- package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--tf-psa-crypto__LICENSE +552 -0
- package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--tf-psa-crypto__framework__LICENSE +553 -0
- package/runtime/native/binary/notices/nanobind-2.13.0.r18.g4db9ed3f--LICENSE +26 -0
- package/runtime/native/binary/notices/nanobind-2.13.0.r18.g4db9ed3f--ext__robin_map__LICENSE +21 -0
- package/runtime/native/binary/notices/span-LICENSE_1_0.txt +23 -0
- package/runtime/native/binary/notices/span-attribution.txt +11 -0
- package/runtime/native/binary/notices/spdlog-1.17.0--spdlog-1.17.0__LICENSE +25 -0
- package/runtime/native/binary/notices/utfcpp-4.0.9--utfcpp-4.0.9__LICENSE +23 -0
- package/runtime/native/binary/provenance.json +48 -0
- package/runtime/native/child-deadline-linux-x64 +0 -0
- package/runtime/native/child-deadline-linux.c +24 -0
- package/runtime/native/child-deadline-linux.provenance.json +17 -0
- package/runtime/native/deadline-alarm-darwin-universal.dylib +0 -0
- package/runtime/native/deadline-alarm.c +33 -0
- package/runtime/native/deadline-alarm.provenance.json +22 -0
- package/runtime/native/deadline-exec-darwin-arm64 +0 -0
- package/runtime/native/deadline-exec.c +24 -0
- package/runtime/native/deadline-exec.provenance.json +17 -0
- package/runtime/native/dnspy-extension/Bridge.cs +58 -0
- package/runtime/native/dnspy-extension/Insight.DnSpy.csproj +13 -0
- package/runtime/native/dnspy-extension/Insight.DnSpy.x.dll +0 -0
- package/runtime/native/dnspy-extension/NuGet.Config +1 -0
- package/runtime/native/dnspy-extension/UNICODE-LOADER.md +26 -0
- package/runtime/native/dnspy-extension/packages.lock.json +6 -0
- package/runtime/native/dnspy-extension/provenance.json +27 -0
- package/runtime/native/dnspy-extension/upstream-public-build.snk +0 -0
- package/runtime/native/dnspy-extension/vendor-files.json +4341 -0
- package/runtime/native/file-version.ps1 +7 -0
- package/runtime/native/insight-registry-win-x64.dll +0 -0
- package/runtime/native/mitmproxy/bridge.py +180 -0
- package/runtime/native/mitmproxy/notices.json +476 -0
- package/runtime/native/sources/detours-LICENSE.md +23 -0
- package/runtime/native/sources/detours-e4bfd6b.tar.gz +0 -0
- package/runtime/native/sources/detours-provenance.json +10 -0
- package/runtime/native/tshark-layout.json +2247 -0
- package/runtime/native/windows-job/DirectoryAlias.cs +24 -0
- package/runtime/native/windows-job/Insight.WindowsJob.csproj +1 -0
- package/runtime/native/windows-job/Insight.WindowsJob.dll +0 -0
- package/runtime/native/windows-job/NuGet.Config +1 -0
- package/runtime/native/windows-job/OwnedJob.cs +79 -0
- package/runtime/native/windows-job/RegistryRedirect.cs +45 -0
- package/runtime/native/windows-job/packages.lock.json +21 -0
- package/runtime/native/windows-job/provenance.json +16 -0
- package/runtime/native/windows-job/windows-job.ps1 +8 -0
- package/runtime/native/windows-registry.c +21 -0
- package/runtime/native/windows-registry.def +3 -0
- package/runtime/native/windows-registry.provenance.json +14 -0
- package/runtime/notices/diagnostics-10.0.750501.txt +23 -0
- package/runtime/tool-catalog.json +290 -0
- package/runtime/toolbox.json +1401 -0
- package/skill-bundle/insight-artifacts/SKILL.md +30 -0
- package/skill-bundle/insight-artifacts/references/agent-execution.md +36 -0
- package/skill-bundle/insight-artifacts/references/artifacts.md +52 -0
- package/skill-bundle/insight-binary/SKILL.md +46 -0
- package/skill-bundle/insight-binary/references/agent-execution.md +36 -0
- package/skill-bundle/insight-capture/SKILL.md +56 -0
- package/skill-bundle/insight-capture/references/agent-execution.md +36 -0
- package/skill-bundle/insight-cli/SKILL.md +42 -0
- package/skill-bundle/insight-cli/references/agent-execution.md +36 -0
- package/skill-bundle/insight-cli/references/agent-setup.md +61 -0
- package/skill-bundle/insight-die/SKILL.md +49 -0
- package/skill-bundle/insight-die/references/agent-execution.md +36 -0
- package/skill-bundle/insight-dnspy/SKILL.md +65 -0
- package/skill-bundle/insight-dnspy/references/agent-execution.md +36 -0
- package/skill-bundle/insight-dotnet-dump/SKILL.md +46 -0
- package/skill-bundle/insight-dotnet-dump/references/agent-execution.md +36 -0
- package/skill-bundle/insight-dotnet-stack/SKILL.md +39 -0
- package/skill-bundle/insight-dotnet-stack/references/agent-execution.md +36 -0
- package/skill-bundle/insight-dotnet-trace/SKILL.md +45 -0
- package/skill-bundle/insight-dotnet-trace/references/agent-execution.md +36 -0
- package/skill-bundle/insight-frida/SKILL.md +67 -0
- package/skill-bundle/insight-frida/references/agent-execution.md +36 -0
- package/skill-bundle/insight-ghidra/SKILL.md +91 -0
- package/skill-bundle/insight-ghidra/references/administration.md +34 -0
- package/skill-bundle/insight-ghidra/references/agent-execution.md +36 -0
- package/skill-bundle/insight-ghidra/references/archive.md +32 -0
- package/skill-bundle/insight-ghidra/references/artifacts.md +52 -0
- package/skill-bundle/insight-ghidra/references/debugger.md +62 -0
- package/skill-bundle/insight-ghidra/references/extensions-and-sync.md +124 -0
- package/skill-bundle/insight-ghidra/references/managed-runtime.md +157 -0
- package/skill-bundle/insight-ghidra/references/native-workflows.md +112 -0
- package/skill-bundle/insight-ghidra/references/query-semantics.md +96 -0
- package/skill-bundle/insight-ghidra/references/recovery.md +53 -0
- package/skill-bundle/insight-ghidra/references/research.md +101 -0
- package/skill-bundle/insight-ghidra/references/setup.md +50 -0
- package/skill-bundle/insight-ilspy/SKILL.md +45 -0
- package/skill-bundle/insight-ilspy/references/agent-execution.md +36 -0
- package/skill-bundle/insight-ilspy/references/ilspy.md +33 -0
- package/skill-bundle/insight-interop/SKILL.md +54 -0
- package/skill-bundle/insight-interop/references/agent-execution.md +36 -0
- package/skill-bundle/insight-lldb/SKILL.md +54 -0
- package/skill-bundle/insight-lldb/references/agent-execution.md +36 -0
- package/skill-bundle/insight-llvm/SKILL.md +56 -0
- package/skill-bundle/insight-llvm/references/agent-execution.md +36 -0
- package/skill-bundle/insight-managed-heap/SKILL.md +43 -0
- package/skill-bundle/insight-managed-heap/references/agent-execution.md +36 -0
- package/skill-bundle/insight-managed-metadata/SKILL.md +52 -0
- package/skill-bundle/insight-managed-metadata/references/agent-execution.md +36 -0
- package/skill-bundle/insight-mitmproxy/SKILL.md +62 -0
- package/skill-bundle/insight-mitmproxy/references/agent-execution.md +36 -0
- package/skill-bundle/insight-overview/SKILL.md +79 -0
- package/skill-bundle/insight-overview/references/agent-execution.md +36 -0
- package/skill-bundle/insight-procmon/SKILL.md +49 -0
- package/skill-bundle/insight-procmon/references/agent-execution.md +36 -0
- package/skill-bundle/insight-re/SKILL.md +121 -0
- package/skill-bundle/insight-re/references/agent-execution.md +36 -0
- package/skill-bundle/insight-re/references/artifacts.md +52 -0
- package/skill-bundle/insight-re/references/recovery.md +53 -0
- package/skill-bundle/insight-sevenzip/SKILL.md +42 -0
- package/skill-bundle/insight-sevenzip/references/agent-execution.md +36 -0
- package/skill-bundle/insight-strace/SKILL.md +46 -0
- package/skill-bundle/insight-strace/references/agent-execution.md +36 -0
- package/skill-bundle/insight-tshark/SKILL.md +49 -0
- package/skill-bundle/insight-tshark/references/agent-execution.md +36 -0
- package/skill-bundle/insight-windbg/SKILL.md +46 -0
- package/skill-bundle/insight-windbg/references/agent-execution.md +36 -0
- package/skill-bundle/manifest.json +32 -0
- package/skills/insight-artifacts/SKILL.md +30 -0
- package/skills/insight-artifacts/references/agent-execution.md +36 -0
- package/skills/insight-artifacts/references/artifacts.md +52 -0
- package/skills/insight-binary/SKILL.md +46 -0
- package/skills/insight-binary/references/agent-execution.md +36 -0
- package/skills/insight-capture/SKILL.md +56 -0
- package/skills/insight-capture/references/agent-execution.md +36 -0
- package/skills/insight-die/SKILL.md +49 -0
- package/skills/insight-die/references/agent-execution.md +36 -0
- package/skills/insight-dnspy/SKILL.md +65 -0
- package/skills/insight-dnspy/references/agent-execution.md +36 -0
- package/skills/insight-dotnet-dump/SKILL.md +46 -0
- package/skills/insight-dotnet-dump/references/agent-execution.md +36 -0
- package/skills/insight-dotnet-stack/SKILL.md +39 -0
- package/skills/insight-dotnet-stack/references/agent-execution.md +36 -0
- package/skills/insight-dotnet-trace/SKILL.md +45 -0
- package/skills/insight-dotnet-trace/references/agent-execution.md +36 -0
- package/skills/insight-frida/SKILL.md +67 -0
- package/skills/insight-frida/references/agent-execution.md +36 -0
- package/skills/insight-ghidra/SKILL.md +91 -0
- package/skills/insight-ghidra/references/administration.md +34 -0
- package/skills/insight-ghidra/references/agent-execution.md +36 -0
- package/skills/insight-ghidra/references/archive.md +32 -0
- package/skills/insight-ghidra/references/artifacts.md +52 -0
- package/skills/insight-ghidra/references/debugger.md +62 -0
- package/skills/insight-ghidra/references/extensions-and-sync.md +124 -0
- package/skills/insight-ghidra/references/managed-runtime.md +157 -0
- package/skills/insight-ghidra/references/native-workflows.md +112 -0
- package/skills/insight-ghidra/references/query-semantics.md +96 -0
- package/skills/insight-ghidra/references/recovery.md +53 -0
- package/skills/insight-ghidra/references/research.md +101 -0
- package/skills/insight-ghidra/references/setup.md +50 -0
- package/skills/insight-ilspy/SKILL.md +45 -0
- package/skills/insight-ilspy/references/agent-execution.md +36 -0
- package/skills/insight-ilspy/references/ilspy.md +33 -0
- package/skills/insight-interop/SKILL.md +54 -0
- package/skills/insight-interop/references/agent-execution.md +36 -0
- package/skills/insight-lldb/SKILL.md +54 -0
- package/skills/insight-lldb/references/agent-execution.md +36 -0
- package/skills/insight-llvm/SKILL.md +56 -0
- package/skills/insight-llvm/references/agent-execution.md +36 -0
- package/skills/insight-managed-heap/SKILL.md +43 -0
- package/skills/insight-managed-heap/references/agent-execution.md +36 -0
- package/skills/insight-managed-metadata/SKILL.md +52 -0
- package/skills/insight-managed-metadata/references/agent-execution.md +36 -0
- package/skills/insight-mitmproxy/SKILL.md +62 -0
- package/skills/insight-mitmproxy/references/agent-execution.md +36 -0
- package/skills/insight-overview/SKILL.md +79 -0
- package/skills/insight-overview/references/agent-execution.md +36 -0
- package/skills/insight-procmon/SKILL.md +49 -0
- package/skills/insight-procmon/references/agent-execution.md +36 -0
- package/skills/insight-re/SKILL.md +22 -9
- package/skills/insight-re/references/agent-execution.md +36 -0
- package/skills/insight-re/references/artifacts.md +52 -0
- package/skills/insight-re/references/recovery.md +53 -0
- package/skills/insight-sevenzip/SKILL.md +42 -0
- package/skills/insight-sevenzip/references/agent-execution.md +36 -0
- package/skills/insight-strace/SKILL.md +46 -0
- package/skills/insight-strace/references/agent-execution.md +36 -0
- package/skills/insight-tshark/SKILL.md +49 -0
- package/skills/insight-tshark/references/agent-execution.md +36 -0
- package/skills/insight-windbg/SKILL.md +46 -0
- package/skills/insight-windbg/references/agent-execution.md +36 -0
- package/dist/src/runtime-archives.d.ts +0 -5
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { command, Permission } from '@eyeauras/cli-factory';
|
|
2
|
+
import { join, resolve, dirname, basename } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { readFile, mkdir, copyFile, lstat, open, writeFile } from 'node:fs/promises';
|
|
5
|
+
import { constants } from 'node:fs';
|
|
6
|
+
import { randomUUID } from 'node:crypto';
|
|
7
|
+
import { ToolInstaller } from './tool-runtime/installer.js';
|
|
8
|
+
import { defineTool, lifecycleCommands } from './tool-runtime/definition.js';
|
|
9
|
+
import { catalogArtifact } from './tool-runtime/catalog.js';
|
|
10
|
+
import { fileSha256, archiveName } from './tool-runtime/archives.js';
|
|
11
|
+
import { runTool } from './tool-runtime/run.js';
|
|
12
|
+
import { digest, fail, id, text } from './model.js';
|
|
13
|
+
import { number } from './research.js';
|
|
14
|
+
const archive = '90a4f106033c74eef38f52985fc168c99a293ae35c9d3d7d1b157558a94d5261', relativeExecutable = 'Wireshark.app/Contents/MacOS/tshark';
|
|
15
|
+
const layout = JSON.parse(await readFile(fileURLToPath(new URL('../../runtime/native/tshark-layout.json', import.meta.url)), 'utf8'));
|
|
16
|
+
function supported() { if (process.platform !== 'darwin' || process.arch !== 'arm64')
|
|
17
|
+
fail('unsupported', 'TShark currently requires native macOS ARM64, macOS 14+ for the owned deadline launcher. Offline PCAP analysis requires no live-capture privileges.'); }
|
|
18
|
+
function externalRoot(executable) { if (basename(executable) !== 'tshark' || basename(dirname(executable)) !== 'MacOS' || basename(resolve(dirname(executable), '../..')) !== 'Wireshark.app')
|
|
19
|
+
fail('configuration', 'Select the pinned Wireshark.app/Contents/MacOS/tshark or our extracted console runtime.'); return resolve(dirname(executable), '../../..'); }
|
|
20
|
+
async function verifyFamily(executable) { supported(); const root = externalRoot(executable); for (const entry of layout.entries) {
|
|
21
|
+
archiveName(entry.path);
|
|
22
|
+
const path = join(root, entry.path), info = await lstat(path);
|
|
23
|
+
if (!info.isFile() || info.size !== entry.size || await fileSha256(path) !== entry.sha256)
|
|
24
|
+
fail('binding', 'TShark runtime family differs from the pinned 4.6.9 console subset.', { component: entry.path });
|
|
25
|
+
} return { runtimeFamily: digest(layout.entries) }; }
|
|
26
|
+
const safeArguments = ['-n', '-o', 'capture.no_extcap:TRUE', '-o', 'nameres.maxmind_geoip:FALSE'];
|
|
27
|
+
export function tsharkInstaller(c) { return new ToolInstaller(c, { id: 'tshark', primary: 'tshark', preparationId: 'console-subset-v1', components: () => { supported(); return { tshark: catalogArtifact(archive) }; }, launch: roots => ({ executable: join(roots.tshark, relativeExecutable), arguments: [], environment: {} }), externalInputs: verifyFamily, prepareExternal: async (executable, stage) => { const root = externalRoot(executable), owned = join(stage, 'execution'); for (const entry of layout.entries) {
|
|
28
|
+
const target = join(owned, entry.path);
|
|
29
|
+
await mkdir(dirname(target), { recursive: true, mode: 0o700 });
|
|
30
|
+
await copyFile(join(root, entry.path), target, constants.COPYFILE_EXCL);
|
|
31
|
+
if (await fileSha256(target) !== entry.sha256)
|
|
32
|
+
fail('binding', 'Copied TShark runtime differs.');
|
|
33
|
+
} return { executable: join(owned, relativeExecutable), arguments: [], environment: {} }; }, probe: async (launch, context) => { supported(); const result = await runTool(context, { tool: 'tshark', role: 'version', executable: launch.executable, arguments: ['--version'], maxOutputBytes: 65536, timeoutMs: 10000, nativeDeadline: true }); if (!/^TShark \(Wireshark\) 4\.6\.9\b/.test(result.stdout))
|
|
34
|
+
fail('configuration', 'Select TShark 4.6.9.'); return { version: '4.6.9', offlineCaptureOnly: true, privateSettings: true, consoleSubset: true, systemCaptureHelperRequired: false }; } }); }
|
|
35
|
+
const fields = ['frame.number', 'frame.time_epoch', 'frame.len', 'frame.protocols', 'ip.src', 'ip.dst', 'ipv6.src', 'ipv6.dst', 'tcp.srcport', 'tcp.dstport', 'tcp.stream', 'udp.srcport', 'udp.dstport', 'udp.stream', '_ws.col.Protocol', 'http.request.method', 'http.request.full_uri', 'http.request.uri', 'http.response.code', 'dns.qry.name', 'tls.handshake.extensions_server_name'];
|
|
36
|
+
export function tsharkRows(value) { let rows; try {
|
|
37
|
+
rows = JSON.parse(value);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
fail('partial', 'TShark did not return a complete bounded JSON document.');
|
|
41
|
+
} if (!Array.isArray(rows) || rows.length > 10001)
|
|
42
|
+
fail('partial', 'Unexpected bounded packet inventory.'); return rows.map(row => { const layers = row?._source?.layers; if (!layers || typeof layers !== 'object' || Array.isArray(layers))
|
|
43
|
+
fail('partial', 'Packet fields are unavailable.'); for (const [key, values] of Object.entries(layers)) {
|
|
44
|
+
if (key.length > 256 || !Array.isArray(values) || values.length > 65536 || values.some(v => typeof v !== 'string' || v.length > 65536))
|
|
45
|
+
fail('partial', 'Packet fields exceed their typed bounds.');
|
|
46
|
+
} if (!/^\d+$/.test(layers['frame.number']?.[0] ?? ''))
|
|
47
|
+
fail('partial', 'Packet has no frame identity.'); return layers; }); }
|
|
48
|
+
export function tsharkStreams(rows) { const streams = new Map(); for (const row of rows)
|
|
49
|
+
for (const transport of ['tcp', 'udp'])
|
|
50
|
+
for (const value of row[transport + '.stream'] ?? []) {
|
|
51
|
+
if (!/^\d+$/.test(value))
|
|
52
|
+
fail('partial', 'Invalid native stream identity.');
|
|
53
|
+
const key = transport + ':' + value, stream = streams.get(key) ?? { transport, stream: Number(value), frames: [], sources: new Set(), destinations: new Set() };
|
|
54
|
+
stream.frames.push(Number(row['frame.number'][0]));
|
|
55
|
+
for (const ip of [...(row['ip.src'] ?? []), ...(row['ipv6.src'] ?? [])])
|
|
56
|
+
stream.sources.add(ip);
|
|
57
|
+
for (const ip of [...(row['ip.dst'] ?? []), ...(row['ipv6.dst'] ?? [])])
|
|
58
|
+
stream.destinations.add(ip);
|
|
59
|
+
streams.set(key, stream);
|
|
60
|
+
} return [...streams.values()].map(v => ({ ...v, frames: [...new Set(v.frames)], sources: [...v.sources], destinations: [...v.destinations] })); }
|
|
61
|
+
export function tsharkFollow(output, transport, stream) { const lines = output.trim().split(/\r?\n/), nodes = [], chunks = []; if (!lines.includes('Follow: ' + transport + ',raw') || !lines.includes('Filter: ' + transport + '.stream eq ' + stream))
|
|
62
|
+
fail('partial', 'Follow output does not match the selected native stream.'); for (const line of lines) {
|
|
63
|
+
const node = /^Node ([01]): (.*)$/.exec(line);
|
|
64
|
+
if (node) {
|
|
65
|
+
nodes[Number(node[1])] = node[2];
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if (/^\t?[0-9a-f]+$/i.test(line)) {
|
|
69
|
+
const hex = line.trim();
|
|
70
|
+
if (hex.length % 2)
|
|
71
|
+
fail('partial', 'Follow output has an incomplete byte.');
|
|
72
|
+
chunks.push({ node: line.startsWith('\t') ? 1 : 0, hex, bytes: hex.length / 2 });
|
|
73
|
+
}
|
|
74
|
+
} if (nodes.length !== 2)
|
|
75
|
+
fail('partial', 'Follow output has no endpoint pair.'); return { nodes, chunks, totalBytes: chunks.reduce((n, v) => n + v.bytes, 0) }; }
|
|
76
|
+
export function tsharkCommands(workspace) {
|
|
77
|
+
const definition = defineTool({ id: 'tshark', description: 'Inspect an immutable offline capture, packet fields and reconstructed TCP/UDP streams', components: [{ id: 'tshark', version: '4.6.9', artifacts: [] }], lifecycle: { download: (o, c) => tsharkInstaller(c).download(Boolean(o.offline)), install: (o, c) => tsharkInstaller(c).install(o), status: (_o, c) => tsharkInstaller(c).status(), doctor: (_o, c) => tsharkInstaller(c).doctor(), uninstall: (o, c) => tsharkInstaller(c).uninstall(Boolean(o.purgeCache)) } });
|
|
78
|
+
return [command('tshark', definition.description, [...lifecycleCommands(definition), command('inspect [input]', 'Read bounded protocol evidence from a captured PCAP/PCAPNG', async ({ args, options: o }, c) => {
|
|
79
|
+
supported();
|
|
80
|
+
if (Boolean(args.input) === Boolean(o.target))
|
|
81
|
+
fail('invalid', 'Supply one PCAP path or --target.');
|
|
82
|
+
const view = text(o.view ?? 'overview', 32);
|
|
83
|
+
if (!['overview', 'packets', 'packet', 'streams', 'follow'].includes(view))
|
|
84
|
+
fail('invalid', 'Use overview, packets, packet, streams or follow.');
|
|
85
|
+
const limit = number(o.limit ?? 50, 1000, 1), offset = number(o.offset ?? 0, 1000000), frame = o.frame === undefined ? undefined : number(o.frame, 1000000, 1), filter = o.filter === undefined ? undefined : text(o.filter, 4096);
|
|
86
|
+
if ((view === 'packet') !== (frame !== undefined))
|
|
87
|
+
fail('invalid', 'Only packet view requires --frame.');
|
|
88
|
+
if ((o.stream !== undefined || o.transport !== undefined) !== (view === 'follow'))
|
|
89
|
+
fail('invalid', 'Only follow view requires --stream and --transport.');
|
|
90
|
+
if (view === 'packet' && filter)
|
|
91
|
+
fail('invalid', 'Packet detail uses its exact --frame without a display filter.');
|
|
92
|
+
if (view === 'follow' && (o.stream === undefined || o.transport === undefined || filter))
|
|
93
|
+
fail('invalid', 'Follow requires --stream and --transport, without --filter.');
|
|
94
|
+
const transport = view === 'follow' ? text(o.transport, 8) : undefined, stream = view === 'follow' ? number(o.stream, 1000000) : undefined;
|
|
95
|
+
if (transport && !['tcp', 'udp'].includes(transport))
|
|
96
|
+
fail('invalid', 'Follow transport must be tcp or udp.');
|
|
97
|
+
const w = workspace(c), target = args.input ? await w.importTarget(resolve(c.cwd, text(args.input, 4096))) : w.target(id(o.target)), input = await w.artifacts.verify(target.input);
|
|
98
|
+
if (target.input.size > 64 * 1024 ** 2)
|
|
99
|
+
fail('limit', 'Capture input exceeds 64 MiB.');
|
|
100
|
+
const file = await open(input, 'r'), header = Buffer.alloc(4);
|
|
101
|
+
try {
|
|
102
|
+
await file.read(header, 0, 4, 0);
|
|
103
|
+
}
|
|
104
|
+
finally {
|
|
105
|
+
await file.close();
|
|
106
|
+
}
|
|
107
|
+
if (!['d4c3b2a1', 'a1b2c3d4', '4d3cb2a1', 'a1b23c4d', '0a0d0d0a'].includes(header.toString('hex')))
|
|
108
|
+
fail('unsupported', 'Input is not a PCAP/PCAPNG capture.');
|
|
109
|
+
const directory = join(c.appArguments.AppDataDirectory, 'runtime/tshark/queries', randomUUID()), home = join(directory, 'home');
|
|
110
|
+
await mkdir(home, { recursive: true, mode: 0o700 });
|
|
111
|
+
return tsharkInstaller(c).use(async (selected) => {
|
|
112
|
+
const runs = [], run = async (arguments_, maxOutputBytes = 16 * 1024 ** 2, acceptedCodes = [0]) => { const r = await runTool(c, { tool: 'tshark', role: view, installation: selected.id, executable: selected.executable, arguments: [...safeArguments, '-r', input, ...arguments_], environment: { HOME: home, XDG_CONFIG_HOME: join(home, 'config'), XDG_DATA_HOME: join(home, 'data'), WIRESHARK_CONFIG_DIR: join(home, 'config/wireshark') }, target: target.id, nativeDeadline: true, timeoutMs: 60000, maxOutputBytes, acceptedCodes, metadata: { inputSha256: target.binarySha256, view } }); runs.push({ process: r.process, diagnostics: r.diagnostics, elapsedMs: r.elapsedMs, exitCode: r.exitCode, stderr: r.stderr }); return r; };
|
|
113
|
+
let data, total, items, complete = true, scannedFrames;
|
|
114
|
+
if (view === 'packet') {
|
|
115
|
+
const r = await run(['-c', String(frame), '-Y', 'frame.number == ' + frame, '-T', 'json', '--no-duplicate-keys']);
|
|
116
|
+
try {
|
|
117
|
+
data = JSON.parse(r.stdout);
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
fail('partial', 'Native packet detail is incomplete.', { diagnostics: r.diagnostics });
|
|
121
|
+
}
|
|
122
|
+
if (!Array.isArray(data) || data.length > 1)
|
|
123
|
+
fail('partial', 'Packet detail did not preserve one frame identity.');
|
|
124
|
+
if (!data.length)
|
|
125
|
+
fail('notFound', 'Selected packet was not found before the capture ended.');
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
const r = await run(['-c', '10001', '-T', 'json', '--no-duplicate-keys', ...fields.flatMap(f => ['-e', f])], 16 * 1024 ** 2, [0, 2]), observed = tsharkRows(r.stdout);
|
|
129
|
+
complete = r.exitCode === 0 && observed.length < 10001;
|
|
130
|
+
const rows = observed.slice(0, 10000);
|
|
131
|
+
scannedFrames = rows.length;
|
|
132
|
+
let selectedRows = rows;
|
|
133
|
+
if (filter) {
|
|
134
|
+
const f = await run(['-c', '10000', '-Y', filter, '-T', 'fields', '-e', 'frame.number'], 1024 ** 2), matches = f.stdout.trim() ? f.stdout.trim().split(/\r?\n/) : [];
|
|
135
|
+
if (matches.some(v => !/^\d+$/.test(v)))
|
|
136
|
+
fail('partial', 'Filtered native frame identities are invalid.');
|
|
137
|
+
const ids = new Set(matches);
|
|
138
|
+
selectedRows = rows.filter(p => ids.has(p['frame.number'][0]));
|
|
139
|
+
}
|
|
140
|
+
if (view === 'follow') {
|
|
141
|
+
if (!tsharkStreams(rows).some(s => s.transport === transport && s.stream === stream))
|
|
142
|
+
fail(complete ? 'notFound' : 'partial', 'Selected stream is absent from the inspected capture prefix; no follow is fabricated.');
|
|
143
|
+
const followed = await run(['-c', '10000', '-q', '-z', 'follow,' + transport + ',raw,' + stream], 2 * 1024 ** 2, [0, 2]);
|
|
144
|
+
complete &&= followed.exitCode === 0;
|
|
145
|
+
data = tsharkFollow(followed.stdout, transport, stream);
|
|
146
|
+
}
|
|
147
|
+
else if (view === 'packets')
|
|
148
|
+
items = selectedRows;
|
|
149
|
+
else if (view === 'streams')
|
|
150
|
+
items = tsharkStreams(selectedRows);
|
|
151
|
+
else {
|
|
152
|
+
const protocols = {};
|
|
153
|
+
for (const row of selectedRows) {
|
|
154
|
+
const protocol = row['_ws.col.protocol']?.[0] ?? 'unknown';
|
|
155
|
+
protocols[protocol] = (protocols[protocol] ?? 0) + 1;
|
|
156
|
+
}
|
|
157
|
+
data = { matchingFrames: selectedRows.length, protocols, streams: tsharkStreams(selectedRows).length, firstFrame: selectedRows[0]?.['frame.number']?.[0], lastFrame: selectedRows.at(-1)?.['frame.number']?.[0] };
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (await fileSha256(input) !== target.binarySha256)
|
|
161
|
+
fail('binding', 'Immutable capture changed during inspection.');
|
|
162
|
+
if (items)
|
|
163
|
+
total = items.length;
|
|
164
|
+
const base = { state: complete ? 'completed' : 'partial', complete, target: target.id, inputSha256: target.binarySha256, view, filter, scannedFrames, coverage: view === 'packet' ? 'One selected frame; packet existence is verified, whole-capture coverage is not claimed.' : complete ? 'All frames reached EOF in the bounded inventory; native protocol evidence is limited by packet content and dissector behavior.' : 'Only the first 10000 frames or a readable prefix were inspected; later packets, missing streams and absent matches remain unknown.', runs, diagnostics: directory };
|
|
165
|
+
if (o.output) {
|
|
166
|
+
const output = resolve(c.cwd, text(o.output, 4096)), content = JSON.stringify({ ...base, ...(items ? { items, total } : { data }) }, null, 2) + '\n';
|
|
167
|
+
await mkdir(dirname(output), { recursive: true, mode: 0o700 });
|
|
168
|
+
await writeFile(output, content, { flag: 'wx', mode: 0o600 });
|
|
169
|
+
return { ...base, output, bytes: Buffer.byteLength(content), total };
|
|
170
|
+
}
|
|
171
|
+
return { ...base, ...(items ? { items: items.slice(offset, offset + limit), total, limit, offset, truncated: offset + limit < items.length } : { data }) };
|
|
172
|
+
});
|
|
173
|
+
}, { permission: Permission.Update, options: [{ flags: '--target <id>', description: 'Reuse an immutable captured PCAP' }, { flags: '--view <kind>', description: 'overview, packets, packet, streams or follow', defaultValue: 'overview' }, { flags: '--filter <expression>', description: 'Native Wireshark display filter within the inspected prefix' }, { flags: '--frame <number>', description: 'Required for packet view; decimal frame number, up to one million' }, { flags: '--transport <kind>', description: 'Required for follow: tcp or udp' }, { flags: '--stream <index>', description: 'Required for follow: zero-based native stream ID' }, { flags: '--limit <count>', description: 'Return up to 1000 packet/stream rows', defaultValue: 50 }, { flags: '--offset <count>', description: 'Skip matching rows after filtering', defaultValue: 0 }, { flags: '--output <file>', description: 'Save the complete bounded view to a new ordinary JSON file' }] })])];
|
|
174
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CommandContext, type CommandDefinition } from '@eyeauras/cli-factory';
|
|
2
|
+
import { ToolInstaller } from './tool-runtime/installer.js';
|
|
3
|
+
import type { Workspace } from './workspace.js';
|
|
4
|
+
export declare function windbgInstaller(c: CommandContext): ToolInstaller;
|
|
5
|
+
export declare function windbgPlan(o: Record<string, unknown>, nonce: string): {
|
|
6
|
+
view: "modules" | "registers" | "memory" | "threads" | "overview" | "stack" | "disassembly";
|
|
7
|
+
commands: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function windbgSnapshot(stdout: string, nonce: string): {
|
|
10
|
+
lines: string[];
|
|
11
|
+
complete: boolean;
|
|
12
|
+
warnings: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare function windbgCommands(workspace: (c: CommandContext) => Workspace): CommandDefinition[];
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { command, Permission } from '@eyeauras/cli-factory';
|
|
2
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
3
|
+
import { mkdir, writeFile, open, copyFile, readdir, rm } from 'node:fs/promises';
|
|
4
|
+
import { constants } from 'node:fs';
|
|
5
|
+
import { randomUUID } from 'node:crypto';
|
|
6
|
+
import { ToolInstaller } from './tool-runtime/installer.js';
|
|
7
|
+
import { defineTool, lifecycleCommands } from './tool-runtime/definition.js';
|
|
8
|
+
import { catalogArtifact } from './tool-runtime/catalog.js';
|
|
9
|
+
import { runTool } from './tool-runtime/run.js';
|
|
10
|
+
import { fileSha256, extractArchive } from './tool-runtime/archives.js';
|
|
11
|
+
import { treeFingerprint } from './tool-runtime/store.js';
|
|
12
|
+
import { fail, text, id } from './model.js';
|
|
13
|
+
import { number } from './research.js';
|
|
14
|
+
const bundleSha = '4662ae17bc0dc77db987b89cccea32c30058baa06268f861d09e0ab4e4f45c20';
|
|
15
|
+
function supported() { if (process.platform !== 'win32' || process.arch !== 'x64')
|
|
16
|
+
fail('unsupported', 'This WinDbg facade requires Windows x64. It inspects Windows user-mode minidumps without launching or attaching their original process.'); }
|
|
17
|
+
export function windbgInstaller(c) {
|
|
18
|
+
return new ToolInstaller(c, { id: 'windbg', primary: 'windbg', components: () => { supported(); return { windbg: catalogArtifact(bundleSha) }; }, prepare: async (roots, context) => {
|
|
19
|
+
const root = roots.windbg, inner = join(root, 'windbg_win-x64.msix');
|
|
20
|
+
if (await fileSha256(inner, context.signal) !== '959c4ec033e2d00f7ed75646e4d352cc7cff6de33f494fd5dccb83819fe64e7a')
|
|
21
|
+
fail('binding', 'WinDbg x64 nested package differs from the pinned distribution.');
|
|
22
|
+
await extractArchive(inner, join(root, 'payload'), 'zip', context.signal);
|
|
23
|
+
for (const name of await readdir(root))
|
|
24
|
+
if (name.endsWith('.msix'))
|
|
25
|
+
await rm(join(root, name));
|
|
26
|
+
}, launch: roots => ({ executable: join(roots.windbg, 'payload/amd64/cdb.exe'), arguments: [], environment: {} }), externalInputs: async (executable) => {
|
|
27
|
+
supported();
|
|
28
|
+
if (basename(executable).toLowerCase() !== 'cdb.exe')
|
|
29
|
+
fail('configuration', 'Select the WinDbg bundle amd64/cdb.exe console executable.');
|
|
30
|
+
const root = dirname(executable);
|
|
31
|
+
for (const name of ['dbgeng.dll', 'dbghelp.dll', 'dbgmodel.dll'])
|
|
32
|
+
await fileSha256(join(root, name));
|
|
33
|
+
return { consoleFamily: await treeFingerprint(root) };
|
|
34
|
+
}, probe: async (launch, context) => { supported(); const r = await runTool(context, { tool: 'windbg', role: 'version', executable: launch.executable, arguments: ['-version'], maxOutputBytes: 65536, timeoutMs: 15000, nativeDeadline: true }); if (!/\b(?:cdb(?:\.exe)?|debugger)\s+(?:version\s+)?10\.[0-9.]+/i.test(r.stdout + '\n' + r.stderr))
|
|
35
|
+
fail('configuration', 'Select a compatible Microsoft CDB 10.x console debugger with its adjacent runtime.', { nativeVersion: (r.stdout + '\n' + r.stderr).trim(), diagnostics: r.diagnostics }); return { packageVersion: '1.2610.1001.0', consoleVersion: (r.stdout + '\n' + r.stderr).trim(), ownedJob: true, mode: 'read-only-user-minidump' }; } });
|
|
36
|
+
}
|
|
37
|
+
export function windbgPlan(o, nonce) {
|
|
38
|
+
const view = text(o.view ?? 'overview', 32), commands = [];
|
|
39
|
+
if (o.thread !== undefined)
|
|
40
|
+
commands.push('~' + number(o.thread, 65535) + 's');
|
|
41
|
+
switch (view) {
|
|
42
|
+
case 'overview':
|
|
43
|
+
commands.push('vertarget', '~', 'kp 0n' + number(o.frames ?? 32, 128, 1), 'r', 'lm');
|
|
44
|
+
break;
|
|
45
|
+
case 'stack':
|
|
46
|
+
commands.push('kp 0n' + number(o.frames ?? 32, 128, 1));
|
|
47
|
+
break;
|
|
48
|
+
case 'threads':
|
|
49
|
+
commands.push('~');
|
|
50
|
+
break;
|
|
51
|
+
case 'registers':
|
|
52
|
+
commands.push('r');
|
|
53
|
+
break;
|
|
54
|
+
case 'modules':
|
|
55
|
+
commands.push('lm');
|
|
56
|
+
break;
|
|
57
|
+
case 'memory':
|
|
58
|
+
case 'disassembly': {
|
|
59
|
+
const address = text(o.address, 32);
|
|
60
|
+
if (!/^0x[0-9a-fA-F]{1,16}$/.test(address))
|
|
61
|
+
fail('invalid', 'A hexadecimal runtime --address is required.');
|
|
62
|
+
const count = number(o.count ?? (view === 'memory' ? 64 : 16), view === 'memory' ? 4096 : 256, 1);
|
|
63
|
+
commands.push((view === 'memory' ? 'db ' : 'u ') + address + ' L0x' + count.toString(16));
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
default: fail('invalid', 'Choose overview, stack, threads, registers, modules, memory or disassembly.');
|
|
67
|
+
}
|
|
68
|
+
if (!['memory', 'disassembly'].includes(view) && (o.address !== undefined || o.count !== undefined))
|
|
69
|
+
fail('invalid', '--address and --count require memory or disassembly.');
|
|
70
|
+
if (!['stack', 'overview'].includes(view) && o.frames !== undefined)
|
|
71
|
+
fail('invalid', '--frames requires stack or overview.');
|
|
72
|
+
return { view, commands: ['.echo INSIGHT_BEGIN_' + nonce, ...commands, '.echo INSIGHT_END_' + nonce, 'q'].join('; ') };
|
|
73
|
+
}
|
|
74
|
+
export function windbgSnapshot(stdout, nonce) {
|
|
75
|
+
const output = stdout.split(/\r?\n/), start = output.findIndex(line => line.trim() === 'INSIGHT_BEGIN_' + nonce), end = output.findIndex((line, index) => index > start && line.trim() === 'INSIGHT_END_' + nonce);
|
|
76
|
+
if (start < 0 || end < 0)
|
|
77
|
+
fail('partial', 'CDB did not complete the selected dump query; inspect retained diagnostics.');
|
|
78
|
+
const lines = output.slice(start + 1, end);
|
|
79
|
+
const diagnostics = stdout.split(/\r?\n/).filter(line => /error|warning|unable to|could not|not found|couldn't|memory access|\?{4,}|syntax error|invalid thread/i.test(line));
|
|
80
|
+
return { lines, complete: diagnostics.length === 0, warnings: diagnostics.slice(0, 100) };
|
|
81
|
+
}
|
|
82
|
+
export function windbgCommands(workspace) {
|
|
83
|
+
const definition = defineTool({ id: 'windbg', description: 'Inspect Windows native user-mode dump stacks, registers, modules and memory', vendorDirect: true, components: [{ id: 'windbg', version: '1.2610.1001.0', artifacts: [] }], lifecycle: { download: (o, c) => windbgInstaller(c).download(Boolean(o.offline), Boolean(o.vendorDirect)), install: (o, c) => windbgInstaller(c).install(o), uninstall: (o, c) => windbgInstaller(c).uninstall(Boolean(o.purgeCache)), doctor: (_o, c) => windbgInstaller(c).doctor(), status: (_o, c) => windbgInstaller(c).status() } });
|
|
84
|
+
return [command('windbg', definition.description, [...lifecycleCommands(definition), command('inspect [input]', 'Read a captured Windows minidump with bounded typed debugger queries', async ({ args, options: o }, c) => {
|
|
85
|
+
supported();
|
|
86
|
+
if (Boolean(args.input) === Boolean(o.target))
|
|
87
|
+
fail('invalid', 'Supply exactly one dump path or --target.');
|
|
88
|
+
const nonce = randomUUID().replaceAll('-', ''), plan = windbgPlan(o, nonce), limit = number(o.limit ?? 200, 1000, 1), offset = number(o.offset ?? 0, 1000000), timeoutMs = number(o.timeoutSeconds ?? 30, 600, 1) * 1000;
|
|
89
|
+
const w = workspace(c), target = args.input ? await w.importTarget(resolve(c.cwd, text(args.input, 4096))) : w.target(id(o.target)), input = await w.artifacts.verify(target.input), header = Buffer.alloc(32), handle = await open(input, 'r');
|
|
90
|
+
try {
|
|
91
|
+
const { bytesRead } = await handle.read(header, 0, 32, 0);
|
|
92
|
+
if (bytesRead < 32 || header.subarray(0, 4).toString('ascii') !== 'MDMP')
|
|
93
|
+
fail('unsupported', 'WinDbg inspect requires a Windows user-mode minidump (MDMP).');
|
|
94
|
+
}
|
|
95
|
+
finally {
|
|
96
|
+
await handle.close();
|
|
97
|
+
}
|
|
98
|
+
const directory = join(c.appArguments.AppDataDirectory, 'runtime/windbg/queries', randomUUID()), symbolDirectory = join(directory, 'symbols');
|
|
99
|
+
await mkdir(symbolDirectory, { recursive: true, mode: 0o700 });
|
|
100
|
+
const symbols = o.symbols ? await w.artifacts.capture(resolve(c.cwd, text(o.symbols, 4096)), 'input') : undefined;
|
|
101
|
+
if (symbols) {
|
|
102
|
+
const name = basename(text(o.symbols, 4096));
|
|
103
|
+
if (!/^[a-zA-Z0-9_. -]+\.pdb$/i.test(name))
|
|
104
|
+
fail('invalid', 'Symbol companion must have an ordinary .pdb filename.');
|
|
105
|
+
await copyFile(await w.artifacts.verify(symbols), join(symbolDirectory, name), constants.COPYFILE_EXCL);
|
|
106
|
+
}
|
|
107
|
+
return windbgInstaller(c).use(async (selected) => {
|
|
108
|
+
const result = await runTool(c, { tool: 'windbg', role: 'inspect', installation: selected.id, executable: selected.executable, arguments: ['-sins', '-noshell', '-nosqm', '-netsyms:no', '-failinc', '-y', symbolDirectory, '-z', input, '-c', plan.commands], cwd: directory, target: target.id, timeoutMs, nativeDeadline: true, metadata: { dumpSha256: target.binarySha256, view: plan.view, ...(symbols ? { symbolsSha256: symbols.sha256 } : {}) } }), snapshot = windbgSnapshot(result.stdout, nonce);
|
|
109
|
+
const base = { state: snapshot.complete ? 'completed' : 'partial', complete: snapshot.complete, target: target.id, inputSha256: target.binarySha256, ...(symbols ? { symbolsSha256: symbols.sha256 } : {}), view: plan.view, process: result.process, elapsedMs: result.elapsedMs, diagnostics: result.diagnostics, stderr: result.stderr, warnings: snapshot.warnings, coverage: 'Read-only dump observation. Runtime addresses and thread indices belong to this dump; missing memory or symbols are unknown. Local matching PDB only; no symbol server. No original process is launched or attached.' };
|
|
110
|
+
if (o.output) {
|
|
111
|
+
const output = resolve(c.cwd, text(o.output, 4096)), content = JSON.stringify({ ...base, lines: snapshot.lines }, null, 2) + '\n';
|
|
112
|
+
await mkdir(dirname(output), { recursive: true, mode: 0o700 });
|
|
113
|
+
await writeFile(output, content, { flag: 'wx', mode: 0o600 });
|
|
114
|
+
return { ...base, output, bytes: Buffer.byteLength(content), totalLines: snapshot.lines.length };
|
|
115
|
+
}
|
|
116
|
+
return { ...base, lines: snapshot.lines.slice(offset, offset + limit), offset, limit, totalLines: snapshot.lines.length, truncated: offset + limit < snapshot.lines.length };
|
|
117
|
+
});
|
|
118
|
+
}, { permission: Permission.Update, options: [{ flags: '--target <id>', description: 'Reuse a captured minidump target' }, { flags: '--view <kind>', description: 'overview, stack, threads, registers, modules, memory or disassembly', defaultValue: 'overview' }, { flags: '--thread <index>', description: 'Dump thread index (decimal)' }, { flags: '--frames <count>', description: 'Stack frames (1–128)' }, { flags: '--address <hex>', description: 'Required runtime 0x address for memory/disassembly' }, { flags: '--count <count>', description: 'Memory bytes (1–4096) or instructions (1–256)' }, { flags: '--symbols <file>', description: 'Capture a matching local PDB companion; network symbols are disabled' }, { flags: '--output <file>', description: 'Save the full bounded result to a new ordinary JSON file' }, { flags: '--limit <count>', description: 'Maximum native lines (1–1000)', defaultValue: 200 }, { flags: '--offset <count>', description: 'Skip native output lines', defaultValue: 0 }, { flags: '--timeout-seconds <seconds>', description: 'Owned debugger deadline (1–600)', defaultValue: 30 }] })])];
|
|
119
|
+
}
|
package/dist/src/workspace.d.ts
CHANGED
|
@@ -138,6 +138,7 @@ export declare class Workspace {
|
|
|
138
138
|
sessions(limit?: number, offset?: number): ResearchSession[];
|
|
139
139
|
model(target: string): GhidraModel;
|
|
140
140
|
context(scope: Scope): GhidraContext;
|
|
141
|
+
contextById(context: string): GhidraContext;
|
|
141
142
|
contexts(session: string, limit?: number, offset?: number): GhidraContext[];
|
|
142
143
|
private existingRequest;
|
|
143
144
|
private insertRequest;
|
package/dist/src/workspace.js
CHANGED
|
@@ -183,6 +183,12 @@ export class Workspace {
|
|
|
183
183
|
fail('notFound', 'No Ghidra context exists for this session and target; open it first.');
|
|
184
184
|
return JSON.parse(String(row.data));
|
|
185
185
|
}
|
|
186
|
+
contextById(context) {
|
|
187
|
+
const row = this.db.prepare('SELECT data FROM contexts WHERE id=?').get(id(context));
|
|
188
|
+
if (!row)
|
|
189
|
+
fail('notFound', 'Tool context was not found.');
|
|
190
|
+
return JSON.parse(String(row.data));
|
|
191
|
+
}
|
|
186
192
|
contexts(session, limit = 100, offset = 0) {
|
|
187
193
|
this.session(session);
|
|
188
194
|
page(limit, offset);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eyeauras/insight-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-facing durable sessions and isolated Ghidra research contexts",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
@@ -13,18 +13,19 @@
|
|
|
13
13
|
"dist/src",
|
|
14
14
|
"SKILL.md",
|
|
15
15
|
"skills",
|
|
16
|
+
"skill-bundle",
|
|
16
17
|
"references",
|
|
17
18
|
"runtime",
|
|
18
19
|
"LICENSE",
|
|
19
20
|
".cli-package-build.json"
|
|
20
21
|
],
|
|
21
22
|
"scripts": {
|
|
22
|
-
"build": "tsc -p tsconfig.json && node ../../scripts/prepare-package.mjs",
|
|
23
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json && node ../../scripts/prepare-package.mjs",
|
|
23
24
|
"prepack": "npm run build"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@eyeauras/cli-factory": "
|
|
27
|
-
"@eyeauras/cli-factory-ipc": "https://raw.githubusercontent.com/iXab3r/insight-cli/
|
|
27
|
+
"@eyeauras/cli-factory": "https://raw.githubusercontent.com/iXab3r/insight-cli/73459aecc88da6f878988b64f71ab72b34a83c45/vendor/factory-core-74e7a64.tgz",
|
|
28
|
+
"@eyeauras/cli-factory-ipc": "https://raw.githubusercontent.com/iXab3r/insight-cli/f47f6d14e8aadc6b6778a6e3627bbb08909521d2/vendor/factory-ipc-7c403d8.tgz",
|
|
28
29
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
29
30
|
"tar": "7.5.22",
|
|
30
31
|
"yauzl": "3.4.0"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Agent host execution permissions
|
|
2
|
+
|
|
3
|
+
Keep the user/project host policy and the selected profile. A sandbox can deny writes
|
|
4
|
+
to runtime AppData or access to the local IPC endpoint, including during local help.
|
|
5
|
+
This is a host execution boundary, not evidence that the tool or its inputs are absent.
|
|
6
|
+
|
|
7
|
+
First retry only `insight-cli --help`, `tools list`, `skill`, or the selected application's
|
|
8
|
+
read-only `status` using the host's normal permission escalation. In Codex, use the
|
|
9
|
+
execution tool's `sandbox_permissions: "require_escalated"` with a scoped explanation
|
|
10
|
+
that the installed CLI needs its existing profile storage/local IPC. Automatic approval
|
|
11
|
+
review or the user decides that request; do not disable the sandbox or approval policy.
|
|
12
|
+
|
|
13
|
+
Do not work around this by changing HOME/AppData/profile paths, creating another host,
|
|
14
|
+
deleting owner/endpoint files, killing unrelated processes or claiming a missing runtime.
|
|
15
|
+
After the read-only probe succeeds, use the approved execution route for the intended
|
|
16
|
+
public CLI commands. An access refusal explicitly stating **no command was sent** is
|
|
17
|
+
known not dispatched; it is safe to submit that authorized command through the approved
|
|
18
|
+
route. This includes a mutation refused before dispatch. Do not mistake that definite
|
|
19
|
+
pre-dispatch refusal for an unknown execution outcome. Downloads still require their explicit
|
|
20
|
+
network access.
|
|
21
|
+
|
|
22
|
+
A lost mutation response is different from a denied startup probe: inspect retained
|
|
23
|
+
request/status/recovery evidence and use its request ID when supported. Never blindly
|
|
24
|
+
repeat a publication, script or program run whose outcome is unknown. External-tool
|
|
25
|
+
fallback is allowed by project rules, but record that the intended facade was not used
|
|
26
|
+
and do not invent a successful checkpoint or native result.
|
|
27
|
+
|
|
28
|
+
## Wait for the original execution
|
|
29
|
+
|
|
30
|
+
A tool operation may outlast the host execution tool's initial wait. A returned running
|
|
31
|
+
session/cell ID means that command is still in progress, not that the CLI returned no data.
|
|
32
|
+
Use the host's session poll/wait facility until terminal exit and consume stdout/stderr
|
|
33
|
+
before issuing a dependent command. In Codex, an `exec_command` session is continued with
|
|
34
|
+
`write_stdin`; a yielded execution cell uses that host's cell wait. Do not launch a second
|
|
35
|
+
open/install or repeat a CPU action just because the first chunk was empty. If the execution
|
|
36
|
+
really loses its terminal result, use the CLI's request/status recovery as described above.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Connect the toolbox to an agent
|
|
2
|
+
|
|
3
|
+
npm installs the CLI and all declared skills. Native tool downloads are separate. A host needs
|
|
4
|
+
shell access to `insight-cli`, skill discovery and execution access to the assigned profile.
|
|
5
|
+
`insight-cli tools list --json` discovers shipped capabilities without profile configuration,
|
|
6
|
+
native runtimes, credentials or IPC. `skill <name>` returns the instructions' ordinary path;
|
|
7
|
+
it does not inject them into an agent automatically.
|
|
8
|
+
|
|
9
|
+
## Codex: one project-local bundle
|
|
10
|
+
|
|
11
|
+
The package prepares `skill-bundle`, containing an independent folder for every registered
|
|
12
|
+
skill. `insight-cli skill --json` returns its `bundlePath`. References stay inside each skill;
|
|
13
|
+
link the whole bundle once rather than connecting each tool separately. npm installation
|
|
14
|
+
never edits agent settings or project RE instructions.
|
|
15
|
+
|
|
16
|
+
With a global npm installation, run from the research project:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
mkdir -p .agents/skills
|
|
20
|
+
ln -s "$(npm root -g)/@eyeauras/insight-cli/skill-bundle" .agents/skills/insight-toolbox
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`ln` refuses an existing destination: inspect it instead of overwriting another skill or
|
|
24
|
+
connection. Local npm installations use the `bundlePath` from their actual CLI receipt.
|
|
25
|
+
These machine-local links are not portable files to commit to a shared project. Start a fresh
|
|
26
|
+
agent and verify all registered names/descriptions appear. The [official discovery contract](https://learn.chatgpt.com/docs/build-skills)
|
|
27
|
+
supports project skills and symlinked directories; our actual host gate must still establish
|
|
28
|
+
recursive discovery for this packaged bundle.
|
|
29
|
+
|
|
30
|
+
An npm upgrade at the same global prefix replaces the bundle at the same path, including newly
|
|
31
|
+
registered tool skills. Check its manifest/version and start a fresh host session after upgrade.
|
|
32
|
+
A changed npm prefix needs reconnection. To disconnect, inspect `readlink .agents/skills/insight-toolbox`
|
|
33
|
+
and remove only that owned symlink with `unlink .agents/skills/insight-toolbox`; preserve other
|
|
34
|
+
entries and the package. No copied skills, per-tool installer or second agent configuration
|
|
35
|
+
store is maintained. Other hosts may register this ordinary bundle through their own mechanism;
|
|
36
|
+
Codex is the first concrete supported-host gate.
|
|
37
|
+
|
|
38
|
+
## Execution access
|
|
39
|
+
|
|
40
|
+
A skill link does not grant filesystem or IPC permissions. Allow the assigned profile's AppData
|
|
41
|
+
and the CLI's `.runtime` directory, plus its exact local IPC endpoint. On macOS the application
|
|
42
|
+
root is `~/Library/Application Support/insight-cli`; its Unix socket is `.runtime/host.sock`.
|
|
43
|
+
Keep unrelated profiles outside the write scope and pass the assigned `--profile` explicitly.
|
|
44
|
+
Do not grant broad external network access merely to reach a local socket.
|
|
45
|
+
|
|
46
|
+
An inaccessible profile means readiness is unknown. Inspect access failures; stopping a shared
|
|
47
|
+
owner does not grant access to it. Existing restricted-host evaluation has not established a
|
|
48
|
+
complete facade workflow yet; a successful metadata call or filesystem grant alone is insufficient.
|
|
49
|
+
|
|
50
|
+
## Behavioral acceptance
|
|
51
|
+
|
|
52
|
+
Give a fresh agent an input and business question without commands/tool names. Verify startup
|
|
53
|
+
metadata, implicit skill selection, intended public-tool use, correct findings, saved ordinary
|
|
54
|
+
project files and cleanup. Ghidra edits additionally require merge and independent readback.
|
|
55
|
+
Repeat cold-runtime and prepared-runtime cases; retain failures and distinguish an external-tool
|
|
56
|
+
fallback from acceptance of the intended adapter. Package/skill existence is structural evidence,
|
|
57
|
+
not proof that a model completed research.
|
|
58
|
+
|
|
59
|
+
The project bundle is a symlink. A plain `find` does not follow it and can misleadingly
|
|
60
|
+
show no files. Use the host skill inventory, a named `.../<skill>/SKILL.md` path, or
|
|
61
|
+
`insight-cli skill <name>` to check availability; `find -L` follows the link if needed.
|
package/references/artifacts.md
CHANGED
|
@@ -24,6 +24,11 @@ files; byte count counts their contents. A file's SHA-256 hashes its bytes; a di
|
|
|
24
24
|
SHA-256 hashes its canonical manifest of relative paths, kinds, file lengths and hashes.
|
|
25
25
|
The manifest is stored beside the content, outside the returned directory.
|
|
26
26
|
|
|
27
|
+
Before claiming a verified checkpoint, read the expected files at the returned `path` using
|
|
28
|
+
ordinary file tools. Preserve that path verbatim in the handoff, alongside the receipt;
|
|
29
|
+
profile and snapshot identifiers must not be reconstructed from memory. If access is denied,
|
|
30
|
+
retain the actual receipt and state that readback remains unverified.
|
|
31
|
+
|
|
27
32
|
The service copies and syncs data before publishing the completed snapshot. Failure does
|
|
28
33
|
not return a successful receipt or expose a partial completed snapshot. Source edits made
|
|
29
34
|
after a successful save do not change the copy. Treat saved copies as retained snapshots;
|
package/references/debugger.md
CHANGED
|
@@ -6,6 +6,12 @@ verified copy of the selected immutable input in an owned run directory. It acce
|
|
|
6
6
|
`--args`, `--cwd`, a bounded launch timeout and the optional request ID. A second live process
|
|
7
7
|
uses another session; it does not replace this context's current process.
|
|
8
8
|
|
|
9
|
+
For local macOS `lldb`, `--stop-at-entry` launches stopped before normal program startup.
|
|
10
|
+
The response verifies a live `STOPPED` target and reports `stoppedAtEntry: true`. This is
|
|
11
|
+
useful for short programs: inspect/map/set breakpoints, then explicitly resume. Without the
|
|
12
|
+
flag, the existing immediate-run behavior is unchanged. Other offers reject this flag before
|
|
13
|
+
a CPU intent is reserved. An unknown stopped launch still requires ordinary request recovery.
|
|
14
|
+
|
|
9
15
|
Read `debugger status`, `modules`, `registers`, `stack-trace` and `traces`. Address conversion
|
|
10
16
|
uses `static-to-dynamic` and `dynamic-to-static`; memory and breakpoint commands take dynamic
|
|
11
17
|
addresses. Lists are paged. Read results identify the logical context and current trace, and
|
|
@@ -38,3 +44,19 @@ directory are Factory profile settings. Native Windows/Linux acceptance remains
|
|
|
38
44
|
|
|
39
45
|
Use generated help for exact flags. A retained static breakpoint bookmark may remain after its live trace placement is
|
|
40
46
|
removed; `trace_location_count` distinguishes current placements from that static metadata.
|
|
47
|
+
|
|
48
|
+
For a call observation, set the mapped function breakpoint **before** resuming from entry.
|
|
49
|
+
After the stop, check the PC against that address, then capture arguments and stack before
|
|
50
|
+
stepping. Step-out verifies return to the native caller in the same thread and stack;
|
|
51
|
+
return registers are observed without being modified. A competing stop or unavailable caller
|
|
52
|
+
does not count as a verified return. A requested step whose reply
|
|
53
|
+
or observed completion is unknown remains journaled; do not issue another CPU action to
|
|
54
|
+
try to recover a missing return. Retain its diagnostics and use request/status recovery.
|
|
55
|
+
|
|
56
|
+
For another intentional run, close and reopen the same owned context first: this disconnects
|
|
57
|
+
and retains the previous trace without relaunching it. Then launch with a distinct request ID
|
|
58
|
+
and desired arguments. A connected debugger remains busy even after its subject has exited;
|
|
59
|
+
selecting or reading its old trace is not a request to execute the subject again.
|
|
60
|
+
Map the new process and explicitly set/check its live breakpoints before each resume from
|
|
61
|
+
entry. Old static bookmarks do not establish new trace placements. Reopening restores each
|
|
62
|
+
trace's saved snap/thread, including inactive traces; choose its returned ID with `--trace`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Static .NET research
|
|
2
|
+
|
|
3
|
+
Use the project's preferred tools and evidence conventions. When ILSpy is appropriate,
|
|
4
|
+
`insight-cli ilspy install` prepares its pinned CLI and private .NET runtime; a global SDK
|
|
5
|
+
or dotnet installation is unnecessary. Lifecycle and archive options appear in `--help`.
|
|
6
|
+
The ILSpy and runtime distributions come from our pinned GitHub Releases. For offline
|
|
7
|
+
installation supply `--archive` and `--dotnet-archive`, or use an already verified cache.
|
|
8
|
+
`--executable` selects a compatible external ilspycmd; uninstall preserves its files.
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
insight-cli ilspy types ./client.dll --json
|
|
12
|
+
insight-cli ilspy decompile --target <returned-target> --type Example.Policy --output policy.cs --json
|
|
13
|
+
insight-cli ilspy il --target <target> --type Example.Policy --json
|
|
14
|
+
insight-cli ilspy resources --target <target> --json
|
|
15
|
+
insight-cli ilspy resource --target <target> --name Example.settings.json --output extracted --json
|
|
16
|
+
insight-cli ilspy project --target <target> --output recovered-project --json
|
|
17
|
+
insight-cli ilspy metadata --target <target> --table MethodDef --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use either an input file or an existing target. Reusing the target associates Ghidra and
|
|
21
|
+
ILSpy results with the same immutable bytes. No Ghidra context or merge is needed for a
|
|
22
|
+
stateless ILSpy read. An optional `--session` associates an existing session; it does not
|
|
23
|
+
create one. These calls require Update to capture input and run a tool.
|
|
24
|
+
|
|
25
|
+
Text responses include `content`, input SHA, process ID, elapsed time and diagnostic paths.
|
|
26
|
+
`--member` selects a metadata token or XML member ID for decompilation. Output paths must
|
|
27
|
+
be new: text operations create one ordinary file, project/resource operations create a
|
|
28
|
+
folder. Keep useful output in the project's chosen evidence location; `artifacts save`
|
|
29
|
+
is an optional explicit checkpoint. Static decompilation does not execute an assembly.
|
|
30
|
+
|
|
31
|
+
Use `tools processes --tool ilspy --all` for execution history and `tools processes show
|
|
32
|
+
<process-id>` for retained diagnostics. A failed or interrupted export can leave partial
|
|
33
|
+
files/staging; inspect them and choose a new output path for another intentional run.
|