windows-exe-decompiler-mcp-server 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/CODEX_INSTALLATION.md +69 -0
  2. package/COPILOT_INSTALLATION.md +77 -0
  3. package/LICENSE +21 -0
  4. package/README.md +314 -0
  5. package/bin/windows-exe-decompiler-mcp-server.js +3 -0
  6. package/dist/analysis-provenance.d.ts +184 -0
  7. package/dist/analysis-provenance.js +74 -0
  8. package/dist/analysis-task-runner.d.ts +31 -0
  9. package/dist/analysis-task-runner.js +160 -0
  10. package/dist/artifact-inventory.d.ts +23 -0
  11. package/dist/artifact-inventory.js +175 -0
  12. package/dist/cache-manager.d.ts +128 -0
  13. package/dist/cache-manager.js +454 -0
  14. package/dist/confidence-semantics.d.ts +66 -0
  15. package/dist/confidence-semantics.js +122 -0
  16. package/dist/config.d.ts +335 -0
  17. package/dist/config.js +193 -0
  18. package/dist/database.d.ts +227 -0
  19. package/dist/database.js +601 -0
  20. package/dist/decompiler-worker.d.ts +441 -0
  21. package/dist/decompiler-worker.js +1962 -0
  22. package/dist/dynamic-trace.d.ts +95 -0
  23. package/dist/dynamic-trace.js +629 -0
  24. package/dist/env-validator.d.ts +15 -0
  25. package/dist/env-validator.js +249 -0
  26. package/dist/error-handler.d.ts +28 -0
  27. package/dist/error-handler.example.d.ts +22 -0
  28. package/dist/error-handler.example.js +141 -0
  29. package/dist/error-handler.js +139 -0
  30. package/dist/ghidra-analysis-status.d.ts +49 -0
  31. package/dist/ghidra-analysis-status.js +178 -0
  32. package/dist/ghidra-config.d.ts +134 -0
  33. package/dist/ghidra-config.js +464 -0
  34. package/dist/index.d.ts +9 -0
  35. package/dist/index.js +200 -0
  36. package/dist/job-queue.d.ts +169 -0
  37. package/dist/job-queue.js +407 -0
  38. package/dist/logger.d.ts +106 -0
  39. package/dist/logger.js +176 -0
  40. package/dist/policy-guard.d.ts +115 -0
  41. package/dist/policy-guard.js +243 -0
  42. package/dist/process-output.d.ts +15 -0
  43. package/dist/process-output.js +90 -0
  44. package/dist/prompts/function-explanation-review.d.ts +5 -0
  45. package/dist/prompts/function-explanation-review.js +64 -0
  46. package/dist/prompts/semantic-name-review.d.ts +5 -0
  47. package/dist/prompts/semantic-name-review.js +63 -0
  48. package/dist/runtime-correlation.d.ts +34 -0
  49. package/dist/runtime-correlation.js +279 -0
  50. package/dist/runtime-paths.d.ts +3 -0
  51. package/dist/runtime-paths.js +11 -0
  52. package/dist/selection-diff.d.ts +667 -0
  53. package/dist/selection-diff.js +53 -0
  54. package/dist/semantic-name-suggestion-artifacts.d.ts +116 -0
  55. package/dist/semantic-name-suggestion-artifacts.js +314 -0
  56. package/dist/server.d.ts +129 -0
  57. package/dist/server.js +578 -0
  58. package/dist/tools/artifact-read.d.ts +235 -0
  59. package/dist/tools/artifact-read.js +317 -0
  60. package/dist/tools/artifacts-diff.d.ts +728 -0
  61. package/dist/tools/artifacts-diff.js +304 -0
  62. package/dist/tools/artifacts-list.d.ts +515 -0
  63. package/dist/tools/artifacts-list.js +389 -0
  64. package/dist/tools/attack-map.d.ts +290 -0
  65. package/dist/tools/attack-map.js +519 -0
  66. package/dist/tools/cache-observability.d.ts +4 -0
  67. package/dist/tools/cache-observability.js +36 -0
  68. package/dist/tools/code-function-cfg.d.ts +50 -0
  69. package/dist/tools/code-function-cfg.js +102 -0
  70. package/dist/tools/code-function-decompile.d.ts +55 -0
  71. package/dist/tools/code-function-decompile.js +103 -0
  72. package/dist/tools/code-function-disassemble.d.ts +43 -0
  73. package/dist/tools/code-function-disassemble.js +185 -0
  74. package/dist/tools/code-function-explain-apply.d.ts +255 -0
  75. package/dist/tools/code-function-explain-apply.js +225 -0
  76. package/dist/tools/code-function-explain-prepare.d.ts +535 -0
  77. package/dist/tools/code-function-explain-prepare.js +276 -0
  78. package/dist/tools/code-function-explain-review.d.ts +397 -0
  79. package/dist/tools/code-function-explain-review.js +589 -0
  80. package/dist/tools/code-function-rename-apply.d.ts +248 -0
  81. package/dist/tools/code-function-rename-apply.js +220 -0
  82. package/dist/tools/code-function-rename-prepare.d.ts +506 -0
  83. package/dist/tools/code-function-rename-prepare.js +279 -0
  84. package/dist/tools/code-function-rename-review.d.ts +574 -0
  85. package/dist/tools/code-function-rename-review.js +761 -0
  86. package/dist/tools/code-functions-list.d.ts +37 -0
  87. package/dist/tools/code-functions-list.js +91 -0
  88. package/dist/tools/code-functions-rank.d.ts +34 -0
  89. package/dist/tools/code-functions-rank.js +90 -0
  90. package/dist/tools/code-functions-reconstruct.d.ts +2725 -0
  91. package/dist/tools/code-functions-reconstruct.js +2807 -0
  92. package/dist/tools/code-functions-search.d.ts +39 -0
  93. package/dist/tools/code-functions-search.js +90 -0
  94. package/dist/tools/code-reconstruct-export.d.ts +1212 -0
  95. package/dist/tools/code-reconstruct-export.js +4002 -0
  96. package/dist/tools/code-reconstruct-plan.d.ts +274 -0
  97. package/dist/tools/code-reconstruct-plan.js +342 -0
  98. package/dist/tools/dotnet-metadata-extract.d.ts +541 -0
  99. package/dist/tools/dotnet-metadata-extract.js +355 -0
  100. package/dist/tools/dotnet-reconstruct-export.d.ts +567 -0
  101. package/dist/tools/dotnet-reconstruct-export.js +1151 -0
  102. package/dist/tools/dotnet-types-list.d.ts +325 -0
  103. package/dist/tools/dotnet-types-list.js +201 -0
  104. package/dist/tools/dynamic-dependencies.d.ts +115 -0
  105. package/dist/tools/dynamic-dependencies.js +213 -0
  106. package/dist/tools/dynamic-memory-import.d.ts +10 -0
  107. package/dist/tools/dynamic-memory-import.js +567 -0
  108. package/dist/tools/dynamic-trace-import.d.ts +10 -0
  109. package/dist/tools/dynamic-trace-import.js +235 -0
  110. package/dist/tools/entrypoint-fallback-disasm.d.ts +30 -0
  111. package/dist/tools/entrypoint-fallback-disasm.js +89 -0
  112. package/dist/tools/ghidra-analyze.d.ts +88 -0
  113. package/dist/tools/ghidra-analyze.js +208 -0
  114. package/dist/tools/ghidra-health.d.ts +37 -0
  115. package/dist/tools/ghidra-health.js +212 -0
  116. package/dist/tools/ioc-export.d.ts +209 -0
  117. package/dist/tools/ioc-export.js +542 -0
  118. package/dist/tools/packer-detect.d.ts +165 -0
  119. package/dist/tools/packer-detect.js +284 -0
  120. package/dist/tools/pe-exports-extract.d.ts +175 -0
  121. package/dist/tools/pe-exports-extract.js +253 -0
  122. package/dist/tools/pe-fingerprint.d.ts +234 -0
  123. package/dist/tools/pe-fingerprint.js +269 -0
  124. package/dist/tools/pe-imports-extract.d.ts +105 -0
  125. package/dist/tools/pe-imports-extract.js +245 -0
  126. package/dist/tools/report-generate.d.ts +157 -0
  127. package/dist/tools/report-generate.js +457 -0
  128. package/dist/tools/report-summarize.d.ts +2131 -0
  129. package/dist/tools/report-summarize.js +596 -0
  130. package/dist/tools/runtime-detect.d.ts +135 -0
  131. package/dist/tools/runtime-detect.js +247 -0
  132. package/dist/tools/sample-ingest.d.ts +94 -0
  133. package/dist/tools/sample-ingest.js +327 -0
  134. package/dist/tools/sample-profile-get.d.ts +183 -0
  135. package/dist/tools/sample-profile-get.js +121 -0
  136. package/dist/tools/sandbox-execute.d.ts +441 -0
  137. package/dist/tools/sandbox-execute.js +392 -0
  138. package/dist/tools/strings-extract.d.ts +375 -0
  139. package/dist/tools/strings-extract.js +314 -0
  140. package/dist/tools/strings-floss-decode.d.ts +143 -0
  141. package/dist/tools/strings-floss-decode.js +259 -0
  142. package/dist/tools/system-health.d.ts +434 -0
  143. package/dist/tools/system-health.js +446 -0
  144. package/dist/tools/task-cancel.d.ts +21 -0
  145. package/dist/tools/task-cancel.js +70 -0
  146. package/dist/tools/task-status.d.ts +27 -0
  147. package/dist/tools/task-status.js +106 -0
  148. package/dist/tools/task-sweep.d.ts +22 -0
  149. package/dist/tools/task-sweep.js +77 -0
  150. package/dist/tools/tool-help.d.ts +340 -0
  151. package/dist/tools/tool-help.js +261 -0
  152. package/dist/tools/yara-scan.d.ts +554 -0
  153. package/dist/tools/yara-scan.js +313 -0
  154. package/dist/types.d.ts +266 -0
  155. package/dist/types.js +41 -0
  156. package/dist/worker-pool.d.ts +204 -0
  157. package/dist/worker-pool.js +650 -0
  158. package/dist/workflows/deep-static.d.ts +104 -0
  159. package/dist/workflows/deep-static.js +276 -0
  160. package/dist/workflows/function-explanation-review.d.ts +655 -0
  161. package/dist/workflows/function-explanation-review.js +440 -0
  162. package/dist/workflows/reconstruct.d.ts +2053 -0
  163. package/dist/workflows/reconstruct.js +666 -0
  164. package/dist/workflows/semantic-name-review.d.ts +2418 -0
  165. package/dist/workflows/semantic-name-review.js +521 -0
  166. package/dist/workflows/triage.d.ts +659 -0
  167. package/dist/workflows/triage.js +1374 -0
  168. package/dist/workspace-manager.d.ts +150 -0
  169. package/dist/workspace-manager.js +411 -0
  170. package/ghidra_scripts/DecompileFunction.java +487 -0
  171. package/ghidra_scripts/DecompileFunction.py +150 -0
  172. package/ghidra_scripts/ExtractCFG.java +256 -0
  173. package/ghidra_scripts/ExtractCFG.py +233 -0
  174. package/ghidra_scripts/ExtractFunctions.java +442 -0
  175. package/ghidra_scripts/ExtractFunctions.py +101 -0
  176. package/ghidra_scripts/README.md +125 -0
  177. package/ghidra_scripts/SearchFunctionReferences.java +380 -0
  178. package/helpers/DotNetMetadataProbe/DotNetMetadataProbe.csproj +9 -0
  179. package/helpers/DotNetMetadataProbe/Program.cs +566 -0
  180. package/install-to-codex.ps1 +178 -0
  181. package/install-to-copilot.ps1 +303 -0
  182. package/package.json +101 -0
  183. package/requirements.txt +9 -0
  184. package/workers/requirements-dynamic.txt +11 -0
  185. package/workers/requirements.txt +8 -0
  186. package/workers/speakeasy_compat.py +175 -0
  187. package/workers/static_worker.py +5183 -0
  188. package/workers/yara_rules/default.yar +33 -0
  189. package/workers/yara_rules/malware_families.yar +93 -0
  190. package/workers/yara_rules/packers.yar +80 -0
