@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,84 @@
1
+ import { type CommandDefinition } from '@eyeauras/cli-factory';
2
+ interface PackagedSkill {
3
+ name: string;
4
+ title: string;
5
+ path: string;
6
+ resources: Record<string, string>;
7
+ }
8
+ interface Capability {
9
+ id: string;
10
+ namespace: string;
11
+ kind: 'analytical' | 'supporting' | 'capability';
12
+ skill: string;
13
+ purpose: string;
14
+ evaluationCase: {
15
+ id: string;
16
+ inputFamily: string;
17
+ task: string;
18
+ modes: string[];
19
+ requiredObservations: string[];
20
+ };
21
+ inputs: string[];
22
+ tasks: string[];
23
+ platforms: string[];
24
+ dependencies: string[];
25
+ workflowCommands: string[];
26
+ limitations: string[];
27
+ }
28
+ export interface Toolbox {
29
+ schema: 1;
30
+ skills: PackagedSkill[];
31
+ tools: Capability[];
32
+ }
33
+ export declare const toolbox: Toolbox;
34
+ export declare function locateSkill(name?: string): {
35
+ version: string;
36
+ name: string;
37
+ bundlePath: string;
38
+ path: string;
39
+ skills: string[];
40
+ };
41
+ export declare function describeTool(id: string): {
42
+ status: string;
43
+ version: string;
44
+ skill: {
45
+ version: string;
46
+ name: string;
47
+ bundlePath: string;
48
+ path: string;
49
+ skills: string[];
50
+ };
51
+ runtime: {
52
+ required: boolean;
53
+ providedByNamespace: string;
54
+ dependencies: string[];
55
+ readiness?: undefined;
56
+ statusCommand?: undefined;
57
+ } | {
58
+ required: boolean;
59
+ readiness: string;
60
+ statusCommand: string[];
61
+ providedByNamespace?: undefined;
62
+ dependencies?: undefined;
63
+ };
64
+ id: string;
65
+ namespace: string;
66
+ kind: "analytical" | "supporting" | "capability";
67
+ purpose: string;
68
+ evaluationCase: {
69
+ id: string;
70
+ inputFamily: string;
71
+ task: string;
72
+ modes: string[];
73
+ requiredObservations: string[];
74
+ };
75
+ inputs: string[];
76
+ tasks: string[];
77
+ platforms: string[];
78
+ dependencies: string[];
79
+ workflowCommands: string[];
80
+ limitations: string[];
81
+ };
82
+ export declare function skillCommand(): CommandDefinition;
83
+ export declare function toolboxCommands(): CommandDefinition[];
84
+ export {};
@@ -0,0 +1,35 @@
1
+ import { localCommand, CliError, tableView, recordView } from '@eyeauras/cli-factory';
2
+ import { readFileSync } from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { packageVersion } from './package-version.js';
5
+ const packageRoot = new URL('../../', import.meta.url);
6
+ export const toolbox = JSON.parse(readFileSync(new URL('runtime/toolbox.json', packageRoot), 'utf8'));
7
+ export function locateSkill(name = 'insight-cli') {
8
+ const skill = toolbox.skills.find(s => s.name === name);
9
+ if (!skill)
10
+ throw new CliError(`Unknown skill '${name}'.`, { code: 'toolbox.skillNotFound', next: [['tools', 'list']] });
11
+ return { version: packageVersion, name, bundlePath: fileURLToPath(new URL('skill-bundle', packageRoot)), path: fileURLToPath(new URL(skill.path, packageRoot)), skills: toolbox.skills.map(s => s.name) };
12
+ }
13
+ export function describeTool(id) {
14
+ const tool = toolbox.tools.find(t => t.id === id);
15
+ if (!tool)
16
+ throw new CliError(`Unknown tool '${id}'.`, { code: 'toolbox.notFound', next: [['tools', 'list']] });
17
+ return { ...tool, status: 'available', version: packageVersion, skill: locateSkill(tool.skill),
18
+ runtime: tool.kind !== 'analytical' ? { required: false, providedByNamespace: tool.namespace, dependencies: tool.dependencies } : { required: true, readiness: 'notChecked', statusCommand: ['insight-cli', tool.namespace, 'status', '--json'] } };
19
+ }
20
+ export function skillCommand() {
21
+ return localCommand('skill [name]', 'Locate packaged tool instructions', ({ args }) => locateSkill(args.name === undefined ? undefined : String(args.name)), {
22
+ view: recordView({ fields: [{ label: 'Skill', value: x => x.name }, { label: 'Version', value: x => x.version }, { label: 'Path', value: x => x.path }] })
23
+ });
24
+ }
25
+ export function toolboxCommands() {
26
+ return [
27
+ localCommand('list', 'List shipped research capabilities', () => ({ version: packageVersion, items: toolbox.tools.map(t => ({ id: t.id, namespace: t.namespace, kind: t.kind, purpose: t.purpose, inputs: t.inputs, tasks: t.tasks, platforms: t.platforms, skill: t.skill, status: 'available' })) }), {
28
+ view: tableView({ rows: x => x.items, columns: [{ header: 'Tool', value: x => x.id }, { header: 'Purpose', value: x => x.purpose }, { header: 'Skill', value: x => x.skill }] })
29
+ }),
30
+ localCommand('show <tool>', 'Describe tasks and tool preparation', ({ args }) => describeTool(String(args.tool)), {
31
+ view: recordView({ fields: [{ label: 'Tool', value: x => x.id }, { label: 'Purpose', value: x => x.purpose }, { label: 'Kind', value: x => x.kind }, { label: 'Platforms', value: x => x.platforms.join(', ') }, { label: 'Dependencies', value: x => x.dependencies.join(', ') || 'none' }, { label: 'Skill', value: x => x.skill.path }],
32
+ sections: [{ title: () => 'Tasks', lines: x => x.tasks }, { title: () => 'Limitations', lines: x => x.limitations }], next: x => [['skill', x.skill.name]] })
33
+ }),
34
+ ];
35
+ }
@@ -0,0 +1,23 @@
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 tsharkInstaller(c: CommandContext): ToolInstaller;
5
+ export type PacketFields = Record<string, string[]>;
6
+ export declare function tsharkRows(value: string): PacketFields[];
7
+ export declare function tsharkStreams(rows: PacketFields[]): {
8
+ frames: number[];
9
+ sources: string[];
10
+ destinations: string[];
11
+ transport: string;
12
+ stream: number;
13
+ }[];
14
+ export declare function tsharkFollow(output: string, transport: string, stream: number): {
15
+ nodes: string[];
16
+ chunks: {
17
+ node: number;
18
+ hex: string;
19
+ bytes: number;
20
+ }[];
21
+ totalBytes: number;
22
+ };
23
+ export declare function tsharkCommands(workspace: (c: CommandContext) => Workspace): CommandDefinition[];
@@ -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
+ }
@@ -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;
@@ -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.1.0",
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,19 +13,22 @@
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": "0.4.1",
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",
27
29
  "@modelcontextprotocol/sdk": "1.32.1",
28
- "@eyeauras/cli-factory-ipc": "https://raw.githubusercontent.com/iXab3r/insight-cli/43f815a006711418bcffa47a7d99ef5c42424ca5/vendor/factory-ipc-a2094fb.tgz"
30
+ "tar": "7.5.22",
31
+ "yauzl": "3.4.0"
29
32
  },
30
33
  "engines": {
31
34
  "node": ">=24"
@@ -22,7 +22,8 @@ changing that project stays blocked; read-only inspection remains available. Par
22
22
  export output does not prove success and is preserved. Retain receipts for continuation.
23
23
 
24
24
  `ghidra server` operates on the configured local or external server. `status` reports connection
25
- state; `connect` enables shared operations; `disconnect` releases the owned local server or the
25
+ state, including a missing runtime before installation; `start/stop` manage the owned local
26
+ server (stop requires closed contexts). `connect` enables shared operations; `disconnect` releases the owned local server or the
26
27
  external connection. Reconnect preserves repositories. Repository/file/history/checkout commands
27
28
  require the explicit repository and relevant path. Admin actions require actual server authority
28
29
  alongside Factory permissions. Changing ACLs preserves other users and anonymous access.
@@ -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.