windows-exe-decompiler-mcp-server 0.1.0 → 0.1.3

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 (134) hide show
  1. package/CLAUDE_INSTALLATION.md +129 -0
  2. package/CODEX_INSTALLATION.md +25 -1
  3. package/COPILOT_INSTALLATION.md +29 -1
  4. package/LICENSE +21 -21
  5. package/README.md +232 -110
  6. package/dist/analysis-provenance.d.ts +50 -2
  7. package/dist/analysis-provenance.js +1 -0
  8. package/dist/analysis-task-runner.js +92 -0
  9. package/dist/config.d.ts +35 -16
  10. package/dist/config.js +37 -3
  11. package/dist/database.js +115 -115
  12. package/dist/decompiler-worker.d.ts +10 -5
  13. package/dist/decompiler-worker.js +240 -58
  14. package/dist/dynamic-trace.d.ts +6 -0
  15. package/dist/dynamic-trace.js +52 -1
  16. package/dist/ghidra-config.js +17 -1
  17. package/dist/index.js +38 -8
  18. package/dist/pe-runtime-functions.d.ts +90 -0
  19. package/dist/pe-runtime-functions.js +452 -0
  20. package/dist/prompts/module-reconstruction-review.d.ts +5 -0
  21. package/dist/prompts/module-reconstruction-review.js +65 -0
  22. package/dist/runtime-correlation.d.ts +5 -0
  23. package/dist/runtime-correlation.js +179 -2
  24. package/dist/sample-workspace.d.ts +28 -0
  25. package/dist/sample-workspace.js +186 -0
  26. package/dist/semantic-name-suggestion-artifacts.d.ts +56 -0
  27. package/dist/semantic-name-suggestion-artifacts.js +87 -0
  28. package/dist/server.js +1 -1
  29. package/dist/setup-guidance.d.ts +73 -0
  30. package/dist/setup-guidance.js +211 -0
  31. package/dist/tools/artifact-read.d.ts +10 -10
  32. package/dist/tools/artifacts-diff.d.ts +8 -8
  33. package/dist/tools/artifacts-list.d.ts +16 -16
  34. package/dist/tools/attack-map.d.ts +8 -8
  35. package/dist/tools/binary-role-profile.d.ts +1197 -0
  36. package/dist/tools/binary-role-profile.js +575 -0
  37. package/dist/tools/code-function-explain-apply.d.ts +12 -12
  38. package/dist/tools/code-function-explain-prepare.d.ts +12 -12
  39. package/dist/tools/code-function-explain-review.d.ts +58 -58
  40. package/dist/tools/code-function-rename-apply.d.ts +12 -12
  41. package/dist/tools/code-function-rename-prepare.d.ts +14 -14
  42. package/dist/tools/code-function-rename-review.d.ts +66 -66
  43. package/dist/tools/code-functions-define.d.ts +337 -0
  44. package/dist/tools/code-functions-define.js +337 -0
  45. package/dist/tools/code-functions-list.js +1 -1
  46. package/dist/tools/code-functions-rank.js +1 -1
  47. package/dist/tools/code-functions-reconstruct.d.ts +368 -58
  48. package/dist/tools/code-functions-reconstruct.js +130 -10
  49. package/dist/tools/code-functions-smart-recover.d.ts +352 -0
  50. package/dist/tools/code-functions-smart-recover.js +190 -0
  51. package/dist/tools/code-module-review-apply.d.ts +233 -0
  52. package/dist/tools/code-module-review-apply.js +209 -0
  53. package/dist/tools/code-module-review-prepare.d.ts +756 -0
  54. package/dist/tools/code-module-review-prepare.js +343 -0
  55. package/dist/tools/code-module-review.d.ts +474 -0
  56. package/dist/tools/code-module-review.js +566 -0
  57. package/dist/tools/code-reconstruct-export.d.ts +193 -21
  58. package/dist/tools/code-reconstruct-export.js +578 -21
  59. package/dist/tools/code-reconstruct-plan.d.ts +20 -20
  60. package/dist/tools/com-role-profile.d.ts +353 -0
  61. package/dist/tools/com-role-profile.js +186 -0
  62. package/dist/tools/dll-export-profile.d.ts +625 -0
  63. package/dist/tools/dll-export-profile.js +230 -0
  64. package/dist/tools/dotnet-metadata-extract.d.ts +122 -122
  65. package/dist/tools/dotnet-reconstruct-export.d.ts +49 -49
  66. package/dist/tools/dotnet-types-list.d.ts +66 -66
  67. package/dist/tools/dynamic-dependencies.d.ts +144 -8
  68. package/dist/tools/dynamic-dependencies.js +20 -1
  69. package/dist/tools/dynamic-memory-import.js +105 -2
  70. package/dist/tools/ghidra-analyze.d.ts +20 -0
  71. package/dist/tools/ghidra-analyze.js +10 -2
  72. package/dist/tools/ghidra-health.d.ts +177 -0
  73. package/dist/tools/ghidra-health.js +28 -0
  74. package/dist/tools/ioc-export.d.ts +8 -8
  75. package/dist/tools/packer-detect.d.ts +14 -14
  76. package/dist/tools/packer-detect.js +6 -9
  77. package/dist/tools/pe-exports-extract.d.ts +8 -8
  78. package/dist/tools/pe-exports-extract.js +6 -9
  79. package/dist/tools/pe-fingerprint.d.ts +36 -36
  80. package/dist/tools/pe-imports-extract.d.ts +8 -8
  81. package/dist/tools/pe-imports-extract.js +6 -9
  82. package/dist/tools/pe-pdata-extract.d.ts +448 -0
  83. package/dist/tools/pe-pdata-extract.js +219 -0
  84. package/dist/tools/pe-symbols-recover.d.ts +227 -0
  85. package/dist/tools/pe-symbols-recover.js +316 -0
  86. package/dist/tools/report-generate.d.ts +15 -1
  87. package/dist/tools/report-generate.js +139 -16
  88. package/dist/tools/report-summarize.d.ts +2242 -8
  89. package/dist/tools/report-summarize.js +246 -10
  90. package/dist/tools/runtime-detect.d.ts +8 -8
  91. package/dist/tools/runtime-detect.js +2 -12
  92. package/dist/tools/rust-binary-analyze.d.ts +2047 -0
  93. package/dist/tools/rust-binary-analyze.js +443 -0
  94. package/dist/tools/sample-profile-get.d.ts +135 -16
  95. package/dist/tools/sample-profile-get.js +35 -32
  96. package/dist/tools/sandbox-execute.d.ts +10 -10
  97. package/dist/tools/strings-extract.d.ts +8 -8
  98. package/dist/tools/strings-extract.js +2 -12
  99. package/dist/tools/strings-floss-decode.d.ts +8 -8
  100. package/dist/tools/system-health.d.ts +172 -36
  101. package/dist/tools/system-health.js +14 -0
  102. package/dist/tools/system-setup-guide.d.ts +179 -0
  103. package/dist/tools/system-setup-guide.js +62 -0
  104. package/dist/tools/tool-help.d.ts +16 -16
  105. package/dist/tools/tool-help.js +172 -0
  106. package/dist/tools/yara-scan.d.ts +8 -8
  107. package/dist/types.d.ts +2 -0
  108. package/dist/workflows/function-explanation-review.d.ts +3034 -76
  109. package/dist/workflows/function-explanation-review.js +172 -42
  110. package/dist/workflows/function-index-recover.d.ts +333 -0
  111. package/dist/workflows/function-index-recover.js +291 -0
  112. package/dist/workflows/module-reconstruction-review.d.ts +3537 -0
  113. package/dist/workflows/module-reconstruction-review.js +354 -0
  114. package/dist/workflows/reconstruct.d.ts +2182 -223
  115. package/dist/workflows/reconstruct.js +575 -32
  116. package/dist/workflows/semantic-name-review.d.ts +1436 -85
  117. package/dist/workflows/semantic-name-review.js +150 -58
  118. package/dist/workflows/triage.d.ts +8 -8
  119. package/ghidra_scripts/DecompileFunction.java +487 -487
  120. package/ghidra_scripts/ExtractCFG.java +256 -256
  121. package/ghidra_scripts/ExtractFunctions.java +442 -442
  122. package/ghidra_scripts/README.md +112 -112
  123. package/ghidra_scripts/SearchFunctionReferences.java +380 -380
  124. package/helpers/DotNetMetadataProbe/DotNetMetadataProbe.csproj +9 -9
  125. package/helpers/DotNetMetadataProbe/Program.cs +566 -566
  126. package/install-to-claude.ps1 +432 -0
  127. package/install-to-codex.ps1 +256 -178
  128. package/install-to-copilot.ps1 +389 -303
  129. package/package.json +4 -2
  130. package/requirements.txt +9 -9
  131. package/workers/requirements-dynamic.txt +11 -11
  132. package/workers/requirements.txt +8 -8
  133. package/workers/speakeasy_compat.py +175 -175
  134. package/workers/static_worker.py +3474 -3474