@@ -0,0 +1,2053 @@
1
+ /**
2
+ * Reconstruction workflow implementation
3
+ * One-shot orchestration for source-like reconstruction across native/.NET paths.
4
+ */
5
+ import { z } from 'zod';
6
+ import type { ToolDefinition, ToolArgs, WorkerResult } from '../types.js';
7
+ import type { WorkspaceManager } from '../workspace-manager.js';
8
+ import type { DatabaseManager } from '../database.js';
9
+ import type { CacheManager } from '../cache-manager.js';
10
+ export declare const ReconstructWorkflowInputSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
11
+ sample_id: z.ZodString;
12
+ path: z.ZodDefault<z.ZodEnum<["auto", "native", "dotnet"]>>;
13
+ topk: z.ZodDefault<z.ZodNumber>;
14
+ export_name: z.ZodOptional<z.ZodString>;
15
+ validate_build: z.ZodDefault<z.ZodBoolean>;
16
+ run_harness: z.ZodDefault<z.ZodBoolean>;
17
+ compiler_path: z.ZodOptional<z.ZodString>;
18
+ build_timeout_ms: z.ZodDefault<z.ZodNumber>;
19
+ run_timeout_ms: z.ZodDefault<z.ZodNumber>;
20
+ evidence_scope: z.ZodDefault<z.ZodEnum<["all", "latest", "session"]>>;
21
+ evidence_session_tag: z.ZodOptional<z.ZodString>;
22
+ semantic_scope: z.ZodDefault<z.ZodEnum<["all", "latest", "session"]>>;
23
+ semantic_session_tag: z.ZodOptional<z.ZodString>;
24
+ compare_evidence_scope: z.ZodOptional<z.ZodEnum<["all", "latest", "session"]>>;
25
+ compare_evidence_session_tag: z.ZodOptional<z.ZodString>;
26
+ compare_semantic_scope: z.ZodOptional<z.ZodEnum<["all", "latest", "session"]>>;
27
+ compare_semantic_session_tag: z.ZodOptional<z.ZodString>;
28
+ include_plan: z.ZodDefault<z.ZodBoolean>;
29
+ include_obfuscation_fallback: z.ZodDefault<z.ZodBoolean>;
30
+ fallback_on_error: z.ZodDefault<z.ZodBoolean>;
31
+ allow_partial: z.ZodDefault<z.ZodBoolean>;
32
+ reuse_cached: z.ZodDefault<z.ZodBoolean>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ path: "dotnet" | "native" | "auto";
35
+ sample_id: string;
36
+ evidence_scope: "all" | "latest" | "session";
37
+ topk: number;
38
+ semantic_scope: "all" | "latest" | "session";
39
+ validate_build: boolean;
40
+ run_harness: boolean;
41
+ build_timeout_ms: number;
42
+ run_timeout_ms: number;
43
+ reuse_cached: boolean;
44
+ include_obfuscation_fallback: boolean;
45
+ include_plan: boolean;
46
+ fallback_on_error: boolean;
47
+ allow_partial: boolean;
48
+ evidence_session_tag?: string | undefined;
49
+ semantic_session_tag?: string | undefined;
50
+ export_name?: string | undefined;
51
+ compiler_path?: string | undefined;
52
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
53
+ compare_evidence_session_tag?: string | undefined;
54
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
55
+ compare_semantic_session_tag?: string | undefined;
56
+ }, {
57
+ sample_id: string;
58
+ path?: "dotnet" | "native" | "auto" | undefined;
59
+ evidence_scope?: "all" | "latest" | "session" | undefined;
60
+ topk?: number | undefined;
61
+ evidence_session_tag?: string | undefined;
62
+ semantic_scope?: "all" | "latest" | "session" | undefined;
63
+ semantic_session_tag?: string | undefined;
64
+ export_name?: string | undefined;
65
+ validate_build?: boolean | undefined;
66
+ run_harness?: boolean | undefined;
67
+ compiler_path?: string | undefined;
68
+ build_timeout_ms?: number | undefined;
69
+ run_timeout_ms?: number | undefined;
70
+ reuse_cached?: boolean | undefined;
71
+ include_obfuscation_fallback?: boolean | undefined;
72
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
73
+ compare_evidence_session_tag?: string | undefined;
74
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
75
+ compare_semantic_session_tag?: string | undefined;
76
+ include_plan?: boolean | undefined;
77
+ fallback_on_error?: boolean | undefined;
78
+ allow_partial?: boolean | undefined;
79
+ }>, {
80
+ path: "dotnet" | "native" | "auto";
81
+ sample_id: string;
82
+ evidence_scope: "all" | "latest" | "session";
83
+ topk: number;
84
+ semantic_scope: "all" | "latest" | "session";
85
+ validate_build: boolean;
86
+ run_harness: boolean;
87
+ build_timeout_ms: number;
88
+ run_timeout_ms: number;
89
+ reuse_cached: boolean;
90
+ include_obfuscation_fallback: boolean;
91
+ include_plan: boolean;
92
+ fallback_on_error: boolean;
93
+ allow_partial: boolean;
94
+ evidence_session_tag?: string | undefined;
95
+ semantic_session_tag?: string | undefined;
96
+ export_name?: string | undefined;
97
+ compiler_path?: string | undefined;
98
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
99
+ compare_evidence_session_tag?: string | undefined;
100
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
101
+ compare_semantic_session_tag?: string | undefined;
102
+ }, {
103
+ sample_id: string;
104
+ path?: "dotnet" | "native" | "auto" | undefined;
105
+ evidence_scope?: "all" | "latest" | "session" | undefined;
106
+ topk?: number | undefined;
107
+ evidence_session_tag?: string | undefined;
108
+ semantic_scope?: "all" | "latest" | "session" | undefined;
109
+ semantic_session_tag?: string | undefined;
110
+ export_name?: string | undefined;
111
+ validate_build?: boolean | undefined;
112
+ run_harness?: boolean | undefined;
113
+ compiler_path?: string | undefined;
114
+ build_timeout_ms?: number | undefined;
115
+ run_timeout_ms?: number | undefined;
116
+ reuse_cached?: boolean | undefined;
117
+ include_obfuscation_fallback?: boolean | undefined;
118
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
119
+ compare_evidence_session_tag?: string | undefined;
120
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
121
+ compare_semantic_session_tag?: string | undefined;
122
+ include_plan?: boolean | undefined;
123
+ fallback_on_error?: boolean | undefined;
124
+ allow_partial?: boolean | undefined;
125
+ }>, {
126
+ path: "dotnet" | "native" | "auto";
127
+ sample_id: string;
128
+ evidence_scope: "all" | "latest" | "session";
129
+ topk: number;
130
+ semantic_scope: "all" | "latest" | "session";
131
+ validate_build: boolean;
132
+ run_harness: boolean;
133
+ build_timeout_ms: number;
134
+ run_timeout_ms: number;
135
+ reuse_cached: boolean;
136
+ include_obfuscation_fallback: boolean;
137
+ include_plan: boolean;
138
+ fallback_on_error: boolean;
139
+ allow_partial: boolean;
140
+ evidence_session_tag?: string | undefined;
141
+ semantic_session_tag?: string | undefined;
142
+ export_name?: string | undefined;
143
+ compiler_path?: string | undefined;
144
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
145
+ compare_evidence_session_tag?: string | undefined;
146
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
147
+ compare_semantic_session_tag?: string | undefined;
148
+ }, {
149
+ sample_id: string;
150
+ path?: "dotnet" | "native" | "auto" | undefined;
151
+ evidence_scope?: "all" | "latest" | "session" | undefined;
152
+ topk?: number | undefined;
153
+ evidence_session_tag?: string | undefined;
154
+ semantic_scope?: "all" | "latest" | "session" | undefined;
155
+ semantic_session_tag?: string | undefined;
156
+ export_name?: string | undefined;
157
+ validate_build?: boolean | undefined;
158
+ run_harness?: boolean | undefined;
159
+ compiler_path?: string | undefined;
160
+ build_timeout_ms?: number | undefined;
161
+ run_timeout_ms?: number | undefined;
162
+ reuse_cached?: boolean | undefined;
163
+ include_obfuscation_fallback?: boolean | undefined;
164
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
165
+ compare_evidence_session_tag?: string | undefined;
166
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
167
+ compare_semantic_session_tag?: string | undefined;
168
+ include_plan?: boolean | undefined;
169
+ fallback_on_error?: boolean | undefined;
170
+ allow_partial?: boolean | undefined;
171
+ }>, {
172
+ path: "dotnet" | "native" | "auto";
173
+ sample_id: string;
174
+ evidence_scope: "all" | "latest" | "session";
175
+ topk: number;
176
+ semantic_scope: "all" | "latest" | "session";
177
+ validate_build: boolean;
178
+ run_harness: boolean;
179
+ build_timeout_ms: number;
180
+ run_timeout_ms: number;
181
+ reuse_cached: boolean;
182
+ include_obfuscation_fallback: boolean;
183
+ include_plan: boolean;
184
+ fallback_on_error: boolean;
185
+ allow_partial: boolean;
186
+ evidence_session_tag?: string | undefined;
187
+ semantic_session_tag?: string | undefined;
188
+ export_name?: string | undefined;
189
+ compiler_path?: string | undefined;
190
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
191
+ compare_evidence_session_tag?: string | undefined;
192
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
193
+ compare_semantic_session_tag?: string | undefined;
194
+ }, {
195
+ sample_id: string;
196
+ path?: "dotnet" | "native" | "auto" | undefined;
197
+ evidence_scope?: "all" | "latest" | "session" | undefined;
198
+ topk?: number | undefined;
199
+ evidence_session_tag?: string | undefined;
200
+ semantic_scope?: "all" | "latest" | "session" | undefined;
201
+ semantic_session_tag?: string | undefined;
202
+ export_name?: string | undefined;
203
+ validate_build?: boolean | undefined;
204
+ run_harness?: boolean | undefined;
205
+ compiler_path?: string | undefined;
206
+ build_timeout_ms?: number | undefined;
207
+ run_timeout_ms?: number | undefined;
208
+ reuse_cached?: boolean | undefined;
209
+ include_obfuscation_fallback?: boolean | undefined;
210
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
211
+ compare_evidence_session_tag?: string | undefined;
212
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
213
+ compare_semantic_session_tag?: string | undefined;
214
+ include_plan?: boolean | undefined;
215
+ fallback_on_error?: boolean | undefined;
216
+ allow_partial?: boolean | undefined;
217
+ }>, {
218
+ path: "dotnet" | "native" | "auto";
219
+ sample_id: string;
220
+ evidence_scope: "all" | "latest" | "session";
221
+ topk: number;
222
+ semantic_scope: "all" | "latest" | "session";
223
+ validate_build: boolean;
224
+ run_harness: boolean;
225
+ build_timeout_ms: number;
226
+ run_timeout_ms: number;
227
+ reuse_cached: boolean;
228
+ include_obfuscation_fallback: boolean;
229
+ include_plan: boolean;
230
+ fallback_on_error: boolean;
231
+ allow_partial: boolean;
232
+ evidence_session_tag?: string | undefined;
233
+ semantic_session_tag?: string | undefined;
234
+ export_name?: string | undefined;
235
+ compiler_path?: string | undefined;
236
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
237
+ compare_evidence_session_tag?: string | undefined;
238
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
239
+ compare_semantic_session_tag?: string | undefined;
240
+ }, {
241
+ sample_id: string;
242
+ path?: "dotnet" | "native" | "auto" | undefined;
243
+ evidence_scope?: "all" | "latest" | "session" | undefined;
244
+ topk?: number | undefined;
245
+ evidence_session_tag?: string | undefined;
246
+ semantic_scope?: "all" | "latest" | "session" | undefined;
247
+ semantic_session_tag?: string | undefined;
248
+ export_name?: string | undefined;
249
+ validate_build?: boolean | undefined;
250
+ run_harness?: boolean | undefined;
251
+ compiler_path?: string | undefined;
252
+ build_timeout_ms?: number | undefined;
253
+ run_timeout_ms?: number | undefined;
254
+ reuse_cached?: boolean | undefined;
255
+ include_obfuscation_fallback?: boolean | undefined;
256
+ compare_evidence_scope?: "all" | "latest" | "session" | undefined;
257
+ compare_evidence_session_tag?: string | undefined;
258
+ compare_semantic_scope?: "all" | "latest" | "session" | undefined;
259
+ compare_semantic_session_tag?: string | undefined;
260
+ include_plan?: boolean | undefined;
261
+ fallback_on_error?: boolean | undefined;
262
+ allow_partial?: boolean | undefined;
263
+ }>;
264
+ export type ReconstructWorkflowInput = z.infer<typeof ReconstructWorkflowInputSchema>;
265
+ export declare const ReconstructWorkflowOutputSchema: z.ZodObject<{
266
+ ok: z.ZodBoolean;
267
+ data: z.ZodOptional<z.ZodObject<{
268
+ sample_id: z.ZodString;
269
+ selected_path: z.ZodEnum<["native", "dotnet"]>;
270
+ degraded: z.ZodBoolean;
271
+ stage_status: z.ZodObject<{
272
+ runtime: z.ZodEnum<["ok", "failed"]>;
273
+ plan: z.ZodEnum<["ok", "failed", "skipped"]>;
274
+ export_primary: z.ZodEnum<["ok", "failed", "skipped"]>;
275
+ export_fallback: z.ZodEnum<["ok", "failed", "skipped"]>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ runtime: "failed" | "ok";
278
+ plan: "failed" | "ok" | "skipped";
279
+ export_primary: "failed" | "ok" | "skipped";
280
+ export_fallback: "failed" | "ok" | "skipped";
281
+ }, {
282
+ runtime: "failed" | "ok";
283
+ plan: "failed" | "ok" | "skipped";
284
+ export_primary: "failed" | "ok" | "skipped";
285
+ export_fallback: "failed" | "ok" | "skipped";
286
+ }>;
287
+ provenance: z.ZodObject<{
288
+ runtime: z.ZodObject<{
289
+ scope: z.ZodEnum<["all", "latest", "session"]>;
290
+ session_selector: z.ZodNullable<z.ZodString>;
291
+ artifact_count: z.ZodNumber;
292
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
293
+ session_tags: z.ZodArray<z.ZodString, "many">;
294
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
295
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
296
+ scope_note: z.ZodString;
297
+ }, "strip", z.ZodTypeAny, {
298
+ artifact_count: number;
299
+ scope_note: string;
300
+ artifact_ids: string[];
301
+ session_selector: string | null;
302
+ session_tags: string[];
303
+ scope: "all" | "latest" | "session";
304
+ earliest_artifact_at: string | null;
305
+ latest_artifact_at: string | null;
306
+ }, {
307
+ artifact_count: number;
308
+ scope_note: string;
309
+ artifact_ids: string[];
310
+ session_selector: string | null;
311
+ session_tags: string[];
312
+ scope: "all" | "latest" | "session";
313
+ earliest_artifact_at: string | null;
314
+ latest_artifact_at: string | null;
315
+ }>;
316
+ semantic_names: z.ZodOptional<z.ZodObject<{
317
+ scope: z.ZodEnum<["all", "latest", "session"]>;
318
+ session_selector: z.ZodNullable<z.ZodString>;
319
+ artifact_count: z.ZodNumber;
320
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
321
+ session_tags: z.ZodArray<z.ZodString, "many">;
322
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
323
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
324
+ scope_note: z.ZodString;
325
+ }, "strip", z.ZodTypeAny, {
326
+ artifact_count: number;
327
+ scope_note: string;
328
+ artifact_ids: string[];
329
+ session_selector: string | null;
330
+ session_tags: string[];
331
+ scope: "all" | "latest" | "session";
332
+ earliest_artifact_at: string | null;
333
+ latest_artifact_at: string | null;
334
+ }, {
335
+ artifact_count: number;
336
+ scope_note: string;
337
+ artifact_ids: string[];
338
+ session_selector: string | null;
339
+ session_tags: string[];
340
+ scope: "all" | "latest" | "session";
341
+ earliest_artifact_at: string | null;
342
+ latest_artifact_at: string | null;
343
+ }>>;
344
+ semantic_explanations: z.ZodOptional<z.ZodObject<{
345
+ scope: z.ZodEnum<["all", "latest", "session"]>;
346
+ session_selector: z.ZodNullable<z.ZodString>;
347
+ artifact_count: z.ZodNumber;
348
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
349
+ session_tags: z.ZodArray<z.ZodString, "many">;
350
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
351
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
352
+ scope_note: z.ZodString;
353
+ }, "strip", z.ZodTypeAny, {
354
+ artifact_count: number;
355
+ scope_note: string;
356
+ artifact_ids: string[];
357
+ session_selector: string | null;
358
+ session_tags: string[];
359
+ scope: "all" | "latest" | "session";
360
+ earliest_artifact_at: string | null;
361
+ latest_artifact_at: string | null;
362
+ }, {
363
+ artifact_count: number;
364
+ scope_note: string;
365
+ artifact_ids: string[];
366
+ session_selector: string | null;
367
+ session_tags: string[];
368
+ scope: "all" | "latest" | "session";
369
+ earliest_artifact_at: string | null;
370
+ latest_artifact_at: string | null;
371
+ }>>;
372
+ }, "strip", z.ZodTypeAny, {
373
+ runtime: {
374
+ artifact_count: number;
375
+ scope_note: string;
376
+ artifact_ids: string[];
377
+ session_selector: string | null;
378
+ session_tags: string[];
379
+ scope: "all" | "latest" | "session";
380
+ earliest_artifact_at: string | null;
381
+ latest_artifact_at: string | null;
382
+ };
383
+ semantic_names?: {
384
+ artifact_count: number;
385
+ scope_note: string;
386
+ artifact_ids: string[];
387
+ session_selector: string | null;
388
+ session_tags: string[];
389
+ scope: "all" | "latest" | "session";
390
+ earliest_artifact_at: string | null;
391
+ latest_artifact_at: string | null;
392
+ } | undefined;
393
+ semantic_explanations?: {
394
+ artifact_count: number;
395
+ scope_note: string;
396
+ artifact_ids: string[];
397
+ session_selector: string | null;
398
+ session_tags: string[];
399
+ scope: "all" | "latest" | "session";
400
+ earliest_artifact_at: string | null;
401
+ latest_artifact_at: string | null;
402
+ } | undefined;
403
+ }, {
404
+ runtime: {
405
+ artifact_count: number;
406
+ scope_note: string;
407
+ artifact_ids: string[];
408
+ session_selector: string | null;
409
+ session_tags: string[];
410
+ scope: "all" | "latest" | "session";
411
+ earliest_artifact_at: string | null;
412
+ latest_artifact_at: string | null;
413
+ };
414
+ semantic_names?: {
415
+ artifact_count: number;
416
+ scope_note: string;
417
+ artifact_ids: string[];
418
+ session_selector: string | null;
419
+ session_tags: string[];
420
+ scope: "all" | "latest" | "session";
421
+ earliest_artifact_at: string | null;
422
+ latest_artifact_at: string | null;
423
+ } | undefined;
424
+ semantic_explanations?: {
425
+ artifact_count: number;
426
+ scope_note: string;
427
+ artifact_ids: string[];
428
+ session_selector: string | null;
429
+ session_tags: string[];
430
+ scope: "all" | "latest" | "session";
431
+ earliest_artifact_at: string | null;
432
+ latest_artifact_at: string | null;
433
+ } | undefined;
434
+ }>;
435
+ selection_diffs: z.ZodOptional<z.ZodObject<{
436
+ runtime: z.ZodOptional<z.ZodObject<{
437
+ label: z.ZodEnum<["runtime", "semantic_names", "semantic_explanations"]>;
438
+ current: z.ZodObject<{
439
+ scope: z.ZodEnum<["all", "latest", "session"]>;
440
+ session_selector: z.ZodNullable<z.ZodString>;
441
+ artifact_count: z.ZodNumber;
442
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
443
+ session_tags: z.ZodArray<z.ZodString, "many">;
444
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
445
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
446
+ scope_note: z.ZodString;
447
+ }, "strip", z.ZodTypeAny, {
448
+ artifact_count: number;
449
+ scope_note: string;
450
+ artifact_ids: string[];
451
+ session_selector: string | null;
452
+ session_tags: string[];
453
+ scope: "all" | "latest" | "session";
454
+ earliest_artifact_at: string | null;
455
+ latest_artifact_at: string | null;
456
+ }, {
457
+ artifact_count: number;
458
+ scope_note: string;
459
+ artifact_ids: string[];
460
+ session_selector: string | null;
461
+ session_tags: string[];
462
+ scope: "all" | "latest" | "session";
463
+ earliest_artifact_at: string | null;
464
+ latest_artifact_at: string | null;
465
+ }>;
466
+ baseline: z.ZodObject<{
467
+ scope: z.ZodEnum<["all", "latest", "session"]>;
468
+ session_selector: z.ZodNullable<z.ZodString>;
469
+ artifact_count: z.ZodNumber;
470
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
471
+ session_tags: z.ZodArray<z.ZodString, "many">;
472
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
473
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
474
+ scope_note: z.ZodString;
475
+ }, "strip", z.ZodTypeAny, {
476
+ artifact_count: number;
477
+ scope_note: string;
478
+ artifact_ids: string[];
479
+ session_selector: string | null;
480
+ session_tags: string[];
481
+ scope: "all" | "latest" | "session";
482
+ earliest_artifact_at: string | null;
483
+ latest_artifact_at: string | null;
484
+ }, {
485
+ artifact_count: number;
486
+ scope_note: string;
487
+ artifact_ids: string[];
488
+ session_selector: string | null;
489
+ session_tags: string[];
490
+ scope: "all" | "latest" | "session";
491
+ earliest_artifact_at: string | null;
492
+ latest_artifact_at: string | null;
493
+ }>;
494
+ added_artifact_ids: z.ZodArray<z.ZodString, "many">;
495
+ removed_artifact_ids: z.ZodArray<z.ZodString, "many">;
496
+ added_session_tags: z.ZodArray<z.ZodString, "many">;
497
+ removed_session_tags: z.ZodArray<z.ZodString, "many">;
498
+ artifact_count_delta: z.ZodNumber;
499
+ summary: z.ZodString;
500
+ }, "strip", z.ZodTypeAny, {
501
+ summary: string;
502
+ baseline: {
503
+ artifact_count: number;
504
+ scope_note: string;
505
+ artifact_ids: string[];
506
+ session_selector: string | null;
507
+ session_tags: string[];
508
+ scope: "all" | "latest" | "session";
509
+ earliest_artifact_at: string | null;
510
+ latest_artifact_at: string | null;
511
+ };
512
+ label: "runtime" | "semantic_names" | "semantic_explanations";
513
+ current: {
514
+ artifact_count: number;
515
+ scope_note: string;
516
+ artifact_ids: string[];
517
+ session_selector: string | null;
518
+ session_tags: string[];
519
+ scope: "all" | "latest" | "session";
520
+ earliest_artifact_at: string | null;
521
+ latest_artifact_at: string | null;
522
+ };
523
+ added_artifact_ids: string[];
524
+ removed_artifact_ids: string[];
525
+ added_session_tags: string[];
526
+ removed_session_tags: string[];
527
+ artifact_count_delta: number;
528
+ }, {
529
+ summary: string;
530
+ baseline: {
531
+ artifact_count: number;
532
+ scope_note: string;
533
+ artifact_ids: string[];
534
+ session_selector: string | null;
535
+ session_tags: string[];
536
+ scope: "all" | "latest" | "session";
537
+ earliest_artifact_at: string | null;
538
+ latest_artifact_at: string | null;
539
+ };
540
+ label: "runtime" | "semantic_names" | "semantic_explanations";
541
+ current: {
542
+ artifact_count: number;
543
+ scope_note: string;
544
+ artifact_ids: string[];
545
+ session_selector: string | null;
546
+ session_tags: string[];
547
+ scope: "all" | "latest" | "session";
548
+ earliest_artifact_at: string | null;
549
+ latest_artifact_at: string | null;
550
+ };
551
+ added_artifact_ids: string[];
552
+ removed_artifact_ids: string[];
553
+ added_session_tags: string[];
554
+ removed_session_tags: string[];
555
+ artifact_count_delta: number;
556
+ }>>;
557
+ semantic_names: z.ZodOptional<z.ZodObject<{
558
+ label: z.ZodEnum<["runtime", "semantic_names", "semantic_explanations"]>;
559
+ current: z.ZodObject<{
560
+ scope: z.ZodEnum<["all", "latest", "session"]>;
561
+ session_selector: z.ZodNullable<z.ZodString>;
562
+ artifact_count: z.ZodNumber;
563
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
564
+ session_tags: z.ZodArray<z.ZodString, "many">;
565
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
566
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
567
+ scope_note: z.ZodString;
568
+ }, "strip", z.ZodTypeAny, {
569
+ artifact_count: number;
570
+ scope_note: string;
571
+ artifact_ids: string[];
572
+ session_selector: string | null;
573
+ session_tags: string[];
574
+ scope: "all" | "latest" | "session";
575
+ earliest_artifact_at: string | null;
576
+ latest_artifact_at: string | null;
577
+ }, {
578
+ artifact_count: number;
579
+ scope_note: string;
580
+ artifact_ids: string[];
581
+ session_selector: string | null;
582
+ session_tags: string[];
583
+ scope: "all" | "latest" | "session";
584
+ earliest_artifact_at: string | null;
585
+ latest_artifact_at: string | null;
586
+ }>;
587
+ baseline: z.ZodObject<{
588
+ scope: z.ZodEnum<["all", "latest", "session"]>;
589
+ session_selector: z.ZodNullable<z.ZodString>;
590
+ artifact_count: z.ZodNumber;
591
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
592
+ session_tags: z.ZodArray<z.ZodString, "many">;
593
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
594
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
595
+ scope_note: z.ZodString;
596
+ }, "strip", z.ZodTypeAny, {
597
+ artifact_count: number;
598
+ scope_note: string;
599
+ artifact_ids: string[];
600
+ session_selector: string | null;
601
+ session_tags: string[];
602
+ scope: "all" | "latest" | "session";
603
+ earliest_artifact_at: string | null;
604
+ latest_artifact_at: string | null;
605
+ }, {
606
+ artifact_count: number;
607
+ scope_note: string;
608
+ artifact_ids: string[];
609
+ session_selector: string | null;
610
+ session_tags: string[];
611
+ scope: "all" | "latest" | "session";
612
+ earliest_artifact_at: string | null;
613
+ latest_artifact_at: string | null;
614
+ }>;
615
+ added_artifact_ids: z.ZodArray<z.ZodString, "many">;
616
+ removed_artifact_ids: z.ZodArray<z.ZodString, "many">;
617
+ added_session_tags: z.ZodArray<z.ZodString, "many">;
618
+ removed_session_tags: z.ZodArray<z.ZodString, "many">;
619
+ artifact_count_delta: z.ZodNumber;
620
+ summary: z.ZodString;
621
+ }, "strip", z.ZodTypeAny, {
622
+ summary: string;
623
+ baseline: {
624
+ artifact_count: number;
625
+ scope_note: string;
626
+ artifact_ids: string[];
627
+ session_selector: string | null;
628
+ session_tags: string[];
629
+ scope: "all" | "latest" | "session";
630
+ earliest_artifact_at: string | null;
631
+ latest_artifact_at: string | null;
632
+ };
633
+ label: "runtime" | "semantic_names" | "semantic_explanations";
634
+ current: {
635
+ artifact_count: number;
636
+ scope_note: string;
637
+ artifact_ids: string[];
638
+ session_selector: string | null;
639
+ session_tags: string[];
640
+ scope: "all" | "latest" | "session";
641
+ earliest_artifact_at: string | null;
642
+ latest_artifact_at: string | null;
643
+ };
644
+ added_artifact_ids: string[];
645
+ removed_artifact_ids: string[];
646
+ added_session_tags: string[];
647
+ removed_session_tags: string[];
648
+ artifact_count_delta: number;
649
+ }, {
650
+ summary: string;
651
+ baseline: {
652
+ artifact_count: number;
653
+ scope_note: string;
654
+ artifact_ids: string[];
655
+ session_selector: string | null;
656
+ session_tags: string[];
657
+ scope: "all" | "latest" | "session";
658
+ earliest_artifact_at: string | null;
659
+ latest_artifact_at: string | null;
660
+ };
661
+ label: "runtime" | "semantic_names" | "semantic_explanations";
662
+ current: {
663
+ artifact_count: number;
664
+ scope_note: string;
665
+ artifact_ids: string[];
666
+ session_selector: string | null;
667
+ session_tags: string[];
668
+ scope: "all" | "latest" | "session";
669
+ earliest_artifact_at: string | null;
670
+ latest_artifact_at: string | null;
671
+ };
672
+ added_artifact_ids: string[];
673
+ removed_artifact_ids: string[];
674
+ added_session_tags: string[];
675
+ removed_session_tags: string[];
676
+ artifact_count_delta: number;
677
+ }>>;
678
+ semantic_explanations: z.ZodOptional<z.ZodObject<{
679
+ label: z.ZodEnum<["runtime", "semantic_names", "semantic_explanations"]>;
680
+ current: z.ZodObject<{
681
+ scope: z.ZodEnum<["all", "latest", "session"]>;
682
+ session_selector: z.ZodNullable<z.ZodString>;
683
+ artifact_count: z.ZodNumber;
684
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
685
+ session_tags: z.ZodArray<z.ZodString, "many">;
686
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
687
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
688
+ scope_note: z.ZodString;
689
+ }, "strip", z.ZodTypeAny, {
690
+ artifact_count: number;
691
+ scope_note: string;
692
+ artifact_ids: string[];
693
+ session_selector: string | null;
694
+ session_tags: string[];
695
+ scope: "all" | "latest" | "session";
696
+ earliest_artifact_at: string | null;
697
+ latest_artifact_at: string | null;
698
+ }, {
699
+ artifact_count: number;
700
+ scope_note: string;
701
+ artifact_ids: string[];
702
+ session_selector: string | null;
703
+ session_tags: string[];
704
+ scope: "all" | "latest" | "session";
705
+ earliest_artifact_at: string | null;
706
+ latest_artifact_at: string | null;
707
+ }>;
708
+ baseline: z.ZodObject<{
709
+ scope: z.ZodEnum<["all", "latest", "session"]>;
710
+ session_selector: z.ZodNullable<z.ZodString>;
711
+ artifact_count: z.ZodNumber;
712
+ artifact_ids: z.ZodArray<z.ZodString, "many">;
713
+ session_tags: z.ZodArray<z.ZodString, "many">;
714
+ earliest_artifact_at: z.ZodNullable<z.ZodString>;
715
+ latest_artifact_at: z.ZodNullable<z.ZodString>;
716
+ scope_note: z.ZodString;
717
+ }, "strip", z.ZodTypeAny, {
718
+ artifact_count: number;
719
+ scope_note: string;
720
+ artifact_ids: string[];
721
+ session_selector: string | null;
722
+ session_tags: string[];
723
+ scope: "all" | "latest" | "session";
724
+ earliest_artifact_at: string | null;
725
+ latest_artifact_at: string | null;
726
+ }, {
727
+ artifact_count: number;
728
+ scope_note: string;
729
+ artifact_ids: string[];
730
+ session_selector: string | null;
731
+ session_tags: string[];
732
+ scope: "all" | "latest" | "session";
733
+ earliest_artifact_at: string | null;
734
+ latest_artifact_at: string | null;
735
+ }>;
736
+ added_artifact_ids: z.ZodArray<z.ZodString, "many">;
737
+ removed_artifact_ids: z.ZodArray<z.ZodString, "many">;
738
+ added_session_tags: z.ZodArray<z.ZodString, "many">;
739
+ removed_session_tags: z.ZodArray<z.ZodString, "many">;
740
+ artifact_count_delta: z.ZodNumber;
741
+ summary: z.ZodString;
742
+ }, "strip", z.ZodTypeAny, {
743
+ summary: string;
744
+ baseline: {
745
+ artifact_count: number;
746
+ scope_note: string;
747
+ artifact_ids: string[];
748
+ session_selector: string | null;
749
+ session_tags: string[];
750
+ scope: "all" | "latest" | "session";
751
+ earliest_artifact_at: string | null;
752
+ latest_artifact_at: string | null;
753
+ };
754
+ label: "runtime" | "semantic_names" | "semantic_explanations";
755
+ current: {
756
+ artifact_count: number;
757
+ scope_note: string;
758
+ artifact_ids: string[];
759
+ session_selector: string | null;
760
+ session_tags: string[];
761
+ scope: "all" | "latest" | "session";
762
+ earliest_artifact_at: string | null;
763
+ latest_artifact_at: string | null;
764
+ };
765
+ added_artifact_ids: string[];
766
+ removed_artifact_ids: string[];
767
+ added_session_tags: string[];
768
+ removed_session_tags: string[];
769
+ artifact_count_delta: number;
770
+ }, {
771
+ summary: string;
772
+ baseline: {
773
+ artifact_count: number;
774
+ scope_note: string;
775
+ artifact_ids: string[];
776
+ session_selector: string | null;
777
+ session_tags: string[];
778
+ scope: "all" | "latest" | "session";
779
+ earliest_artifact_at: string | null;
780
+ latest_artifact_at: string | null;
781
+ };
782
+ label: "runtime" | "semantic_names" | "semantic_explanations";
783
+ current: {
784
+ artifact_count: number;
785
+ scope_note: string;
786
+ artifact_ids: string[];
787
+ session_selector: string | null;
788
+ session_tags: string[];
789
+ scope: "all" | "latest" | "session";
790
+ earliest_artifact_at: string | null;
791
+ latest_artifact_at: string | null;
792
+ };
793
+ added_artifact_ids: string[];
794
+ removed_artifact_ids: string[];
795
+ added_session_tags: string[];
796
+ removed_session_tags: string[];
797
+ artifact_count_delta: number;
798
+ }>>;
799
+ }, "strip", z.ZodTypeAny, {
800
+ runtime?: {
801
+ summary: string;
802
+ baseline: {
803
+ artifact_count: number;
804
+ scope_note: string;
805
+ artifact_ids: string[];
806
+ session_selector: string | null;
807
+ session_tags: string[];
808
+ scope: "all" | "latest" | "session";
809
+ earliest_artifact_at: string | null;
810
+ latest_artifact_at: string | null;
811
+ };
812
+ label: "runtime" | "semantic_names" | "semantic_explanations";
813
+ current: {
814
+ artifact_count: number;
815
+ scope_note: string;
816
+ artifact_ids: string[];
817
+ session_selector: string | null;
818
+ session_tags: string[];
819
+ scope: "all" | "latest" | "session";
820
+ earliest_artifact_at: string | null;
821
+ latest_artifact_at: string | null;
822
+ };
823
+ added_artifact_ids: string[];
824
+ removed_artifact_ids: string[];
825
+ added_session_tags: string[];
826
+ removed_session_tags: string[];
827
+ artifact_count_delta: number;
828
+ } | undefined;
829
+ semantic_names?: {
830
+ summary: string;
831
+ baseline: {
832
+ artifact_count: number;
833
+ scope_note: string;
834
+ artifact_ids: string[];
835
+ session_selector: string | null;
836
+ session_tags: string[];
837
+ scope: "all" | "latest" | "session";
838
+ earliest_artifact_at: string | null;
839
+ latest_artifact_at: string | null;
840
+ };
841
+ label: "runtime" | "semantic_names" | "semantic_explanations";
842
+ current: {
843
+ artifact_count: number;
844
+ scope_note: string;
845
+ artifact_ids: string[];
846
+ session_selector: string | null;
847
+ session_tags: string[];
848
+ scope: "all" | "latest" | "session";
849
+ earliest_artifact_at: string | null;
850
+ latest_artifact_at: string | null;
851
+ };
852
+ added_artifact_ids: string[];
853
+ removed_artifact_ids: string[];
854
+ added_session_tags: string[];
855
+ removed_session_tags: string[];
856
+ artifact_count_delta: number;
857
+ } | undefined;
858
+ semantic_explanations?: {
859
+ summary: string;
860
+ baseline: {
861
+ artifact_count: number;
862
+ scope_note: string;
863
+ artifact_ids: string[];
864
+ session_selector: string | null;
865
+ session_tags: string[];
866
+ scope: "all" | "latest" | "session";
867
+ earliest_artifact_at: string | null;
868
+ latest_artifact_at: string | null;
869
+ };
870
+ label: "runtime" | "semantic_names" | "semantic_explanations";
871
+ current: {
872
+ artifact_count: number;
873
+ scope_note: string;
874
+ artifact_ids: string[];
875
+ session_selector: string | null;
876
+ session_tags: string[];
877
+ scope: "all" | "latest" | "session";
878
+ earliest_artifact_at: string | null;
879
+ latest_artifact_at: string | null;
880
+ };
881
+ added_artifact_ids: string[];
882
+ removed_artifact_ids: string[];
883
+ added_session_tags: string[];
884
+ removed_session_tags: string[];
885
+ artifact_count_delta: number;
886
+ } | undefined;
887
+ }, {
888
+ runtime?: {
889
+ summary: string;
890
+ baseline: {
891
+ artifact_count: number;
892
+ scope_note: string;
893
+ artifact_ids: string[];
894
+ session_selector: string | null;
895
+ session_tags: string[];
896
+ scope: "all" | "latest" | "session";
897
+ earliest_artifact_at: string | null;
898
+ latest_artifact_at: string | null;
899
+ };
900
+ label: "runtime" | "semantic_names" | "semantic_explanations";
901
+ current: {
902
+ artifact_count: number;
903
+ scope_note: string;
904
+ artifact_ids: string[];
905
+ session_selector: string | null;
906
+ session_tags: string[];
907
+ scope: "all" | "latest" | "session";
908
+ earliest_artifact_at: string | null;
909
+ latest_artifact_at: string | null;
910
+ };
911
+ added_artifact_ids: string[];
912
+ removed_artifact_ids: string[];
913
+ added_session_tags: string[];
914
+ removed_session_tags: string[];
915
+ artifact_count_delta: number;
916
+ } | undefined;
917
+ semantic_names?: {
918
+ summary: string;
919
+ baseline: {
920
+ artifact_count: number;
921
+ scope_note: string;
922
+ artifact_ids: string[];
923
+ session_selector: string | null;
924
+ session_tags: string[];
925
+ scope: "all" | "latest" | "session";
926
+ earliest_artifact_at: string | null;
927
+ latest_artifact_at: string | null;
928
+ };
929
+ label: "runtime" | "semantic_names" | "semantic_explanations";
930
+ current: {
931
+ artifact_count: number;
932
+ scope_note: string;
933
+ artifact_ids: string[];
934
+ session_selector: string | null;
935
+ session_tags: string[];
936
+ scope: "all" | "latest" | "session";
937
+ earliest_artifact_at: string | null;
938
+ latest_artifact_at: string | null;
939
+ };
940
+ added_artifact_ids: string[];
941
+ removed_artifact_ids: string[];
942
+ added_session_tags: string[];
943
+ removed_session_tags: string[];
944
+ artifact_count_delta: number;
945
+ } | undefined;
946
+ semantic_explanations?: {
947
+ summary: string;
948
+ baseline: {
949
+ artifact_count: number;
950
+ scope_note: string;
951
+ artifact_ids: string[];
952
+ session_selector: string | null;
953
+ session_tags: string[];
954
+ scope: "all" | "latest" | "session";
955
+ earliest_artifact_at: string | null;
956
+ latest_artifact_at: string | null;
957
+ };
958
+ label: "runtime" | "semantic_names" | "semantic_explanations";
959
+ current: {
960
+ artifact_count: number;
961
+ scope_note: string;
962
+ artifact_ids: string[];
963
+ session_selector: string | null;
964
+ session_tags: string[];
965
+ scope: "all" | "latest" | "session";
966
+ earliest_artifact_at: string | null;
967
+ latest_artifact_at: string | null;
968
+ };
969
+ added_artifact_ids: string[];
970
+ removed_artifact_ids: string[];
971
+ added_session_tags: string[];
972
+ removed_session_tags: string[];
973
+ artifact_count_delta: number;
974
+ } | undefined;
975
+ }>>;
976
+ runtime: z.ZodObject<{
977
+ is_dotnet: z.ZodNullable<z.ZodBoolean>;
978
+ dotnet_version: z.ZodNullable<z.ZodString>;
979
+ target_framework: z.ZodNullable<z.ZodString>;
980
+ primary_runtime: z.ZodNullable<z.ZodString>;
981
+ }, "strip", z.ZodTypeAny, {
982
+ is_dotnet: boolean | null;
983
+ dotnet_version: string | null;
984
+ target_framework: string | null;
985
+ primary_runtime: string | null;
986
+ }, {
987
+ is_dotnet: boolean | null;
988
+ dotnet_version: string | null;
989
+ target_framework: string | null;
990
+ primary_runtime: string | null;
991
+ }>;
992
+ plan: z.ZodNullable<z.ZodObject<{
993
+ feasibility: z.ZodEnum<["high", "medium", "low"]>;
994
+ confidence: z.ZodNumber;
995
+ restoration_expectation: z.ZodString;
996
+ blockers: z.ZodArray<z.ZodString, "many">;
997
+ recommendations: z.ZodArray<z.ZodString, "many">;
998
+ }, "strip", z.ZodTypeAny, {
999
+ confidence: number;
1000
+ feasibility: "high" | "low" | "medium";
1001
+ restoration_expectation: string;
1002
+ blockers: string[];
1003
+ recommendations: string[];
1004
+ }, {
1005
+ confidence: number;
1006
+ feasibility: "high" | "low" | "medium";
1007
+ restoration_expectation: string;
1008
+ blockers: string[];
1009
+ recommendations: string[];
1010
+ }>>;
1011
+ export: z.ZodNullable<z.ZodObject<{
1012
+ tool: z.ZodEnum<["code.reconstruct.export", "dotnet.reconstruct.export"]>;
1013
+ export_root: z.ZodString;
1014
+ manifest_path: z.ZodNullable<z.ZodString>;
1015
+ gaps_path: z.ZodNullable<z.ZodString>;
1016
+ notes_path: z.ZodNullable<z.ZodString>;
1017
+ metadata_path: z.ZodNullable<z.ZodString>;
1018
+ csproj_path: z.ZodNullable<z.ZodString>;
1019
+ readme_path: z.ZodNullable<z.ZodString>;
1020
+ fallback_notes_path: z.ZodNullable<z.ZodString>;
1021
+ build_validation_status: z.ZodNullable<z.ZodEnum<["passed", "failed", "skipped", "unavailable"]>>;
1022
+ harness_validation_status: z.ZodNullable<z.ZodEnum<["passed", "failed", "skipped", "unavailable"]>>;
1023
+ build_log_path: z.ZodNullable<z.ZodString>;
1024
+ harness_log_path: z.ZodNullable<z.ZodString>;
1025
+ executable_path: z.ZodNullable<z.ZodString>;
1026
+ degraded_mode: z.ZodNullable<z.ZodBoolean>;
1027
+ module_count: z.ZodNullable<z.ZodNumber>;
1028
+ unresolved_count: z.ZodNullable<z.ZodNumber>;
1029
+ class_count: z.ZodNullable<z.ZodNumber>;
1030
+ binary_profile: z.ZodNullable<z.ZodObject<{
1031
+ binary_role: z.ZodString;
1032
+ original_filename: z.ZodNullable<z.ZodString>;
1033
+ export_count: z.ZodNumber;
1034
+ forwarder_count: z.ZodNumber;
1035
+ notable_exports: z.ZodArray<z.ZodString, "many">;
1036
+ packed: z.ZodBoolean;
1037
+ packing_confidence: z.ZodNumber;
1038
+ analysis_priorities: z.ZodArray<z.ZodString, "many">;
1039
+ }, "strip", z.ZodTypeAny, {
1040
+ packed: boolean;
1041
+ binary_role: string;
1042
+ original_filename: string | null;
1043
+ export_count: number;
1044
+ forwarder_count: number;
1045
+ notable_exports: string[];
1046
+ packing_confidence: number;
1047
+ analysis_priorities: string[];
1048
+ }, {
1049
+ packed: boolean;
1050
+ binary_role: string;
1051
+ original_filename: string | null;
1052
+ export_count: number;
1053
+ forwarder_count: number;
1054
+ notable_exports: string[];
1055
+ packing_confidence: number;
1056
+ analysis_priorities: string[];
1057
+ }>>;
1058
+ managed_profile: z.ZodNullable<z.ZodObject<{
1059
+ assembly_name: z.ZodNullable<z.ZodString>;
1060
+ assembly_version: z.ZodNullable<z.ZodString>;
1061
+ module_name: z.ZodNullable<z.ZodString>;
1062
+ metadata_version: z.ZodNullable<z.ZodString>;
1063
+ is_library: z.ZodBoolean;
1064
+ entry_point_token: z.ZodNullable<z.ZodString>;
1065
+ type_count: z.ZodNumber;
1066
+ method_count: z.ZodNumber;
1067
+ namespace_count: z.ZodNumber;
1068
+ assembly_reference_count: z.ZodNumber;
1069
+ resource_count: z.ZodNumber;
1070
+ dominant_namespaces: z.ZodArray<z.ZodString, "many">;
1071
+ notable_types: z.ZodArray<z.ZodString, "many">;
1072
+ assembly_references: z.ZodArray<z.ZodString, "many">;
1073
+ resources: z.ZodArray<z.ZodString, "many">;
1074
+ analysis_priorities: z.ZodArray<z.ZodString, "many">;
1075
+ }, "strip", z.ZodTypeAny, {
1076
+ resources: string[];
1077
+ method_count: number;
1078
+ type_count: number;
1079
+ namespace_count: number;
1080
+ assembly_reference_count: number;
1081
+ resource_count: number;
1082
+ assembly_name: string | null;
1083
+ assembly_version: string | null;
1084
+ module_name: string | null;
1085
+ metadata_version: string | null;
1086
+ is_library: boolean;
1087
+ entry_point_token: string | null;
1088
+ assembly_references: string[];
1089
+ analysis_priorities: string[];
1090
+ dominant_namespaces: string[];
1091
+ notable_types: string[];
1092
+ }, {
1093
+ resources: string[];
1094
+ method_count: number;
1095
+ type_count: number;
1096
+ namespace_count: number;
1097
+ assembly_reference_count: number;
1098
+ resource_count: number;
1099
+ assembly_name: string | null;
1100
+ assembly_version: string | null;
1101
+ module_name: string | null;
1102
+ metadata_version: string | null;
1103
+ is_library: boolean;
1104
+ entry_point_token: string | null;
1105
+ assembly_references: string[];
1106
+ analysis_priorities: string[];
1107
+ dominant_namespaces: string[];
1108
+ notable_types: string[];
1109
+ }>>;
1110
+ }, "strip", z.ZodTypeAny, {
1111
+ tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
1112
+ executable_path: string | null;
1113
+ export_root: string;
1114
+ manifest_path: string | null;
1115
+ gaps_path: string | null;
1116
+ notes_path: string | null;
1117
+ module_count: number | null;
1118
+ unresolved_count: number | null;
1119
+ binary_profile: {
1120
+ packed: boolean;
1121
+ binary_role: string;
1122
+ original_filename: string | null;
1123
+ export_count: number;
1124
+ forwarder_count: number;
1125
+ notable_exports: string[];
1126
+ packing_confidence: number;
1127
+ analysis_priorities: string[];
1128
+ } | null;
1129
+ csproj_path: string | null;
1130
+ readme_path: string | null;
1131
+ metadata_path: string | null;
1132
+ fallback_notes_path: string | null;
1133
+ degraded_mode: boolean | null;
1134
+ managed_profile: {
1135
+ resources: string[];
1136
+ method_count: number;
1137
+ type_count: number;
1138
+ namespace_count: number;
1139
+ assembly_reference_count: number;
1140
+ resource_count: number;
1141
+ assembly_name: string | null;
1142
+ assembly_version: string | null;
1143
+ module_name: string | null;
1144
+ metadata_version: string | null;
1145
+ is_library: boolean;
1146
+ entry_point_token: string | null;
1147
+ assembly_references: string[];
1148
+ analysis_priorities: string[];
1149
+ dominant_namespaces: string[];
1150
+ notable_types: string[];
1151
+ } | null;
1152
+ build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1153
+ harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1154
+ build_log_path: string | null;
1155
+ harness_log_path: string | null;
1156
+ class_count: number | null;
1157
+ }, {
1158
+ tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
1159
+ executable_path: string | null;
1160
+ export_root: string;
1161
+ manifest_path: string | null;
1162
+ gaps_path: string | null;
1163
+ notes_path: string | null;
1164
+ module_count: number | null;
1165
+ unresolved_count: number | null;
1166
+ binary_profile: {
1167
+ packed: boolean;
1168
+ binary_role: string;
1169
+ original_filename: string | null;
1170
+ export_count: number;
1171
+ forwarder_count: number;
1172
+ notable_exports: string[];
1173
+ packing_confidence: number;
1174
+ analysis_priorities: string[];
1175
+ } | null;
1176
+ csproj_path: string | null;
1177
+ readme_path: string | null;
1178
+ metadata_path: string | null;
1179
+ fallback_notes_path: string | null;
1180
+ degraded_mode: boolean | null;
1181
+ managed_profile: {
1182
+ resources: string[];
1183
+ method_count: number;
1184
+ type_count: number;
1185
+ namespace_count: number;
1186
+ assembly_reference_count: number;
1187
+ resource_count: number;
1188
+ assembly_name: string | null;
1189
+ assembly_version: string | null;
1190
+ module_name: string | null;
1191
+ metadata_version: string | null;
1192
+ is_library: boolean;
1193
+ entry_point_token: string | null;
1194
+ assembly_references: string[];
1195
+ analysis_priorities: string[];
1196
+ dominant_namespaces: string[];
1197
+ notable_types: string[];
1198
+ } | null;
1199
+ build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1200
+ harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1201
+ build_log_path: string | null;
1202
+ harness_log_path: string | null;
1203
+ class_count: number | null;
1204
+ }>>;
1205
+ notes: z.ZodArray<z.ZodString, "many">;
1206
+ }, "strip", z.ZodTypeAny, {
1207
+ sample_id: string;
1208
+ notes: string[];
1209
+ runtime: {
1210
+ is_dotnet: boolean | null;
1211
+ dotnet_version: string | null;
1212
+ target_framework: string | null;
1213
+ primary_runtime: string | null;
1214
+ };
1215
+ 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
+ export: {
1263
+ tool: "code.reconstruct.export" | "dotnet.reconstruct.export";
1264
+ executable_path: string | null;
1265
+ export_root: string;
1266
+ manifest_path: string | null;
1267
+ gaps_path: string | null;
1268
+ notes_path: string | null;
1269
+ module_count: number | null;
1270
+ unresolved_count: number | null;
1271
+ binary_profile: {
1272
+ packed: boolean;
1273
+ binary_role: string;
1274
+ original_filename: string | null;
1275
+ export_count: number;
1276
+ forwarder_count: number;
1277
+ notable_exports: string[];
1278
+ packing_confidence: number;
1279
+ analysis_priorities: string[];
1280
+ } | null;
1281
+ csproj_path: string | null;
1282
+ readme_path: string | null;
1283
+ metadata_path: string | null;
1284
+ fallback_notes_path: string | null;
1285
+ degraded_mode: boolean | null;
1286
+ managed_profile: {
1287
+ resources: string[];
1288
+ method_count: number;
1289
+ type_count: number;
1290
+ namespace_count: number;
1291
+ assembly_reference_count: number;
1292
+ resource_count: number;
1293
+ assembly_name: string | null;
1294
+ assembly_version: string | null;
1295
+ module_name: string | null;
1296
+ metadata_version: string | null;
1297
+ is_library: boolean;
1298
+ entry_point_token: string | null;
1299
+ assembly_references: string[];
1300
+ analysis_priorities: string[];
1301
+ dominant_namespaces: string[];
1302
+ notable_types: string[];
1303
+ } | null;
1304
+ build_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1305
+ harness_validation_status: "failed" | "passed" | "skipped" | "unavailable" | null;
1306
+ build_log_path: string | null;
1307
+ harness_log_path: string | null;
1308
+ class_count: number | null;
1309
+ } | null;
1310
+ selection_diffs?: {
1311
+ runtime?: {
1312
+ summary: string;
1313
+ baseline: {
1314
+ artifact_count: number;
1315
+ scope_note: string;
1316
+ artifact_ids: string[];
1317
+ session_selector: string | null;
1318
+ session_tags: string[];
1319
+ scope: "all" | "latest" | "session";
1320
+ earliest_artifact_at: string | null;
1321
+ latest_artifact_at: string | null;
1322
+ };
1323
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1324
+ current: {
1325
+ artifact_count: number;
1326
+ scope_note: string;
1327
+ artifact_ids: string[];
1328
+ session_selector: string | null;
1329
+ session_tags: string[];
1330
+ scope: "all" | "latest" | "session";
1331
+ earliest_artifact_at: string | null;
1332
+ latest_artifact_at: string | null;
1333
+ };
1334
+ added_artifact_ids: string[];
1335
+ removed_artifact_ids: string[];
1336
+ added_session_tags: string[];
1337
+ removed_session_tags: string[];
1338
+ artifact_count_delta: number;
1339
+ } | undefined;
1340
+ semantic_names?: {
1341
+ summary: string;
1342
+ baseline: {
1343
+ artifact_count: number;
1344
+ scope_note: string;
1345
+ artifact_ids: string[];
1346
+ session_selector: string | null;
1347
+ session_tags: string[];
1348
+ scope: "all" | "latest" | "session";
1349
+ earliest_artifact_at: string | null;
1350
+ latest_artifact_at: string | null;
1351
+ };
1352
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1353
+ current: {
1354
+ artifact_count: number;
1355
+ scope_note: string;
1356
+ artifact_ids: string[];
1357
+ session_selector: string | null;
1358
+ session_tags: string[];
1359
+ scope: "all" | "latest" | "session";
1360
+ earliest_artifact_at: string | null;
1361
+ latest_artifact_at: string | null;
1362
+ };
1363
+ added_artifact_ids: string[];
1364
+ removed_artifact_ids: string[];
1365
+ added_session_tags: string[];
1366
+ removed_session_tags: string[];
1367
+ artifact_count_delta: number;
1368
+ } | undefined;
1369
+ semantic_explanations?: {
1370
+ summary: string;
1371
+ baseline: {
1372
+ artifact_count: number;
1373
+ scope_note: string;
1374
+ artifact_ids: string[];
1375
+ session_selector: string | null;
1376
+ session_tags: string[];
1377
+ scope: "all" | "latest" | "session";
1378
+ earliest_artifact_at: string | null;
1379
+ latest_artifact_at: string | null;
1380
+ };
1381
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1382
+ current: {
1383
+ artifact_count: number;
1384
+ scope_note: string;
1385
+ artifact_ids: string[];
1386
+ session_selector: string | null;
1387
+ session_tags: string[];
1388
+ scope: "all" | "latest" | "session";
1389
+ earliest_artifact_at: string | null;
1390
+ latest_artifact_at: string | null;
1391
+ };
1392
+ added_artifact_ids: string[];
1393
+ removed_artifact_ids: string[];
1394
+ added_session_tags: string[];
1395
+ removed_session_tags: string[];
1396
+ artifact_count_delta: number;
1397
+ } | undefined;
1398
+ } | undefined;
1399
+ }, {
1400
+ sample_id: string;
1401
+ notes: string[];
1402
+ runtime: {
1403
+ is_dotnet: boolean | null;
1404
+ dotnet_version: string | null;
1405
+ target_framework: string | null;
1406
+ primary_runtime: string | null;
1407
+ };
1408
+ degraded: boolean;
1409
+ provenance: {
1410
+ runtime: {
1411
+ artifact_count: number;
1412
+ scope_note: string;
1413
+ artifact_ids: string[];
1414
+ session_selector: string | null;
1415
+ session_tags: string[];
1416
+ scope: "all" | "latest" | "session";
1417
+ earliest_artifact_at: string | null;
1418
+ latest_artifact_at: string | null;
1419
+ };
1420
+ semantic_names?: {
1421
+ artifact_count: number;
1422
+ scope_note: string;
1423
+ artifact_ids: string[];
1424
+ session_selector: string | null;
1425
+ session_tags: string[];
1426
+ scope: "all" | "latest" | "session";
1427
+ earliest_artifact_at: string | null;
1428
+ latest_artifact_at: string | null;
1429
+ } | undefined;
1430
+ semantic_explanations?: {
1431
+ artifact_count: number;
1432
+ scope_note: string;
1433
+ artifact_ids: string[];
1434
+ session_selector: string | null;
1435
+ session_tags: string[];
1436
+ scope: "all" | "latest" | "session";
1437
+ earliest_artifact_at: string | null;
1438
+ latest_artifact_at: string | null;
1439
+ } | undefined;
1440
+ };
1441
+ selected_path: "dotnet" | "native";
1442
+ stage_status: {
1443
+ runtime: "failed" | "ok";
1444
+ plan: "failed" | "ok" | "skipped";
1445
+ export_primary: "failed" | "ok" | "skipped";
1446
+ export_fallback: "failed" | "ok" | "skipped";
1447
+ };
1448
+ plan: {
1449
+ confidence: number;
1450
+ feasibility: "high" | "low" | "medium";
1451
+ restoration_expectation: string;
1452
+ blockers: string[];
1453
+ recommendations: string[];
1454
+ } | 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
+ selection_diffs?: {
1504
+ runtime?: {
1505
+ summary: string;
1506
+ baseline: {
1507
+ artifact_count: number;
1508
+ scope_note: string;
1509
+ artifact_ids: string[];
1510
+ session_selector: string | null;
1511
+ session_tags: string[];
1512
+ scope: "all" | "latest" | "session";
1513
+ earliest_artifact_at: string | null;
1514
+ latest_artifact_at: string | null;
1515
+ };
1516
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1517
+ current: {
1518
+ artifact_count: number;
1519
+ scope_note: string;
1520
+ artifact_ids: string[];
1521
+ session_selector: string | null;
1522
+ session_tags: string[];
1523
+ scope: "all" | "latest" | "session";
1524
+ earliest_artifact_at: string | null;
1525
+ latest_artifact_at: string | null;
1526
+ };
1527
+ added_artifact_ids: string[];
1528
+ removed_artifact_ids: string[];
1529
+ added_session_tags: string[];
1530
+ removed_session_tags: string[];
1531
+ artifact_count_delta: number;
1532
+ } | undefined;
1533
+ semantic_names?: {
1534
+ summary: string;
1535
+ baseline: {
1536
+ artifact_count: number;
1537
+ scope_note: string;
1538
+ artifact_ids: string[];
1539
+ session_selector: string | null;
1540
+ session_tags: string[];
1541
+ scope: "all" | "latest" | "session";
1542
+ earliest_artifact_at: string | null;
1543
+ latest_artifact_at: string | null;
1544
+ };
1545
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1546
+ current: {
1547
+ artifact_count: number;
1548
+ scope_note: string;
1549
+ artifact_ids: string[];
1550
+ session_selector: string | null;
1551
+ session_tags: string[];
1552
+ scope: "all" | "latest" | "session";
1553
+ earliest_artifact_at: string | null;
1554
+ latest_artifact_at: string | null;
1555
+ };
1556
+ added_artifact_ids: string[];
1557
+ removed_artifact_ids: string[];
1558
+ added_session_tags: string[];
1559
+ removed_session_tags: string[];
1560
+ artifact_count_delta: number;
1561
+ } | undefined;
1562
+ semantic_explanations?: {
1563
+ summary: string;
1564
+ baseline: {
1565
+ artifact_count: number;
1566
+ scope_note: string;
1567
+ artifact_ids: string[];
1568
+ session_selector: string | null;
1569
+ session_tags: string[];
1570
+ scope: "all" | "latest" | "session";
1571
+ earliest_artifact_at: string | null;
1572
+ latest_artifact_at: string | null;
1573
+ };
1574
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1575
+ current: {
1576
+ artifact_count: number;
1577
+ scope_note: string;
1578
+ artifact_ids: string[];
1579
+ session_selector: string | null;
1580
+ session_tags: string[];
1581
+ scope: "all" | "latest" | "session";
1582
+ earliest_artifact_at: string | null;
1583
+ latest_artifact_at: string | null;
1584
+ };
1585
+ added_artifact_ids: string[];
1586
+ removed_artifact_ids: string[];
1587
+ added_session_tags: string[];
1588
+ removed_session_tags: string[];
1589
+ artifact_count_delta: number;
1590
+ } | undefined;
1591
+ } | undefined;
1592
+ }>>;
1593
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1594
+ errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1595
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1596
+ metrics: z.ZodOptional<z.ZodObject<{
1597
+ elapsed_ms: z.ZodNumber;
1598
+ tool: z.ZodString;
1599
+ cached: z.ZodOptional<z.ZodBoolean>;
1600
+ cache_key: z.ZodOptional<z.ZodString>;
1601
+ cache_tier: z.ZodOptional<z.ZodString>;
1602
+ cache_created_at: z.ZodOptional<z.ZodString>;
1603
+ cache_expires_at: z.ZodOptional<z.ZodString>;
1604
+ cache_hit_at: z.ZodOptional<z.ZodString>;
1605
+ }, "strip", z.ZodTypeAny, {
1606
+ elapsed_ms: number;
1607
+ tool: string;
1608
+ cached?: boolean | undefined;
1609
+ cache_key?: string | undefined;
1610
+ cache_tier?: string | undefined;
1611
+ cache_created_at?: string | undefined;
1612
+ cache_expires_at?: string | undefined;
1613
+ cache_hit_at?: string | undefined;
1614
+ }, {
1615
+ elapsed_ms: number;
1616
+ tool: string;
1617
+ cached?: boolean | undefined;
1618
+ cache_key?: string | undefined;
1619
+ cache_tier?: string | undefined;
1620
+ cache_created_at?: string | undefined;
1621
+ cache_expires_at?: string | undefined;
1622
+ cache_hit_at?: string | undefined;
1623
+ }>>;
1624
+ }, "strip", z.ZodTypeAny, {
1625
+ 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
+ data?: {
1637
+ sample_id: string;
1638
+ notes: string[];
1639
+ runtime: {
1640
+ is_dotnet: boolean | null;
1641
+ dotnet_version: string | null;
1642
+ target_framework: string | null;
1643
+ primary_runtime: string | null;
1644
+ };
1645
+ degraded: boolean;
1646
+ provenance: {
1647
+ runtime: {
1648
+ artifact_count: number;
1649
+ scope_note: string;
1650
+ artifact_ids: string[];
1651
+ session_selector: string | null;
1652
+ session_tags: string[];
1653
+ scope: "all" | "latest" | "session";
1654
+ earliest_artifact_at: string | null;
1655
+ latest_artifact_at: string | null;
1656
+ };
1657
+ semantic_names?: {
1658
+ artifact_count: number;
1659
+ scope_note: string;
1660
+ artifact_ids: string[];
1661
+ session_selector: string | null;
1662
+ session_tags: string[];
1663
+ scope: "all" | "latest" | "session";
1664
+ earliest_artifact_at: string | null;
1665
+ latest_artifact_at: string | null;
1666
+ } | undefined;
1667
+ semantic_explanations?: {
1668
+ artifact_count: number;
1669
+ scope_note: string;
1670
+ artifact_ids: string[];
1671
+ session_selector: string | null;
1672
+ session_tags: string[];
1673
+ scope: "all" | "latest" | "session";
1674
+ earliest_artifact_at: string | null;
1675
+ latest_artifact_at: string | null;
1676
+ } | undefined;
1677
+ };
1678
+ selected_path: "dotnet" | "native";
1679
+ stage_status: {
1680
+ runtime: "failed" | "ok";
1681
+ plan: "failed" | "ok" | "skipped";
1682
+ export_primary: "failed" | "ok" | "skipped";
1683
+ export_fallback: "failed" | "ok" | "skipped";
1684
+ };
1685
+ plan: {
1686
+ confidence: number;
1687
+ feasibility: "high" | "low" | "medium";
1688
+ restoration_expectation: string;
1689
+ blockers: string[];
1690
+ recommendations: string[];
1691
+ } | 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
+ selection_diffs?: {
1741
+ runtime?: {
1742
+ summary: string;
1743
+ baseline: {
1744
+ artifact_count: number;
1745
+ scope_note: string;
1746
+ artifact_ids: string[];
1747
+ session_selector: string | null;
1748
+ session_tags: string[];
1749
+ scope: "all" | "latest" | "session";
1750
+ earliest_artifact_at: string | null;
1751
+ latest_artifact_at: string | null;
1752
+ };
1753
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1754
+ current: {
1755
+ artifact_count: number;
1756
+ scope_note: string;
1757
+ artifact_ids: string[];
1758
+ session_selector: string | null;
1759
+ session_tags: string[];
1760
+ scope: "all" | "latest" | "session";
1761
+ earliest_artifact_at: string | null;
1762
+ latest_artifact_at: string | null;
1763
+ };
1764
+ added_artifact_ids: string[];
1765
+ removed_artifact_ids: string[];
1766
+ added_session_tags: string[];
1767
+ removed_session_tags: string[];
1768
+ artifact_count_delta: number;
1769
+ } | undefined;
1770
+ semantic_names?: {
1771
+ summary: string;
1772
+ baseline: {
1773
+ artifact_count: number;
1774
+ scope_note: string;
1775
+ artifact_ids: string[];
1776
+ session_selector: string | null;
1777
+ session_tags: string[];
1778
+ scope: "all" | "latest" | "session";
1779
+ earliest_artifact_at: string | null;
1780
+ latest_artifact_at: string | null;
1781
+ };
1782
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1783
+ current: {
1784
+ artifact_count: number;
1785
+ scope_note: string;
1786
+ artifact_ids: string[];
1787
+ session_selector: string | null;
1788
+ session_tags: string[];
1789
+ scope: "all" | "latest" | "session";
1790
+ earliest_artifact_at: string | null;
1791
+ latest_artifact_at: string | null;
1792
+ };
1793
+ added_artifact_ids: string[];
1794
+ removed_artifact_ids: string[];
1795
+ added_session_tags: string[];
1796
+ removed_session_tags: string[];
1797
+ artifact_count_delta: number;
1798
+ } | undefined;
1799
+ semantic_explanations?: {
1800
+ summary: string;
1801
+ baseline: {
1802
+ artifact_count: number;
1803
+ scope_note: string;
1804
+ artifact_ids: string[];
1805
+ session_selector: string | null;
1806
+ session_tags: string[];
1807
+ scope: "all" | "latest" | "session";
1808
+ earliest_artifact_at: string | null;
1809
+ latest_artifact_at: string | null;
1810
+ };
1811
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1812
+ current: {
1813
+ artifact_count: number;
1814
+ scope_note: string;
1815
+ artifact_ids: string[];
1816
+ session_selector: string | null;
1817
+ session_tags: string[];
1818
+ scope: "all" | "latest" | "session";
1819
+ earliest_artifact_at: string | null;
1820
+ latest_artifact_at: string | null;
1821
+ };
1822
+ added_artifact_ids: string[];
1823
+ removed_artifact_ids: string[];
1824
+ added_session_tags: string[];
1825
+ removed_session_tags: string[];
1826
+ artifact_count_delta: number;
1827
+ } | undefined;
1828
+ } | undefined;
1829
+ } | undefined;
1830
+ warnings?: string[] | undefined;
1831
+ errors?: string[] | undefined;
1832
+ artifacts?: any[] | undefined;
1833
+ }, {
1834
+ ok: boolean;
1835
+ metrics?: {
1836
+ elapsed_ms: number;
1837
+ tool: string;
1838
+ cached?: boolean | undefined;
1839
+ cache_key?: string | undefined;
1840
+ cache_tier?: string | undefined;
1841
+ cache_created_at?: string | undefined;
1842
+ cache_expires_at?: string | undefined;
1843
+ cache_hit_at?: string | undefined;
1844
+ } | undefined;
1845
+ data?: {
1846
+ sample_id: string;
1847
+ notes: string[];
1848
+ runtime: {
1849
+ is_dotnet: boolean | null;
1850
+ dotnet_version: string | null;
1851
+ target_framework: string | null;
1852
+ primary_runtime: string | null;
1853
+ };
1854
+ degraded: boolean;
1855
+ provenance: {
1856
+ runtime: {
1857
+ artifact_count: number;
1858
+ scope_note: string;
1859
+ artifact_ids: string[];
1860
+ session_selector: string | null;
1861
+ session_tags: string[];
1862
+ scope: "all" | "latest" | "session";
1863
+ earliest_artifact_at: string | null;
1864
+ latest_artifact_at: string | null;
1865
+ };
1866
+ semantic_names?: {
1867
+ artifact_count: number;
1868
+ scope_note: string;
1869
+ artifact_ids: string[];
1870
+ session_selector: string | null;
1871
+ session_tags: string[];
1872
+ scope: "all" | "latest" | "session";
1873
+ earliest_artifact_at: string | null;
1874
+ latest_artifact_at: string | null;
1875
+ } | undefined;
1876
+ semantic_explanations?: {
1877
+ artifact_count: number;
1878
+ scope_note: string;
1879
+ artifact_ids: string[];
1880
+ session_selector: string | null;
1881
+ session_tags: string[];
1882
+ scope: "all" | "latest" | "session";
1883
+ earliest_artifact_at: string | null;
1884
+ latest_artifact_at: string | null;
1885
+ } | undefined;
1886
+ };
1887
+ selected_path: "dotnet" | "native";
1888
+ stage_status: {
1889
+ runtime: "failed" | "ok";
1890
+ plan: "failed" | "ok" | "skipped";
1891
+ export_primary: "failed" | "ok" | "skipped";
1892
+ export_fallback: "failed" | "ok" | "skipped";
1893
+ };
1894
+ plan: {
1895
+ confidence: number;
1896
+ feasibility: "high" | "low" | "medium";
1897
+ restoration_expectation: string;
1898
+ blockers: string[];
1899
+ recommendations: string[];
1900
+ } | 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
+ selection_diffs?: {
1950
+ runtime?: {
1951
+ summary: string;
1952
+ baseline: {
1953
+ artifact_count: number;
1954
+ scope_note: string;
1955
+ artifact_ids: string[];
1956
+ session_selector: string | null;
1957
+ session_tags: string[];
1958
+ scope: "all" | "latest" | "session";
1959
+ earliest_artifact_at: string | null;
1960
+ latest_artifact_at: string | null;
1961
+ };
1962
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1963
+ current: {
1964
+ artifact_count: number;
1965
+ scope_note: string;
1966
+ artifact_ids: string[];
1967
+ session_selector: string | null;
1968
+ session_tags: string[];
1969
+ scope: "all" | "latest" | "session";
1970
+ earliest_artifact_at: string | null;
1971
+ latest_artifact_at: string | null;
1972
+ };
1973
+ added_artifact_ids: string[];
1974
+ removed_artifact_ids: string[];
1975
+ added_session_tags: string[];
1976
+ removed_session_tags: string[];
1977
+ artifact_count_delta: number;
1978
+ } | undefined;
1979
+ semantic_names?: {
1980
+ summary: string;
1981
+ baseline: {
1982
+ artifact_count: number;
1983
+ scope_note: string;
1984
+ artifact_ids: string[];
1985
+ session_selector: string | null;
1986
+ session_tags: string[];
1987
+ scope: "all" | "latest" | "session";
1988
+ earliest_artifact_at: string | null;
1989
+ latest_artifact_at: string | null;
1990
+ };
1991
+ label: "runtime" | "semantic_names" | "semantic_explanations";
1992
+ current: {
1993
+ artifact_count: number;
1994
+ scope_note: string;
1995
+ artifact_ids: string[];
1996
+ session_selector: string | null;
1997
+ session_tags: string[];
1998
+ scope: "all" | "latest" | "session";
1999
+ earliest_artifact_at: string | null;
2000
+ latest_artifact_at: string | null;
2001
+ };
2002
+ added_artifact_ids: string[];
2003
+ removed_artifact_ids: string[];
2004
+ added_session_tags: string[];
2005
+ removed_session_tags: string[];
2006
+ artifact_count_delta: number;
2007
+ } | undefined;
2008
+ semantic_explanations?: {
2009
+ summary: string;
2010
+ baseline: {
2011
+ artifact_count: number;
2012
+ scope_note: string;
2013
+ artifact_ids: string[];
2014
+ session_selector: string | null;
2015
+ session_tags: string[];
2016
+ scope: "all" | "latest" | "session";
2017
+ earliest_artifact_at: string | null;
2018
+ latest_artifact_at: string | null;
2019
+ };
2020
+ label: "runtime" | "semantic_names" | "semantic_explanations";
2021
+ current: {
2022
+ artifact_count: number;
2023
+ scope_note: string;
2024
+ artifact_ids: string[];
2025
+ session_selector: string | null;
2026
+ session_tags: string[];
2027
+ scope: "all" | "latest" | "session";
2028
+ earliest_artifact_at: string | null;
2029
+ latest_artifact_at: string | null;
2030
+ };
2031
+ added_artifact_ids: string[];
2032
+ removed_artifact_ids: string[];
2033
+ added_session_tags: string[];
2034
+ removed_session_tags: string[];
2035
+ artifact_count_delta: number;
2036
+ } | undefined;
2037
+ } | undefined;
2038
+ } | undefined;
2039
+ warnings?: string[] | undefined;
2040
+ errors?: string[] | undefined;
2041
+ artifacts?: any[] | undefined;
2042
+ }>;
2043
+ export type ReconstructWorkflowOutput = z.infer<typeof ReconstructWorkflowOutputSchema>;
2044
+ export declare const reconstructWorkflowToolDefinition: ToolDefinition;
2045
+ interface ReconstructWorkflowDependencies {
2046
+ runtimeDetectHandler?: (args: ToolArgs) => Promise<WorkerResult>;
2047
+ planHandler?: (args: ToolArgs) => Promise<WorkerResult>;
2048
+ nativeExportHandler?: (args: ToolArgs) => Promise<WorkerResult>;
2049
+ dotnetExportHandler?: (args: ToolArgs) => Promise<WorkerResult>;
2050
+ }
2051
+ export declare function createReconstructWorkflowHandler(workspaceManager: WorkspaceManager, database: DatabaseManager, cacheManager: CacheManager, dependencies?: ReconstructWorkflowDependencies): (args: ToolArgs) => Promise<WorkerResult>;
2052
+ export {};
2053
+ //# sourceMappingURL=reconstruct.d.ts.map