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
@@ -7,6 +7,7 @@ import type { ToolDefinition, ToolArgs, WorkerResult } from '../types.js';
7
7
  import type { WorkspaceManager } from '../workspace-manager.js';
8
8
  import type { DatabaseManager } from '../database.js';
9
9
  import type { CacheManager } from '../cache-manager.js';
10
+ import type { JobQueue } from '../job-queue.js';
10
11
  export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
11
12
  sample_id: z.ZodString;
12
13
  path: z.ZodDefault<z.ZodEnum<["auto", "native", "dotnet"]>>;
@@ -25,6 +26,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
25
26
  compare_evidence_session_tag: z.ZodOptional<z.ZodString>;
26
27
  compare_semantic_scope: z.ZodOptional<z.ZodEnum<["all", "latest", "session"]>>;
27
28
  compare_semantic_session_tag: z.ZodOptional<z.ZodString>;
29
+ include_preflight: z.ZodDefault<z.ZodBoolean>;
30
+ auto_recover_function_index: z.ZodDefault<z.ZodBoolean>;
28
31
  include_plan: z.ZodDefault<z.ZodBoolean>;
29
32
  include_obfuscation_fallback: z.ZodDefault<z.ZodBoolean>;
30
33
  fallback_on_error: z.ZodDefault<z.ZodBoolean>;
@@ -42,6 +45,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
42
45
  run_timeout_ms: number;
43
46
  reuse_cached: boolean;
44
47
  include_obfuscation_fallback: boolean;
48
+ include_preflight: boolean;
49
+ auto_recover_function_index: boolean;
45
50
  include_plan: boolean;
46
51
  fallback_on_error: boolean;
47
52
  allow_partial: boolean;
@@ -73,6 +78,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
73
78
  compare_evidence_session_tag?: string | undefined;
74
79
  compare_semantic_scope?: "all" | "latest" | "session" | undefined;
75
80
  compare_semantic_session_tag?: string | undefined;
81
+ include_preflight?: boolean | undefined;
82
+ auto_recover_function_index?: boolean | undefined;
76
83
  include_plan?: boolean | undefined;
77
84
  fallback_on_error?: boolean | undefined;
78
85
  allow_partial?: boolean | undefined;
@@ -88,6 +95,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
88
95
  run_timeout_ms: number;
89
96
  reuse_cached: boolean;
90
97
  include_obfuscation_fallback: boolean;
98
+ include_preflight: boolean;
99
+ auto_recover_function_index: boolean;
91
100
  include_plan: boolean;
92
101
  fallback_on_error: boolean;
93
102
  allow_partial: boolean;
@@ -119,6 +128,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
119
128
  compare_evidence_session_tag?: string | undefined;
120
129
  compare_semantic_scope?: "all" | "latest" | "session" | undefined;
121
130
  compare_semantic_session_tag?: string | undefined;
131
+ include_preflight?: boolean | undefined;
132
+ auto_recover_function_index?: boolean | undefined;
122
133
  include_plan?: boolean | undefined;
123
134
  fallback_on_error?: boolean | undefined;
124
135
  allow_partial?: boolean | undefined;
@@ -134,6 +145,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
134
145
  run_timeout_ms: number;
135
146
  reuse_cached: boolean;
136
147
  include_obfuscation_fallback: boolean;
148
+ include_preflight: boolean;
149
+ auto_recover_function_index: boolean;
137
150
  include_plan: boolean;
138
151
  fallback_on_error: boolean;
139
152
  allow_partial: boolean;
@@ -165,6 +178,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
165
178
  compare_evidence_session_tag?: string | undefined;
166
179
  compare_semantic_scope?: "all" | "latest" | "session" | undefined;
167
180
  compare_semantic_session_tag?: string | undefined;
181
+ include_preflight?: boolean | undefined;
182
+ auto_recover_function_index?: boolean | undefined;
168
183
  include_plan?: boolean | undefined;
169
184
  fallback_on_error?: boolean | undefined;
170
185
  allow_partial?: boolean | undefined;
@@ -180,6 +195,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
180
195
  run_timeout_ms: number;
181
196
  reuse_cached: boolean;
182
197
  include_obfuscation_fallback: boolean;
198
+ include_preflight: boolean;
199
+ auto_recover_function_index: boolean;
183
200
  include_plan: boolean;
184
201
  fallback_on_error: boolean;
185
202
  allow_partial: boolean;
@@ -211,6 +228,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
211
228
  compare_evidence_session_tag?: string | undefined;
212
229
  compare_semantic_scope?: "all" | "latest" | "session" | undefined;
213
230
  compare_semantic_session_tag?: string | undefined;
231
+ include_preflight?: boolean | undefined;
232
+ auto_recover_function_index?: boolean | undefined;
214
233
  include_plan?: boolean | undefined;
215
234
  fallback_on_error?: boolean | undefined;
216
235
  allow_partial?: boolean | undefined;
@@ -226,6 +245,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
226
245
  run_timeout_ms: number;
227
246
  reuse_cached: boolean;
228
247
  include_obfuscation_fallback: boolean;
248
+ include_preflight: boolean;
249
+ auto_recover_function_index: boolean;
229
250
  include_plan: boolean;
230
251
  fallback_on_error: boolean;
231
252
  allow_partial: boolean;
@@ -257,6 +278,8 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
257
278
  compare_evidence_session_tag?: string | undefined;
258
279
  compare_semantic_scope?: "all" | "latest" | "session" | undefined;
259
280
  compare_semantic_session_tag?: string | undefined;
281
+ include_preflight?: boolean | undefined;
282
+ auto_recover_function_index?: boolean | undefined;
260
283
  include_plan?: boolean | undefined;
261
284
  fallback_on_error?: boolean | undefined;
262
285
  allow_partial?: boolean | undefined;
@@ -264,22 +287,37 @@ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z
264
287
  export type ReconstructWorkflowInput = z.infer<typeof ReconstructWorkflowInputSchema>;
265
288
  export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
266
289
  ok: z.ZodBoolean;
