@eyeauras/insight-cli 0.1.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.
Files changed (391) hide show
  1. package/.cli-package-build.json +1 -1
  2. package/README.md +33 -2
  3. package/SKILL.md +38 -51
  4. package/dist/src/administration-results.js +1 -1
  5. package/dist/src/administration.d.ts +1 -1
  6. package/dist/src/administration.js +16 -2
  7. package/dist/src/binary.d.ts +3 -0
  8. package/dist/src/binary.js +74 -0
  9. package/dist/src/capture.d.ts +3 -0
  10. package/dist/src/capture.js +220 -0
  11. package/dist/src/cli.js +91 -14
  12. package/dist/src/contexts.d.ts +5 -0
  13. package/dist/src/contexts.js +54 -18
  14. package/dist/src/debugger-caller.d.ts +17 -0
  15. package/dist/src/debugger-caller.js +129 -0
  16. package/dist/src/debugger-launch.d.ts +2 -0
  17. package/dist/src/debugger-launch.js +17 -0
  18. package/dist/src/debugger-results.d.ts +1 -0
  19. package/dist/src/debugger-results.js +8 -0
  20. package/dist/src/debugger-supervisor.js +56 -13
  21. package/dist/src/debugger.js +16 -7
  22. package/dist/src/die.d.ts +12 -0
  23. package/dist/src/die.js +127 -0
  24. package/dist/src/dnspy-runtime.d.ts +8 -0
  25. package/dist/src/dnspy-runtime.js +46 -0
  26. package/dist/src/dnspy.d.ts +22 -0
  27. package/dist/src/dnspy.js +160 -0
  28. package/dist/src/dotnet-diagnostics.d.ts +13 -0
  29. package/dist/src/dotnet-diagnostics.js +101 -0
  30. package/dist/src/frida-worker.d.ts +1 -0
  31. package/dist/src/frida-worker.js +125 -0
  32. package/dist/src/frida.d.ts +16 -0
  33. package/dist/src/frida.js +125 -0
  34. package/dist/src/ghidra-debugger-runtime.d.ts +7 -0
  35. package/dist/src/ghidra-debugger-runtime.js +31 -0
  36. package/dist/src/ghidra-processes.d.ts +6 -0
  37. package/dist/src/ghidra-processes.js +121 -0
  38. package/dist/src/ghidra.js +6 -6
  39. package/dist/src/ilspy.d.ts +7 -0
  40. package/dist/src/ilspy.js +122 -0
  41. package/dist/src/lifecycle.d.ts +1 -1
  42. package/dist/src/lifecycle.js +8 -2
  43. package/dist/src/lldb.d.ts +10 -0
  44. package/dist/src/lldb.js +99 -0
  45. package/dist/src/llvm.d.ts +6 -0
  46. package/dist/src/llvm.js +133 -0
  47. package/dist/src/managed-heap.d.ts +4 -0
  48. package/dist/src/managed-heap.js +73 -0
  49. package/dist/src/managed-metadata.d.ts +11 -0
  50. package/dist/src/managed-metadata.js +66 -0
  51. package/dist/src/mitmproxy.d.ts +55 -0
  52. package/dist/src/mitmproxy.js +172 -0
  53. package/dist/src/native-inputs.d.ts +3 -2
  54. package/dist/src/native-inputs.js +21 -5
  55. package/dist/src/package-version.d.ts +1 -0
  56. package/dist/src/package-version.js +3 -0
  57. package/dist/src/procmon-config.d.ts +2 -0
  58. package/dist/src/procmon-config.js +15 -0
  59. package/dist/src/procmon-events.d.ts +13 -0
  60. package/dist/src/procmon-events.js +82 -0
  61. package/dist/src/procmon.d.ts +4 -0
  62. package/dist/src/procmon.js +107 -0
  63. package/dist/src/research.d.ts +11 -2
  64. package/dist/src/research.js +5 -3
  65. package/dist/src/runtime-catalog.d.ts +13 -0
  66. package/dist/src/runtime-catalog.js +26 -0
  67. package/dist/src/runtime-manager.d.ts +125 -0
  68. package/dist/src/runtime-manager.js +385 -0
  69. package/dist/src/runtime-selection.d.ts +13 -0
  70. package/dist/src/runtime-selection.js +42 -0
  71. package/dist/src/server.d.ts +15 -0
  72. package/dist/src/server.js +77 -96
  73. package/dist/src/sevenzip.d.ts +15 -0
  74. package/dist/src/sevenzip.js +119 -0
  75. package/dist/src/strace.d.ts +10 -0
  76. package/dist/src/strace.js +71 -0
  77. package/dist/src/text-window.d.ts +11 -0
  78. package/dist/src/text-window.js +6 -0
  79. package/dist/src/tool-runtime/archives.d.ts +10 -0
  80. package/dist/src/tool-runtime/archives.js +194 -0
  81. package/dist/src/tool-runtime/catalog.d.ts +3 -0
  82. package/dist/src/tool-runtime/catalog.js +13 -0
  83. package/dist/src/tool-runtime/commands.d.ts +9 -0
  84. package/dist/src/tool-runtime/commands.js +39 -0
  85. package/dist/src/tool-runtime/deadline.d.ts +11 -0
  86. package/dist/src/tool-runtime/deadline.js +32 -0
  87. package/dist/src/tool-runtime/definition.d.ts +73 -0
  88. package/dist/src/tool-runtime/definition.js +49 -0
  89. package/dist/src/tool-runtime/dotnet.d.ts +4 -0
  90. package/dist/src/tool-runtime/dotnet.js +22 -0
  91. package/dist/src/tool-runtime/identity.d.ts +6 -0
  92. package/dist/src/tool-runtime/identity.js +50 -0
  93. package/dist/src/tool-runtime/installer.d.ts +101 -0
  94. package/dist/src/tool-runtime/installer.js +180 -0
  95. package/dist/src/tool-runtime/launch-worker.d.ts +1 -0
  96. package/dist/src/tool-runtime/launch-worker.js +58 -0
  97. package/dist/src/tool-runtime/run.d.ts +51 -0
  98. package/dist/src/tool-runtime/run.js +159 -0
  99. package/dist/src/tool-runtime/store.d.ts +15 -0
  100. package/dist/src/tool-runtime/store.js +219 -0
  101. package/dist/src/tool-runtime/supervisor.d.ts +57 -0
  102. package/dist/src/tool-runtime/supervisor.js +266 -0
  103. package/dist/src/tool-runtime/windows-job.d.ts +22 -0
  104. package/dist/src/tool-runtime/windows-job.js +43 -0
  105. package/dist/src/toolbox.d.ts +84 -0
  106. package/dist/src/toolbox.js +35 -0
  107. package/dist/src/tshark.d.ts +23 -0
  108. package/dist/src/tshark.js +174 -0
  109. package/dist/src/windbg.d.ts +14 -0
  110. package/dist/src/windbg.js +119 -0
  111. package/dist/src/workspace.d.ts +1 -0
  112. package/dist/src/workspace.js +6 -0
  113. package/package.json +7 -4
  114. package/references/administration.md +2 -1
  115. package/references/agent-execution.md +36 -0
  116. package/references/agent-setup.md +61 -0
  117. package/references/artifacts.md +5 -0
  118. package/references/debugger.md +22 -0
  119. package/references/ilspy.md +33 -0
  120. package/references/managed-runtime.md +157 -0
  121. package/references/native/InsightPythonWheels.java +283 -2
  122. package/references/native/InsightRuntimeDoctor.java +33 -0
  123. package/references/native/InsightTraceState.java +28 -13
  124. package/references/setup.md +6 -3
  125. package/runtime/managed/insight-heap/Azure.Core.dll +0 -0
  126. package/runtime/managed/insight-heap/Azure.Identity.dll +0 -0
  127. package/runtime/managed/insight-heap/Insight.Heap.csproj +1 -0
  128. package/runtime/managed/insight-heap/Insight.Heap.deps.json +391 -0
  129. package/runtime/managed/insight-heap/Insight.Heap.dll +0 -0
  130. package/runtime/managed/insight-heap/Insight.Heap.runtimeconfig.json +13 -0
  131. package/runtime/managed/insight-heap/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  132. package/runtime/managed/insight-heap/Microsoft.Diagnostics.NETCore.Client.dll +0 -0
  133. package/runtime/managed/insight-heap/Microsoft.Diagnostics.Runtime.dll +0 -0
  134. package/runtime/managed/insight-heap/Microsoft.Extensions.Configuration.Abstractions.dll +0 -0
  135. package/runtime/managed/insight-heap/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
  136. package/runtime/managed/insight-heap/Microsoft.Extensions.Diagnostics.Abstractions.dll +0 -0
  137. package/runtime/managed/insight-heap/Microsoft.Extensions.FileProviders.Abstractions.dll +0 -0
  138. package/runtime/managed/insight-heap/Microsoft.Extensions.Hosting.Abstractions.dll +0 -0
  139. package/runtime/managed/insight-heap/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
  140. package/runtime/managed/insight-heap/Microsoft.Extensions.Options.dll +0 -0
  141. package/runtime/managed/insight-heap/Microsoft.Extensions.Primitives.dll +0 -0
  142. package/runtime/managed/insight-heap/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  143. package/runtime/managed/insight-heap/Microsoft.Identity.Client.dll +0 -0
  144. package/runtime/managed/insight-heap/Microsoft.IdentityModel.Abstractions.dll +0 -0
  145. package/runtime/managed/insight-heap/Microsoft.Security.AntiSSRF.dll +0 -0
  146. package/runtime/managed/insight-heap/NuGet.Config +1 -0
  147. package/runtime/managed/insight-heap/Program.cs +20 -0
  148. package/runtime/managed/insight-heap/README.md +16 -0
  149. package/runtime/managed/insight-heap/System.ClientModel.dll +0 -0
  150. package/runtime/managed/insight-heap/System.Memory.Data.dll +0 -0
  151. package/runtime/managed/insight-heap/System.Security.Cryptography.ProtectedData.dll +0 -0
  152. package/runtime/managed/insight-heap/dependencies.json +436 -0
  153. package/runtime/managed/insight-heap/notices/Azure.Core-LICENSE.txt +21 -0
  154. package/runtime/managed/insight-heap/notices/Azure.Identity-LICENSE.txt +21 -0
  155. package/runtime/managed/insight-heap/notices/Microsoft.Bcl.AsyncInterfaces-LICENSE.txt +23 -0
  156. package/runtime/managed/insight-heap/notices/Microsoft.Bcl.AsyncInterfaces-THIRD-PARTY-NOTICES.TXT +1418 -0
  157. package/runtime/managed/insight-heap/notices/Microsoft.Diagnostics.NETCore.Client-LICENSE.txt +23 -0
  158. package/runtime/managed/insight-heap/notices/Microsoft.Diagnostics.Runtime-LICENSE.txt +23 -0
  159. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Configuration.Abstractions-LICENSE.txt +23 -0
  160. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Configuration.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  161. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.DependencyInjection.Abstractions-LICENSE.txt +23 -0
  162. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.DependencyInjection.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  163. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Diagnostics.Abstractions-LICENSE.txt +23 -0
  164. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Diagnostics.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  165. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.FileProviders.Abstractions-LICENSE.txt +23 -0
  166. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.FileProviders.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  167. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Hosting.Abstractions-LICENSE.txt +23 -0
  168. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Hosting.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  169. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Logging.Abstractions-LICENSE.txt +23 -0
  170. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Logging.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  171. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Options-LICENSE.txt +23 -0
  172. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Options-THIRD-PARTY-NOTICES.TXT +1418 -0
  173. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Primitives-LICENSE.txt +23 -0
  174. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Primitives-THIRD-PARTY-NOTICES.TXT +1418 -0
  175. package/runtime/managed/insight-heap/notices/Microsoft.Identity.Client-LICENSE.txt +21 -0
  176. package/runtime/managed/insight-heap/notices/Microsoft.Identity.Client.Extensions.Msal-LICENSE.txt +21 -0
  177. package/runtime/managed/insight-heap/notices/Microsoft.IdentityModel.Abstractions-LICENSE.txt +21 -0
  178. package/runtime/managed/insight-heap/notices/Microsoft.Security.AntiSSRF-LICENSE.txt +21 -0
  179. package/runtime/managed/insight-heap/notices/System.ClientModel-LICENSE.txt +21 -0
  180. package/runtime/managed/insight-heap/notices/System.Memory.Data-LICENSE.txt +23 -0
  181. package/runtime/managed/insight-heap/notices/System.Memory.Data-THIRD-PARTY-NOTICES.TXT +1418 -0
  182. package/runtime/managed/insight-heap/notices/System.Security.Cryptography.ProtectedData-LICENSE.TXT +23 -0
  183. package/runtime/managed/insight-heap/notices/System.Security.Cryptography.ProtectedData-THIRD-PARTY-NOTICES.TXT +309 -0
  184. package/runtime/managed/insight-heap/packages.lock.json +165 -0
  185. package/runtime/managed/insight-heap/provenance.json +146 -0
  186. package/runtime/managed/insight-heap/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll +0 -0
  187. package/runtime/managed/insight-managed/Insight.Managed.csproj +4 -0
  188. package/runtime/managed/insight-managed/Insight.Managed.deps.json +41 -0
  189. package/runtime/managed/insight-managed/Insight.Managed.dll +0 -0
  190. package/runtime/managed/insight-managed/Insight.Managed.runtimeconfig.json +13 -0
  191. package/runtime/managed/insight-managed/LICENSE.dnlib.txt +20 -0
  192. package/runtime/managed/insight-managed/NuGet.Config +1 -0
  193. package/runtime/managed/insight-managed/Program.cs +31 -0
  194. package/runtime/managed/insight-managed/README.md +16 -0
  195. package/runtime/managed/insight-managed/dnlib.dll +0 -0
  196. package/runtime/managed/insight-managed/packages.lock.json +13 -0
  197. package/runtime/managed/insight-managed/provenance.json +40 -0
  198. package/runtime/native/binary/README.md +22 -0
  199. package/runtime/native/binary/dependencies.json +166 -0
  200. package/runtime/native/binary/helper.cpp +44 -0
  201. package/runtime/native/binary/insight-binary-darwin-arm64 +0 -0
  202. package/runtime/native/binary/notices/Catch2-3.12.0--Catch2-3.12.0__LICENSE.txt +23 -0
  203. package/runtime/native/binary/notices/LIEF-LICENSE.txt +202 -0
  204. package/runtime/native/binary/notices/LIEF-attribution.txt +37 -0
  205. package/runtime/native/binary/notices/Melkor_ELF_Fuzzer-ac2495b--elf_fuzzer-master__LICENSE.txt +674 -0
  206. package/runtime/native/binary/notices/expected-1.3.1--expected-1.3.1__COPYING +121 -0
  207. package/runtime/native/binary/notices/frozen-61dce5a--frozen-61dce5ae18ca59931e27675c468e64118aba8744__AUTHORS +3 -0
  208. package/runtime/native/binary/notices/frozen-61dce5a--frozen-61dce5ae18ca59931e27675c468e64118aba8744__LICENSE +202 -0
  209. package/runtime/native/binary/notices/json-LICENSE.MIT +21 -0
  210. package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--LICENSE +553 -0
  211. package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--framework__LICENSE +553 -0
  212. package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--tf-psa-crypto__LICENSE +552 -0
  213. package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--tf-psa-crypto__framework__LICENSE +553 -0
  214. package/runtime/native/binary/notices/nanobind-2.13.0.r18.g4db9ed3f--LICENSE +26 -0
  215. package/runtime/native/binary/notices/nanobind-2.13.0.r18.g4db9ed3f--ext__robin_map__LICENSE +21 -0
  216. package/runtime/native/binary/notices/span-LICENSE_1_0.txt +23 -0
  217. package/runtime/native/binary/notices/span-attribution.txt +11 -0
  218. package/runtime/native/binary/notices/spdlog-1.17.0--spdlog-1.17.0__LICENSE +25 -0
  219. package/runtime/native/binary/notices/utfcpp-4.0.9--utfcpp-4.0.9__LICENSE +23 -0
  220. package/runtime/native/binary/provenance.json +48 -0
  221. package/runtime/native/child-deadline-linux-x64 +0 -0
  222. package/runtime/native/child-deadline-linux.c +24 -0
  223. package/runtime/native/child-deadline-linux.provenance.json +17 -0
  224. package/runtime/native/deadline-alarm-darwin-universal.dylib +0 -0
  225. package/runtime/native/deadline-alarm.c +33 -0
  226. package/runtime/native/deadline-alarm.provenance.json +22 -0
  227. package/runtime/native/deadline-exec-darwin-arm64 +0 -0
  228. package/runtime/native/deadline-exec.c +24 -0
  229. package/runtime/native/deadline-exec.provenance.json +17 -0
  230. package/runtime/native/dnspy-extension/Bridge.cs +58 -0
  231. package/runtime/native/dnspy-extension/Insight.DnSpy.csproj +13 -0
  232. package/runtime/native/dnspy-extension/Insight.DnSpy.x.dll +0 -0
  233. package/runtime/native/dnspy-extension/NuGet.Config +1 -0
  234. package/runtime/native/dnspy-extension/UNICODE-LOADER.md +26 -0
  235. package/runtime/native/dnspy-extension/packages.lock.json +6 -0
  236. package/runtime/native/dnspy-extension/provenance.json +27 -0
  237. package/runtime/native/dnspy-extension/upstream-public-build.snk +0 -0
  238. package/runtime/native/dnspy-extension/vendor-files.json +4341 -0
  239. package/runtime/native/file-version.ps1 +7 -0
  240. package/runtime/native/insight-registry-win-x64.dll +0 -0
  241. package/runtime/native/mitmproxy/bridge.py +180 -0
  242. package/runtime/native/mitmproxy/notices.json +476 -0
  243. package/runtime/native/sources/detours-LICENSE.md +23 -0
  244. package/runtime/native/sources/detours-e4bfd6b.tar.gz +0 -0
  245. package/runtime/native/sources/detours-provenance.json +10 -0
  246. package/runtime/native/tshark-layout.json +2247 -0
  247. package/runtime/native/windows-job/DirectoryAlias.cs +24 -0
  248. package/runtime/native/windows-job/Insight.WindowsJob.csproj +1 -0
  249. package/runtime/native/windows-job/Insight.WindowsJob.dll +0 -0
  250. package/runtime/native/windows-job/NuGet.Config +1 -0
  251. package/runtime/native/windows-job/OwnedJob.cs +79 -0
  252. package/runtime/native/windows-job/RegistryRedirect.cs +45 -0
  253. package/runtime/native/windows-job/packages.lock.json +21 -0
  254. package/runtime/native/windows-job/provenance.json +16 -0
  255. package/runtime/native/windows-job/windows-job.ps1 +8 -0
  256. package/runtime/native/windows-registry.c +21 -0
  257. package/runtime/native/windows-registry.def +3 -0
  258. package/runtime/native/windows-registry.provenance.json +14 -0
  259. package/runtime/notices/diagnostics-10.0.750501.txt +23 -0
  260. package/runtime/tool-catalog.json +290 -0
  261. package/runtime/toolbox.json +1401 -0
  262. package/skill-bundle/insight-artifacts/SKILL.md +30 -0
  263. package/skill-bundle/insight-artifacts/references/agent-execution.md +36 -0
  264. package/skill-bundle/insight-artifacts/references/artifacts.md +52 -0
  265. package/skill-bundle/insight-binary/SKILL.md +46 -0
  266. package/skill-bundle/insight-binary/references/agent-execution.md +36 -0
  267. package/skill-bundle/insight-capture/SKILL.md +56 -0
  268. package/skill-bundle/insight-capture/references/agent-execution.md +36 -0
  269. package/skill-bundle/insight-cli/SKILL.md +42 -0
  270. package/skill-bundle/insight-cli/references/agent-execution.md +36 -0
  271. package/skill-bundle/insight-cli/references/agent-setup.md +61 -0
  272. package/skill-bundle/insight-die/SKILL.md +49 -0
  273. package/skill-bundle/insight-die/references/agent-execution.md +36 -0
  274. package/skill-bundle/insight-dnspy/SKILL.md +65 -0
  275. package/skill-bundle/insight-dnspy/references/agent-execution.md +36 -0
  276. package/skill-bundle/insight-dotnet-dump/SKILL.md +46 -0
  277. package/skill-bundle/insight-dotnet-dump/references/agent-execution.md +36 -0
  278. package/skill-bundle/insight-dotnet-stack/SKILL.md +39 -0
  279. package/skill-bundle/insight-dotnet-stack/references/agent-execution.md +36 -0
  280. package/skill-bundle/insight-dotnet-trace/SKILL.md +45 -0
  281. package/skill-bundle/insight-dotnet-trace/references/agent-execution.md +36 -0
  282. package/skill-bundle/insight-frida/SKILL.md +67 -0
  283. package/skill-bundle/insight-frida/references/agent-execution.md +36 -0
  284. package/skill-bundle/insight-ghidra/SKILL.md +91 -0
  285. package/skill-bundle/insight-ghidra/references/administration.md +34 -0
  286. package/skill-bundle/insight-ghidra/references/agent-execution.md +36 -0
  287. package/skill-bundle/insight-ghidra/references/archive.md +32 -0
  288. package/skill-bundle/insight-ghidra/references/artifacts.md +52 -0
  289. package/skill-bundle/insight-ghidra/references/debugger.md +62 -0
  290. package/skill-bundle/insight-ghidra/references/extensions-and-sync.md +124 -0
  291. package/skill-bundle/insight-ghidra/references/managed-runtime.md +157 -0
  292. package/skill-bundle/insight-ghidra/references/native-workflows.md +112 -0
  293. package/skill-bundle/insight-ghidra/references/query-semantics.md +96 -0
  294. package/skill-bundle/insight-ghidra/references/recovery.md +53 -0
  295. package/skill-bundle/insight-ghidra/references/research.md +101 -0
  296. package/skill-bundle/insight-ghidra/references/setup.md +50 -0
  297. package/skill-bundle/insight-ilspy/SKILL.md +45 -0
  298. package/skill-bundle/insight-ilspy/references/agent-execution.md +36 -0
  299. package/skill-bundle/insight-ilspy/references/ilspy.md +33 -0
  300. package/skill-bundle/insight-interop/SKILL.md +54 -0
  301. package/skill-bundle/insight-interop/references/agent-execution.md +36 -0
  302. package/skill-bundle/insight-lldb/SKILL.md +54 -0
  303. package/skill-bundle/insight-lldb/references/agent-execution.md +36 -0
  304. package/skill-bundle/insight-llvm/SKILL.md +56 -0
  305. package/skill-bundle/insight-llvm/references/agent-execution.md +36 -0
  306. package/skill-bundle/insight-managed-heap/SKILL.md +43 -0
  307. package/skill-bundle/insight-managed-heap/references/agent-execution.md +36 -0
  308. package/skill-bundle/insight-managed-metadata/SKILL.md +52 -0
  309. package/skill-bundle/insight-managed-metadata/references/agent-execution.md +36 -0
  310. package/skill-bundle/insight-mitmproxy/SKILL.md +62 -0
  311. package/skill-bundle/insight-mitmproxy/references/agent-execution.md +36 -0
  312. package/skill-bundle/insight-overview/SKILL.md +79 -0
  313. package/skill-bundle/insight-overview/references/agent-execution.md +36 -0
  314. package/skill-bundle/insight-procmon/SKILL.md +49 -0
  315. package/skill-bundle/insight-procmon/references/agent-execution.md +36 -0
  316. package/skill-bundle/insight-re/SKILL.md +121 -0
  317. package/skill-bundle/insight-re/references/agent-execution.md +36 -0
  318. package/skill-bundle/insight-re/references/artifacts.md +52 -0
  319. package/skill-bundle/insight-re/references/recovery.md +53 -0
  320. package/skill-bundle/insight-sevenzip/SKILL.md +42 -0
  321. package/skill-bundle/insight-sevenzip/references/agent-execution.md +36 -0
  322. package/skill-bundle/insight-strace/SKILL.md +46 -0
  323. package/skill-bundle/insight-strace/references/agent-execution.md +36 -0
  324. package/skill-bundle/insight-tshark/SKILL.md +49 -0
  325. package/skill-bundle/insight-tshark/references/agent-execution.md +36 -0
  326. package/skill-bundle/insight-windbg/SKILL.md +46 -0
  327. package/skill-bundle/insight-windbg/references/agent-execution.md +36 -0
  328. package/skill-bundle/manifest.json +32 -0
  329. package/skills/insight-artifacts/SKILL.md +30 -0
  330. package/skills/insight-artifacts/references/agent-execution.md +36 -0
  331. package/skills/insight-artifacts/references/artifacts.md +52 -0
  332. package/skills/insight-binary/SKILL.md +46 -0
  333. package/skills/insight-binary/references/agent-execution.md +36 -0
  334. package/skills/insight-capture/SKILL.md +56 -0
  335. package/skills/insight-capture/references/agent-execution.md +36 -0
  336. package/skills/insight-die/SKILL.md +49 -0
  337. package/skills/insight-die/references/agent-execution.md +36 -0
  338. package/skills/insight-dnspy/SKILL.md +65 -0
  339. package/skills/insight-dnspy/references/agent-execution.md +36 -0
  340. package/skills/insight-dotnet-dump/SKILL.md +46 -0
  341. package/skills/insight-dotnet-dump/references/agent-execution.md +36 -0
  342. package/skills/insight-dotnet-stack/SKILL.md +39 -0
  343. package/skills/insight-dotnet-stack/references/agent-execution.md +36 -0
  344. package/skills/insight-dotnet-trace/SKILL.md +45 -0
  345. package/skills/insight-dotnet-trace/references/agent-execution.md +36 -0
  346. package/skills/insight-frida/SKILL.md +67 -0
  347. package/skills/insight-frida/references/agent-execution.md +36 -0
  348. package/skills/insight-ghidra/SKILL.md +91 -0
  349. package/skills/insight-ghidra/references/administration.md +34 -0
  350. package/skills/insight-ghidra/references/agent-execution.md +36 -0
  351. package/skills/insight-ghidra/references/archive.md +32 -0
  352. package/skills/insight-ghidra/references/artifacts.md +52 -0
  353. package/skills/insight-ghidra/references/debugger.md +62 -0
  354. package/skills/insight-ghidra/references/extensions-and-sync.md +124 -0
  355. package/skills/insight-ghidra/references/managed-runtime.md +157 -0
  356. package/skills/insight-ghidra/references/native-workflows.md +112 -0
  357. package/skills/insight-ghidra/references/query-semantics.md +96 -0
  358. package/skills/insight-ghidra/references/recovery.md +53 -0
  359. package/skills/insight-ghidra/references/research.md +101 -0
  360. package/skills/insight-ghidra/references/setup.md +50 -0
  361. package/skills/insight-ilspy/SKILL.md +45 -0
  362. package/skills/insight-ilspy/references/agent-execution.md +36 -0
  363. package/skills/insight-ilspy/references/ilspy.md +33 -0
  364. package/skills/insight-interop/SKILL.md +54 -0
  365. package/skills/insight-interop/references/agent-execution.md +36 -0
  366. package/skills/insight-lldb/SKILL.md +54 -0
  367. package/skills/insight-lldb/references/agent-execution.md +36 -0
  368. package/skills/insight-llvm/SKILL.md +56 -0
  369. package/skills/insight-llvm/references/agent-execution.md +36 -0
  370. package/skills/insight-managed-heap/SKILL.md +43 -0
  371. package/skills/insight-managed-heap/references/agent-execution.md +36 -0
  372. package/skills/insight-managed-metadata/SKILL.md +52 -0
  373. package/skills/insight-managed-metadata/references/agent-execution.md +36 -0
  374. package/skills/insight-mitmproxy/SKILL.md +62 -0
  375. package/skills/insight-mitmproxy/references/agent-execution.md +36 -0
  376. package/skills/insight-overview/SKILL.md +79 -0
  377. package/skills/insight-overview/references/agent-execution.md +36 -0
  378. package/skills/insight-procmon/SKILL.md +49 -0
  379. package/skills/insight-procmon/references/agent-execution.md +36 -0
  380. package/skills/insight-re/SKILL.md +22 -9
  381. package/skills/insight-re/references/agent-execution.md +36 -0
  382. package/skills/insight-re/references/artifacts.md +52 -0
  383. package/skills/insight-re/references/recovery.md +53 -0
  384. package/skills/insight-sevenzip/SKILL.md +42 -0
  385. package/skills/insight-sevenzip/references/agent-execution.md +36 -0
  386. package/skills/insight-strace/SKILL.md +46 -0
  387. package/skills/insight-strace/references/agent-execution.md +36 -0
  388. package/skills/insight-tshark/SKILL.md +49 -0
  389. package/skills/insight-tshark/references/agent-execution.md +36 -0
  390. package/skills/insight-windbg/SKILL.md +46 -0
  391. package/skills/insight-windbg/references/agent-execution.md +36 -0
