windows-exe-decompiler-mcp-server 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/CODEX_INSTALLATION.md +69 -0
  2. package/COPILOT_INSTALLATION.md +77 -0
  3. package/LICENSE +21 -0
  4. package/README.md +314 -0
  5. package/bin/windows-exe-decompiler-mcp-server.js +3 -0
  6. package/dist/analysis-provenance.d.ts +184 -0
  7. package/dist/analysis-provenance.js +74 -0
  8. package/dist/analysis-task-runner.d.ts +31 -0
  9. package/dist/analysis-task-runner.js +160 -0
  10. package/dist/artifact-inventory.d.ts +23 -0
  11. package/dist/artifact-inventory.js +175 -0
  12. package/dist/cache-manager.d.ts +128 -0
  13. package/dist/cache-manager.js +454 -0
  14. package/dist/confidence-semantics.d.ts +66 -0
  15. package/dist/confidence-semantics.js +122 -0
  16. package/dist/config.d.ts +335 -0
  17. package/dist/config.js +193 -0
  18. package/dist/database.d.ts +227 -0
  19. package/dist/database.js +601 -0
  20. package/dist/decompiler-worker.d.ts +441 -0
  21. package/dist/decompiler-worker.js +1962 -0
  22. package/dist/dynamic-trace.d.ts +95 -0
  23. package/dist/dynamic-trace.js +629 -0
  24. package/dist/env-validator.d.ts +15 -0
  25. package/dist/env-validator.js +249 -0
  26. package/dist/error-handler.d.ts +28 -0
  27. package/dist/error-handler.example.d.ts +22 -0
  28. package/dist/error-handler.example.js +141 -0
  29. package/dist/error-handler.js +139 -0
  30. package/dist/ghidra-analysis-status.d.ts +49 -0
  31. package/dist/ghidra-analysis-status.js +178 -0
  32. package/dist/ghidra-config.d.ts +134 -0
  33. package/dist/ghidra-config.js +464 -0
  34. package/dist/index.d.ts +9 -0
  35. package/dist/index.js +200 -0
  36. package/dist/job-queue.d.ts +169 -0
  37. package/dist/job-queue.js +407 -0
  38. package/dist/logger.d.ts +106 -0
  39. package/dist/logger.js +176 -0
  40. package/dist/policy-guard.d.ts +115 -0
  41. package/dist/policy-guard.js +243 -0
  42. package/dist/process-output.d.ts +15 -0
  43. package/dist/process-output.js +90 -0
  44. package/dist/prompts/function-explanation-review.d.ts +5 -0
  45. package/dist/prompts/function-explanation-review.js +64 -0
  46. package/dist/prompts/semantic-name-review.d.ts +5 -0
  47. package/dist/prompts/semantic-name-review.js +63 -0
  48. package/dist/runtime-correlation.d.ts +34 -0
  49. package/dist/runtime-correlation.js +279 -0
  50. package/dist/runtime-paths.d.ts +3 -0
  51. package/dist/runtime-paths.js +11 -0
  52. package/dist/selection-diff.d.ts +667 -0
  53. package/dist/selection-diff.js +53 -0
  54. package/dist/semantic-name-suggestion-artifacts.d.ts +116 -0
  55. package/dist/semantic-name-suggestion-artifacts.js +314 -0
  56. package/dist/server.d.ts +129 -0
  57. package/dist/server.js +578 -0
  58. package/dist/tools/artifact-read.d.ts +235 -0
  59. package/dist/tools/artifact-read.js +317 -0
  60. package/dist/tools/artifacts-diff.d.ts +728 -0
  61. package/dist/tools/artifacts-diff.js +304 -0
  62. package/dist/tools/artifacts-list.d.ts +515 -0
  63. package/dist/tools/artifacts-list.js +389 -0
  64. package/dist/tools/attack-map.d.ts +290 -0
  65. package/dist/tools/attack-map.js +519 -0
  66. package/dist/tools/cache-observability.d.ts +4 -0
  67. package/dist/tools/cache-observability.js +36 -0
  68. package/dist/tools/code-function-cfg.d.ts +50 -0
  69. package/dist/tools/code-function-cfg.js +102 -0
  70. package/dist/tools/code-function-decompile.d.ts +55 -0
  71. package/dist/tools/code-function-decompile.js +103 -0
  72. package/dist/tools/code-function-disassemble.d.ts +43 -0
  73. package/dist/tools/code-function-disassemble.js +185 -0
  74. package/dist/tools/code-function-explain-apply.d.ts +255 -0
  75. package/dist/tools/code-function-explain-apply.js +225 -0
  76. package/dist/tools/code-function-explain-prepare.d.ts +535 -0
  77. package/dist/tools/code-function-explain-prepare.js +276 -0
  78. package/dist/tools/code-function-explain-review.d.ts +397 -0
  79. package/dist/tools/code-function-explain-review.js +589 -0
  80. package/dist/tools/code-function-rename-apply.d.ts +248 -0
  81. package/dist/tools/code-function-rename-apply.js +220 -0
  82. package/dist/tools/code-function-rename-prepare.d.ts +506 -0
  83. package/dist/tools/code-function-rename-prepare.js +279 -0
  84. package/dist/tools/code-function-rename-review.d.ts +574 -0
  85. package/dist/tools/code-function-rename-review.js +761 -0
  86. package/dist/tools/code-functions-list.d.ts +37 -0
  87. package/dist/tools/code-functions-list.js +91 -0
  88. package/dist/tools/code-functions-rank.d.ts +34 -0
  89. package/dist/tools/code-functions-rank.js +90 -0
  90. package/dist/tools/code-functions-reconstruct.d.ts +2725 -0
  91. package/dist/tools/code-functions-reconstruct.js +2807 -0
  92. package/dist/tools/code-functions-search.d.ts +39 -0
  93. package/dist/tools/code-functions-search.js +90 -0
  94. package/dist/tools/code-reconstruct-export.d.ts +1212 -0
  95. package/dist/tools/code-reconstruct-export.js +4002 -0
  96. package/dist/tools/code-reconstruct-plan.d.ts +274 -0
  97. package/dist/tools/code-reconstruct-plan.js +342 -0
  98. package/dist/tools/dotnet-metadata-extract.d.ts +541 -0
  99. package/dist/tools/dotnet-metadata-extract.js +355 -0
  100. package/dist/tools/dotnet-reconstruct-export.d.ts +567 -0
  101. package/dist/tools/dotnet-reconstruct-export.js +1151 -0
  102. package/dist/tools/dotnet-types-list.d.ts +325 -0
  103. package/dist/tools/dotnet-types-list.js +201 -0
  104. package/dist/tools/dynamic-dependencies.d.ts +115 -0
  105. package/dist/tools/dynamic-dependencies.js +213 -0
  106. package/dist/tools/dynamic-memory-import.d.ts +10 -0
  107. package/dist/tools/dynamic-memory-import.js +567 -0
  108. package/dist/tools/dynamic-trace-import.d.ts +10 -0
  109. package/dist/tools/dynamic-trace-import.js +235 -0
  110. package/dist/tools/entrypoint-fallback-disasm.d.ts +30 -0
  111. package/dist/tools/entrypoint-fallback-disasm.js +89 -0
  112. package/dist/tools/ghidra-analyze.d.ts +88 -0
  113. package/dist/tools/ghidra-analyze.js +208 -0
  114. package/dist/tools/ghidra-health.d.ts +37 -0
  115. package/dist/tools/ghidra-health.js +212 -0
  116. package/dist/tools/ioc-export.d.ts +209 -0
  117. package/dist/tools/ioc-export.js +542 -0
  118. package/dist/tools/packer-detect.d.ts +165 -0
  119. package/dist/tools/packer-detect.js +284 -0
  120. package/dist/tools/pe-exports-extract.d.ts +175 -0
  121. package/dist/tools/pe-exports-extract.js +253 -0
  122. package/dist/tools/pe-fingerprint.d.ts +234 -0
  123. package/dist/tools/pe-fingerprint.js +269 -0
  124. package/dist/tools/pe-imports-extract.d.ts +105 -0
  125. package/dist/tools/pe-imports-extract.js +245 -0
  126. package/dist/tools/report-generate.d.ts +157 -0
  127. package/dist/tools/report-generate.js +457 -0
  128. package/dist/tools/report-summarize.d.ts +2131 -0
  129. package/dist/tools/report-summarize.js +596 -0
  130. package/dist/tools/runtime-detect.d.ts +135 -0
  131. package/dist/tools/runtime-detect.js +247 -0
  132. package/dist/tools/sample-ingest.d.ts +94 -0
  133. package/dist/tools/sample-ingest.js +327 -0
  134. package/dist/tools/sample-profile-get.d.ts +183 -0
  135. package/dist/tools/sample-profile-get.js +121 -0
  136. package/dist/tools/sandbox-execute.d.ts +441 -0
  137. package/dist/tools/sandbox-execute.js +392 -0
  138. package/dist/tools/strings-extract.d.ts +375 -0
  139. package/dist/tools/strings-extract.js +314 -0
  140. package/dist/tools/strings-floss-decode.d.ts +143 -0
  141. package/dist/tools/strings-floss-decode.js +259 -0
  142. package/dist/tools/system-health.d.ts +434 -0
  143. package/dist/tools/system-health.js +446 -0
  144. package/dist/tools/task-cancel.d.ts +21 -0
  145. package/dist/tools/task-cancel.js +70 -0
  146. package/dist/tools/task-status.d.ts +27 -0
  147. package/dist/tools/task-status.js +106 -0
  148. package/dist/tools/task-sweep.d.ts +22 -0
  149. package/dist/tools/task-sweep.js +77 -0
  150. package/dist/tools/tool-help.d.ts +340 -0
  151. package/dist/tools/tool-help.js +261 -0
  152. package/dist/tools/yara-scan.d.ts +554 -0
  153. package/dist/tools/yara-scan.js +313 -0
  154. package/dist/types.d.ts +266 -0
  155. package/dist/types.js +41 -0
  156. package/dist/worker-pool.d.ts +204 -0
  157. package/dist/worker-pool.js +650 -0
  158. package/dist/workflows/deep-static.d.ts +104 -0
  159. package/dist/workflows/deep-static.js +276 -0
  160. package/dist/workflows/function-explanation-review.d.ts +655 -0
  161. package/dist/workflows/function-explanation-review.js +440 -0
  162. package/dist/workflows/reconstruct.d.ts +2053 -0
  163. package/dist/workflows/reconstruct.js +666 -0
  164. package/dist/workflows/semantic-name-review.d.ts +2418 -0
  165. package/dist/workflows/semantic-name-review.js +521 -0
  166. package/dist/workflows/triage.d.ts +659 -0
  167. package/dist/workflows/triage.js +1374 -0
  168. package/dist/workspace-manager.d.ts +150 -0
  169. package/dist/workspace-manager.js +411 -0
  170. package/ghidra_scripts/DecompileFunction.java +487 -0
  171. package/ghidra_scripts/DecompileFunction.py +150 -0
  172. package/ghidra_scripts/ExtractCFG.java +256 -0
  173. package/ghidra_scripts/ExtractCFG.py +233 -0
  174. package/ghidra_scripts/ExtractFunctions.java +442 -0
  175. package/ghidra_scripts/ExtractFunctions.py +101 -0
  176. package/ghidra_scripts/README.md +125 -0
  177. package/ghidra_scripts/SearchFunctionReferences.java +380 -0
  178. package/helpers/DotNetMetadataProbe/DotNetMetadataProbe.csproj +9 -0
  179. package/helpers/DotNetMetadataProbe/Program.cs +566 -0
  180. package/install-to-codex.ps1 +178 -0
  181. package/install-to-copilot.ps1 +303 -0
  182. package/package.json +101 -0
  183. package/requirements.txt +9 -0
  184. package/workers/requirements-dynamic.txt +11 -0
  185. package/workers/requirements.txt +8 -0
  186. package/workers/speakeasy_compat.py +175 -0
  187. package/workers/static_worker.py +5183 -0
  188. package/workers/yara_rules/default.yar +33 -0
  189. package/workers/yara_rules/malware_families.yar +93 -0
  190. package/workers/yara_rules/packers.yar +80 -0