267
- data: z.ZodOptional<z.ZodObject<{
290
+ data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
268
291
  sample_id: z.ZodString;
269
292
  selected_path: z.ZodEnum<["native", "dotnet"]>;
270
293
  degraded: z.ZodBoolean;
271
294
  stage_status: z.ZodObject<{
272
295
  runtime: z.ZodEnum<["ok", "failed"]>;
296
+ preflight_binary_profile: z.ZodEnum<["ok", "failed", "skipped"]>;
297
+ preflight_dll_profile: z.ZodEnum<["ok", "failed", "skipped"]>;
298
+ preflight_com_profile: z.ZodEnum<["ok", "failed", "skipped"]>;
299
+ preflight_rust_profile: z.ZodEnum<["ok", "failed", "skipped"]>;
300
+ function_index_recovery: z.ZodEnum<["ok", "failed", "skipped"]>;
273
301
  plan: z.ZodEnum<["ok", "failed", "skipped"]>;
274
302
  export_primary: z.ZodEnum<["ok", "failed", "skipped"]>;
275
303
  export_fallback: z.ZodEnum<["ok", "failed", "skipped"]>;
276
304
  }, "strip", z.ZodTypeAny, {
277
305
  runtime: "failed" | "ok";
306
+ function_index_recovery: "failed" | "ok" | "skipped";
307
+ preflight_binary_profile: "failed" | "ok" | "skipped";
308
+ preflight_dll_profile: "failed" | "ok" | "skipped";
309
+ preflight_com_profile: "failed" | "ok" | "skipped";
310
+ preflight_rust_profile: "failed" | "ok" | "skipped";
278
311
  plan: "failed" | "ok" | "skipped";
279
312
  export_primary: "failed" | "ok" | "skipped";
280
313
  export_fallback: "failed" | "ok" | "skipped";
281
314
  }, {
282
315
  runtime: "failed" | "ok";
316
+ function_index_recovery: "failed" | "ok" | "skipped";
317
+ preflight_binary_profile: "failed" | "ok" | "skipped";
318
+ preflight_dll_profile: "failed" | "ok" | "skipped";
319
+ preflight_com_profile: "failed" | "ok" | "skipped";
320
+ preflight_rust_profile: "failed" | "ok" | "skipped";
283
321
  plan: "failed" | "ok" | "skipped";
284
322
  export_primary: "failed" | "ok" | "skipped";
285
323
  export_fallback: "failed" | "ok" | "skipped";
@@ -369,6 +407,34 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
369
407
  earliest_artifact_at: string | null;
370
408
  latest_artifact_at: string | null;
371
409
  }>>;
410
+ semantic_module_reviews: z.ZodOptional<z.ZodObject<{
411
+ scope: z.ZodEnum<["all", "latest", "session"]>;
412
+ session_selector: z.ZodNullable<z.ZodString>;
413
+ artifact_count: z.ZodNumber;
414
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
415
+ session_tags: z.ZodArray<z.ZodString, "many">;
416
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
417
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
418
+ scope_note: z.ZodString;
419
+ }, "strip", z.ZodTypeAny, {
420
+ artifact_count: number;
421
+ scope_note: string;
422
+ artifact_ids: string[];
423
+ session_selector: string | null;
424
+ session_tags: string[];
425
+ scope: "all" | "latest" | "session";
426
+ earliest_artifact_at: string | null;
427
+ latest_artifact_at: string | null;
428
+ }, {
429
+ artifact_count: number;
430
+ scope_note: string;
431
+ artifact_ids: string[];
432
+ session_selector: string | null;
433
+ session_tags: string[];
434
+ scope: "all" | "latest" | "session";
435
+ earliest_artifact_at: string | null;
436
+ latest_artifact_at: string | null;
437
+ }>>;
372
438
  }, "strip", z.ZodTypeAny, {
373
439
  runtime: {
374
440
  artifact_count: number;
@@ -380,6 +446,16 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
380
446
  earliest_artifact_at: string | null;
381
447
  latest_artifact_at: string | null;
382
448
  };
449
+ semantic_module_reviews?: {
450
+ artifact_count: number;
451
+ scope_note: string;
452
+ artifact_ids: string[];
453
+ session_selector: string | null;
454
+ session_tags: string[];
455
+ scope: "all" | "latest" | "session";
456
+ earliest_artifact_at: string | null;
457
+ latest_artifact_at: string | null;
458
+ } | undefined;
383
459
  semantic_names?: {
384
460
  artifact_count: number;
385
461
  scope_note: string;
@@ -411,6 +487,16 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
411
487
  earliest_artifact_at: string | null;
412
488
  latest_artifact_at: string | null;
413
489
  };
490
+ semantic_module_reviews?: {
491
+ artifact_count: number;
492
+ scope_note: string;
493
+ artifact_ids: string[];
494
+ session_selector: string | null;
495
+ session_tags: string[];
496
+ scope: "all" | "latest" | "session";
497
+ earliest_artifact_at: string | null;
498
+ latest_artifact_at: string | null;
499
+ } | undefined;
414
500
  semantic_names?: {
415
501
  artifact_count: number;
416
502
  scope_note: string;
@@ -989,6 +1075,1023 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
989
1075
  target_framework: string | null;
990
1076
  primary_runtime: string | null;
991
1077
  }>;
1078
+ preflight: z.ZodOptional<z.ZodObject<{
1079
+ binary_profile: z.ZodNullable<z.ZodObject<{
1080
+ sample_id: z.ZodString;
1081
+ original_filename: z.ZodNullable<z.ZodString>;
1082
+ binary_role: z.ZodString;
1083
+ role_confidence: z.ZodNumber;
1084
+ runtime_hint: z.ZodObject<{
1085
+ is_dotnet: z.ZodNullable<z.ZodBoolean>;
1086
+ dotnet_version: z.ZodNullable<z.ZodString>;
1087
+ target_framework: z.ZodNullable<z.ZodString>;
1088
+ primary_runtime: z.ZodNullable<z.ZodString>;
1089
+ }, "strip", z.ZodTypeAny, {
1090
+ is_dotnet: boolean | null;
1091
+ dotnet_version: string | null;
1092
+ target_framework: string | null;
1093
+ primary_runtime: string | null;
1094
+ }, {
1095
+ is_dotnet: boolean | null;
1096
+ dotnet_version: string | null;
1097
+ target_framework: string | null;
1098
+ primary_runtime: string | null;
1099
+ }>;
1100
+ export_surface: z.ZodObject<{
1101
+ total_exports: z.ZodNumber;
1102
+ total_forwarders: z.ZodNumber;
1103
+ notable_exports: z.ZodArray<z.ZodString, "many">;
1104
+ com_related_exports: z.ZodArray<z.ZodString, "many">;
1105
+ service_related_exports: z.ZodArray<z.ZodString, "many">;
1106
+ plugin_related_exports: z.ZodArray<z.ZodString, "many">;
1107
+ forwarded_exports: z.ZodArray<z.ZodString, "many">;
1108
+ }, "strip", z.ZodTypeAny, {
1109
+ total_exports: number;
1110
+ total_forwarders: number;
1111
+ notable_exports: string[];
1112
+ com_related_exports: string[];
1113
+ service_related_exports: string[];
1114
+ plugin_related_exports: string[];
1115
+ forwarded_exports: string[];
1116
+ }, {
1117
+ total_exports: number;
1118
+ total_forwarders: number;
1119
+ notable_exports: string[];
1120
+ com_related_exports: string[];
1121
+ service_related_exports: string[];
1122
+ plugin_related_exports: string[];
1123
+ forwarded_exports: string[];
1124
+ }>;
1125
+ import_surface: z.ZodObject<{
1126
+ dll_count: z.ZodNumber;
1127
+ notable_dlls: z.ZodArray<z.ZodString, "many">;
1128
+ com_related_imports: z.ZodArray<z.ZodString, "many">;
1129
+ service_related_imports: z.ZodArray<z.ZodString, "many">;
1130
+ network_related_imports: z.ZodArray<z.ZodString, "many">;
1131
+ process_related_imports: z.ZodArray<z.ZodString, "many">;
1132
+ }, "strip", z.ZodTypeAny, {
1133
+ dll_count: number;
1134
+ notable_dlls: string[];
1135
+ com_related_imports: string[];
1136
+ service_related_imports: string[];
1137
+ network_related_imports: string[];
1138
+ process_related_imports: string[];
1139
+ }, {
1140
+ dll_count: number;
1141
+ notable_dlls: string[];
1142
+ com_related_imports: string[];
1143
+ service_related_imports: string[];
1144
+ network_related_imports: string[];
1145
+ process_related_imports: string[];
1146
+ }>;
1147
+ packed: z.ZodBoolean;
1148
+ packing_confidence: z.ZodNumber;
1149
+ indicators: z.ZodObject<{
1150
+ com_server: z.ZodObject<{
1151
+ likely: z.ZodBoolean;
1152
+ confidence: z.ZodNumber;
1153
+ evidence: z.ZodArray<z.ZodString, "many">;
1154
+ }, "strip", z.ZodTypeAny, {
1155
+ confidence: number;
1156
+ evidence: string[];
1157
+ likely: boolean;
1158
+ }, {
1159
+ confidence: number;
1160
+ evidence: string[];
1161
+ likely: boolean;
1162
+ }>;
1163
+ service_binary: z.ZodObject<{
1164
+ likely: z.ZodBoolean;
1165
+ confidence: z.ZodNumber;
1166
+ evidence: z.ZodArray<z.ZodString, "many">;
1167
+ }, "strip", z.ZodTypeAny, {
1168
+ confidence: number;
1169
+ evidence: string[];
1170
+ likely: boolean;
1171
+ }, {
1172
+ confidence: number;
1173
+ evidence: string[];
1174
+ likely: boolean;
1175
+ }>;
1176
+ plugin_binary: z.ZodObject<{
1177
+ likely: z.ZodBoolean;
1178
+ confidence: z.ZodNumber;
1179
+ evidence: z.ZodArray<z.ZodString, "many">;
1180
+ }, "strip", z.ZodTypeAny, {
1181
+ confidence: number;
1182
+ evidence: string[];
1183
+ likely: boolean;
1184
+ }, {
1185
+ confidence: number;
1186
+ evidence: string[];
1187
+ likely: boolean;
1188
+ }>;
1189
+ driver_binary: z.ZodObject<{
1190
+ likely: z.ZodBoolean;
1191
+ confidence: z.ZodNumber;
1192
+ evidence: z.ZodArray<z.ZodString, "many">;
1193
+ }, "strip", z.ZodTypeAny, {
1194
+ confidence: number;
1195
+ evidence: string[];
1196
+ likely: boolean;
1197
+ }, {
1198
+ confidence: number;
1199
+ evidence: string[];
1200
+ likely: boolean;
1201
+ }>;
1202
+ }, "strip", z.ZodTypeAny, {
1203
+ com_server: {
1204
+ confidence: number;
1205
+ evidence: string[];
1206
+ likely: boolean;
1207
+ };
1208
+ service_binary: {
1209
+ confidence: number;
1210
+ evidence: string[];
1211
+ likely: boolean;
1212
+ };
1213
+ plugin_binary: {
1214
+ confidence: number;
1215
+ evidence: string[];
1216
+ likely: boolean;
1217
+ };
1218
+ driver_binary: {
1219
+ confidence: number;
1220
+ evidence: string[];
1221
+ likely: boolean;
1222
+ };
1223
+ }, {
1224
+ com_server: {
1225
+ confidence: number;
1226
+ evidence: string[];
1227
+ likely: boolean;
1228
+ };
1229
+ service_binary: {
1230
+ confidence: number;
1231
+ evidence: string[];
1232
+ likely: boolean;
1233
+ };
1234
+ plugin_binary: {
1235
+ confidence: number;
1236
+ evidence: string[];
1237
+ likely: boolean;
1238
+ };
1239
+ driver_binary: {
1240
+ confidence: number;
1241
+ evidence: string[];
1242
+ likely: boolean;
1243
+ };
1244
+ }>;
1245
+ export_dispatch_profile: z.ZodObject<{
1246
+ command_like_exports: z.ZodArray<z.ZodString, "many">;
1247
+ callback_like_exports: z.ZodArray<z.ZodString, "many">;
1248
+ registration_exports: z.ZodArray<z.ZodString, "many">;
1249
+ ordinal_only_exports: z.ZodNumber;
1250
+ likely_dispatch_model: z.ZodString;
1251
+ confidence: z.ZodNumber;
1252
+ }, "strip", z.ZodTypeAny, {
1253
+ confidence: number;
1254
+ command_like_exports: string[];
1255
+ callback_like_exports: string[];
1256
+ registration_exports: string[];
1257
+ ordinal_only_exports: number;
1258
+ likely_dispatch_model: string;
1259
+ }, {
1260
+ confidence: number;
1261
+ command_like_exports: string[];
1262
+ callback_like_exports: string[];
1263
+ registration_exports: string[];
1264
+ ordinal_only_exports: number;
1265
+ likely_dispatch_model: string;
1266
+ }>;
1267
+ lifecycle_surface: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1268
+ com_profile: z.ZodObject<{
1269
+ clsid_strings: z.ZodArray<z.ZodString, "many">;
1270
+ progid_strings: z.ZodArray<z.ZodString, "many">;
1271
+ interface_hints: z.ZodArray<z.ZodString, "many">;
1272
+ registration_strings: z.ZodArray<z.ZodString, "many">;
1273
+ class_factory_exports: z.ZodArray<z.ZodString, "many">;
1274
+ class_factory_surface: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1275
+ confidence: z.ZodNumber;
1276
+ }, "strip", z.ZodTypeAny, {
1277
+ confidence: number;
1278
+ clsid_strings: string[];
1279
+ progid_strings: string[];
1280
+ interface_hints: string[];
1281
+ registration_strings: string[];
1282
+ class_factory_exports: string[];
1283
+ class_factory_surface: string[];
1284
+ }, {
1285
+ confidence: number;
1286
+ clsid_strings: string[];
1287
+ progid_strings: string[];
1288
+ interface_hints: string[];
1289
+ registration_strings: string[];
1290
+ class_factory_exports: string[];
1291
+ class_factory_surface?: string[] | undefined;
1292
+ }>;
1293
+ host_interaction_profile: z.ZodObject<{
1294
+ likely_hosted: z.ZodBoolean;
1295
+ host_hints: z.ZodArray<z.ZodString, "many">;
1296
+ callback_exports: z.ZodArray<z.ZodString, "many">;
1297
+ callback_surface: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1298
+ callback_strings: z.ZodArray<z.ZodString, "many">;
1299
+ service_hooks: z.ZodArray<z.ZodString, "many">;
1300
+ confidence: z.ZodNumber;
1301
+ }, "strip", z.ZodTypeAny, {
1302
+ confidence: number;
1303
+ callback_surface: string[];
1304
+ likely_hosted: boolean;
1305
+ host_hints: string[];
1306
+ callback_exports: string[];
1307
+ callback_strings: string[];
1308
+ service_hooks: string[];
1309
+ }, {
1310
+ confidence: number;
1311
+ likely_hosted: boolean;
1312
+ host_hints: string[];
1313
+ callback_exports: string[];
1314
+ callback_strings: string[];
1315
+ service_hooks: string[];
1316
+ callback_surface?: string[] | undefined;
1317
+ }>;
1318
+ analysis_priorities: z.ZodArray<z.ZodString, "many">;
1319
+ strings_considered: z.ZodNumber;
1320
+ }, "strip", z.ZodTypeAny, {
1321
+ sample_id: string;
1322
+ indicators: {
1323
+ com_server: {
1324
+ confidence: number;
1325
+ evidence: string[];
1326
+ likely: boolean;
1327
+ };
1328
+ service_binary: {
1329
+ confidence: number;
1330
+ evidence: string[];
1331
+ likely: boolean;
1332
+ };
1333
+ plugin_binary: {
1334
+ confidence: number;
1335
+ evidence: string[];
1336
+ likely: boolean;
1337
+ };
1338
+ driver_binary: {
1339
+ confidence: number;
1340
+ evidence: string[];
1341
+ likely: boolean;
1342
+ };
1343
+ };
1344
+ export_surface: {
1345
+ total_exports: number;
1346
+ total_forwarders: number;
1347
+ notable_exports: string[];
1348
+ com_related_exports: string[];
1349
+ service_related_exports: string[];
1350
+ plugin_related_exports: string[];
1351
+ forwarded_exports: string[];
1352
+ };
1353
+ packed: boolean;
1354
+ binary_role: string;
1355
+ original_filename: string | null;
1356
+ packing_confidence: number;
1357
+ analysis_priorities: string[];
1358
+ role_confidence: number;
1359
+ runtime_hint: {
1360
+ is_dotnet: boolean | null;
1361
+ dotnet_version: string | null;
1362
+ target_framework: string | null;
1363
+ primary_runtime: string | null;
1364
+ };
1365
+ import_surface: {
1366
+ dll_count: number;
1367
+ notable_dlls: string[];
1368
+ com_related_imports: string[];
1369
+ service_related_imports: string[];
1370
+ network_related_imports: string[];
1371
+ process_related_imports: string[];
1372
+ };
1373
+ export_dispatch_profile: {
1374
+ confidence: number;
1375
+ command_like_exports: string[];
1376
+ callback_like_exports: string[];
1377
+ registration_exports: string[];
1378
+ ordinal_only_exports: number;
1379
+ likely_dispatch_model: string;
1380
+ };
1381
+ lifecycle_surface: string[];
1382
+ com_profile: {
1383
+ confidence: number;
1384
+ clsid_strings: string[];
1385
+ progid_strings: string[];
1386
+ interface_hints: string[];
1387
+ registration_strings: string[];
1388
+ class_factory_exports: string[];
1389
+ class_factory_surface: string[];
1390
+ };
1391
+ host_interaction_profile: {
1392
+ confidence: number;
1393
+ callback_surface: string[];
1394
+ likely_hosted: boolean;
1395
+ host_hints: string[];
1396
+ callback_exports: string[];
1397
+ callback_strings: string[];
1398
+ service_hooks: string[];
1399
+ };
1400
+ strings_considered: number;
1401
+ }, {
1402
+ sample_id: string;
1403
+ indicators: {
1404
+ com_server: {
1405
+ confidence: number;
1406
+ evidence: string[];
1407
+ likely: boolean;
1408
+ };
1409
+ service_binary: {
1410
+ confidence: number;
1411
+ evidence: string[];
1412
+ likely: boolean;
1413
+ };
1414
+ plugin_binary: {
1415
+ confidence: number;
1416
+ evidence: string[];
1417
+ likely: boolean;
1418
+ };
1419
+ driver_binary: {
1420
+ confidence: number;
1421
+ evidence: string[];
1422
+ likely: boolean;
1423
+ };
1424
+ };
1425
+ export_surface: {
1426
+ total_exports: number;
1427
+ total_forwarders: number;
1428
+ notable_exports: string[];
1429
+ com_related_exports: string[];
1430
+ service_related_exports: string[];
1431
+ plugin_related_exports: string[];
1432
+ forwarded_exports: string[];
1433
+ };
1434
+ packed: boolean;
1435
+ binary_role: string;
1436
+ original_filename: string | null;
1437
+ packing_confidence: number;
1438
+ analysis_priorities: string[];
1439
+ role_confidence: number;
1440
+ runtime_hint: {
1441
+ is_dotnet: boolean | null;
1442
+ dotnet_version: string | null;
1443
+ target_framework: string | null;
1444
+ primary_runtime: string | null;
1445
+ };
1446
+ import_surface: {
1447
+ dll_count: number;
1448
+ notable_dlls: string[];
1449
+ com_related_imports: string[];
1450
+ service_related_imports: string[];
1451
+ network_related_imports: string[];
1452
+ process_related_imports: string[];
1453
+ };
1454
+ export_dispatch_profile: {
1455
+ confidence: number;
1456
+ command_like_exports: string[];
1457
+ callback_like_exports: string[];
1458
+ registration_exports: string[];
1459
+ ordinal_only_exports: number;
1460
+ likely_dispatch_model: string;
1461
+ };
1462
+ com_profile: {
1463
+ confidence: number;
1464
+ clsid_strings: string[];
1465
+ progid_strings: string[];
1466
+ interface_hints: string[];
1467
+ registration_strings: string[];
1468
+ class_factory_exports: string[];
1469
+ class_factory_surface?: string[] | undefined;
1470
+ };
1471
+ host_interaction_profile: {
1472
+ confidence: number;
1473
+ likely_hosted: boolean;
1474
+ host_hints: string[];
1475
+ callback_exports: string[];
1476
+ callback_strings: string[];
1477
+ service_hooks: string[];
1478
+ callback_surface?: string[] | undefined;
1479
+ };
1480
+ strings_considered: number;
1481
+ lifecycle_surface?: string[] | undefined;
1482
+ }>>;
1483
+ dll_profile: z.ZodNullable<z.ZodObject<{
1484
+ library_like: z.ZodBoolean;
1485
+ role_confidence: z.ZodNumber;
1486
+ likely_entry_model: z.ZodString;
1487
+ dll_entry_hints: z.ZodArray<z.ZodString, "many">;
1488
+ dispatch_model: z.ZodString;
1489
+ host_hints: z.ZodArray<z.ZodString, "many">;
1490
+ lifecycle_surface: z.ZodObject<{
1491
+ lifecycle_exports: z.ZodArray<z.ZodString, "many">;
1492
+ lifecycle_imports: z.ZodArray<z.ZodString, "many">;
1493
+ attach_detach_strings: z.ZodArray<z.ZodString, "many">;
1494
+ confidence: z.ZodNumber;
1495
+ }, "strip", z.ZodTypeAny, {
1496
+ confidence: number;
1497
+ lifecycle_exports: string[];
1498
+ lifecycle_imports: string[];
1499
+ attach_detach_strings: string[];
1500
+ }, {
1501
+ confidence: number;
1502
+ lifecycle_exports: string[];
1503
+ lifecycle_imports: string[];
1504
+ attach_detach_strings: string[];
1505
+ }>;
1506
+ class_factory_surface: z.ZodObject<{
1507
+ class_factory_exports: z.ZodArray<z.ZodString, "many">;
1508
+ activation_markers: z.ZodArray<z.ZodString, "many">;
1509
+ confidence: z.ZodNumber;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ confidence: number;
1512
+ class_factory_exports: string[];
1513
+ activation_markers: string[];
1514
+ }, {
1515
+ confidence: number;
1516
+ class_factory_exports: string[];
1517
+ activation_markers: string[];
1518
+ }>;
1519
+ callback_surface: z.ZodObject<{
1520
+ callback_exports: z.ZodArray<z.ZodString, "many">;
1521
+ callback_strings: z.ZodArray<z.ZodString, "many">;
1522
+ host_hints: z.ZodArray<z.ZodString, "many">;
1523
+ confidence: z.ZodNumber;
1524
+ }, "strip", z.ZodTypeAny, {
1525
+ confidence: number;
1526
+ host_hints: string[];
1527
+ callback_exports: string[];
1528
+ callback_strings: string[];
1529
+ }, {
1530
+ confidence: number;
1531
+ host_hints: string[];
1532
+ callback_exports: string[];
1533
+ callback_strings: string[];
1534
+ }>;
1535
+ analysis_priorities: z.ZodArray<z.ZodString, "many">;
1536
+ }, "strip", z.ZodTypeAny, {
1537
+ callback_surface: {
1538
+ confidence: number;
1539
+ host_hints: string[];
1540
+ callback_exports: string[];
1541
+ callback_strings: string[];
1542
+ };
1543
+ analysis_priorities: string[];
1544
+ class_factory_surface: {
1545
+ confidence: number;
1546
+ class_factory_exports: string[];
1547
+ activation_markers: string[];
1548
+ };
1549
+ host_hints: string[];
1550
+ role_confidence: number;
1551
+ lifecycle_surface: {
1552
+ confidence: number;
1553
+ lifecycle_exports: string[];
1554
+ lifecycle_imports: string[];
1555
+ attach_detach_strings: string[];
1556
+ };
1557
+ library_like: boolean;
1558
+ dll_entry_hints: string[];
1559
+ likely_entry_model: string;
1560
+ dispatch_model: string;
1561
+ }, {
1562
+ callback_surface: {
1563
+ confidence: number;
1564
+ host_hints: string[];
1565
+ callback_exports: string[];
1566
+ callback_strings: string[];
1567
+ };
1568
+ analysis_priorities: string[];
1569
+ class_factory_surface: {
1570
+ confidence: number;
1571
+ class_factory_exports: string[];
1572
+ activation_markers: string[];
1573
+ };
1574
+ host_hints: string[];
1575
+ role_confidence: number;
1576
+ lifecycle_surface: {
1577
+ confidence: number;
1578
+ lifecycle_exports: string[];
1579
+ lifecycle_imports: string[];
1580
+ attach_detach_strings: string[];
1581
+ };
1582
+ library_like: boolean;
1583
+ dll_entry_hints: string[];
1584
+ likely_entry_model: string;
1585
+ dispatch_model: string;
1586
+ }>>;
1587
+ com_profile: z.ZodNullable<z.ZodObject<{
1588
+ likely_com_server: z.ZodBoolean;
1589
+ com_confidence: z.ZodNumber;
1590
+ activation_model: z.ZodString;
1591
+ class_factory_exports: z.ZodArray<z.ZodString, "many">;
1592
+ registration_exports: z.ZodArray<z.ZodString, "many">;
1593
+ clsid_strings: z.ZodArray<z.ZodString, "many">;
1594
+ progid_strings: z.ZodArray<z.ZodString, "many">;
1595
+ interface_hints: z.ZodArray<z.ZodString, "many">;
1596
+ class_factory_surface: z.ZodObject<{
1597
+ class_factory_exports: z.ZodArray<z.ZodString, "many">;
1598
+ activation_markers: z.ZodArray<z.ZodString, "many">;
1599
+ interface_hints: z.ZodArray<z.ZodString, "many">;
1600
+ confidence: z.ZodNumber;
1601
+ }, "strip", z.ZodTypeAny, {
1602
+ confidence: number;
1603
+ interface_hints: string[];
1604
+ class_factory_exports: string[];
1605
+ activation_markers: string[];
1606
+ }, {
1607
+ confidence: number;
1608
+ interface_hints: string[];
1609
+ class_factory_exports: string[];
1610
+ activation_markers: string[];
1611
+ }>;
1612
+ activation_steps: z.ZodArray<z.ZodString, "many">;
1613
+ analysis_priorities: z.ZodArray<z.ZodString, "many">;
1614
+ }, "strip", z.ZodTypeAny, {
1615
+ analysis_priorities: string[];
1616
+ registration_exports: string[];
1617
+ clsid_strings: string[];
1618
+ progid_strings: string[];
1619
+ interface_hints: string[];
1620
+ class_factory_exports: string[];
1621
+ class_factory_surface: {
1622
+ confidence: number;
1623
+ interface_hints: string[];
1624
+ class_factory_exports: string[];
1625
+ activation_markers: string[];
1626
+ };
1627
+ likely_com_server: boolean;
1628
+ com_confidence: number;
1629
+ activation_steps: string[];
1630
+ activation_model: string;
1631
+ }, {
1632
+ analysis_priorities: string[];
1633
+ registration_exports: string[];
1634
+ clsid_strings: string[];
1635
+ progid_strings: string[];
1636
+ interface_hints: string[];
1637
+ class_factory_exports: string[];
1638
+ class_factory_surface: {
1639
+ confidence: number;
1640
+ interface_hints: string[];
1641
+ class_factory_exports: string[];
1642
+ activation_markers: string[];
1643
+ };
1644
+ likely_com_server: boolean;
1645
+ com_confidence: number;
1646
+ activation_steps: string[];
1647
+ activation_model: string;
1648
+ }>>;
1649
+ rust_profile: z.ZodNullable<z.ZodObject<{
1650
+ suspected_rust: z.ZodBoolean;
1651
+ confidence: z.ZodNumber;
1652
+ primary_runtime: z.ZodNullable<z.ZodString>;
1653
+ runtime_hints: z.ZodArray<z.ZodString, "many">;
1654
+ crate_hints: z.ZodArray<z.ZodString, "many">;
1655
+ cargo_paths: z.ZodArray<z.ZodString, "many">;
1656
+ recovered_function_count: z.ZodNumber;
1657
+ recovered_symbol_count: z.ZodNumber;
1658
+ importable_with_code_functions_define: z.ZodBoolean;
1659
+ analysis_priorities: z.ZodArray<z.ZodString, "many">;
1660
+ }, "strip", z.ZodTypeAny, {
1661
+ confidence: number;
1662
+ cargo_paths: string[];
1663
+ primary_runtime: string | null;
1664
+ analysis_priorities: string[];
1665
+ crate_hints: string[];
1666
+ runtime_hints: string[];
1667
+ suspected_rust: boolean;
1668
+ recovered_function_count: number;
1669
+ recovered_symbol_count: number;
1670
+ importable_with_code_functions_define: boolean;
1671
+ }, {
1672
+ confidence: number;
1673
+ cargo_paths: string[];
1674
+ primary_runtime: string | null;
1675
+ analysis_priorities: string[];
1676
+ crate_hints: string[];
1677
+ runtime_hints: string[];
1678
+ suspected_rust: boolean;
1679
+ recovered_function_count: number;
1680
+ recovered_symbol_count: number;
1681
+ importable_with_code_functions_define: boolean;
1682
+ }>>;
1683
+ function_index_recovery: z.ZodNullable<z.ZodObject<{
1684
+ applied: z.ZodBoolean;
1685
+ define_from: z.ZodNullable<z.ZodEnum<["smart_recover", "symbols_recover"]>>;
1686
+ recovered_function_count: z.ZodNumber;
1687
+ recovered_symbol_count: z.ZodNumber;
1688
+ imported_count: z.ZodNumber;
1689
+ function_index_status: z.ZodNullable<z.ZodEnum<["ready"]>>;
1690
+ decompile_status: z.ZodNullable<z.ZodEnum<["missing"]>>;
1691
+ cfg_status: z.ZodNullable<z.ZodEnum<["missing"]>>;
1692
+ recovery_strategy: z.ZodArray<z.ZodString, "many">;
1693
+ next_steps: z.ZodArray<z.ZodString, "many">;
1694
+ }, "strip", z.ZodTypeAny, {
1695
+ recovered_function_count: number;
1696
+ recovered_symbol_count: number;
1697
+ next_steps: string[];
1698
+ imported_count: number;
1699
+ function_index_status: "ready" | null;
1700
+ decompile_status: "missing" | null;
1701
+ cfg_status: "missing" | null;
1702
+ define_from: "smart_recover" | "symbols_recover" | null;
1703
+ recovery_strategy: string[];
1704
+ applied: boolean;
1705
+ }, {
1706
+ recovered_function_count: number;
1707
+ recovered_symbol_count: number;
1708
+ next_steps: string[];
1709
+ imported_count: number;
1710
+ function_index_status: "ready" | null;
1711
+ decompile_status: "missing" | null;
1712
+ cfg_status: "missing" | null;
1713
+ define_from: "smart_recover" | "symbols_recover" | null;
1714
+ recovery_strategy: string[];
1715
+ applied: boolean;
1716
+ }>>;
1717
+ role_strategy: z.ZodNullable<z.ZodObject<{
1718
+ target_role: z.ZodString;
1719
+ priority_order: z.ZodArray<z.ZodString, "many">;
1720
+ focus_areas: z.ZodArray<z.ZodString, "many">;
1721
+ rationale: z.ZodArray<z.ZodString, "many">;
1722
+ export_tuning: z.ZodObject<{
1723
+ topk: z.ZodNumber;
1724
+ module_limit: z.ZodNumber;
1725
+ min_module_size: z.ZodNumber;
1726
+ include_imports: z.ZodBoolean;
1727
+ include_strings: z.ZodBoolean;
1728
+ }, "strip", z.ZodTypeAny, {
1729
+ include_strings: boolean;
1730
+ topk: number;
1731
+ module_limit: number;
1732
+ min_module_size: number;
1733
+ include_imports: boolean;
1734
+ }, {
1735
+ include_strings: boolean;
1736
+ topk: number;
1737
+ module_limit: number;
1738
+ min_module_size: number;
1739
+ include_imports: boolean;
1740
+ }>;
1741
+ }, "strip", z.ZodTypeAny, {
1742
+ focus_areas: string[];
1743
+ target_role: string;
1744
+ priority_order: string[];
1745
+ rationale: string[];
1746
+ export_tuning: {
1747
+ include_strings: boolean;
1748
+ topk: number;
1749
+ module_limit: number;
1750
+ min_module_size: number;
1751
+ include_imports: boolean;
1752
+ };
1753
+ }, {
1754
+ focus_areas: string[];
1755
+ target_role: string;
1756
+ priority_order: string[];
1757
+ rationale: string[];
1758
+ export_tuning: {
1759
+ include_strings: boolean;
1760
+ topk: number;
1761
+ module_limit: number;
1762
+ min_module_size: number;
1763
+ include_imports: boolean;
1764
+ };
1765
+ }>>;
1766
+ }, "strip", z.ZodTypeAny, {
1767
+ binary_profile: {
1768
+ sample_id: string;
1769
+ indicators: {
1770
+ com_server: {
1771
+ confidence: number;
1772
+ evidence: string[];
1773
+ likely: boolean;
1774
+ };
1775
+ service_binary: {
1776
+ confidence: number;
1777
+ evidence: string[];
1778
+ likely: boolean;
1779
+ };
1780
+ plugin_binary: {
1781
+ confidence: number;
1782
+ evidence: string[];
1783
+ likely: boolean;
1784
+ };
1785
+ driver_binary: {
1786
+ confidence: number;
1787
+ evidence: string[];
1788
+ likely: boolean;
1789
+ };
1790
+ };
1791
+ export_surface: {
1792
+ total_exports: number;
1793
+ total_forwarders: number;
1794
+ notable_exports: string[];
1795
+ com_related_exports: string[];
1796
+ service_related_exports: string[];
1797
+ plugin_related_exports: string[];
1798
+ forwarded_exports: string[];
1799
+ };
1800
+ packed: boolean;
1801
+ binary_role: string;
1802
+ original_filename: string | null;
1803
+ packing_confidence: number;
1804
+ analysis_priorities: string[];
1805
+ role_confidence: number;
1806
+ runtime_hint: {
1807
+ is_dotnet: boolean | null;
1808
+ dotnet_version: string | null;
1809
+ target_framework: string | null;
1810
+ primary_runtime: string | null;
1811
+ };
1812
+ import_surface: {
1813
+ dll_count: number;
1814
+ notable_dlls: string[];
1815
+ com_related_imports: string[];
1816
+ service_related_imports: string[];
1817
+ network_related_imports: string[];
1818
+ process_related_imports: string[];
1819
+ };
1820
+ export_dispatch_profile: {
1821
+ confidence: number;
1822
+ command_like_exports: string[];
1823
+ callback_like_exports: string[];
1824
+ registration_exports: string[];
1825
+ ordinal_only_exports: number;
1826
+ likely_dispatch_model: string;
1827
+ };
1828
+ lifecycle_surface: string[];
1829
+ com_profile: {
1830
+ confidence: number;
1831
+ clsid_strings: string[];
1832
+ progid_strings: string[];
1833
+ interface_hints: string[];
1834
+ registration_strings: string[];
1835
+ class_factory_exports: string[];
1836
+ class_factory_surface: string[];
1837
+ };
1838
+ host_interaction_profile: {
1839
+ confidence: number;
1840
+ callback_surface: string[];
1841
+ likely_hosted: boolean;
1842
+ host_hints: string[];
1843
+ callback_exports: string[];
1844
+ callback_strings: string[];
1845
+ service_hooks: string[];
1846
+ };
1847
+ strings_considered: number;
1848
+ } | null;
1849
+ com_profile: {
1850
+ analysis_priorities: string[];
1851
+ registration_exports: string[];
1852
+ clsid_strings: string[];
1853
+ progid_strings: string[];
1854
+ interface_hints: string[];
1855
+ class_factory_exports: string[];
1856
+ class_factory_surface: {
1857
+ confidence: number;
1858
+ interface_hints: string[];
1859
+ class_factory_exports: string[];
1860
+ activation_markers: string[];
1861
+ };
1862
+ likely_com_server: boolean;
1863
+ com_confidence: number;
1864
+ activation_steps: string[];
1865
+ activation_model: string;
1866
+ } | null;
1867
+ dll_profile: {
1868
+ callback_surface: {
1869
+ confidence: number;
1870
+ host_hints: string[];
1871
+ callback_exports: string[];
1872
+ callback_strings: string[];
1873
+ };
1874
+ analysis_priorities: string[];
1875
+ class_factory_surface: {
1876
+ confidence: number;
1877
+ class_factory_exports: string[];
1878
+ activation_markers: string[];
1879
+ };
1880
+ host_hints: string[];
1881
+ role_confidence: number;
1882
+ lifecycle_surface: {
1883
+ confidence: number;
1884
+ lifecycle_exports: string[];
1885
+ lifecycle_imports: string[];
1886
+ attach_detach_strings: string[];
1887
+ };
1888
+ library_like: boolean;
1889
+ dll_entry_hints: string[];
1890
+ likely_entry_model: string;
1891
+ dispatch_model: string;
1892
+ } | null;
1893
+ rust_profile: {
1894
+ confidence: number;
1895
+ cargo_paths: string[];
1896
+ primary_runtime: string | null;
1897
+ analysis_priorities: string[];
1898
+ crate_hints: string[];
1899
+ runtime_hints: string[];
1900
+ suspected_rust: boolean;
1901
+ recovered_function_count: number;
1902
+ recovered_symbol_count: number;
1903
+ importable_with_code_functions_define: boolean;
1904
+ } | null;
1905
+ function_index_recovery: {
1906
+ recovered_function_count: number;
1907
+ recovered_symbol_count: number;
1908
+ next_steps: string[];
1909
+ imported_count: number;
1910
+ function_index_status: "ready" | null;
1911
+ decompile_status: "missing" | null;
1912
+ cfg_status: "missing" | null;
1913
+ define_from: "smart_recover" | "symbols_recover" | null;
1914
+ recovery_strategy: string[];
1915
+ applied: boolean;
1916
+ } | null;
1917
+ role_strategy: {
1918
+ focus_areas: string[];
1919
+ target_role: string;
1920
+ priority_order: string[];
1921
+ rationale: string[];
1922
+ export_tuning: {
1923
+ include_strings: boolean;
1924
+ topk: number;
1925
+ module_limit: number;
1926
+ min_module_size: number;
1927
+ include_imports: boolean;
1928
+ };
1929
+ } | null;
1930
+ }, {
1931
+ binary_profile: {
1932
+ sample_id: string;
1933
+ indicators: {
1934
+ com_server: {
1935
+ confidence: number;
1936
+ evidence: string[];
1937
+ likely: boolean;
1938
+ };
1939
+ service_binary: {
1940
+ confidence: number;
1941
+ evidence: string[];
1942
+ likely: boolean;
1943
+ };
1944
+ plugin_binary: {
1945
+ confidence: number;
1946
+ evidence: string[];
1947
+ likely: boolean;
1948
+ };
1949
+ driver_binary: {
1950
+ confidence: number;
1951
+ evidence: string[];
1952
+ likely: boolean;
1953
+ };
1954
+ };
1955
+ export_surface: {
1956
+ total_exports: number;
1957
+ total_forwarders: number;
1958
+ notable_exports: string[];
1959
+ com_related_exports: string[];
1960
+ service_related_exports: string[];
1961
+ plugin_related_exports: string[];
1962
+ forwarded_exports: string[];
1963
+ };
1964
+ packed: boolean;
1965
+ binary_role: string;
1966
+ original_filename: string | null;
1967
+ packing_confidence: number;
1968
+ analysis_priorities: string[];
1969
+ role_confidence: number;
1970
+ runtime_hint: {
1971
+ is_dotnet: boolean | null;
1972
+ dotnet_version: string | null;
1973
+ target_framework: string | null;
1974
+ primary_runtime: string | null;
1975
+ };
1976
+ import_surface: {
1977
+ dll_count: number;
1978
+ notable_dlls: string[];
1979
+ com_related_imports: string[];
1980
+ service_related_imports: string[];
1981
+ network_related_imports: string[];
1982
+ process_related_imports: string[];
1983
+ };
1984
+ export_dispatch_profile: {
1985
+ confidence: number;
1986
+ command_like_exports: string[];
1987
+ callback_like_exports: string[];
1988
+ registration_exports: string[];
1989
+ ordinal_only_exports: number;
1990
+ likely_dispatch_model: string;
1991
+ };
1992
+ com_profile: {
1993
+ confidence: number;
1994
+ clsid_strings: string[];
1995
+ progid_strings: string[];
1996
+ interface_hints: string[];
1997
+ registration_strings: string[];
1998
+ class_factory_exports: string[];
1999
+ class_factory_surface?: string[] | undefined;
2000
+ };
2001
+ host_interaction_profile: {
2002
+ confidence: number;
2003
+ likely_hosted: boolean;
2004
+ host_hints: string[];
2005
+ callback_exports: string[];
2006
+ callback_strings: string[];
2007
+ service_hooks: string[];
2008
+ callback_surface?: string[] | undefined;
2009
+ };
2010
+ strings_considered: number;
2011
+ lifecycle_surface?: string[] | undefined;
2012
+ } | null;
2013
+ com_profile: {
2014
+ analysis_priorities: string[];
2015
+ registration_exports: string[];
2016
+ clsid_strings: string[];
2017
+ progid_strings: string[];
2018
+ interface_hints: string[];
2019
+ class_factory_exports: string[];
2020
+ class_factory_surface: {
2021
+ confidence: number;
2022
+ interface_hints: string[];
2023
+ class_factory_exports: string[];
2024
+ activation_markers: string[];
2025
+ };
2026
+ likely_com_server: boolean;
2027
+ com_confidence: number;
2028
+ activation_steps: string[];
2029
+ activation_model: string;
2030
+ } | null;
2031
+ dll_profile: {
2032
+ callback_surface: {
2033
+ confidence: number;
2034
+ host_hints: string[];
2035
+ callback_exports: string[];
2036
+ callback_strings: string[];
2037
+ };
2038
+ analysis_priorities: string[];
2039
+ class_factory_surface: {
2040
+ confidence: number;
2041
+ class_factory_exports: string[];
2042
+ activation_markers: string[];
2043
+ };
2044
+ host_hints: string[];
2045
+ role_confidence: number;
2046
+ lifecycle_surface: {
2047
+ confidence: number;
2048
+ lifecycle_exports: string[];
2049
+ lifecycle_imports: string[];
2050
+ attach_detach_strings: string[];
2051
+ };
2052
+ library_like: boolean;
2053
+ dll_entry_hints: string[];
2054
+ likely_entry_model: string;
2055
+ dispatch_model: string;
2056
+ } | null;
2057
+ rust_profile: {
2058
+ confidence: number;
2059
+ cargo_paths: string[];
2060
+ primary_runtime: string | null;
2061
+ analysis_priorities: string[];
2062
+ crate_hints: string[];
2063
+ runtime_hints: string[];
2064
+ suspected_rust: boolean;
2065
+ recovered_function_count: number;
2066
+ recovered_symbol_count: number;
2067
+ importable_with_code_functions_define: boolean;
2068
+ } | null;
2069
+ function_index_recovery: {
2070
+ recovered_function_count: number;
2071
+ recovered_symbol_count: number;
2072
+ next_steps: string[];
2073
+ imported_count: number;
2074
+ function_index_status: "ready" | null;
2075
+ decompile_status: "missing" | null;
2076
+ cfg_status: "missing" | null;
2077
+ define_from: "smart_recover" | "symbols_recover" | null;
2078
+ recovery_strategy: string[];
2079
+ applied: boolean;
2080
+ } | null;
2081
+ role_strategy: {
2082
+ focus_areas: string[];
2083
+ target_role: string;
2084
+ priority_order: string[];
2085
+ rationale: string[];
2086
+ export_tuning: {
2087
+ include_strings: boolean;
2088
+ topk: number;
2089
+ module_limit: number;
2090
+ min_module_size: number;
2091
+ include_imports: boolean;
2092
+ };
2093
+ } | null;
2094
+ }>>;
992
2095
  plan: z.ZodNullable<z.ZodObject<{
993
2096
  feasibility: z.ZodEnum<["high", "medium", "low"]>;
994
2097
  confidence: z.ZodNumber;
@@ -1073,7 +2176,8 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1073
2176
  resources: z.ZodArray<z.ZodString, "many">;
1074
2177
  analysis_priorities: z.ZodArray<z.ZodString, "many">;
1075
2178
  }, "strip", z.ZodTypeAny, {
1076
- resources: string[];
2179
+ module_name: string | null;
2180
+ analysis_priorities: string[];
1077
2181
  method_count: number;
1078
2182
  type_count: number;
1079
2183
  namespace_count: number;
@@ -1081,16 +2185,16 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1081
2185
  resource_count: number;
1082
2186
  assembly_name: string | null;
1083
2187
  assembly_version: string | null;
1084
- module_name: string | null;
1085
2188
  metadata_version: string | null;
1086
2189
  is_library: boolean;
1087
2190
  entry_point_token: string | null;
1088
2191
  assembly_references: string[];
1089
- analysis_priorities: string[];
2192
+ resources: string[];
1090
2193
  dominant_namespaces: string[];
1091
2194
  notable_types: string[];
1092
2195
  }, {
1093
- resources: string[];
2196
+ module_name: string | null;
2197
+ analysis_priorities: string[];
1094
2198
  method_count: number;
1095
2199
  type_count: number;
1096
2200
  namespace_count: number;
@@ -1098,12 +2202,11 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1098
2202
  resource_count: number;
1099
2203
  assembly_name: string | null;
1100
2204
  assembly_version: string | null;
1101
- module_name: string | null;
1102
2205
  metadata_version: string | null;
1103
2206
  is_library: boolean;
1104
2207
  entry_point_token: string | null;
1105
2208
  assembly_references: string[];
1106
- analysis_priorities: string[];
2209
+ resources: string[];
1107
2210
  dominant_namespaces: string[];
1108
2211
  notable_types: string[];
1109
2212
  }>>;
@@ -1132,7 +2235,8 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1132
2235
  fallback_notes_path: string | null;
1133
2236
  degraded_mode: boolean | null;
1134
2237
  managed_profile: {
1135
- resources: string[];
2238
+ module_name: string | null;
2239
+ analysis_priorities: string[];
1136
2240
  method_count: number;
1137
2241
  type_count: number;
1138
2242
  namespace_count: number;
@@ -1140,12 +2244,11 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1140
2244
  resource_count: number;
1141
2245
  assembly_name: string | null;
1142
2246
  assembly_version: string | null;
1143
- module_name: string | null;
1144
2247
  metadata_version: string | null;
1145
2248
  is_library: boolean;
1146
2249
  entry_point_token: string | null;
1147
2250
  assembly_references: string[];
1148
- analysis_priorities: string[];
2251
+ resources: string[];
1149
2252
  dominant_namespaces: string[];
1150
2253
  notable_types: string[];
1151
2254
  } | null;
@@ -1179,7 +2282,8 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1179
2282
  fallback_notes_path: string | null;
1180
2283
  degraded_mode: boolean | null;
1181
2284
  managed_profile: {
1182
- resources: string[];
2285
+ module_name: string | null;
2286
+ analysis_priorities: string[];
1183
2287
  method_count: number;
1184
2288
  type_count: number;
1185
2289
  namespace_count: number;
@@ -1187,12 +2291,11 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1187
2291
  resource_count: number;
1188
2292
  assembly_name: string | null;
1189
2293
  assembly_version: string | null;
1190
- module_name: string | null;
1191
2294
  metadata_version: string | null;
1192
2295
  is_library: boolean;
1193
2296
  entry_point_token: string | null;
1194
2297
  assembly_references: string[];
1195
- analysis_priorities: string[];
2298
+ resources: string[];
1196
2299
  dominant_namespaces: string[];
1197
2300
  notable_types: string[];
1198
2301
  } | null;
@@ -1213,52 +2316,6 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1213
2316
  primary_runtime: string | null;
1214
2317
  };