@@ -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.
@@ -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;
@@ -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.
@@ -0,0 +1,157 @@
1
+ # Managed Ghidra runtime
2
+
3
+ Use `ghidra install` for a complete compatible installation. Node 24+ is the bootstrap dependency;
4
+ no existing Java, Ghidra, Homebrew, Gradle, compiler or Python MCP bridge is required. Factory
5
+ profiles, permissions and OS secret storage remain in use. Follow the project's tool rules when
6
+ it specifies an external installation or server.
7
+
8
+ ```sh
9
+ insight-cli profile create local
10
+ insight-cli --profile local permissions grant Update
11
+ insight-cli --profile local ghidra install
12
+ insight-cli --profile local ghidra status
13
+ insight-cli --profile local ghidra open ./client.exe --session new --json
14
+ ```
15
+
16
+ `download` caches the complete pinned Ghidra/JDK archives, without selecting or starting a runtime.
17
+ `install` uses that cache or downloads missing archives, unpacks to a new stage, checks JDK 21 and
18
+ Ghidra 12.1.2, decompiles a known x86 function and starts a disposable local Ghidra Server. The
19
+ server probe authenticates its identity and reader/publisher permissions. Selection changes only
20
+ after all checks pass. The bridge and helper sources come from the version-matched npm package.
21
+ A failed install preserves its stage/diagnostics and the old selection. Retrying uses a fresh stage;
22
+ completed cached archives are reused. A later install/doctor/uninstall authenticates and stops
23
+ any leftover disposable probe server before proceeding; an unverified live identity blocks recovery. Interrupted partial downloads are never used as complete files.
24
+
25
+ `status` without scope is passive: selection, paths, missing components, installations, retained
26
+ stages, recorded checks and live process receipts. It works before installation. It does not start
27
+ Java or create a research workspace. `status --session S --target T` retains the scoped live health
28
+ check. `server status` also works without an installed runtime and explains missing prerequisites.
29
+ `doctor` explicitly runs disposable native decompiler/server probes and checks macOS LLDB Python.
30
+ It never imports a research target or publishes research changes. Readiness recorded by a doctor
31
+ run includes its runtime fingerprint; status identifies whether that record matches the selection.
32
+
33
+ ## Local archives and external installations
34
+
35
+ ```sh
36
+ insight-cli --profile local ghidra download
37
+ insight-cli --profile local ghidra install --offline
38
+ insight-cli --profile local ghidra install --archive ./ghidra.zip
39
+ insight-cli --profile local ghidra install --archive ./ghidra.zip \
40
+ --java-archive ./jdk.tar.gz --debugger-archive ./lldb-python.tar.gz --offline
41
+ insight-cli --profile local ghidra install --executable /tools/ghidra/ghidraRun
42
+ insight-cli --profile local ghidra install --executable /tools/ghidra \
43
+ --java /tools/jdk/bin/java --debugger-archive ./lldb-python.tar.gz --offline
44
+ ```
45
+
46
+ `--executable` accepts the actual Ghidra launcher (`ghidraRun[.bat]`, or
47
+ `support/analyzeHeadless[.bat]`) or installation directory. It needs the complete compatible
48
+ installation, including host native components. A target EXE is not a Ghidra launcher.
49
+ Common Homebrew launcher wrappers are resolved through the adjacent complete `libexec` tree.
50
+ The external Ghidra tree is never modified or deleted. Java is delivered automatically unless
51
+ `--java` or `--java-archive` is supplied. Legacy profile `java`/`ghidraHome` configuration still works
52
+ when no explicit selection exists; an explicit selection takes precedence and never silently
53
+ falls back to profile paths after failure or uninstall.
54
+
55
+ Local archives are caller-selected inputs, consumed into owned hash-addressed copies before
56
+ extraction so later source edits cannot change the installed bytes. Optional `--archive-sha256` and
57
+ `--java-archive-sha256` and `--debugger-archive-sha256` check the expected bytes; the actual digests are recorded in the installation
58
+ identity. `--offline` prohibits network acquisition: provide/cache every required archive. On macOS,
59
+ an official Ghidra zip also needs the pinned prebuilt native archive in cache. The managed macOS
60
+ distribution already includes these natives. Executable modes are preserved; paths, links and
61
+ expanded sizes are checked during portable Node extraction. Downloads use exact assets retained
62
+ in `iXab3r/insight-cli` GitHub Releases, with hashes and sizes pinned in the installed package.
63
+ There is no runtime upstream/latest fallback; supplied archives and verified cache support offline use.
64
+ No external unzip, tar or Python executable is needed for extraction.
65
+
66
+ ## Server, process and data ownership
67
+
68
+ The Ghidra distribution includes Ghidra Server. It uses the selected JDK and immutable tool code;
69
+ its repository, certificates, credentials and process settings are separate profile data.
70
+ Ordinary `open` starts it automatically. `server start` explicitly starts/enables it, and
71
+ `server stop` stops the identified owned server after all contexts are closed. It refuses to stop
72
+ a server under live clients. A later open can start it again; explicit `disconnect` disables shared
73
+ operations until `connect`/`start`. `server connect/disconnect` retain their connection-management API.
74
+ An external server remains configured through profile server/repository/account fields and Factory
75
+ secrets; `server stop` cannot stop that external service.
76
+
77
+ Code/cache/installation receipts live under profile AppData `runtime/`; research remains under
78
+ `workspace/`, and saved files under `materials/`. One selected immutable installation serves many
79
+ isolated JVM contexts; each has its own projects, home, settings, cache/temp and authenticated
80
+ endpoint. No per-agent copy of the Ghidra code distribution is required. This is process and data
81
+ isolation; it does not restrict arbitrary user scripts to an OS security sandbox.
82
+
83
+ Close scoped contexts and stop the owned server before selecting/reinstalling/removing a runtime.
84
+ A live receipt conservatively blocks these operations; it never authorizes killing a PID.
85
+ Download and doctor can run without switching the current runtime. Runtime commands serialize
86
+ within the Factory owner. Changing a selected runtime invalidates cached backend handles, without
87
+ removing saved research. There is no automatic version migration or floating upstream upgrade.
88
+
89
+ ```sh
90
+ insight-cli --profile local ghidra close --session S --target T
91
+ insight-cli --profile local ghidra server stop
92
+ insight-cli --profile local permissions grant Destructive
93
+ insight-cli --profile local ghidra uninstall
94
+ # Optional cache deletion; research and external installations remain preserved:
95
+ insight-cli --profile local ghidra uninstall --purge-cache
96
+ ```
97
+
98
+ Uninstall removes only selected owned installation files. It preserves the selection as an
99
+ uninstalled receipt, so later research reports a missing runtime instead of changing bindings.
100
+ Archives remain reusable unless `--purge-cache` is selected. It removes recorded archives for
101
+ this installation, preserving other tools' cache and unrecorded legacy entries. Reinstalling the same archives restores
102
+ the same runtime identity. Sessions, private snapshots, unresolved publication journals, server
103
+ repositories and artifacts survive. Uninstall does not resolve an uncertain merge or replay it.
104
+
105
+ ## Process inventory and recovery
106
+
107
+ ```sh
108
+ insight-cli --profile local tools processes --tool ghidra
109
+ insight-cli --profile local tools processes show <process-id>
110
+ insight-cli --profile local tools processes stop <process-id>
111
+ insight-cli --profile local tools processes kill <process-id>
112
+ ```
113
+
114
+ These IDs describe executions, not new research selectors. Context records include the existing
115
+ session/target; server, GUI, debugger and helper roles remain separate. `stop` saves a selected
116
+ Ghidra context through its ordinary close path. Stopping a server requires closed contexts.
117
+ `kill` requires Destructive and explicitly interrupts verified owned work; it does not prove a
118
+ merge/save completed. Live debugger cleanup goes through the owning GUI so inferior termination
119
+ can be verified. Research and unknown journals are retained.
120
+
121
+ After an owner crash, inventory reconnects to authenticated owned endpoints without re-executing
122
+ research. macOS process birth times alone cannot prove recovered ownership; an ambiguous process
123
+ stays `unverified` and is not signalled. Original child handles and authenticated tool identities
124
+ provide the supported stop/kill authority. This is lifecycle management, not an OS security sandbox.
125
+
126
+ ## Sources and host boundary
127
+
128
+ The catalog pins Ghidra 12.1.2 and Temurin JDK 21.0.11+10. macOS uses public Homebrew-built Ghidra
129
+ bottles with native components (macOS 14+, ARM64 or x64); no installed Homebrew is used. Linux x64
130
+ and Windows x64 use the official Ghidra zip and Temurin archive. The installed `runtime/tool-catalog.json` pins mirror assets; repository
131
+ `scripts/tool-distributions/` recipes retain upstream provenance. Published tool releases include
132
+ original licenses/notices and required source/build companions, independent of CLI releases.
133
+ Unsupported platforms fail explicitly and may use compatible external profile paths. Native
134
+ acceptance for this delivery is macOS ARM64; catalog availability is not Windows/Linux native proof.
135
+
136
+ The host provides Node/npm, OS frameworks, display/keychain access and debugger authorization.
137
+ macOS LLDB and its embedded Python come from Apple's developer tools; they are OS prerequisites,
138
+ not downloaded third-party Python dependencies. `doctor` reports a missing host debugger as a partial
139
+ failure even when static analysis/server pass. No root installation, developer-tools installer,
140
+ Gatekeeper disabling, shell-profile edit or global Java/Python selection is performed. Ghidra GUI
141
+ agents receive private copies of the Ghidra SDK's pinned debugger Python wheels.
142
+
143
+ ## Managed debugger dependency
144
+
145
+ On macOS 15+ ARM64, download/install also prepares pinned LLDB 23.1.3 with its own
146
+ Python 3.15 and native library closure. It is a private Ghidra dependency; the separate
147
+ `insight-cli lldb` application retains its own installation. `--debugger-archive` supplies
148
+ the exact pinned debugger archive for offline installation, including an external Ghidra
149
+ selection. Status reports this dependency and doctor probes its actual Python interpreter.
150
+ GUI startup prepares it for legacy profiles as needed. The backend does not use Homebrew
151
+ or Python from Apple developer tools. OS debugger authorization is still a host prerequisite.
152
+
153
+ A GUI context pins the verified debugger receipt. Its supervisor verifies those code and
154
+ library bytes again before launching LLDB. Close contexts and stop the local server before
155
+ changing/removing the Ghidra runtime; uninstall removes this owned dependency while retaining
156
+ research and external installations. Existing running GUI contexts must be closed/reopened
157
+ to adopt a different backend. Other host debugger profiles retain their declared host requirements.
@@ -19,13 +19,294 @@ class InsightPythonWheels {
19
19
  }