@@ -0,0 +1,434 @@
1
+ /**
2
+ * system.health tool implementation
3
+ * Aggregated runtime health checks for high-availability operations.
4
+ */
5
+ import { z } from 'zod';
6
+ import type { ToolDefinition, ToolArgs, WorkerResult } from '../types.js';
7
+ import type { WorkspaceManager } from '../workspace-manager.js';
8
+ import type { DatabaseManager } from '../database.js';
9
+ import type { CacheManager } from '../cache-manager.js';
10
+ import { type GhidraHealthStatus } from '../ghidra-config.js';
11
+ export declare const SystemHealthInputSchema: z.ZodObject<{
12
+ sample_id: z.ZodOptional<z.ZodString>;
13
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
14
+ include_ghidra: z.ZodDefault<z.ZodBoolean>;
15
+ include_static_worker: z.ZodDefault<z.ZodBoolean>;
16
+ include_cache_probe: z.ZodDefault<z.ZodBoolean>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ timeout_ms: number;
19
+ include_ghidra: boolean;
20
+ include_static_worker: boolean;
21
+ include_cache_probe: boolean;
22
+ sample_id?: string | undefined;
23
+ }, {
24
+ sample_id?: string | undefined;
25
+ timeout_ms?: number | undefined;
26
+ include_ghidra?: boolean | undefined;
27
+ include_static_worker?: boolean | undefined;
28
+ include_cache_probe?: boolean | undefined;
29
+ }>;
30
+ export declare const SystemHealthOutputSchema: z.ZodObject<{
31
+ ok: z.ZodBoolean;
32
+ data: z.ZodOptional<z.ZodObject<{
33
+ overall_status: z.ZodEnum<["healthy", "degraded", "unhealthy"]>;
34
+ checked_at: z.ZodString;
35
+ components: z.ZodObject<{
36
+ workspace: z.ZodObject<{
37
+ status: z.ZodEnum<["healthy", "degraded", "unhealthy", "skipped"]>;
38
+ ok: z.ZodBoolean;
39
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
43
+ ok: boolean;
44
+ error?: string | null | undefined;
45
+ details?: Record<string, any> | undefined;
46
+ }, {
47
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
48
+ ok: boolean;
49
+ error?: string | null | undefined;
50
+ details?: Record<string, any> | undefined;
51
+ }>;
52
+ database: z.ZodObject<{
53
+ status: z.ZodEnum<["healthy", "degraded", "unhealthy", "skipped"]>;
54
+ ok: z.ZodBoolean;
55
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
59
+ ok: boolean;
60
+ error?: string | null | undefined;
61
+ details?: Record<string, any> | undefined;
62
+ }, {
63
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
64
+ ok: boolean;
65
+ error?: string | null | undefined;
66
+ details?: Record<string, any> | undefined;
67
+ }>;
68
+ ghidra: z.ZodObject<{
69
+ status: z.ZodEnum<["healthy", "degraded", "unhealthy", "skipped"]>;
70
+ ok: z.ZodBoolean;
71
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
75
+ ok: boolean;
76
+ error?: string | null | undefined;
77
+ details?: Record<string, any> | undefined;
78
+ }, {
79
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
80
+ ok: boolean;
81
+ error?: string | null | undefined;
82
+ details?: Record<string, any> | undefined;
83
+ }>;
84
+ static_worker: z.ZodObject<{
85
+ status: z.ZodEnum<["healthy", "degraded", "unhealthy", "skipped"]>;
86
+ ok: z.ZodBoolean;
87
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
91
+ ok: boolean;
92
+ error?: string | null | undefined;
93
+ details?: Record<string, any> | undefined;
94
+ }, {
95
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
96
+ ok: boolean;
97
+ error?: string | null | undefined;
98
+ details?: Record<string, any> | undefined;
99
+ }>;
100
+ cache: z.ZodObject<{
101
+ status: z.ZodEnum<["healthy", "degraded", "unhealthy", "skipped"]>;
102
+ ok: z.ZodBoolean;
103
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
107
+ ok: boolean;
108
+ error?: string | null | undefined;
109
+ details?: Record<string, any> | undefined;
110
+ }, {
111
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
112
+ ok: boolean;
113
+ error?: string | null | undefined;
114
+ details?: Record<string, any> | undefined;
115
+ }>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ database: {
118
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
119
+ ok: boolean;
120
+ error?: string | null | undefined;
121
+ details?: Record<string, any> | undefined;
122
+ };
123
+ workspace: {
124
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
125
+ ok: boolean;
126
+ error?: string | null | undefined;
127
+ details?: Record<string, any> | undefined;
128
+ };
129
+ ghidra: {
130
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
131
+ ok: boolean;
132
+ error?: string | null | undefined;
133
+ details?: Record<string, any> | undefined;
134
+ };
135
+ cache: {
136
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
137
+ ok: boolean;
138
+ error?: string | null | undefined;
139
+ details?: Record<string, any> | undefined;
140
+ };
141
+ static_worker: {
142
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
143
+ ok: boolean;
144
+ error?: string | null | undefined;
145
+ details?: Record<string, any> | undefined;
146
+ };
147
+ }, {
148
+ database: {
149
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
150
+ ok: boolean;
151
+ error?: string | null | undefined;
152
+ details?: Record<string, any> | undefined;
153
+ };
154
+ workspace: {
155
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
156
+ ok: boolean;
157
+ error?: string | null | undefined;
158
+ details?: Record<string, any> | undefined;
159
+ };
160
+ ghidra: {
161
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
162
+ ok: boolean;
163
+ error?: string | null | undefined;
164
+ details?: Record<string, any> | undefined;
165
+ };
166
+ cache: {
167
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
168
+ ok: boolean;
169
+ error?: string | null | undefined;
170
+ details?: Record<string, any> | undefined;
171
+ };
172
+ static_worker: {
173
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
174
+ ok: boolean;
175
+ error?: string | null | undefined;
176
+ details?: Record<string, any> | undefined;
177
+ };
178
+ }>;
179
+ cache_observability: z.ZodObject<{
180
+ key: z.ZodNullable<z.ZodString>;
181
+ tier: z.ZodNullable<z.ZodString>;
182
+ created_at: z.ZodNullable<z.ZodString>;
183
+ expires_at: z.ZodNullable<z.ZodString>;
184
+ hit_at: z.ZodNullable<z.ZodString>;
185
+ sample_sha256: z.ZodNullable<z.ZodString>;
186
+ sample_state_consistent: z.ZodNullable<z.ZodBoolean>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ created_at: string | null;
189
+ key: string | null;
190
+ tier: string | null;
191
+ expires_at: string | null;
192
+ hit_at: string | null;
193
+ sample_sha256: string | null;
194
+ sample_state_consistent: boolean | null;
195
+ }, {
196
+ created_at: string | null;
197
+ key: string | null;
198
+ tier: string | null;
199
+ expires_at: string | null;
200
+ hit_at: string | null;
201
+ sample_sha256: string | null;
202
+ sample_state_consistent: boolean | null;
203
+ }>;
204
+ recommendations: z.ZodArray<z.ZodString, "many">;
205
+ }, "strip", z.ZodTypeAny, {
206
+ checked_at: string;
207
+ recommendations: string[];
208
+ overall_status: "degraded" | "healthy" | "unhealthy";
209
+ components: {
210
+ database: {
211
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
212
+ ok: boolean;
213
+ error?: string | null | undefined;
214
+ details?: Record<string, any> | undefined;
215
+ };
216
+ workspace: {
217
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
218
+ ok: boolean;
219
+ error?: string | null | undefined;
220
+ details?: Record<string, any> | undefined;
221
+ };
222
+ ghidra: {
223
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
224
+ ok: boolean;
225
+ error?: string | null | undefined;
226
+ details?: Record<string, any> | undefined;
227
+ };
228
+ cache: {
229
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
230
+ ok: boolean;
231
+ error?: string | null | undefined;
232
+ details?: Record<string, any> | undefined;
233
+ };
234
+ static_worker: {
235
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
236
+ ok: boolean;
237
+ error?: string | null | undefined;
238
+ details?: Record<string, any> | undefined;
239
+ };
240
+ };
241
+ cache_observability: {
242
+ created_at: string | null;
243
+ key: string | null;
244
+ tier: string | null;
245
+ expires_at: string | null;
246
+ hit_at: string | null;
247
+ sample_sha256: string | null;
248
+ sample_state_consistent: boolean | null;
249
+ };
250
+ }, {
251
+ checked_at: string;
252
+ recommendations: string[];
253
+ overall_status: "degraded" | "healthy" | "unhealthy";
254
+ components: {
255
+ database: {
256
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
257
+ ok: boolean;
258
+ error?: string | null | undefined;
259
+ details?: Record<string, any> | undefined;
260
+ };
261
+ workspace: {
262
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
263
+ ok: boolean;
264
+ error?: string | null | undefined;
265
+ details?: Record<string, any> | undefined;
266
+ };
267
+ ghidra: {
268
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
269
+ ok: boolean;
270
+ error?: string | null | undefined;
271
+ details?: Record<string, any> | undefined;
272
+ };
273
+ cache: {
274
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
275
+ ok: boolean;
276
+ error?: string | null | undefined;
277
+ details?: Record<string, any> | undefined;
278
+ };
279
+ static_worker: {
280
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
281
+ ok: boolean;
282
+ error?: string | null | undefined;
283
+ details?: Record<string, any> | undefined;
284
+ };
285
+ };
286
+ cache_observability: {
287
+ created_at: string | null;
288
+ key: string | null;
289
+ tier: string | null;
290
+ expires_at: string | null;
291
+ hit_at: string | null;
292
+ sample_sha256: string | null;
293
+ sample_state_consistent: boolean | null;
294
+ };
295
+ }>>;
296
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
297
+ errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
298
+ metrics: z.ZodOptional<z.ZodObject<{
299
+ elapsed_ms: z.ZodNumber;
300
+ tool: z.ZodString;
301
+ }, "strip", z.ZodTypeAny, {
302
+ elapsed_ms: number;
303
+ tool: string;
304
+ }, {
305
+ elapsed_ms: number;
306
+ tool: string;
307
+ }>>;
308
+ }, "strip", z.ZodTypeAny, {
309
+ ok: boolean;
310
+ metrics?: {
311
+ elapsed_ms: number;
312
+ tool: string;
313
+ } | undefined;
314
+ data?: {
315
+ checked_at: string;
316
+ recommendations: string[];
317
+ overall_status: "degraded" | "healthy" | "unhealthy";
318
+ components: {
319
+ database: {
320
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
321
+ ok: boolean;
322
+ error?: string | null | undefined;
323
+ details?: Record<string, any> | undefined;
324
+ };
325
+ workspace: {
326
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
327
+ ok: boolean;
328
+ error?: string | null | undefined;
329
+ details?: Record<string, any> | undefined;
330
+ };
331
+ ghidra: {
332
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
333
+ ok: boolean;
334
+ error?: string | null | undefined;
335
+ details?: Record<string, any> | undefined;
336
+ };
337
+ cache: {
338
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
339
+ ok: boolean;
340
+ error?: string | null | undefined;
341
+ details?: Record<string, any> | undefined;
342
+ };
343
+ static_worker: {
344
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
345
+ ok: boolean;
346
+ error?: string | null | undefined;
347
+ details?: Record<string, any> | undefined;
348
+ };
349
+ };
350
+ cache_observability: {
351
+ created_at: string | null;
352
+ key: string | null;
353
+ tier: string | null;
354
+ expires_at: string | null;
355
+ hit_at: string | null;
356
+ sample_sha256: string | null;
357
+ sample_state_consistent: boolean | null;
358
+ };
359
+ } | undefined;
360
+ warnings?: string[] | undefined;
361
+ errors?: string[] | undefined;
362
+ }, {
363
+ ok: boolean;
364
+ metrics?: {
365
+ elapsed_ms: number;
366
+ tool: string;
367
+ } | undefined;
368
+ data?: {
369
+ checked_at: string;
370
+ recommendations: string[];
371
+ overall_status: "degraded" | "healthy" | "unhealthy";
372
+ components: {
373
+ database: {
374
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
375
+ ok: boolean;
376
+ error?: string | null | undefined;
377
+ details?: Record<string, any> | undefined;
378
+ };
379
+ workspace: {
380
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
381
+ ok: boolean;
382
+ error?: string | null | undefined;
383
+ details?: Record<string, any> | undefined;
384
+ };
385
+ ghidra: {
386
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
387
+ ok: boolean;
388
+ error?: string | null | undefined;
389
+ details?: Record<string, any> | undefined;
390
+ };
391
+ cache: {
392
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
393
+ ok: boolean;
394
+ error?: string | null | undefined;
395
+ details?: Record<string, any> | undefined;
396
+ };
397
+ static_worker: {
398
+ status: "degraded" | "skipped" | "healthy" | "unhealthy";
399
+ ok: boolean;
400
+ error?: string | null | undefined;
401
+ details?: Record<string, any> | undefined;
402
+ };
403
+ };
404
+ cache_observability: {
405
+ created_at: string | null;
406
+ key: string | null;
407
+ tier: string | null;
408
+ expires_at: string | null;
409
+ hit_at: string | null;
410
+ sample_sha256: string | null;
411
+ sample_state_consistent: boolean | null;
412
+ };
413
+ } | undefined;
414
+ warnings?: string[] | undefined;
415
+ errors?: string[] | undefined;
416
+ }>;
417
+ export type SystemHealthInput = z.infer<typeof SystemHealthInputSchema>;
418
+ export type SystemHealthOutput = z.infer<typeof SystemHealthOutputSchema>;
419
+ export declare const systemHealthToolDefinition: ToolDefinition;
420
+ interface StaticWorkerHealthData {
421
+ status?: string;
422
+ worker?: Record<string, unknown>;
423
+ dependencies?: Record<string, unknown>;
424
+ yara_rules?: Record<string, unknown>;
425
+ checked_at?: string;
426
+ }
427
+ interface SystemHealthDependencies {
428
+ checkGhidra?: (timeoutMs: number) => GhidraHealthStatus;
429
+ probeStaticWorker?: (timeoutMs: number) => Promise<StaticWorkerHealthData>;
430
+ cacheManager?: CacheManager;
431
+ }
432
+ export declare function createSystemHealthHandler(workspaceManager: WorkspaceManager, database: DatabaseManager, dependencies?: SystemHealthDependencies): (args: ToolArgs) => Promise<WorkerResult>;
433
+ export {};
434
+ //# sourceMappingURL=system-health.d.ts.map