1215
2318
  degraded: boolean;
1216
- provenance: {
1217
- runtime: {
1218
- artifact_count: number;
1219
- scope_note: string;
1220
- artifact_ids: string[];
1221
- session_selector: string | null;
1222
- session_tags: string[];
1223
- scope: "all" | "latest" | "session";
1224
- earliest_artifact_at: string | null;
1225
- latest_artifact_at: string | null;
1226
- };
1227
- semantic_names?: {
1228
- artifact_count: number;
1229
- scope_note: string;
1230
- artifact_ids: string[];
1231
- session_selector: string | null;
1232
- session_tags: string[];
1233
- scope: "all" | "latest" | "session";
1234
- earliest_artifact_at: string | null;
1235
- latest_artifact_at: string | null;
1236
- } | undefined;
1237
- semantic_explanations?: {
1238
- artifact_count: number;
1239
- scope_note: string;
1240
- artifact_ids: string[];
1241
- session_selector: string | null;
1242
- session_tags: string[];
1243
- scope: "all" | "latest" | "session";
1244
- earliest_artifact_at: string | null;
1245
- latest_artifact_at: string | null;
1246
- } | undefined;
1247
- };
1248
- selected_path: "dotnet" | "native";
1249
- stage_status: {
1250
- runtime: "failed" | "ok";
1251
- plan: "failed" | "ok" | "skipped";
1252
- export_primary: "failed" | "ok" | "skipped";
1253
- export_fallback: "failed" | "ok" | "skipped";
1254
- };
1255
- plan: {
1256
- confidence: number;
1257
- feasibility: "high" | "low" | "medium";
1258
- restoration_expectation: string;
1259
- blockers: string[];
1260
- recommendations: string[];
1261
- } | null;
1262
2319
  export: {
1263
2320
  tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
1264
2321
  executable_path: string | null;
@@ -1284,7 +2341,8 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1284
2341
  fallback_notes_path: string | null;
1285
2342
  degraded_mode: boolean | null;
1286
2343
  managed_profile: {
1287
- resources: string[];
2344
+ module_name: string | null;
2345
+ analysis_priorities: string[];
1288
2346
  method_count: number;
1289
2347
  type_count: number;
1290
2348
  namespace_count: number;
@@ -1292,12 +2350,11 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1292
2350
  resource_count: number;
1293
2351
  assembly_name: string | null;
1294
2352
  assembly_version: string | null;
1295
- module_name: string | null;
1296
2353
  metadata_version: string | null;
1297
2354
  is_library: boolean;
1298
2355
  entry_point_token: string | null;
1299
2356
  assembly_references: string[];
1300
- analysis_priorities: string[];
2357
+ resources: string[];
1301
2358
  dominant_namespaces: string[];
1302
2359
  notable_types: string[];
1303
2360
  } | null;
@@ -1307,6 +2364,67 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1307
2364
  harness_log_path: string | null;
1308
2365
  class_count: number | null;
1309
2366
  } | null;