20
20
  }
21
21
  }
22
+ // Never wait for remote futures while holding the batch-state mutex: completing
23
+ // a reply can require a callback which starts another batch. Also close model
24
+ // transactions/batches on exceptions; these adapters never repeat a CPU action.
25
+ Path traceClient=root.resolve("ghidratrace/client.py");String traceClientSource=Files.readString(traceClient);
26
+ String batchEndBefore="""
27
+ def end_batch(self) -> Optional[List[Any]]:
28
+ cb = None
29
+ with self._block:
30
+ cb = self.cur_batch
31
+ if cb is None:
32
+ raise ValueError("No batch to end")
33
+ if 0 == cb.dec():
34
+ self.cur_batch = None
35
+ return cb.results()
36
+ return None
37
+ """;
38
+ String batchEndAfter="""
39
+ def end_batch(self) -> Optional[List[Any]]:
40
+ with self._block:
41
+ cb = self.cur_batch
42
+ if cb is None:
43
+ raise ValueError("No batch to end")
44
+ if cb.dec() != 0:
45
+ return None
46
+ self.cur_batch = None
47
+ return cb.results()
48
+ """;
49
+ String traceTxBefore="""
50
+ tx = self.start_tx(description, undoable)
51
+ yield tx
52
+ tx.commit()
53
+ """;
54
+ String traceTxAfter="""
55
+ tx = self.start_tx(description, undoable)
56
+ try:
57
+ yield tx
58
+ except BaseException:
59
+ tx.abort()
60
+ raise
61
+ else:
62
+ tx.commit()
63
+ """;
64
+ String batchBodyBefore="""
65
+ batch = self.start_batch()
66
+ yield batch
67
+ return self.end_batch()
68
+ """;
69
+ String batchBodyAfter="""
70
+ batch = self.start_batch()
71
+ try:
72
+ yield batch
73
+ finally:
74
+ results = self.end_batch()
75
+ return results
76
+ """;
77
+ String[][] tracePatches={{batchEndBefore,batchEndAfter},{traceTxBefore.indent(4),traceTxAfter.indent(4)},{batchBodyBefore.indent(4),batchBodyAfter.indent(4)}};
78
+ for(String[] patch:tracePatches){
79
+ if(traceClientSource.indexOf(patch[0])<0||traceClientSource.indexOf(patch[0])!=traceClientSource.lastIndexOf(patch[0]))throw new IllegalArgumentException("Unexpected pinned trace transaction/batch lifecycle");
80
+ traceClientSource=traceClientSource.replace(patch[0],patch[1]);
81
+ }
82
+ Files.writeString(traceClient,traceClientSource);
22
83
  // Ghidra 12.1.2's LLDB adapter calls a nonexistent SBProcess.write_memory method.