@@ -114,25 +114,25 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
114
114
  details?: Record<string, any> | undefined;
115
115
  }>;
116
116
  }, "strip", z.ZodTypeAny, {
117
- database: {
117
+ cache: {
118
118
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
119
119
  ok: boolean;
120
120
  error?: string | null | undefined;
121
121
  details?: Record<string, any> | undefined;
122
122
  };
123
- workspace: {
123
+ database: {
124
124
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
125
125
  ok: boolean;
126
126
  error?: string | null | undefined;
127
127
  details?: Record<string, any> | undefined;
128
128
  };
129
- ghidra: {
129
+ workspace: {
130
130
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
131
131
  ok: boolean;
132
132
  error?: string | null | undefined;
133
133
  details?: Record<string, any> | undefined;
134
134
  };
135
- cache: {
135
+ ghidra: {
136
136
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
137
137
  ok: boolean;
138
138
  error?: string | null | undefined;
@@ -145,25 +145,25 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
145
145
  details?: Record<string, any> | undefined;
146
146
  };
147
147
  }, {
148
- database: {
148
+ cache: {
149
149
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
150
150
  ok: boolean;
151
151
  error?: string | null | undefined;
152
152
  details?: Record<string, any> | undefined;
153
153
  };
154
- workspace: {
154
+ database: {
155
155
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
156
156
  ok: boolean;
157
157
  error?: string | null | undefined;
158
158
  details?: Record<string, any> | undefined;
159
159
  };
160
- ghidra: {
160
+ workspace: {
161
161
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
162
162
  ok: boolean;
163
163
  error?: string | null | undefined;
164
164
  details?: Record<string, any> | undefined;
165
165
  };
166
- cache: {
166
+ ghidra: {
167
167
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
168
168
  ok: boolean;
169
169
  error?: string | null | undefined;
@@ -202,30 +202,105 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
202
202
  sample_state_consistent: boolean | null;
203
203
  }>;
204
204
  recommendations: z.ZodArray<z.ZodString, "many">;
205
+ setup_actions: z.ZodArray<z.ZodObject<{
206
+ id: z.ZodString;
207
+ required: z.ZodBoolean;
208
+ kind: z.ZodEnum<["pip_install", "set_env", "provide_path", "verify_install"]>;
209
+ title: z.ZodString;
210
+ summary: z.ZodString;
211
+ command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
+ env_var: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
+ value_hint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ examples: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
215
+ applies_to: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ id: string;
218
+ summary: string;
219
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
220
+ title: string;
221
+ required: boolean;
222
+ examples: string[];
223
+ applies_to: string[];
224
+ command?: string | null | undefined;
225
+ env_var?: string | null | undefined;
226
+ value_hint?: string | null | undefined;
227
+ }, {
228
+ id: string;
229
+ summary: string;
230
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
231
+ title: string;
232
+ required: boolean;
233
+ command?: string | null | undefined;
234
+ env_var?: string | null | undefined;
235
+ value_hint?: string | null | undefined;
236
+ examples?: string[] | undefined;
237
+ applies_to?: string[] | undefined;
238
+ }>, "many">;
239
+ required_user_inputs: z.ZodArray<z.ZodObject<{
240
+ key: z.ZodString;
241
+ label: z.ZodString;
242
+ summary: z.ZodString;
243
+ required: z.ZodBoolean;
244
+ env_vars: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
245
+ examples: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ summary: string;
248
+ label: string;
249
+ required: boolean;
250
+ examples: string[];
251
+ key: string;
252
+ env_vars: string[];
253
+ }, {
254
+ summary: string;
255
+ label: string;
256
+ required: boolean;
257
+ key: string;
258
+ examples?: string[] | undefined;
259
+ env_vars?: string[] | undefined;
260
+ }>, "many">;
205
261
  }, "strip", z.ZodTypeAny, {
206
262
  checked_at: string;
263
+ setup_actions: {
264
+ id: string;
265
+ summary: string;
266
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
267
+ title: string;
268
+ required: boolean;
269
+ examples: string[];
270
+ applies_to: string[];
271
+ command?: string | null | undefined;
272
+ env_var?: string | null | undefined;
273
+ value_hint?: string | null | undefined;
274
+ }[];
275
+ required_user_inputs: {
276
+ summary: string;
277
+ label: string;
278
+ required: boolean;
279
+ examples: string[];
280
+ key: string;
281
+ env_vars: string[];
282
+ }[];
207
283
  recommendations: string[];
208
- overall_status: "degraded" | "healthy" | "unhealthy";
209
284
  components: {
210
- database: {
285
+ cache: {
211
286
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
212
287
  ok: boolean;
213
288
  error?: string | null | undefined;
214
289
  details?: Record<string, any> | undefined;
215
290
  };
216
- workspace: {
291
+ database: {
217
292
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
218
293
  ok: boolean;
219
294
  error?: string | null | undefined;
220
295
  details?: Record<string, any> | undefined;
221
296
  };
222
- ghidra: {
297
+ workspace: {
223
298
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
224
299
  ok: boolean;
225
300
  error?: string | null | undefined;
226
301
  details?: Record<string, any> | undefined;
227
302
  };
228
- cache: {
303
+ ghidra: {
229
304
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
230
305
  ok: boolean;
231
306
  error?: string | null | undefined;
@@ -238,6 +313,7 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
238
313
  details?: Record<string, any> | undefined;
239
314
  };
240
315
  };
316
+ overall_status: "degraded" | "healthy" | "unhealthy";
241
317
  cache_observability: {
242
318
  created_at: string | null;
243
319
  key: string | null;
@@ -249,28 +325,47 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
249
325
  };
250
326
  }, {
251
327
  checked_at: string;
328
+ setup_actions: {
329
+ id: string;
330
+ summary: string;
331
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
332
+ title: string;
333
+ required: boolean;
334
+ command?: string | null | undefined;
335
+ env_var?: string | null | undefined;
336
+ value_hint?: string | null | undefined;
337
+ examples?: string[] | undefined;
338
+ applies_to?: string[] | undefined;
339
+ }[];
340
+ required_user_inputs: {
341
+ summary: string;
342
+ label: string;
343
+ required: boolean;
344
+ key: string;
345
+ examples?: string[] | undefined;
346
+ env_vars?: string[] | undefined;
347
+ }[];
252
348
  recommendations: string[];
253
- overall_status: "degraded" | "healthy" | "unhealthy";
254
349
  components: {
255
- database: {
350
+ cache: {
256
351
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
257
352
  ok: boolean;
258
353
  error?: string | null | undefined;
259
354
  details?: Record<string, any> | undefined;
260
355
  };
261
- workspace: {
356
+ database: {
262
357
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
263
358
  ok: boolean;
264
359
  error?: string | null | undefined;
265
360
  details?: Record<string, any> | undefined;
266
361
  };
267
- ghidra: {
362
+ workspace: {
268
363
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
269
364
  ok: boolean;
270
365
  error?: string | null | undefined;
271
366
  details?: Record<string, any> | undefined;
272
367
  };
273
- cache: {
368
+ ghidra: {
274
369
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
275
370
  ok: boolean;
276
371
  error?: string | null | undefined;
@@ -283,6 +378,7 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
283
378
  details?: Record<string, any> | undefined;
284
379
  };
285
380
  };
381
+ overall_status: "degraded" | "healthy" | "unhealthy";
286
382
  cache_observability: {
287
383
  created_at: string | null;
288
384
  key: string | null;
@@ -307,34 +403,49 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
307
403
  }>>;
308
404
  }, "strip", z.ZodTypeAny, {
309
405
  ok: boolean;
310
- metrics?: {
311
- elapsed_ms: number;
312
- tool: string;
313
- } | undefined;
314
406
  data?: {
315
407
  checked_at: string;
408
+ setup_actions: {
409
+ id: string;
410
+ summary: string;
411
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
412
+ title: string;
413
+ required: boolean;
414
+ examples: string[];
415
+ applies_to: string[];
416
+ command?: string | null | undefined;
417
+ env_var?: string | null | undefined;
418
+ value_hint?: string | null | undefined;
419
+ }[];
420
+ required_user_inputs: {
421
+ summary: string;
422
+ label: string;
423
+ required: boolean;
424
+ examples: string[];
425
+ key: string;
426
+ env_vars: string[];
427
+ }[];
316
428
  recommendations: string[];
317
- overall_status: "degraded" | "healthy" | "unhealthy";
318
429
  components: {
319
- database: {
430
+ cache: {
320
431
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
321
432
  ok: boolean;
322
433
  error?: string | null | undefined;
323
434
  details?: Record<string, any> | undefined;
324
435
  };
325
- workspace: {
436
+ database: {
326
437
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
327
438
  ok: boolean;
328
439
  error?: string | null | undefined;
329
440
  details?: Record<string, any> | undefined;
330
441
  };
331
- ghidra: {
442
+ workspace: {
332
443
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
333
444
  ok: boolean;
334
445
  error?: string | null | undefined;
335
446
  details?: Record<string, any> | undefined;
336
447
  };
337
- cache: {
448
+ ghidra: {
338
449
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
339
450
  ok: boolean;
340
451
  error?: string | null | undefined;
@@ -347,6 +458,7 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
347
458
  details?: Record<string, any> | undefined;
348
459
  };
349
460
  };
461
+ overall_status: "degraded" | "healthy" | "unhealthy";
350
462
  cache_observability: {
351
463
  created_at: string | null;
352
464
  key: string | null;
@@ -357,38 +469,57 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
357
469
  sample_state_consistent: boolean | null;
358
470
  };
359
471
  } | undefined;
360
- warnings?: string[] | undefined;
361
- errors?: string[] | undefined;
362
- }, {
363
- ok: boolean;
364
472
  metrics?: {
365
473
  elapsed_ms: number;
366
474
  tool: string;
367
475
  } | undefined;
476
+ warnings?: string[] | undefined;
477
+ errors?: string[] | undefined;
478
+ }, {
479
+ ok: boolean;
368
480
  data?: {
369
481
  checked_at: string;
482
+ setup_actions: {
483
+ id: string;
484
+ summary: string;
485
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
486
+ title: string;
487
+ required: boolean;
488
+ command?: string | null | undefined;
489
+ env_var?: string | null | undefined;
490
+ value_hint?: string | null | undefined;
491
+ examples?: string[] | undefined;
492
+ applies_to?: string[] | undefined;
493
+ }[];
494
+ required_user_inputs: {
495
+ summary: string;
496
+ label: string;
497
+ required: boolean;
498
+ key: string;
499
+ examples?: string[] | undefined;
500
+ env_vars?: string[] | undefined;
501
+ }[];
370
502
  recommendations: string[];
371
- overall_status: "degraded" | "healthy" | "unhealthy";
372
503
  components: {
373
- database: {
504
+ cache: {
374
505
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
375
506
  ok: boolean;
376
507
  error?: string | null | undefined;
377
508
  details?: Record<string, any> | undefined;
378
509
  };
379
- workspace: {
510
+ database: {
380
511
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
381
512
  ok: boolean;
382
513
  error?: string | null | undefined;
383
514
  details?: Record<string, any> | undefined;
384
515
  };
385
- ghidra: {
516
+ workspace: {
386
517
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
387
518
  ok: boolean;
388
519
  error?: string | null | undefined;
389
520
  details?: Record<string, any> | undefined;
390
521
  };
391
- cache: {
522
+ ghidra: {
392
523
  status: "degraded" | "skipped" | "healthy" | "unhealthy";
393
524
  ok: boolean;
394
525
  error?: string | null | undefined;
@@ -401,6 +532,7 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
401
532
  details?: Record<string, any> | undefined;
402
533
  };
403
534
  };
535
+ overall_status: "degraded" | "healthy" | "unhealthy";
404
536
  cache_observability: {
405
537
  created_at: string | null;
406
538
  key: string | null;
@@ -411,6 +543,10 @@ export declare const SystemHealthOutputSchema: z.ZodObject<{
411
543
  sample_state_consistent: boolean | null;
412
544
  };
413
545
  } | undefined;
546
+ metrics?: {
547
+ elapsed_ms: number;
548
+ tool: string;
549
+ } | undefined;
414
550
  warnings?: string[] | undefined;
415
551
  errors?: string[] | undefined;
416
552
  }>;
@@ -11,6 +11,7 @@ import { z } from 'zod';
11
11
  import { checkGhidraHealth } from '../ghidra-config.js';
12
12
  import { resolvePackagePath } from '../runtime-paths.js';
13
13
  import { lookupCachedResult } from './cache-observability.js';
14
+ import { RequiredUserInputSchema, SetupActionSchema, buildBaselinePythonSetupActions, buildGhidraRequiredUserInputs, buildGhidraSetupActions, buildPyGhidraSetupActions, mergeRequiredUserInputs, mergeSetupActions, } from '../setup-guidance.js';
14
15
  const TOOL_NAME = 'system.health';
15
16
  const ComponentSchema = z.object({
16
17
  status: z.enum(['healthy', 'degraded', 'unhealthy', 'skipped']),
@@ -67,6 +68,8 @@ export const SystemHealthOutputSchema = z.object({
67
68
  }),
68
69
  cache_observability: CacheObservabilitySchema,
69
70
  recommendations: z.array(z.string()),
71
+ setup_actions: z.array(SetupActionSchema),
72
+ required_user_inputs: z.array(RequiredUserInputSchema),
70
73
  })
71
74
  .optional(),
72
75
  warnings: z.array(z.string()).optional(),
@@ -198,6 +201,8 @@ export function createSystemHealthHandler(workspaceManager, database, dependenci
198
201
  const startTime = Date.now();
199
202
  try {
200
203
  const recommendations = [];
204
+ let setupActions = [];
205
+ let requiredUserInputs = [];
201
206
  const warnings = [];
202
207
  const workspaceRoot = workspaceManager.getWorkspaceRoot();
203
208
  let workspaceComponent;
@@ -254,9 +259,12 @@ export function createSystemHealthHandler(workspaceManager, database, dependenci
254
259
  if (ghidraStatus.checks?.pyghidra_available === false) {
255
260
  warnings.push('PyGhidra is unavailable; Python post-scripts may fail and Java fallback will be used.');
256
261
  recommendations.push('Install pyghidra in the active Python environment to improve script compatibility.');
262
+ setupActions = mergeSetupActions(setupActions, buildPyGhidraSetupActions());
257
263
  }
258
264
  if (!ghidraStatus.ok) {
259
265
  recommendations.push('Fix Ghidra install path or launch check before decompiler workloads.');
266
+ setupActions = mergeSetupActions(setupActions, buildGhidraSetupActions());
267
+ requiredUserInputs = mergeRequiredUserInputs(requiredUserInputs, buildGhidraRequiredUserInputs());
260
268
  }
261
269
  }
262
270
  catch (error) {
@@ -266,6 +274,8 @@ export function createSystemHealthHandler(workspaceManager, database, dependenci
266
274
  error: normalizeError(error),
267
275
  };
268
276
  recommendations.push('Investigate ghidra.health probe failure.');
277
+ setupActions = mergeSetupActions(setupActions, buildGhidraSetupActions(), buildPyGhidraSetupActions());
278
+ requiredUserInputs = mergeRequiredUserInputs(requiredUserInputs, buildGhidraRequiredUserInputs());
269
279
  }
270
280
  }
271
281
  let staticWorkerComponent = {
@@ -289,6 +299,7 @@ export function createSystemHealthHandler(workspaceManager, database, dependenci
289
299
  };
290
300
  if (status !== 'healthy') {
291
301
  recommendations.push('Install/repair Python dependencies (yara-python, flare-floss, yara rules) for static analysis stability.');
302
+ setupActions = mergeSetupActions(setupActions, buildBaselinePythonSetupActions());
292
303
  }
293
304
  }
294
305
  catch (error) {
@@ -298,6 +309,7 @@ export function createSystemHealthHandler(workspaceManager, database, dependenci
298
309
  error: normalizeError(error),
299
310
  };
300
311
  recommendations.push('Fix Python runtime or static worker startup to avoid analysis outages.');
312
+ setupActions = mergeSetupActions(setupActions, buildBaselinePythonSetupActions());
301
313
  }
302
314
  }
303
315
  let cacheComponent = {
@@ -423,6 +435,8 @@ export function createSystemHealthHandler(workspaceManager, database, dependenci
423
435
  },
424
436
  cache_observability: cacheObservability,
425
437
  recommendations,
438
+ setup_actions: setupActions,
439
+ required_user_inputs: requiredUserInputs,
426
440
  },
427
441
  warnings: warnings.length > 0 ? warnings : undefined,
428
442
  metrics: {
@@ -0,0 +1,179 @@
1
+ import { z } from 'zod';
2
+ import type { ToolArgs, ToolDefinition, WorkerResult } from '../types.js';
3
+ export declare const systemSetupGuideInputSchema: z.ZodObject<{
4
+ focus: z.ZodDefault<z.ZodEnum<["all", "python", "dynamic", "ghidra"]>>;
5
+ include_optional: z.ZodDefault<z.ZodBoolean>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ focus: "ghidra" | "all" | "python" | "dynamic";
8
+ include_optional: boolean;
9
+ }, {
10
+ focus?: "ghidra" | "all" | "python" | "dynamic" | undefined;
11
+ include_optional?: boolean | undefined;
12
+ }>;
13
+ export declare const systemSetupGuideOutputSchema: z.ZodObject<{
14
+ ok: z.ZodBoolean;
15
+ data: z.ZodObject<{
16
+ focus: z.ZodEnum<["all", "python", "dynamic", "ghidra"]>;
17
+ setup_actions: z.ZodArray<z.ZodObject<{
18
+ id: z.ZodString;
19
+ required: z.ZodBoolean;
20
+ kind: z.ZodEnum<["pip_install", "set_env", "provide_path", "verify_install"]>;
21
+ title: z.ZodString;
22
+ summary: z.ZodString;
23
+ command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ env_var: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ value_hint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ examples: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
27
+ applies_to: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ id: string;
30
+ summary: string;
31
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
32
+ title: string;
33
+ required: boolean;
34
+ examples: string[];
35
+ applies_to: string[];
36
+ command?: string | null | undefined;
37
+ env_var?: string | null | undefined;
38
+ value_hint?: string | null | undefined;
39
+ }, {
40
+ id: string;
41
+ summary: string;
42
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
43
+ title: string;
44
+ required: boolean;
45
+ command?: string | null | undefined;
46
+ env_var?: string | null | undefined;
47
+ value_hint?: string | null | undefined;
48
+ examples?: string[] | undefined;
49
+ applies_to?: string[] | undefined;
50
+ }>, "many">;
51
+ required_user_inputs: z.ZodArray<z.ZodObject<{
52
+ key: z.ZodString;
53
+ label: z.ZodString;
54
+ summary: z.ZodString;
55
+ required: z.ZodBoolean;
56
+ env_vars: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
57
+ examples: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ summary: string;
60
+ label: string;
61
+ required: boolean;
62
+ examples: string[];
63
+ key: string;
64
+ env_vars: string[];
65
+ }, {
66
+ summary: string;
67
+ label: string;
68
+ required: boolean;
69
+ key: string;
70
+ examples?: string[] | undefined;
71
+ env_vars?: string[] | undefined;
72
+ }>, "many">;
73
+ notes: z.ZodArray<z.ZodString, "many">;
74
+ }, "strip", z.ZodTypeAny, {
75
+ notes: string[];
76
+ setup_actions: {
77
+ id: string;
78
+ summary: string;
79
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
80
+ title: string;
81
+ required: boolean;
82
+ examples: string[];
83
+ applies_to: string[];
84
+ command?: string | null | undefined;
85
+ env_var?: string | null | undefined;
86
+ value_hint?: string | null | undefined;
87
+ }[];
88
+ required_user_inputs: {
89
+ summary: string;
90
+ label: string;
91
+ required: boolean;
92
+ examples: string[];
93
+ key: string;
94
+ env_vars: string[];
95
+ }[];
96
+ focus: "ghidra" | "all" | "python" | "dynamic";
97
+ }, {
98
+ notes: string[];
99
+ setup_actions: {
100
+ id: string;
101
+ summary: string;
102
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
103
+ title: string;
104
+ required: boolean;
105
+ command?: string | null | undefined;
106
+ env_var?: string | null | undefined;
107
+ value_hint?: string | null | undefined;
108
+ examples?: string[] | undefined;
109
+ applies_to?: string[] | undefined;
110
+ }[];
111
+ required_user_inputs: {
112
+ summary: string;
113
+ label: string;
114
+ required: boolean;
115
+ key: string;
116
+ examples?: string[] | undefined;
117
+ env_vars?: string[] | undefined;
118
+ }[];
119
+ focus: "ghidra" | "all" | "python" | "dynamic";
120
+ }>;
121
+ errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
122
+ }, "strip", z.ZodTypeAny, {
123
+ data: {
124
+ notes: string[];
125
+ setup_actions: {
126
+ id: string;
127
+ summary: string;
128
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
129
+ title: string;
130
+ required: boolean;
131
+ examples: string[];
132
+ applies_to: string[];
133
+ command?: string | null | undefined;
134
+ env_var?: string | null | undefined;
135
+ value_hint?: string | null | undefined;
136
+ }[];
137
+ required_user_inputs: {
138
+ summary: string;
139
+ label: string;
140
+ required: boolean;
141
+ examples: string[];
142
+ key: string;
143
+ env_vars: string[];
144
+ }[];
145
+ focus: "ghidra" | "all" | "python" | "dynamic";
146
+ };
147
+ ok: boolean;
148
+ errors?: string[] | undefined;
149
+ }, {
150
+ data: {
151
+ notes: string[];
152
+ setup_actions: {
153
+ id: string;
154
+ summary: string;
155
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
156
+ title: string;
157
+ required: boolean;
158
+ command?: string | null | undefined;
159
+ env_var?: string | null | undefined;
160
+ value_hint?: string | null | undefined;
161
+ examples?: string[] | undefined;
162
+ applies_to?: string[] | undefined;
163
+ }[];
164
+ required_user_inputs: {
165
+ summary: string;
166
+ label: string;
167
+ required: boolean;
168
+ key: string;
169
+ examples?: string[] | undefined;
170
+ env_vars?: string[] | undefined;
171
+ }[];
172
+ focus: "ghidra" | "all" | "python" | "dynamic";
173
+ };
174
+ ok: boolean;
175
+ errors?: string[] | undefined;
176
+ }>;
177
+ export declare const systemSetupGuideToolDefinition: ToolDefinition;
178
+ export declare function createSystemSetupGuideHandler(): (args: ToolArgs) => Promise<WorkerResult>;
179
+ //# sourceMappingURL=system-setup-guide.d.ts.map