2367
+ provenance: {
2368
+ runtime: {
2369
+ artifact_count: number;
2370
+ scope_note: string;
2371
+ artifact_ids: string[];
2372
+ session_selector: string | null;
2373
+ session_tags: string[];
2374
+ scope: "all" | "latest" | "session";
2375
+ earliest_artifact_at: string | null;
2376
+ latest_artifact_at: string | null;
2377
+ };
2378
+ semantic_module_reviews?: {
2379
+ artifact_count: number;
2380
+ scope_note: string;
2381
+ artifact_ids: string[];
2382
+ session_selector: string | null;
2383
+ session_tags: string[];
2384
+ scope: "all" | "latest" | "session";
2385
+ earliest_artifact_at: string | null;
2386
+ latest_artifact_at: string | null;
2387
+ } | undefined;
2388
+ semantic_names?: {
2389
+ artifact_count: number;
2390
+ scope_note: string;
2391
+ artifact_ids: string[];
2392
+ session_selector: string | null;
2393
+ session_tags: string[];
2394
+ scope: "all" | "latest" | "session";
2395
+ earliest_artifact_at: string | null;
2396
+ latest_artifact_at: string | null;
2397
+ } | undefined;
2398
+ semantic_explanations?: {
2399
+ artifact_count: number;
2400
+ scope_note: string;
2401
+ artifact_ids: string[];
2402
+ session_selector: string | null;
2403
+ session_tags: string[];
2404
+ scope: "all" | "latest" | "session";
2405
+ earliest_artifact_at: string | null;
2406
+ latest_artifact_at: string | null;
2407
+ } | undefined;
2408
+ };
2409
+ selected_path: "dotnet" | "native";
2410
+ stage_status: {
2411
+ runtime: "failed" | "ok";
2412
+ function_index_recovery: "failed" | "ok" | "skipped";
2413
+ preflight_binary_profile: "failed" | "ok" | "skipped";
2414
+ preflight_dll_profile: "failed" | "ok" | "skipped";
2415
+ preflight_com_profile: "failed" | "ok" | "skipped";
2416
+ preflight_rust_profile: "failed" | "ok" | "skipped";
2417
+ plan: "failed" | "ok" | "skipped";
2418
+ export_primary: "failed" | "ok" | "skipped";
2419
+ export_fallback: "failed" | "ok" | "skipped";
2420
+ };
2421
+ plan: {
2422
+ confidence: number;
2423
+ feasibility: "high" | "low" | "medium";
2424
+ restoration_expectation: string;
2425
+ blockers: string[];
2426
+ recommendations: string[];
2427
+ } | null;
1310
2428
  selection_diffs?: {
1311
2429
  runtime?: {
1312
2430
  summary: string;
@@ -1396,6 +2514,171 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1396
2514
  artifact_count_delta: number;
1397
2515
  } | undefined;
1398
2516
  } | undefined;