23
84
  // Adapt only the newly extracted owned copy; refuse a different upstream implementation.
24
85
  Path methods=root.resolve("ghidralldb/methods.py");String source=Files.readString(methods);
25
86
  String original=" proc.write_memory(offset, data)";
26
87
  if(source.indexOf(original)<0||source.indexOf(original)!=source.lastIndexOf(original))throw new IllegalArgumentException("Unexpected pinned LLDB memory writer");
27
88
  String replacement=" error = lldb.SBError()\n written = proc.WriteMemory(offset, data, error)\n if error.Fail() or written != len(data):\n raise RuntimeError(\"LLDB memory write failed: \" + error.GetCString())";
28
- Files.writeString(methods,source.replace(original,replacement),StandardOpenOption.TRUNCATE_EXISTING);
29
- System.out.println("{\"state\":\"prepared\",\"lldb_memory_adapter\":\"insight-sbprocess-v1\"}");
89
+ source=source.replace(original,replacement);
90
+ String originalStep=" if thread is not None:\n t = find_thread_by_obj(thread)\n t.process.SetSelectedThread(t)\n exec_convert_errors('thread step-out')";
91
+ if(source.indexOf(originalStep)<0||source.indexOf(originalStep)!=source.lastIndexOf(originalStep))throw new IllegalArgumentException("Unexpected pinned LLDB step-out adapter");
92
+ String step = """
93
+ if thread is None:
94
+ raise RuntimeError("A concrete live thread is required")
95
+ import json, os, uuid
96
+ t = find_thread_by_obj(thread)
97
+ proc = t.GetProcess()
98
+ if proc.GetState() != lldb.eStateStopped:
99
+ raise RuntimeError("Native target is not stopped")
100
+ frames = util.insight_frames(t)
101
+ caller = frames[1] if len(frames) > 1 else lldb.SBFrame()
102
+ if not caller.IsValid():
103
+ raise RuntimeError("No native caller frame")
104
+ return_pc, return_sp = caller.GetPC(), caller.GetSP()
105
+ if return_pc in (0, lldb.LLDB_INVALID_ADDRESS) or return_sp in (0, lldb.LLDB_INVALID_ADDRESS):
106
+ raise RuntimeError("Native caller location is unavailable")
107
+ root = os.path.dirname(os.path.dirname(__file__))
108
+ path = os.path.join(root, "caller-goal.json")
109
+ if os.path.exists(path):
110
+ with open(path) as source: prior = json.load(source)
111
+ observed_path = os.path.join(root, "caller-observation.json")
112
+ observed = {}
113
+ if os.path.exists(observed_path):
114
+ with open(observed_path) as source: observed = json.load(source)
115
+ if prior.get("pid") == proc.GetProcessID() and (observed.get("goal") != prior.get("id") or observed.get("state") != "verified"):
116
+ raise RuntimeError("An unverified caller intent is retained; close and reopen the context")
117
+ target = proc.GetTarget()
118
+ with commands.INSIGHT_BREAKPOINT_LOCK:
119
+ breakpoint = target.BreakpointCreateByAddress(return_pc)
120
+ commands.INSIGHT_TRANSIENT_BREAKPOINTS.add(breakpoint.GetID())
121
+ try:
122
+ if not breakpoint.IsValid():
123
+ raise RuntimeError("Cannot establish caller breakpoint")
124
+ breakpoint.SetThreadID(t.GetThreadID())
125
+ breakpoint.SetCondition("$sp == " + hex(return_sp))
126
+ breakpoint.SetOneShot(True)
127
+ if breakpoint.GetNumLocations() != 1:
128
+ raise RuntimeError("Caller breakpoint location is ambiguous")
129
+ goal = dict(schema=1, id=str(uuid.uuid4()), pid=proc.GetProcessID(), thread=str(t.GetThreadID()), pc=hex(return_pc), sp=hex(return_sp), stop=proc.GetStopID(), executable=target.GetExecutable().fullpath, breakpoint=breakpoint.GetID())
130
+ temporary = path + ".new-" + goal["id"]
131
+ fd = os.open(temporary, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o600)
132
+ try:
133
+ os.write(fd, json.dumps(goal).encode("utf-8"))
134
+ os.fsync(fd)
135
+ finally:
136
+ os.close(fd)
137
+ os.replace(temporary, path)
138
+ error = proc.Continue()
139
+ if error.Fail():
140
+ raise RuntimeError(error.GetCString())
141
+ except Exception:
142
+ target.BreakpointDelete(breakpoint.GetID())
143
+ raise
144
+ """;
145
+ boolean ownedCaller=System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("mac");
146
+ if(ownedCaller)source=source.replace(originalStep,step.stripTrailing());
147
+ Files.writeString(methods,source,StandardOpenOption.TRUNCATE_EXISTING);
148
+ Path client=root.resolve("ghidratrace/client.py");String clientSource=Files.readString(client),call=" name = request.name\n if not name in self._method_registry._methods:";
149
+ if(clientSource.indexOf(call)<0||clientSource.indexOf(call)!=clientSource.lastIndexOf(call))throw new IllegalArgumentException("Unexpected pinned TraceRmi method dispatcher");
150
+ String logPath="__import__('base64').b64decode('"+Base64.getEncoder().encodeToString(root.resolve("rpc-methods.log").toString().getBytes(java.nio.charset.StandardCharsets.UTF_8))+"').decode('utf-8')";
151
+ clientSource=clientSource.replace(call," name = request.name\n import os as _insight_os\n _insight_fd = _insight_os.open("+logPath+", _insight_os.O_CREAT | _insight_os.O_APPEND | _insight_os.O_WRONLY, 0o600)\n try:\n if _insight_os.fstat(_insight_fd).st_size < 65536:\n _insight_os.write(_insight_fd, (name[:128] + '\\n').encode('utf-8'))\n finally:\n _insight_os.close(_insight_fd)\n if not name in self._method_registry._methods:");
152
+ Path commands=root.resolve("ghidralldb/commands.py");String commandSource=Files.readString(commands);
153
+ String trackedTxBefore="""
154
+ with STATE.require_trace().open_tx(description) as tx:
155
+ STATE.tx = tx
156
+ yield tx
157
+ STATE.reset_tx()
158
+ """;
159
+ String trackedTxAfter="""
160
+ try:
161
+ with STATE.require_trace().open_tx(description) as tx:
162
+ STATE.tx = tx
163
+ yield tx
164
+ finally:
165
+ STATE.reset_tx()
166
+ """;
167
+ if(commandSource.indexOf(trackedTxBefore)<0||commandSource.indexOf(trackedTxBefore)!=commandSource.lastIndexOf(trackedTxBefore))throw new IllegalArgumentException("Unexpected pinned tracked transaction lifecycle");
168
+ commandSource=commandSource.replace(trackedTxBefore,trackedTxAfter);
169
+ int frameStart=commandSource.indexOf("def put_frames() -> None:"),frameEnd=commandSource.indexOf("@convert_errors\ndef ghidra_trace_put_frames",frameStart);
170
+ if(frameStart<0||frameEnd<frameStart)throw new IllegalArgumentException("Unexpected pinned LLDB frame exporter");
171
+ String frameBlock=commandSource.substring(frameStart,frameEnd),frameIndex="level=f.GetFrameID()";
172
+ int first=frameBlock.indexOf(frameIndex),second=frameBlock.indexOf(frameIndex,first+frameIndex.length());
173
+ if(first<0||second<0||frameBlock.indexOf(frameIndex,second+frameIndex.length())>=0)throw new IllegalArgumentException("Unexpected pinned LLDB frame identity");
174
+ if(ownedCaller){
175
+ if(!frameBlock.contains("mapper.map(proc, f.GetPC())")||!frameBlock.contains("str(f.GetFunctionName())")||!frameBlock.contains("util.get_description(f)"))throw new IllegalArgumentException("Unexpected pinned LLDB frame coordinates");
176
+ frameBlock=frameBlock.replace("for i in range(0, t.GetNumFrames()):", "frames = util.insight_frames(t)\n for i in range(len(frames)):").replace("f = t.GetFrameAtIndex(i)", "f = frames[i]").replace("mapper.map(proc, f.GetPC())","mapper.map(proc, util.insight_frame_pc(f))").replace("str(f.GetFunctionName())","util.insight_frame_function(f)").replace("util.get_description(f)","util.insight_frame_description(f)");
177
+ }
178
+ commandSource=commandSource.substring(0,frameStart)+frameBlock.replace(frameIndex,"level=i")+commandSource.substring(frameEnd);
179
+ String single="def put_single_breakpoint(b: lldb.SBBreakpoint, proc: lldb.SBProcess) -> None:\n";
180
+ String list=" b = target.GetBreakpointAtIndex(i)\n keys.append(BREAKPOINT_KEY_PATTERN.format(breaknum=b.GetID()))";
181
+ if(commandSource.indexOf(single)<0||commandSource.indexOf(single)!=commandSource.lastIndexOf(single)||commandSource.indexOf(list)<0||commandSource.indexOf(list)!=commandSource.lastIndexOf(list))throw new IllegalArgumentException("Unexpected pinned LLDB breakpoint exporter");
182
+ commandSource=commandSource.replace(single,"import threading as _insight_threading\nINSIGHT_BREAKPOINT_LOCK = _insight_threading.RLock()\nINSIGHT_TRANSIENT_BREAKPOINTS = set()\n\n"+single+" with INSIGHT_BREAKPOINT_LOCK:\n if b.GetID() in INSIGHT_TRANSIENT_BREAKPOINTS:\n return\n");
183
+ commandSource=commandSource.replace(list," b = target.GetBreakpointAtIndex(i)\n with INSIGHT_BREAKPOINT_LOCK:\n if b.GetID() in INSIGHT_TRANSIENT_BREAKPOINTS:\n continue\n keys.append(BREAKPOINT_KEY_PATTERN.format(breaknum=b.GetID()))");
184
+ String registerFrame="frame.GetFrameID()";
185
+ if(commandSource.split(java.util.regex.Pattern.quote(registerFrame),-1).length!=5)throw new IllegalArgumentException("Unexpected pinned LLDB frame register paths");
186
+ commandSource=commandSource.replace(registerFrame,"util.insight_frame_level(frame)");
187
+ String dynamicRegister="bank.GetChildAtIndex(i, lldb.eDynamicCanRunTarget, True)";
188
+ if(commandSource.split(java.util.regex.Pattern.quote(dynamicRegister),-1).length!=3)throw new IllegalArgumentException("Unexpected pinned LLDB register reader");
189
+ commandSource=commandSource.replace(dynamicRegister,"bank.GetChildAtIndex(i, lldb.eDynamicDontRunTarget, True)");
190
+ Path util=root.resolve("ghidralldb/util.py");String utilSource=Files.readString(util);
191
+ String evaluation="def parse_and_eval(expr: str, signed: bool = False) -> int:\n if signed is True:\n return get_eval(expr).GetValueAsSigned()\n return get_eval(expr).GetValueAsUnsigned()";
192
+ String readOnlyEvaluation="""
193
+ def parse_and_eval(expr: str, signed: bool = False) -> int:
194
+ if not signed and re.fullmatch(r'0[xX][0-9a-fA-F]+|0|[1-9][0-9]*', expr):
195
+ return int(expr, 16 if expr.lower().startswith('0x') else 10)
196
+ register = re.fullmatch(r'[$](pc|sp)([+-](?:0[xX][0-9a-fA-F]+|0|[1-9][0-9]*))?', expr)
197
+ if register:
198
+ frame = selected_frame()
199
+ value = frame.FindRegister(register.group(1))
200
+ if not frame.IsValid() or not value.IsValid() or value.GetError().Fail():
201
+ raise ValueError('Stopped native register is unavailable')
202
+ offset = register.group(2) or '0'
203
+ displacement = int(offset, 16 if 'x' in offset.lower() else 10)
204
+ bits = get_target().GetAddressByteSize() * 8
205
+ number = (value.GetValueAsUnsigned() + displacement) & ((1 << bits) - 1)
206
+ return number - (1 << bits) if signed and number >= (1 << (bits - 1)) else number
207
+ if signed is True:
208
+ return get_eval(expr).GetValueAsSigned()
209
+ return get_eval(expr).GetValueAsUnsigned()
210
+ """;
211
+ if(utilSource.indexOf(evaluation)<0||utilSource.indexOf(evaluation)!=utilSource.lastIndexOf(evaluation))throw new IllegalArgumentException("Unexpected pinned LLDB address evaluator");
212
+ utilSource=utilSource.replace(evaluation,readOnlyEvaluation.stripTrailing());
213
+ utilSource+="\n\nINSIGHT_NORMALIZE_PHYSICAL_STACK = "+(ownedCaller?"True":"False")+"\n";
214
+ utilSource+="""
215
+
216
+ def insight_frames(thread):
217
+ frames = [thread.GetFrameAtIndex(i) for i in range(thread.GetNumFrames())]
218
+ if not INSIGHT_NORMALIZE_PHYSICAL_STACK or not frames:
219
+ return frames
220
+ head = frames[0]
221
+ pc, sp = head.FindRegister('pc'), head.FindRegister('sp')
222
+ if not pc.IsValid() or not sp.IsValid() or pc.GetError().Fail() or sp.GetError().Fail():
223
+ return frames
224
+ live_pc, live_sp = pc.GetValueAsUnsigned(), sp.GetValueAsUnsigned()
225
+ for index in range(1, min(len(frames), 16)):
226
+ previous, candidate = frames[index - 1], frames[index]
227
+ if previous.IsInlined() or previous.IsArtificial() or previous.GetSP() != live_sp or previous.GetCFA() != live_sp:
228
+ break
229
+ if candidate.GetPC() == live_pc and candidate.GetSP() == live_sp and not candidate.IsInlined() and not candidate.IsArtificial():
230
+ return frames[index:]
231
+ return frames
232
+
233
+ def insight_frame_native_index(frame):
234
+ thread = frame.GetThread()
235
+ for index in range(thread.GetNumFrames()):
236
+ if thread.GetFrameAtIndex(index).GetFrameID() == frame.GetFrameID():
237
+ return index
238
+ raise RuntimeError('Native frame is no longer present')
239
+
240
+ def insight_frame_for_level(thread, level):
241
+ return thread.GetFrameAtIndex(0) if level == 0 else insight_frames(thread)[level]
242
+
243
+ def insight_frame_level(frame):
244
+ thread = frame.GetThread()
245
+ for index, candidate in enumerate(insight_frames(thread)):
246
+ if candidate.GetFrameID() == frame.GetFrameID():
247
+ return index
248
+ frames = insight_frames(thread)
249
+ if frames and insight_frame_native_index(frame) < insight_frame_native_index(frames[0]):
250
+ return 0
251
+ raise RuntimeError('Native frame is no longer in the current stack')
252
+ """;
253
+ utilSource+="""
254
+
255
+ def insight_frame_pc(frame):
256
+ if insight_frame_level(frame) != 0 or frame.IsInlined() or frame.IsArtificial():
257
+ return frame.GetPC()
258
+ value = frame.FindRegister('pc')
259
+ if not value.IsValid() or value.GetError().Fail():
260
+ raise RuntimeError('Native frame PC register is unavailable')
261
+ return value.GetValueAsUnsigned()
262
+
263
+ def insight_frame_function(frame):
264
+ target = frame.GetThread().GetProcess().GetTarget()
265
+ address = target.ResolveLoadAddress(insight_frame_pc(frame))
266
+ function, symbol = address.GetFunction(), address.GetSymbol()
267
+ return str(function.GetName() if function.IsValid() else symbol.GetName() if symbol.IsValid() else '<unknown>')
268
+
269
+ def insight_frame_description(frame):
270
+ return '#%d: %s %s' % (insight_frame_level(frame), hex(insight_frame_pc(frame)), insight_frame_function(frame))
271
+
272
+ def insight_thread_description(thread):
273
+ if thread.GetProcess().GetState() != lldb.eStateStopped:
274
+ return get_description(thread)
275
+ frames = insight_frames(thread)
276
+ if not frames:
277
+ return get_description(thread)
278
+ frame = frames[0]
279
+ return 'thread #%d: tid = %s, %s %s, stop reason = %s' % (thread.GetIndexID(), hex(thread.GetThreadID()), hex(insight_frame_pc(frame)), insight_frame_function(frame), thread.GetStopDescription(512))
280
+ """;
281
+ Files.writeString(util,utilSource,StandardOpenOption.TRUNCATE_EXISTING);
282
+ String selectFrame="f.thread.SetSelectedFrame(f.GetFrameID())";
283
+ if(source.split(java.util.regex.Pattern.quote(selectFrame),-1).length!=3)throw new IllegalArgumentException("Unexpected pinned LLDB frame selector");
284
+ source=source.replace(selectFrame,"f.thread.SetSelectedFrame(util.insight_frame_native_index(f))");
285
+ if(ownedCaller){
286
+ String lookup=" return thread.GetFrameAtIndex(level)";
287
+ if(source.indexOf(lookup)<0||source.indexOf(lookup)!=source.lastIndexOf(lookup))throw new IllegalArgumentException("Unexpected pinned LLDB frame lookup");
288
+ source=source.replace(lookup," return util.insight_frame_for_level(thread, level)");
289
+ String display="def compute_thread_display(t: lldb.SBThread) -> str:\n return util.get_description(t)";
290
+ if(commandSource.indexOf(display)<0||commandSource.indexOf(display)!=commandSource.lastIndexOf(display))throw new IllegalArgumentException("Unexpected pinned LLDB thread display");
291
+ commandSource=commandSource.replace(display,"def compute_thread_display(t: lldb.SBThread) -> str:\n return util.insight_thread_description(t)");
292
+ }
293
+ Files.writeString(methods,source,StandardOpenOption.TRUNCATE_EXISTING);
294
+ Files.writeString(commands,commandSource,StandardOpenOption.TRUNCATE_EXISTING);
295
+ Files.writeString(client,clientSource,StandardOpenOption.TRUNCATE_EXISTING);
296
+ Path architecture=root.resolve("ghidralldb/arch.py");String architectureSource=Files.readString(architecture);
297
+ String registerAliases="""
298
+
299
+ class InsightAarch64RegisterMapper(DefaultRegisterMapper):
300
+ def map_name(self, proc, name):
301
+ return {'fp': 'x29', 'lr': 'x30'}.get(name, super().map_name(proc, name))
302
+
303
+ def map_name_back(self, proc, name):
304
+ return {'x29': 'fp', 'x30': 'lr'}.get(name, super().map_name_back(proc, name))
305
+ """;
306
+ String mapper="def compute_register_mapper(lang: str) -> DefaultRegisterMapper:\n";
307
+ if(architectureSource.indexOf(mapper)<0||architectureSource.indexOf(mapper)!=architectureSource.lastIndexOf(mapper))throw new IllegalArgumentException("Unexpected pinned LLDB register mapper");
308
+ architectureSource=architectureSource.replace(mapper,mapper+" if lang.startswith('AARCH64:'):\n return InsightAarch64RegisterMapper('big' if ':BE:' in lang else 'little')\n")+registerAliases;
309
+ Files.writeString(architecture,architectureSource,StandardOpenOption.TRUNCATE_EXISTING);
310
+ System.out.println("{\"state\":\"prepared\",\"lldb_memory_adapter\":\"insight-sbprocess-v1\",\"lldb_step_adapter\":\"insight-caller-dispatch-v2\"}");
30
311
  }