2517
+ preflight?: {
2518
+ binary_profile: {
2519
+ sample_id: string;
2520
+ indicators: {
2521
+ com_server: {
2522
+ confidence: number;
2523
+ evidence: string[];
2524
+ likely: boolean;
2525
+ };
2526
+ service_binary: {
2527
+ confidence: number;
2528
+ evidence: string[];
2529
+ likely: boolean;
2530
+ };
2531
+ plugin_binary: {
2532
+ confidence: number;
2533
+ evidence: string[];
2534
+ likely: boolean;
2535
+ };
2536
+ driver_binary: {
2537
+ confidence: number;
2538
+ evidence: string[];
2539
+ likely: boolean;
2540
+ };
2541
+ };
2542
+ export_surface: {
2543
+ total_exports: number;
2544
+ total_forwarders: number;
2545
+ notable_exports: string[];
2546
+ com_related_exports: string[];
2547
+ service_related_exports: string[];
2548
+ plugin_related_exports: string[];
2549
+ forwarded_exports: string[];
2550
+ };
2551
+ packed: boolean;
2552
+ binary_role: string;
2553
+ original_filename: string | null;
2554
+ packing_confidence: number;
2555
+ analysis_priorities: string[];
2556
+ role_confidence: number;
2557
+ runtime_hint: {
2558
+ is_dotnet: boolean | null;
2559
+ dotnet_version: string | null;
2560
+ target_framework: string | null;
2561
+ primary_runtime: string | null;
2562
+ };
2563
+ import_surface: {
2564
+ dll_count: number;
2565
+ notable_dlls: string[];
2566
+ com_related_imports: string[];
2567
+ service_related_imports: string[];
2568
+ network_related_imports: string[];
2569
+ process_related_imports: string[];
2570
+ };
2571
+ export_dispatch_profile: {
2572
+ confidence: number;
2573
+ command_like_exports: string[];
2574
+ callback_like_exports: string[];
2575
+ registration_exports: string[];
2576
+ ordinal_only_exports: number;
2577
+ likely_dispatch_model: string;
2578
+ };
2579
+ lifecycle_surface: string[];
2580
+ com_profile: {
2581
+ confidence: number;
2582
+ clsid_strings: string[];
2583
+ progid_strings: string[];
2584
+ interface_hints: string[];
2585
+ registration_strings: string[];
2586
+ class_factory_exports: string[];
2587
+ class_factory_surface: string[];
2588
+ };
2589
+ host_interaction_profile: {
2590
+ confidence: number;
2591
+ callback_surface: string[];
2592
+ likely_hosted: boolean;
2593
+ host_hints: string[];
2594
+ callback_exports: string[];
2595
+ callback_strings: string[];
2596
+ service_hooks: string[];
2597
+ };
2598
+ strings_considered: number;
2599
+ } | null;
2600
+ com_profile: {
2601
+ analysis_priorities: string[];
2602
+ registration_exports: string[];
2603
+ clsid_strings: string[];
2604
+ progid_strings: string[];
2605
+ interface_hints: string[];
2606
+ class_factory_exports: string[];
2607
+ class_factory_surface: {
2608
+ confidence: number;
2609
+ interface_hints: string[];
2610
+ class_factory_exports: string[];
2611
+ activation_markers: string[];
2612
+ };
2613
+ likely_com_server: boolean;
2614
+ com_confidence: number;
2615
+ activation_steps: string[];
2616
+ activation_model: string;
2617
+ } | null;
2618
+ dll_profile: {
2619
+ callback_surface: {
2620
+ confidence: number;
2621
+ host_hints: string[];
2622
+ callback_exports: string[];
2623
+ callback_strings: string[];
2624
+ };
2625
+ analysis_priorities: string[];
2626
+ class_factory_surface: {
2627
+ confidence: number;
2628
+ class_factory_exports: string[];
2629
+ activation_markers: string[];
2630
+ };
2631
+ host_hints: string[];
2632
+ role_confidence: number;
2633
+ lifecycle_surface: {
2634
+ confidence: number;
2635
+ lifecycle_exports: string[];
2636
+ lifecycle_imports: string[];
2637
+ attach_detach_strings: string[];
2638
+ };
2639
+ library_like: boolean;
2640
+ dll_entry_hints: string[];
2641
+ likely_entry_model: string;
2642
+ dispatch_model: string;
2643
+ } | null;
2644
+ rust_profile: {
2645
+ confidence: number;
2646
+ cargo_paths: string[];
2647
+ primary_runtime: string | null;
2648
+ analysis_priorities: string[];
2649
+ crate_hints: string[];
2650
+ runtime_hints: string[];
2651
+ suspected_rust: boolean;
2652
+ recovered_function_count: number;
2653
+ recovered_symbol_count: number;
2654
+ importable_with_code_functions_define: boolean;
2655
+ } | null;
2656
+ function_index_recovery: {
2657
+ recovered_function_count: number;
2658
+ recovered_symbol_count: number;
2659
+ next_steps: string[];
2660
+ imported_count: number;
2661
+ function_index_status: "ready" | null;
2662
+ decompile_status: "missing" | null;
2663
+ cfg_status: "missing" | null;
2664
+ define_from: "smart_recover" | "symbols_recover" | null;
2665
+ recovery_strategy: string[];
2666
+ applied: boolean;
2667
+ } | null;
2668
+ role_strategy: {
2669
+ focus_areas: string[];
2670
+ target_role: string;
2671
+ priority_order: string[];
2672
+ rationale: string[];
2673
+ export_tuning: {
2674
+ include_strings: boolean;
2675
+ topk: number;
2676
+ module_limit: number;
2677
+ min_module_size: number;
2678
+ include_imports: boolean;
2679
+ };
2680
+ } | null;
2681
+ } | undefined;
1399
2682
  }, {
1400
2683
  sample_id: string;
1401
2684
  notes: string[];
@@ -1406,6 +2689,54 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1406
2689
  primary_runtime: string | null;
1407
2690
  };
1408
2691
  degraded: boolean;
2692
+ export: {
2693
+ tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
2694
+ executable_path: string | null;
2695
+ export_root: string;
2696
+ manifest_path: string | null;
2697
+ gaps_path: string | null;
2698
+ notes_path: string | null;
2699
+ module_count: number | null;
2700
+ unresolved_count: number | null;
2701
+ binary_profile: {
2702
+ packed: boolean;
2703
+ binary_role: string;
2704
+ original_filename: string | null;
2705
+ export_count: number;
2706
+ forwarder_count: number;
2707
+ notable_exports: string[];
2708
+ packing_confidence: number;
2709
+ analysis_priorities: string[];
2710
+ } | null;
2711
+ csproj_path: string | null;
2712
+ readme_path: string | null;
2713
+ metadata_path: string | null;
2714
+ fallback_notes_path: string | null;
2715
+ degraded_mode: boolean | null;
2716
+ managed_profile: {
2717
+ module_name: string | null;
2718
+ analysis_priorities: string[];
2719
+ method_count: number;
2720
+ type_count: number;
2721
+ namespace_count: number;
2722
+ assembly_reference_count: number;
2723
+ resource_count: number;
2724
+ assembly_name: string | null;
2725
+ assembly_version: string | null;
2726
+ metadata_version: string | null;
2727
+ is_library: boolean;
2728
+ entry_point_token: string | null;
2729
+ assembly_references: string[];
2730
+ resources: string[];
2731
+ dominant_namespaces: string[];
2732
+ notable_types: string[];
2733
+ } | null;
2734
+ build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
2735
+ harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
2736
+ build_log_path: string | null;
2737
+ harness_log_path: string | null;
2738
+ class_count: number | null;
2739
+ } | null;
1409
2740
  provenance: {
1410
2741
  runtime: {
1411
2742
  artifact_count: number;
@@ -1417,6 +2748,16 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1417
2748
  earliest_artifact_at: string | null;
1418
2749
  latest_artifact_at: string | null;
1419
2750
  };
2751
+ semantic_module_reviews?: {
2752
+ artifact_count: number;
2753
+ scope_note: string;
2754
+ artifact_ids: string[];
2755
+ session_selector: string | null;
2756
+ session_tags: string[];
2757
+ scope: "all" | "latest" | "session";
2758
+ earliest_artifact_at: string | null;
2759
+ latest_artifact_at: string | null;
2760
+ } | undefined;
1420
2761
  semantic_names?: {
1421
2762
  artifact_count: number;
1422
2763
  scope_note: string;
@@ -1441,6 +2782,11 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1441
2782
  selected_path: "dotnet" | "native";
1442
2783
  stage_status: {
1443
2784
  runtime: "failed" | "ok";
2785
+ function_index_recovery: "failed" | "ok" | "skipped";
2786
+ preflight_binary_profile: "failed" | "ok" | "skipped";
2787
+ preflight_dll_profile: "failed" | "ok" | "skipped";
2788
+ preflight_com_profile: "failed" | "ok" | "skipped";
2789
+ preflight_rust_profile: "failed" | "ok" | "skipped";
1444
2790
  plan: "failed" | "ok" | "skipped";
1445
2791
  export_primary: "failed" | "ok" | "skipped";
1446
2792
  export_fallback: "failed" | "ok" | "skipped";
@@ -1452,54 +2798,6 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1452
2798
  blockers: string[];
1453
2799
  recommendations: string[];
1454
2800
  } | null;
1455
- export: {
1456
- tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
1457
- executable_path: string | null;
1458
- export_root: string;
1459
- manifest_path: string | null;
1460
- gaps_path: string | null;
1461
- notes_path: string | null;
1462
- module_count: number | null;
1463
- unresolved_count: number | null;
1464
- binary_profile: {
1465
- packed: boolean;
1466
- binary_role: string;
1467
- original_filename: string | null;
1468
- export_count: number;
1469
- forwarder_count: number;
1470
- notable_exports: string[];
1471
- packing_confidence: number;
1472
- analysis_priorities: string[];
1473
- } | null;
1474
- csproj_path: string | null;
1475
- readme_path: string | null;
1476
- metadata_path: string | null;
1477
- fallback_notes_path: string | null;
1478
- degraded_mode: boolean | null;
1479
- managed_profile: {
1480
- resources: string[];
1481
- method_count: number;
1482
- type_count: number;
1483
- namespace_count: number;
1484
- assembly_reference_count: number;
1485
- resource_count: number;
1486
- assembly_name: string | null;
1487
- assembly_version: string | null;
1488
- module_name: string | null;
1489
- metadata_version: string | null;
1490
- is_library: boolean;
1491
- entry_point_token: string | null;
1492
- assembly_references: string[];
1493
- analysis_priorities: string[];
1494
- dominant_namespaces: string[];
1495
- notable_types: string[];
1496
- } | null;
1497
- build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1498
- harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1499
- build_log_path: string | null;
1500
- harness_log_path: string | null;
1501
- class_count: number | null;
1502
- } | null;
1503
2801
  selection_diffs?: {
1504
2802
  runtime?: {
1505
2803
  summary: string;
@@ -1589,9 +2887,251 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1589
2887
  artifact_count_delta: number;
1590
2888
  } | undefined;
1591
2889
  } | undefined;
1592
- }>>;
2890
+ preflight?: {
2891
+ binary_profile: {
2892
+ sample_id: string;
2893
+ indicators: {
2894
+ com_server: {
2895
+ confidence: number;
2896
+ evidence: string[];
2897
+ likely: boolean;
2898
+ };
2899
+ service_binary: {
2900
+ confidence: number;
2901
+ evidence: string[];
2902
+ likely: boolean;
2903
+ };
2904
+ plugin_binary: {
2905
+ confidence: number;
2906
+ evidence: string[];
2907
+ likely: boolean;
2908
+ };
2909
+ driver_binary: {
2910
+ confidence: number;
2911
+ evidence: string[];
2912
+ likely: boolean;
2913
+ };
2914
+ };
2915
+ export_surface: {
2916
+ total_exports: number;
2917
+ total_forwarders: number;
2918
+ notable_exports: string[];
2919
+ com_related_exports: string[];
2920
+ service_related_exports: string[];
2921
+ plugin_related_exports: string[];
2922
+ forwarded_exports: string[];
2923
+ };
2924
+ packed: boolean;
2925
+ binary_role: string;
2926
+ original_filename: string | null;
2927
+ packing_confidence: number;
2928
+ analysis_priorities: string[];
2929
+ role_confidence: number;
2930
+ runtime_hint: {
2931
+ is_dotnet: boolean | null;
2932
+ dotnet_version: string | null;
2933
+ target_framework: string | null;
2934
+ primary_runtime: string | null;
2935
+ };
2936
+ import_surface: {
2937
+ dll_count: number;
2938
+ notable_dlls: string[];
2939
+ com_related_imports: string[];
2940
+ service_related_imports: string[];
2941
+ network_related_imports: string[];
2942
+ process_related_imports: string[];
2943
+ };
2944
+ export_dispatch_profile: {
2945
+ confidence: number;
2946
+ command_like_exports: string[];
2947
+ callback_like_exports: string[];
2948
+ registration_exports: string[];
2949
+ ordinal_only_exports: number;
2950
+ likely_dispatch_model: string;
2951
+ };
2952
+ com_profile: {
2953
+ confidence: number;
2954
+ clsid_strings: string[];
2955
+ progid_strings: string[];
2956
+ interface_hints: string[];
2957
+ registration_strings: string[];
2958
+ class_factory_exports: string[];
2959
+ class_factory_surface?: string[] | undefined;
2960
+ };
2961
+ host_interaction_profile: {
2962
+ confidence: number;
2963
+ likely_hosted: boolean;
2964
+ host_hints: string[];
2965
+ callback_exports: string[];
2966
+ callback_strings: string[];
2967
+ service_hooks: string[];
2968
+ callback_surface?: string[] | undefined;
2969
+ };
2970
+ strings_considered: number;
2971
+ lifecycle_surface?: string[] | undefined;
2972
+ } | null;
2973
+ com_profile: {
2974
+ analysis_priorities: string[];
2975
+ registration_exports: string[];
2976
+ clsid_strings: string[];
2977
+ progid_strings: string[];
2978
+ interface_hints: string[];
2979
+ class_factory_exports: string[];
2980
+ class_factory_surface: {
2981
+ confidence: number;
2982
+ interface_hints: string[];
2983
+ class_factory_exports: string[];
2984
+ activation_markers: string[];
2985
+ };
2986
+ likely_com_server: boolean;
2987
+ com_confidence: number;
2988
+ activation_steps: string[];
2989
+ activation_model: string;
2990
+ } | null;
2991
+ dll_profile: {
2992
+ callback_surface: {
2993
+ confidence: number;
2994
+ host_hints: string[];
2995
+ callback_exports: string[];
2996
+ callback_strings: string[];
2997
+ };
2998
+ analysis_priorities: string[];
2999
+ class_factory_surface: {
3000
+ confidence: number;
3001
+ class_factory_exports: string[];
3002
+ activation_markers: string[];
3003
+ };
3004
+ host_hints: string[];
3005
+ role_confidence: number;
3006
+ lifecycle_surface: {
3007
+ confidence: number;
3008
+ lifecycle_exports: string[];
3009
+ lifecycle_imports: string[];
3010
+ attach_detach_strings: string[];
3011
+ };
3012
+ library_like: boolean;
3013
+ dll_entry_hints: string[];
3014
+ likely_entry_model: string;
3015
+ dispatch_model: string;
3016
+ } | null;
3017
+ rust_profile: {
3018
+ confidence: number;
3019
+ cargo_paths: string[];
3020
+ primary_runtime: string | null;
3021
+ analysis_priorities: string[];
3022
+ crate_hints: string[];
3023
+ runtime_hints: string[];
3024
+ suspected_rust: boolean;
3025
+ recovered_function_count: number;
3026
+ recovered_symbol_count: number;
3027
+ importable_with_code_functions_define: boolean;
3028
+ } | null;
3029
+ function_index_recovery: {
3030
+ recovered_function_count: number;
3031
+ recovered_symbol_count: number;
3032
+ next_steps: string[];
3033
+ imported_count: number;
3034
+ function_index_status: "ready" | null;
3035
+ decompile_status: "missing" | null;
3036
+ cfg_status: "missing" | null;
3037
+ define_from: "smart_recover" | "symbols_recover" | null;
3038
+ recovery_strategy: string[];
3039
+ applied: boolean;
3040
+ } | null;
3041
+ role_strategy: {
3042
+ focus_areas: string[];
3043
+ target_role: string;
3044
+ priority_order: string[];
3045
+ rationale: string[];
3046
+ export_tuning: {
3047
+ include_strings: boolean;
3048
+ topk: number;
3049
+ module_limit: number;
3050
+ min_module_size: number;
3051
+ include_imports: boolean;
3052
+ };
3053
+ } | null;
3054
+ } | undefined;
3055
+ }>, z.ZodObject<{
3056
+ job_id: z.ZodString;
3057
+ status: z.ZodLiteral<"queued">;
3058
+ tool: z.ZodLiteral<"workflow.reconstruct">;
3059
+ sample_id: z.ZodString;
3060
+ requested_path: z.ZodEnum<["auto", "native", "dotnet"]>;
3061
+ progress: z.ZodNumber;
3062
+ }, "strip", z.ZodTypeAny, {
3063
+ status: "queued";
3064
+ sample_id: string;
3065
+ tool: "workflow.reconstruct";
3066
+ progress: number;
3067
+ job_id: string;
3068
+ requested_path: "dotnet" | "native" | "auto";
3069
+ }, {
3070
+ status: "queued";
3071
+ sample_id: string;
3072
+ tool: "workflow.reconstruct";
3073
+ progress: number;
3074
+ job_id: string;
3075
+ requested_path: "dotnet" | "native" | "auto";
3076
+ }>]>>;
1593
3077
  warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1594
3078
  errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3079
+ setup_actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3080
+ id: z.ZodString;
3081
+ required: z.ZodBoolean;
3082
+ kind: z.ZodEnum<["pip_install", "set_env", "provide_path", "verify_install"]>;
3083
+ title: z.ZodString;
3084
+ summary: z.ZodString;
3085
+ command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3086
+ env_var: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3087
+ value_hint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3088
+ examples: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3089
+ applies_to: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3090
+ }, "strip", z.ZodTypeAny, {
3091
+ id: string;
3092
+ summary: string;
3093
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
3094
+ title: string;
3095
+ required: boolean;
3096
+ examples: string[];
3097
+ applies_to: string[];
3098
+ command?: string | null | undefined;
3099
+ env_var?: string | null | undefined;
3100
+ value_hint?: string | null | undefined;
3101
+ }, {
3102
+ id: string;
3103
+ summary: string;
3104
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
3105
+ title: string;
3106
+ required: boolean;
3107
+ command?: string | null | undefined;
3108
+ env_var?: string | null | undefined;
3109
+ value_hint?: string | null | undefined;
3110
+ examples?: string[] | undefined;
3111
+ applies_to?: string[] | undefined;
3112
+ }>, "many">>;
3113
+ required_user_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
3114
+ key: z.ZodString;
3115
+ label: z.ZodString;
3116
+ summary: z.ZodString;
3117
+ required: z.ZodBoolean;
3118
+ env_vars: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3119
+ examples: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3120
+ }, "strip", z.ZodTypeAny, {
3121
+ summary: string;
3122
+ label: string;
3123
+ required: boolean;
3124
+ examples: string[];
3125
+ key: string;
3126
+ env_vars: string[];
3127
+ }, {
3128
+ summary: string;
3129
+ label: string;
3130
+ required: boolean;
3131
+ key: string;
3132
+ examples?: string[] | undefined;
3133
+ env_vars?: string[] | undefined;
3134
+ }>, "many">>;
1595
3135
  artifacts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1596
3136
  metrics: z.ZodOptional<z.ZodObject<{
1597
3137
  elapsed_ms: z.ZodNumber;
@@ -1623,17 +3163,14 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1623
3163
  }>>;