31
312
  }
@@ -0,0 +1,33 @@
1
+ import ghidra.GhidraApplicationLayout;
2
+ import ghidra.framework.*;
3
+ import ghidra.program.database.ProgramDB;
4
+ import ghidra.program.model.lang.LanguageID;
5
+ import ghidra.program.util.DefaultLanguageService;
6
+ import ghidra.program.flatapi.FlatProgramAPI;
7
+ import ghidra.app.decompiler.DecompInterface;
8
+ import ghidra.util.task.TaskMonitor;
9
+ import java.io.ByteArrayInputStream;
10
+
11
+ /** Disposable native probe: decode and decompile a known function using the selected installation. */
12
+ class InsightRuntimeDoctor {
13
+ public static void main(String[] args) {
14
+ var out=System.out;System.setOut(System.err);
15
+ try {
16
+ Application.initializeApplication(new GhidraApplicationLayout(),new HeadlessGhidraApplicationConfiguration());
17
+ var language=DefaultLanguageService.getLanguageService().getLanguage(new LanguageID("x86:LE:32:default"));
18
+ var program=new ProgramDB("runtime-probe",language,language.getDefaultCompilerSpec(),new Object());
19
+ var consumer=new Object();program.addConsumer(consumer);
20
+ int tx=program.startTransaction("probe");
21
+ var start=program.getAddressFactory().getDefaultAddressSpace().getAddress(0x1000);
22
+ program.getMemory().createInitializedBlock(".text",start,new ByteArrayInputStream(new byte[]{(byte)0xb8,42,0,0,0,(byte)0xc3}),6,TaskMonitor.DUMMY,false);
23
+ var api=new FlatProgramAPI(program);api.disassemble(start);var function=api.createFunction(start,"runtime_probe");
24
+ program.endTransaction(tx,true);
25
+ var decompiler=new DecompInterface();
26
+ if(!decompiler.openProgram(program))throw new IllegalStateException("Decompiler did not open program");
27
+ var result=decompiler.decompileFunction(function,30,TaskMonitor.DUMMY);
28
+ if(!result.decompileCompleted()||result.getDecompiledFunction()==null||!result.getDecompiledFunction().getC().contains("0x2a"))throw new IllegalStateException("Native decompile did not produce the expected return value");
29
+ decompiler.dispose();program.release(consumer);
30
+ out.println("{\"state\":\"ready\",\"headless\":true,\"decompiler\":true,\"expectedReturn\":42}");System.exit(0);
31
+ } catch(Throwable failure){failure.printStackTrace(System.err);out.println("{\"state\":\"failed\"}");System.exit(1);}
32
+ }
33
+ }