1624
3164
  }, "strip", z.ZodTypeAny, {
1625
3165
  ok: boolean;
1626
- metrics?: {
1627
- elapsed_ms: number;
1628
- tool: string;
1629
- cached?: boolean | undefined;
1630
- cache_key?: string | undefined;
1631
- cache_tier?: string | undefined;
1632
- cache_created_at?: string | undefined;
1633
- cache_expires_at?: string | undefined;
1634
- cache_hit_at?: string | undefined;
1635
- } | undefined;
1636
3166
  data?: {
3167
+ status: "queued";
3168
+ sample_id: string;
3169
+ tool: "workflow.reconstruct";
3170
+ progress: number;
3171
+ job_id: string;
3172
+ requested_path: "dotnet" | "native" | "auto";
3173
+ } | {
1637
3174
  sample_id: string;
1638
3175
  notes: string[];
1639
3176
  runtime: {
@@ -1643,6 +3180,54 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1643
3180
  primary_runtime: string | null;
1644
3181
  };
1645
3182
  degraded: boolean;
3183
+ export: {
3184
+ tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
3185
+ executable_path: string | null;
3186
+ export_root: string;
3187
+ manifest_path: string | null;
3188
+ gaps_path: string | null;
3189
+ notes_path: string | null;
3190
+ module_count: number | null;
3191
+ unresolved_count: number | null;
3192
+ binary_profile: {
3193
+ packed: boolean;
3194
+ binary_role: string;
3195
+ original_filename: string | null;
3196
+ export_count: number;
3197
+ forwarder_count: number;
3198
+ notable_exports: string[];
3199
+ packing_confidence: number;
3200
+ analysis_priorities: string[];
3201
+ } | null;
3202
+ csproj_path: string | null;
3203
+ readme_path: string | null;
3204
+ metadata_path: string | null;
3205
+ fallback_notes_path: string | null;
3206
+ degraded_mode: boolean | null;
3207
+ managed_profile: {
3208
+ module_name: string | null;
3209
+ analysis_priorities: string[];
3210
+ method_count: number;
3211
+ type_count: number;
3212
+ namespace_count: number;
3213
+ assembly_reference_count: number;
3214
+ resource_count: number;
3215
+ assembly_name: string | null;
3216
+ assembly_version: string | null;
3217
+ metadata_version: string | null;
3218
+ is_library: boolean;
3219
+ entry_point_token: string | null;
3220
+ assembly_references: string[];
3221
+ resources: string[];
3222
+ dominant_namespaces: string[];
3223
+ notable_types: string[];
3224
+ } | null;
3225
+ build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
3226
+ harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
3227
+ build_log_path: string | null;
3228
+ harness_log_path: string | null;
3229
+ class_count: number | null;
3230
+ } | null;
1646
3231
  provenance: {
1647
3232
  runtime: {
1648
3233
  artifact_count: number;
@@ -1654,6 +3239,16 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1654
3239
  earliest_artifact_at: string | null;
1655
3240
  latest_artifact_at: string | null;
1656
3241
  };
3242
+ semantic_module_reviews?: {
3243
+ artifact_count: number;
3244
+ scope_note: string;
3245
+ artifact_ids: string[];
3246
+ session_selector: string | null;
3247
+ session_tags: string[];
3248
+ scope: "all" | "latest" | "session";
3249
+ earliest_artifact_at: string | null;
3250
+ latest_artifact_at: string | null;
3251
+ } | undefined;
1657
3252
  semantic_names?: {
1658
3253
  artifact_count: number;
1659
3254
  scope_note: string;
@@ -1678,6 +3273,11 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1678
3273
  selected_path: "dotnet" | "native";
1679
3274
  stage_status: {
1680
3275
  runtime: "failed" | "ok";
3276
+ function_index_recovery: "failed" | "ok" | "skipped";
3277
+ preflight_binary_profile: "failed" | "ok" | "skipped";
3278
+ preflight_dll_profile: "failed" | "ok" | "skipped";
3279
+ preflight_com_profile: "failed" | "ok" | "skipped";
3280
+ preflight_rust_profile: "failed" | "ok" | "skipped";
1681
3281
  plan: "failed" | "ok" | "skipped";
1682
3282
  export_primary: "failed" | "ok" | "skipped";
1683
3283
  export_fallback: "failed" | "ok" | "skipped";
@@ -1689,54 +3289,6 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1689
3289
  blockers: string[];
1690
3290
  recommendations: string[];
1691
3291
  } | null;
1692
- export: {
1693
- tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
1694
- executable_path: string | null;
1695
- export_root: string;
1696
- manifest_path: string | null;
1697
- gaps_path: string | null;
1698
- notes_path: string | null;
1699
- module_count: number | null;
1700
- unresolved_count: number | null;
1701
- binary_profile: {
1702
- packed: boolean;
1703
- binary_role: string;
1704
- original_filename: string | null;
1705
- export_count: number;
1706
- forwarder_count: number;
1707
- notable_exports: string[];
1708
- packing_confidence: number;
1709
- analysis_priorities: string[];
1710
- } | null;
1711
- csproj_path: string | null;
1712
- readme_path: string | null;
1713
- metadata_path: string | null;
1714
- fallback_notes_path: string | null;
1715
- degraded_mode: boolean | null;
1716
- managed_profile: {
1717
- resources: string[];
1718
- method_count: number;
1719
- type_count: number;
1720
- namespace_count: number;
1721
- assembly_reference_count: number;
1722
- resource_count: number;
1723
- assembly_name: string | null;
1724
- assembly_version: string | null;
1725
- module_name: string | null;
1726
- metadata_version: string | null;
1727
- is_library: boolean;
1728
- entry_point_token: string | null;
1729
- assembly_references: string[];
1730
- analysis_priorities: string[];
1731
- dominant_namespaces: string[];
1732
- notable_types: string[];
1733
- } | null;
1734
- build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1735
- harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1736
- build_log_path: string | null;
1737
- harness_log_path: string | null;
1738
- class_count: number | null;
1739
- } | null;
1740
3292
  selection_diffs?: {
1741
3293
  runtime?: {
1742
3294
  summary: string;
@@ -1826,12 +3378,172 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1826
3378
  artifact_count_delta: number;
1827
3379
  } | undefined;
1828
3380
  } | undefined;
3381
+ preflight?: {
3382
+ binary_profile: {
3383
+ sample_id: string;
3384
+ indicators: {
3385
+ com_server: {
3386
+ confidence: number;
3387
+ evidence: string[];
3388
+ likely: boolean;
3389
+ };
3390
+ service_binary: {
3391
+ confidence: number;
3392
+ evidence: string[];
3393
+ likely: boolean;
3394
+ };
3395
+ plugin_binary: {
3396
+ confidence: number;
3397
+ evidence: string[];
3398
+ likely: boolean;
3399
+ };
3400
+ driver_binary: {
3401
+ confidence: number;
3402
+ evidence: string[];
3403
+ likely: boolean;
3404
+ };
3405
+ };
3406
+ export_surface: {
3407
+ total_exports: number;
3408
+ total_forwarders: number;
3409
+ notable_exports: string[];
3410
+ com_related_exports: string[];
3411
+ service_related_exports: string[];
3412
+ plugin_related_exports: string[];
3413
+ forwarded_exports: string[];
3414
+ };
3415
+ packed: boolean;
3416
+ binary_role: string;
3417
+ original_filename: string | null;
3418
+ packing_confidence: number;
3419
+ analysis_priorities: string[];
3420
+ role_confidence: number;
3421
+ runtime_hint: {
3422
+ is_dotnet: boolean | null;
3423
+ dotnet_version: string | null;
3424
+ target_framework: string | null;
3425
+ primary_runtime: string | null;
3426
+ };
3427
+ import_surface: {
3428
+ dll_count: number;
3429
+ notable_dlls: string[];
3430
+ com_related_imports: string[];
3431
+ service_related_imports: string[];
3432
+ network_related_imports: string[];
3433
+ process_related_imports: string[];
3434
+ };
3435
+ export_dispatch_profile: {
3436
+ confidence: number;
3437
+ command_like_exports: string[];
3438
+ callback_like_exports: string[];
3439
+ registration_exports: string[];
3440
+ ordinal_only_exports: number;
3441
+ likely_dispatch_model: string;
3442
+ };
3443
+ lifecycle_surface: string[];
3444
+ com_profile: {
3445
+ confidence: number;
3446
+ clsid_strings: string[];
3447
+ progid_strings: string[];
3448
+ interface_hints: string[];
3449
+ registration_strings: string[];
3450
+ class_factory_exports: string[];
3451
+ class_factory_surface: string[];
3452
+ };
3453
+ host_interaction_profile: {
3454
+ confidence: number;
3455
+ callback_surface: string[];
3456
+ likely_hosted: boolean;
3457
+ host_hints: string[];
3458
+ callback_exports: string[];
3459
+ callback_strings: string[];
3460
+ service_hooks: string[];
3461
+ };
3462
+ strings_considered: number;
3463
+ } | null;
3464
+ com_profile: {
3465
+ analysis_priorities: string[];
3466
+ registration_exports: string[];
3467
+ clsid_strings: string[];
3468
+ progid_strings: string[];
3469
+ interface_hints: string[];
3470
+ class_factory_exports: string[];
3471
+ class_factory_surface: {
3472
+ confidence: number;
3473
+ interface_hints: string[];
3474
+ class_factory_exports: string[];
3475
+ activation_markers: string[];
3476
+ };
3477
+ likely_com_server: boolean;
3478
+ com_confidence: number;
3479
+ activation_steps: string[];
3480
+ activation_model: string;
3481
+ } | null;
3482
+ dll_profile: {
3483
+ callback_surface: {
3484
+ confidence: number;
3485
+ host_hints: string[];
3486
+ callback_exports: string[];
3487
+ callback_strings: string[];
3488
+ };
3489
+ analysis_priorities: string[];
3490
+ class_factory_surface: {
3491
+ confidence: number;
3492
+ class_factory_exports: string[];
3493
+ activation_markers: string[];
3494
+ };
3495
+ host_hints: string[];
3496
+ role_confidence: number;
3497
+ lifecycle_surface: {
3498
+ confidence: number;
3499
+ lifecycle_exports: string[];
3500
+ lifecycle_imports: string[];
3501
+ attach_detach_strings: string[];
3502
+ };
3503
+ library_like: boolean;
3504
+ dll_entry_hints: string[];
3505
+ likely_entry_model: string;
3506
+ dispatch_model: string;
3507
+ } | null;
3508
+ rust_profile: {
3509
+ confidence: number;
3510
+ cargo_paths: string[];
3511
+ primary_runtime: string | null;
3512
+ analysis_priorities: string[];
3513
+ crate_hints: string[];
3514
+ runtime_hints: string[];
3515
+ suspected_rust: boolean;
3516
+ recovered_function_count: number;
3517
+ recovered_symbol_count: number;
3518
+ importable_with_code_functions_define: boolean;
3519
+ } | null;
3520
+ function_index_recovery: {
3521
+ recovered_function_count: number;
3522
+ recovered_symbol_count: number;
3523
+ next_steps: string[];
3524
+ imported_count: number;
3525
+ function_index_status: "ready" | null;
3526
+ decompile_status: "missing" | null;
3527
+ cfg_status: "missing" | null;
3528
+ define_from: "smart_recover" | "symbols_recover" | null;
3529
+ recovery_strategy: string[];
3530
+ applied: boolean;
3531
+ } | null;
3532
+ role_strategy: {
3533
+ focus_areas: string[];
3534
+ target_role: string;
3535
+ priority_order: string[];
3536
+ rationale: string[];
3537
+ export_tuning: {
3538
+ include_strings: boolean;
3539
+ topk: number;
3540
+ module_limit: number;
3541
+ min_module_size: number;
3542
+ include_imports: boolean;
3543
+ };
3544
+ } | null;
3545
+ } | undefined;
1829
3546
  } | undefined;
1830
- warnings?: string[] | undefined;
1831
- errors?: string[] | undefined;
1832
- artifacts?: any[] | undefined;
1833
- }, {
1834
- ok: boolean;
1835
3547
  metrics?: {
1836
3548
  elapsed_ms: number;
1837
3549
  tool: string;
@@ -1842,7 +3554,39 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1842
3554
  cache_expires_at?: string | undefined;
1843
3555
  cache_hit_at?: string | undefined;
1844
3556
  } | undefined;
3557
+ warnings?: string[] | undefined;
3558
+ errors?: string[] | undefined;
3559
+ artifacts?: any[] | undefined;
3560
+ setup_actions?: {
3561
+ id: string;
3562
+ summary: string;
3563
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
3564
+ title: string;
3565
+ required: boolean;
3566
+ examples: string[];
3567
+ applies_to: string[];
3568
+ command?: string | null | undefined;
3569
+ env_var?: string | null | undefined;
3570
+ value_hint?: string | null | undefined;
3571
+ }[] | undefined;
3572
+ required_user_inputs?: {
3573
+ summary: string;
3574
+ label: string;
3575
+ required: boolean;
3576
+ examples: string[];
3577
+ key: string;
3578
+ env_vars: string[];
3579
+ }[] | undefined;
3580
+ }, {
3581
+ ok: boolean;
1845
3582
  data?: {
3583
+ status: "queued";
3584
+ sample_id: string;
3585
+ tool: "workflow.reconstruct";
3586
+ progress: number;
3587
+ job_id: string;
3588
+ requested_path: "dotnet" | "native" | "auto";
3589
+ } | {
1846
3590
  sample_id: string;
1847
3591
  notes: string[];
1848
3592
  runtime: {
@@ -1852,6 +3596,54 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1852
3596
  primary_runtime: string | null;
1853
3597
  };
1854
3598
  degraded: boolean;
3599
+ export: {
3600
+ tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
3601
+ executable_path: string | null;
3602
+ export_root: string;
3603
+ manifest_path: string | null;
3604
+ gaps_path: string | null;
3605
+ notes_path: string | null;
3606
+ module_count: number | null;
3607
+ unresolved_count: number | null;
3608
+ binary_profile: {
3609
+ packed: boolean;
3610
+ binary_role: string;
3611
+ original_filename: string | null;
3612
+ export_count: number;
3613
+ forwarder_count: number;
3614
+ notable_exports: string[];
3615
+ packing_confidence: number;
3616
+ analysis_priorities: string[];
3617
+ } | null;
3618
+ csproj_path: string | null;
3619
+ readme_path: string | null;
3620
+ metadata_path: string | null;
3621
+ fallback_notes_path: string | null;
3622
+ degraded_mode: boolean | null;
3623
+ managed_profile: {
3624
+ module_name: string | null;
3625
+ analysis_priorities: string[];
3626
+ method_count: number;
3627
+ type_count: number;
3628
+ namespace_count: number;
3629
+ assembly_reference_count: number;
3630
+ resource_count: number;
3631
+ assembly_name: string | null;
3632
+ assembly_version: string | null;
3633
+ metadata_version: string | null;
3634
+ is_library: boolean;
3635
+ entry_point_token: string | null;
3636
+ assembly_references: string[];
3637
+ resources: string[];
3638
+ dominant_namespaces: string[];
3639
+ notable_types: string[];
3640
+ } | null;
3641
+ build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
3642
+ harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
3643
+ build_log_path: string | null;
3644
+ harness_log_path: string | null;
3645
+ class_count: number | null;
3646
+ } | null;
1855
3647
  provenance: {
1856
3648
  runtime: {
1857
3649
  artifact_count: number;
@@ -1863,6 +3655,16 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1863
3655
  earliest_artifact_at: string | null;
1864
3656
  latest_artifact_at: string | null;
1865
3657
  };
3658
+ semantic_module_reviews?: {
3659
+ artifact_count: number;
3660
+ scope_note: string;
3661
+ artifact_ids: string[];
3662
+ session_selector: string | null;
3663
+ session_tags: string[];
3664
+ scope: "all" | "latest" | "session";
3665
+ earliest_artifact_at: string | null;
3666
+ latest_artifact_at: string | null;
3667
+ } | undefined;
1866
3668
  semantic_names?: {
1867
3669
  artifact_count: number;
1868
3670
  scope_note: string;
@@ -1887,6 +3689,11 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1887
3689
  selected_path: "dotnet" | "native";
1888
3690
  stage_status: {
1889
3691
  runtime: "failed" | "ok";
3692
+ function_index_recovery: "failed" | "ok" | "skipped";
3693
+ preflight_binary_profile: "failed" | "ok" | "skipped";
3694
+ preflight_dll_profile: "failed" | "ok" | "skipped";
3695
+ preflight_com_profile: "failed" | "ok" | "skipped";
3696
+ preflight_rust_profile: "failed" | "ok" | "skipped";
1890
3697
  plan: "failed" | "ok" | "skipped";
1891
3698
  export_primary: "failed" | "ok" | "skipped";
1892
3699
  export_fallback: "failed" | "ok" | "skipped";
@@ -1898,54 +3705,6 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
1898
3705
  blockers: string[];
1899
3706
  recommendations: string[];
1900
3707
  } | null;
1901
- export: {
1902
- tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
1903
- executable_path: string | null;
1904
- export_root: string;
1905
- manifest_path: string | null;
1906
- gaps_path: string | null;
1907
- notes_path: string | null;
1908
- module_count: number | null;
1909
- unresolved_count: number | null;
1910
- binary_profile: {
1911
- packed: boolean;
1912
- binary_role: string;
1913
- original_filename: string | null;
1914
- export_count: number;
1915
- forwarder_count: number;
1916
- notable_exports: string[];
1917
- packing_confidence: number;
1918
- analysis_priorities: string[];
1919
- } | null;
1920
- csproj_path: string | null;
1921
- readme_path: string | null;
1922
- metadata_path: string | null;
1923
- fallback_notes_path: string | null;
1924
- degraded_mode: boolean | null;
1925
- managed_profile: {
1926
- resources: string[];
1927
- method_count: number;
1928
- type_count: number;
1929
- namespace_count: number;
1930
- assembly_reference_count: number;
1931
- resource_count: number;
1932
- assembly_name: string | null;
1933
- assembly_version: string | null;
1934
- module_name: string | null;
1935
- metadata_version: string | null;
1936
- is_library: boolean;
1937
- entry_point_token: string | null;
1938
- assembly_references: string[];
1939
- analysis_priorities: string[];
1940
- dominant_namespaces: string[];
1941
- notable_types: string[];
1942
- } | null;
1943
- build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1944
- harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1945
- build_log_path: string | null;
1946
- harness_log_path: string | null;
1947
- class_count: number | null;
1948
- } | null;
1949
3708
  selection_diffs?: {
1950
3709
  runtime?: {
1951
3710
  summary: string;
@@ -2035,10 +3794,205 @@ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
2035
3794
  artifact_count_delta: number;
2036
3795
  } | undefined;
2037
3796
  } | undefined;
3797
+ preflight?: {
3798
+ binary_profile: {
3799
+ sample_id: string;
3800
+ indicators: {
3801
+ com_server: {
3802
+ confidence: number;
3803
+ evidence: string[];
3804
+ likely: boolean;
3805
+ };
3806
+ service_binary: {
3807
+ confidence: number;
3808
+ evidence: string[];
3809
+ likely: boolean;
3810
+ };
3811
+ plugin_binary: {
3812
+ confidence: number;
3813
+ evidence: string[];
3814
+ likely: boolean;
3815
+ };
3816
+ driver_binary: {
3817
+ confidence: number;
3818
+ evidence: string[];
3819
+ likely: boolean;
3820
+ };
3821
+ };
3822
+ export_surface: {
3823
+ total_exports: number;
3824
+ total_forwarders: number;
3825
+ notable_exports: string[];
3826
+ com_related_exports: string[];
3827
+ service_related_exports: string[];
3828
+ plugin_related_exports: string[];
3829
+ forwarded_exports: string[];
3830
+ };
3831
+ packed: boolean;
3832
+ binary_role: string;
3833
+ original_filename: string | null;
3834
+ packing_confidence: number;
3835
+ analysis_priorities: string[];
3836
+ role_confidence: number;
3837
+ runtime_hint: {
3838
+ is_dotnet: boolean | null;
3839
+ dotnet_version: string | null;
3840
+ target_framework: string | null;
3841
+ primary_runtime: string | null;
3842
+ };
3843
+ import_surface: {
3844
+ dll_count: number;
3845
+ notable_dlls: string[];
3846
+ com_related_imports: string[];
3847
+ service_related_imports: string[];
3848
+ network_related_imports: string[];
3849
+ process_related_imports: string[];
3850
+ };
3851
+ export_dispatch_profile: {
3852
+ confidence: number;
3853
+ command_like_exports: string[];
3854
+ callback_like_exports: string[];
3855
+ registration_exports: string[];
3856
+ ordinal_only_exports: number;
3857
+ likely_dispatch_model: string;
3858
+ };
3859
+ com_profile: {
3860
+ confidence: number;
3861
+ clsid_strings: string[];
3862
+ progid_strings: string[];
3863
+ interface_hints: string[];
3864
+ registration_strings: string[];
3865
+ class_factory_exports: string[];
3866
+ class_factory_surface?: string[] | undefined;
3867
+ };
3868
+ host_interaction_profile: {
3869
+ confidence: number;
3870
+ likely_hosted: boolean;
3871
+ host_hints: string[];
3872
+ callback_exports: string[];
3873
+ callback_strings: string[];
3874
+ service_hooks: string[];
3875
+ callback_surface?: string[] | undefined;
3876
+ };
3877
+ strings_considered: number;
3878
+ lifecycle_surface?: string[] | undefined;
3879
+ } | null;
3880
+ com_profile: {
3881
+ analysis_priorities: string[];
3882
+ registration_exports: string[];
3883
+ clsid_strings: string[];
3884
+ progid_strings: string[];
3885
+ interface_hints: string[];
3886
+ class_factory_exports: string[];
3887
+ class_factory_surface: {
3888
+ confidence: number;
3889
+ interface_hints: string[];
3890
+ class_factory_exports: string[];
3891
+ activation_markers: string[];
3892
+ };
3893
+ likely_com_server: boolean;
3894
+ com_confidence: number;
3895
+ activation_steps: string[];
3896
+ activation_model: string;
3897
+ } | null;
3898
+ dll_profile: {
3899
+ callback_surface: {
3900
+ confidence: number;
3901
+ host_hints: string[];
3902
+ callback_exports: string[];
3903
+ callback_strings: string[];
3904
+ };
3905
+ analysis_priorities: string[];
3906
+ class_factory_surface: {
3907
+ confidence: number;
3908
+ class_factory_exports: string[];
3909
+ activation_markers: string[];
3910
+ };
3911
+ host_hints: string[];
3912
+ role_confidence: number;
3913
+ lifecycle_surface: {
3914
+ confidence: number;
3915
+ lifecycle_exports: string[];
3916
+ lifecycle_imports: string[];
3917
+ attach_detach_strings: string[];
3918
+ };
3919
+ library_like: boolean;
3920
+ dll_entry_hints: string[];
3921
+ likely_entry_model: string;
3922
+ dispatch_model: string;
3923
+ } | null;
3924
+ rust_profile: {
3925
+ confidence: number;
3926
+ cargo_paths: string[];
3927
+ primary_runtime: string | null;
3928
+ analysis_priorities: string[];
3929
+ crate_hints: string[];
3930
+ runtime_hints: string[];
3931
+ suspected_rust: boolean;
3932
+ recovered_function_count: number;
3933
+ recovered_symbol_count: number;
3934
+ importable_with_code_functions_define: boolean;
3935
+ } | null;
3936
+ function_index_recovery: {
3937
+ recovered_function_count: number;
3938
+ recovered_symbol_count: number;
3939
+ next_steps: string[];
3940
+ imported_count: number;
3941
+ function_index_status: "ready" | null;
3942
+ decompile_status: "missing" | null;
3943
+ cfg_status: "missing" | null;
3944
+ define_from: "smart_recover" | "symbols_recover" | null;
3945
+ recovery_strategy: string[];
3946
+ applied: boolean;
3947
+ } | null;
3948
+ role_strategy: {
3949
+ focus_areas: string[];
3950
+ target_role: string;
3951
+ priority_order: string[];
3952
+ rationale: string[];
3953
+ export_tuning: {
3954
+ include_strings: boolean;
3955
+ topk: number;
3956
+ module_limit: number;
3957
+ min_module_size: number;
3958
+ include_imports: boolean;
3959
+ };
3960
+ } | null;
3961
+ } | undefined;
3962
+ } | undefined;
3963
+ metrics?: {
3964
+ elapsed_ms: number;
3965
+ tool: string;
3966
+ cached?: boolean | undefined;
3967
+ cache_key?: string | undefined;
3968
+ cache_tier?: string | undefined;
3969
+ cache_created_at?: string | undefined;
3970
+ cache_expires_at?: string | undefined;
3971
+ cache_hit_at?: string | undefined;
2038
3972
  } | undefined;
2039
3973
  warnings?: string[] | undefined;
2040
3974
  errors?: string[] | undefined;
2041
3975
  artifacts?: any[] | undefined;
3976
+ setup_actions?: {
3977
+ id: string;
3978
+ summary: string;
3979
+ kind: "pip_install" | "set_env" | "provide_path" | "verify_install";
3980
+ title: string;
3981
+ required: boolean;
3982
+ command?: string | null | undefined;
3983
+ env_var?: string | null | undefined;
3984
+ value_hint?: string | null | undefined;
3985
+ examples?: string[] | undefined;
3986
+ applies_to?: string[] | undefined;
3987
+ }[] | undefined;
3988
+ required_user_inputs?: {
3989
+ summary: string;
3990
+ label: string;
3991
+ required: boolean;
3992
+ key: string;
3993
+ examples?: string[] | undefined;
3994
+ env_vars?: string[] | undefined;
3995
+ }[] | undefined;
2042
3996
  }>;
2043
3997
  export type ReconstructWorkflowOutput = z.infer<typeof ReconstructWorkflowOutputSchema>;
2044
3998
  export declare const reconstructWorkflowToolDefinition: ToolDefinition;
@@ -2047,7 +4001,12 @@ interface ReconstructWorkflowDependencies {
2047
4001
  planHandler?: (args: ToolArgs) => Promise<WorkerResult>;
2048
4002
  nativeExportHandler?: (args: ToolArgs) => Promise<WorkerResult>;
2049
4003
  dotnetExportHandler?: (args: ToolArgs) => Promise<WorkerResult>;
4004
+ binaryRoleProfileHandler?: (args: ToolArgs) => Promise<WorkerResult>;
4005
+ dllExportProfileHandler?: (args: ToolArgs) => Promise<WorkerResult>;
4006
+ comRoleProfileHandler?: (args: ToolArgs) => Promise<WorkerResult>;
4007
+ rustBinaryAnalyzeHandler?: (args: ToolArgs) => Promise<WorkerResult>;
4008
+ functionIndexRecoverHandler?: (args: ToolArgs) => Promise<WorkerResult>;
2050
4009
  }
2051
- export declare function createReconstructWorkflowHandler(workspaceManager: WorkspaceManager, database: DatabaseManager, cacheManager: CacheManager, dependencies?: ReconstructWorkflowDependencies): (args: ToolArgs) => Promise<WorkerResult>;
4010
+ export declare function createReconstructWorkflowHandler(workspaceManager: WorkspaceManager, database: DatabaseManager, cacheManager: CacheManager, dependencies?: ReconstructWorkflowDependencies, jobQueue?: JobQueue): (args: ToolArgs) => Promise<WorkerResult>;
2052
4011
  export {};
2053
4012
  //# sourceMappingURL=reconstruct.d.ts.map