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.
- package/CLAUDE_INSTALLATION.md +129 -0
- package/CODEX_INSTALLATION.md +25 -1
- package/COPILOT_INSTALLATION.md +29 -1
- package/LICENSE +21 -21
- package/README.md +232 -110
- package/dist/analysis-provenance.d.ts +50 -2
- package/dist/analysis-provenance.js +1 -0
- package/dist/analysis-task-runner.js +92 -0
- package/dist/config.d.ts +35 -16
- package/dist/config.js +37 -3
- package/dist/database.js +115 -115
- package/dist/decompiler-worker.d.ts +10 -5
- package/dist/decompiler-worker.js +240 -58
- package/dist/dynamic-trace.d.ts +6 -0
- package/dist/dynamic-trace.js +52 -1
- package/dist/ghidra-config.js +17 -1
- package/dist/index.js +38 -8
- package/dist/pe-runtime-functions.d.ts +90 -0
- package/dist/pe-runtime-functions.js +452 -0
- package/dist/prompts/module-reconstruction-review.d.ts +5 -0
- package/dist/prompts/module-reconstruction-review.js +65 -0
- package/dist/runtime-correlation.d.ts +5 -0
- package/dist/runtime-correlation.js +179 -2
- package/dist/sample-workspace.d.ts +28 -0
- package/dist/sample-workspace.js +186 -0
- package/dist/semantic-name-suggestion-artifacts.d.ts +56 -0
- package/dist/semantic-name-suggestion-artifacts.js +87 -0
- package/dist/server.js +1 -1
- package/dist/setup-guidance.d.ts +73 -0
- package/dist/setup-guidance.js +211 -0
- package/dist/tools/artifact-read.d.ts +10 -10
- package/dist/tools/artifacts-diff.d.ts +8 -8
- package/dist/tools/artifacts-list.d.ts +16 -16
- package/dist/tools/attack-map.d.ts +8 -8
- package/dist/tools/binary-role-profile.d.ts +1197 -0
- package/dist/tools/binary-role-profile.js +575 -0
- package/dist/tools/code-function-explain-apply.d.ts +12 -12
- package/dist/tools/code-function-explain-prepare.d.ts +12 -12
- package/dist/tools/code-function-explain-review.d.ts +58 -58
- package/dist/tools/code-function-rename-apply.d.ts +12 -12
- package/dist/tools/code-function-rename-prepare.d.ts +14 -14
- package/dist/tools/code-function-rename-review.d.ts +66 -66
- package/dist/tools/code-functions-define.d.ts +337 -0
- package/dist/tools/code-functions-define.js +337 -0
- package/dist/tools/code-functions-list.js +1 -1
- package/dist/tools/code-functions-rank.js +1 -1
- package/dist/tools/code-functions-reconstruct.d.ts +368 -58
- package/dist/tools/code-functions-reconstruct.js +130 -10
- package/dist/tools/code-functions-smart-recover.d.ts +352 -0
- package/dist/tools/code-functions-smart-recover.js +190 -0
- package/dist/tools/code-module-review-apply.d.ts +233 -0
- package/dist/tools/code-module-review-apply.js +209 -0
- package/dist/tools/code-module-review-prepare.d.ts +756 -0
- package/dist/tools/code-module-review-prepare.js +343 -0
- package/dist/tools/code-module-review.d.ts +474 -0
- package/dist/tools/code-module-review.js +566 -0
- package/dist/tools/code-reconstruct-export.d.ts +193 -21
- package/dist/tools/code-reconstruct-export.js +578 -21
- package/dist/tools/code-reconstruct-plan.d.ts +20 -20
- package/dist/tools/com-role-profile.d.ts +353 -0
- package/dist/tools/com-role-profile.js +186 -0
- package/dist/tools/dll-export-profile.d.ts +625 -0
- package/dist/tools/dll-export-profile.js +230 -0
- package/dist/tools/dotnet-metadata-extract.d.ts +122 -122
- package/dist/tools/dotnet-reconstruct-export.d.ts +49 -49
- package/dist/tools/dotnet-types-list.d.ts +66 -66
- package/dist/tools/dynamic-dependencies.d.ts +144 -8
- package/dist/tools/dynamic-dependencies.js +20 -1
- package/dist/tools/dynamic-memory-import.js +105 -2
- package/dist/tools/ghidra-analyze.d.ts +20 -0
- package/dist/tools/ghidra-analyze.js +10 -2
- package/dist/tools/ghidra-health.d.ts +177 -0
- package/dist/tools/ghidra-health.js +28 -0
- package/dist/tools/ioc-export.d.ts +8 -8
- package/dist/tools/packer-detect.d.ts +14 -14
- package/dist/tools/packer-detect.js +6 -9
- package/dist/tools/pe-exports-extract.d.ts +8 -8
- package/dist/tools/pe-exports-extract.js +6 -9
- package/dist/tools/pe-fingerprint.d.ts +36 -36
- package/dist/tools/pe-imports-extract.d.ts +8 -8
- package/dist/tools/pe-imports-extract.js +6 -9
- package/dist/tools/pe-pdata-extract.d.ts +448 -0
- package/dist/tools/pe-pdata-extract.js +219 -0
- package/dist/tools/pe-symbols-recover.d.ts +227 -0
- package/dist/tools/pe-symbols-recover.js +316 -0
- package/dist/tools/report-generate.d.ts +15 -1
- package/dist/tools/report-generate.js +139 -16
- package/dist/tools/report-summarize.d.ts +2242 -8
- package/dist/tools/report-summarize.js +246 -10
- package/dist/tools/runtime-detect.d.ts +8 -8
- package/dist/tools/runtime-detect.js +2 -12
- package/dist/tools/rust-binary-analyze.d.ts +2047 -0
- package/dist/tools/rust-binary-analyze.js +443 -0
- package/dist/tools/sample-profile-get.d.ts +135 -16
- package/dist/tools/sample-profile-get.js +35 -32
- package/dist/tools/sandbox-execute.d.ts +10 -10
- package/dist/tools/strings-extract.d.ts +8 -8
- package/dist/tools/strings-extract.js +2 -12
- package/dist/tools/strings-floss-decode.d.ts +8 -8
- package/dist/tools/system-health.d.ts +172 -36
- package/dist/tools/system-health.js +14 -0
- package/dist/tools/system-setup-guide.d.ts +179 -0
- package/dist/tools/system-setup-guide.js +62 -0
- package/dist/tools/tool-help.d.ts +16 -16
- package/dist/tools/tool-help.js +172 -0
- package/dist/tools/yara-scan.d.ts +8 -8
- package/dist/types.d.ts +2 -0
- package/dist/workflows/function-explanation-review.d.ts +3034 -76
- package/dist/workflows/function-explanation-review.js +172 -42
- package/dist/workflows/function-index-recover.d.ts +333 -0
- package/dist/workflows/function-index-recover.js +291 -0
- package/dist/workflows/module-reconstruction-review.d.ts +3537 -0
- package/dist/workflows/module-reconstruction-review.js +354 -0
- package/dist/workflows/reconstruct.d.ts +2182 -223
- package/dist/workflows/reconstruct.js +575 -32
- package/dist/workflows/semantic-name-review.d.ts +1436 -85
- package/dist/workflows/semantic-name-review.js +150 -58
- package/dist/workflows/triage.d.ts +8 -8
- package/ghidra_scripts/DecompileFunction.java +487 -487
- package/ghidra_scripts/ExtractCFG.java +256 -256
- package/ghidra_scripts/ExtractFunctions.java +442 -442
- package/ghidra_scripts/README.md +112 -112
- package/ghidra_scripts/SearchFunctionReferences.java +380 -380
- package/helpers/DotNetMetadataProbe/DotNetMetadataProbe.csproj +9 -9
- package/helpers/DotNetMetadataProbe/Program.cs +566 -566
- package/install-to-claude.ps1 +432 -0
- package/install-to-codex.ps1 +256 -178
- package/install-to-copilot.ps1 +389 -303
- package/package.json +4 -2
- package/requirements.txt +9 -9
- package/workers/requirements-dynamic.txt +11 -11
- package/workers/requirements.txt +8 -8
- package/workers/speakeasy_compat.py +175 -175
- package/workers/static_worker.py +3474 -3474
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ClientCapabilities, CreateMessageRequest, CreateMessageResult, CreateMessageResultWithTools, Implementation } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import type { ToolArgs, ToolDefinition, WorkerResult } from '../types.js';
|
|
4
|
+
import type { WorkspaceManager } from '../workspace-manager.js';
|
|
5
|
+
import type { DatabaseManager } from '../database.js';
|
|
6
|
+
import type { CacheManager } from '../cache-manager.js';
|
|
7
|
+
import type { MCPServer } from '../server.js';
|
|
8
|
+
export declare const codeModuleReviewInputSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
9
|
+
sample_id: z.ZodString;
|
|
10
|
+
topk: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
module_limit: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
min_module_size: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
include_imports: z.ZodDefault<z.ZodBoolean>;
|
|
14
|
+
include_strings: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
analysis_goal: z.ZodDefault<z.ZodString>;
|
|
16
|
+
session_tag: z.ZodOptional<z.ZodString>;
|
|
17
|
+
evidence_scope: z.ZodDefault<z.ZodEnum<["all", "latest", "session"]>>;
|
|
18
|
+
evidence_session_tag: z.ZodOptional<z.ZodString>;
|
|
19
|
+
semantic_scope: z.ZodDefault<z.ZodEnum<["all", "latest", "session"]>>;
|
|
20
|
+
semantic_session_tag: z.ZodOptional<z.ZodString>;
|
|
21
|
+
role_target: z.ZodOptional<z.ZodString>;
|
|
22
|
+
role_focus_areas: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
+
role_priority_order: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
24
|
+
persist_artifact: z.ZodDefault<z.ZodBoolean>;
|
|
25
|
+
auto_apply: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
temperature: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
max_tokens: z.ZodDefault<z.ZodNumber>;
|
|
28
|
+
include_context: z.ZodDefault<z.ZodEnum<["none", "thisServer", "allServers"]>>;
|
|
29
|
+
model_hint: z.ZodOptional<z.ZodString>;
|
|
30
|
+
cost_priority: z.ZodDefault<z.ZodNumber>;
|
|
31
|
+
speed_priority: z.ZodDefault<z.ZodNumber>;
|
|
32
|
+
intelligence_priority: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
system_prompt: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
sample_id: string;
|
|
36
|
+
evidence_scope: "all" | "latest" | "session";
|
|
37
|
+
include_strings: boolean;
|
|
38
|
+
topk: number;
|
|
39
|
+
semantic_scope: "all" | "latest" | "session";
|
|
40
|
+
module_limit: number;
|
|
41
|
+
min_module_size: number;
|
|
42
|
+
include_imports: boolean;
|
|
43
|
+
role_focus_areas: string[];
|
|
44
|
+
role_priority_order: string[];
|
|
45
|
+
persist_artifact: boolean;
|
|
46
|
+
temperature: number;
|
|
47
|
+
analysis_goal: string;
|
|
48
|
+
auto_apply: boolean;
|
|
49
|
+
max_tokens: number;
|
|
50
|
+
include_context: "none" | "thisServer" | "allServers";
|
|
51
|
+
cost_priority: number;
|
|
52
|
+
speed_priority: number;
|
|
53
|
+
intelligence_priority: number;
|
|
54
|
+
session_tag?: string | undefined;
|
|
55
|
+
evidence_session_tag?: string | undefined;
|
|
56
|
+
semantic_session_tag?: string | undefined;
|
|
57
|
+
role_target?: string | undefined;
|
|
58
|
+
model_hint?: string | undefined;
|
|
59
|
+
system_prompt?: string | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
sample_id: string;
|
|
62
|
+
session_tag?: string | undefined;
|
|
63
|
+
evidence_scope?: "all" | "latest" | "session" | undefined;
|
|
64
|
+
include_strings?: boolean | undefined;
|
|
65
|
+
topk?: number | undefined;
|
|
66
|
+
evidence_session_tag?: string | undefined;
|
|
67
|
+
semantic_scope?: "all" | "latest" | "session" | undefined;
|
|
68
|
+
semantic_session_tag?: string | undefined;
|
|
69
|
+
module_limit?: number | undefined;
|
|
70
|
+
min_module_size?: number | undefined;
|
|
71
|
+
include_imports?: boolean | undefined;
|
|
72
|
+
role_target?: string | undefined;
|
|
73
|
+
role_focus_areas?: string[] | undefined;
|
|
74
|
+
role_priority_order?: string[] | undefined;
|
|
75
|
+
persist_artifact?: boolean | undefined;
|
|
76
|
+
temperature?: number | undefined;
|
|
77
|
+
analysis_goal?: string | undefined;
|
|
78
|
+
auto_apply?: boolean | undefined;
|
|
79
|
+
max_tokens?: number | undefined;
|
|
80
|
+
include_context?: "none" | "thisServer" | "allServers" | undefined;
|
|
81
|
+
model_hint?: string | undefined;
|
|
82
|
+
cost_priority?: number | undefined;
|
|
83
|
+
speed_priority?: number | undefined;
|
|
84
|
+
intelligence_priority?: number | undefined;
|
|
85
|
+
system_prompt?: string | undefined;
|
|
86
|
+
}>, {
|
|
87
|
+
sample_id: string;
|
|
88
|
+
evidence_scope: "all" | "latest" | "session";
|
|
89
|
+
include_strings: boolean;
|
|
90
|
+
topk: number;
|
|
91
|
+
semantic_scope: "all" | "latest" | "session";
|
|
92
|
+
module_limit: number;
|
|
93
|
+
min_module_size: number;
|
|
94
|
+
include_imports: boolean;
|
|
95
|
+
role_focus_areas: string[];
|
|
96
|
+
role_priority_order: string[];
|
|
97
|
+
persist_artifact: boolean;
|
|
98
|
+
temperature: number;
|
|
99
|
+
analysis_goal: string;
|
|
100
|
+
auto_apply: boolean;
|
|
101
|
+
max_tokens: number;
|
|
102
|
+
include_context: "none" | "thisServer" | "allServers";
|
|
103
|
+
cost_priority: number;
|
|
104
|
+
speed_priority: number;
|
|
105
|
+
intelligence_priority: number;
|
|
106
|
+
session_tag?: string | undefined;
|
|
107
|
+
evidence_session_tag?: string | undefined;
|
|
108
|
+
semantic_session_tag?: string | undefined;
|
|
109
|
+
role_target?: string | undefined;
|
|
110
|
+
model_hint?: string | undefined;
|
|
111
|
+
system_prompt?: string | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
sample_id: string;
|
|
114
|
+
session_tag?: string | undefined;
|
|
115
|
+
evidence_scope?: "all" | "latest" | "session" | undefined;
|
|
116
|
+
include_strings?: boolean | undefined;
|
|
117
|
+
topk?: number | undefined;
|
|
118
|
+
evidence_session_tag?: string | undefined;
|
|
119
|
+
semantic_scope?: "all" | "latest" | "session" | undefined;
|
|
120
|
+
semantic_session_tag?: string | undefined;
|
|
121
|
+
module_limit?: number | undefined;
|
|
122
|
+
min_module_size?: number | undefined;
|
|
123
|
+
include_imports?: boolean | undefined;
|
|
124
|
+
role_target?: string | undefined;
|
|
125
|
+
role_focus_areas?: string[] | undefined;
|
|
126
|
+
role_priority_order?: string[] | undefined;
|
|
127
|
+
persist_artifact?: boolean | undefined;
|
|
128
|
+
temperature?: number | undefined;
|
|
129
|
+
analysis_goal?: string | undefined;
|
|
130
|
+
auto_apply?: boolean | undefined;
|
|
131
|
+
max_tokens?: number | undefined;
|
|
132
|
+
include_context?: "none" | "thisServer" | "allServers" | undefined;
|
|
133
|
+
model_hint?: string | undefined;
|
|
134
|
+
cost_priority?: number | undefined;
|
|
135
|
+
speed_priority?: number | undefined;
|
|
136
|
+
intelligence_priority?: number | undefined;
|
|
137
|
+
system_prompt?: string | undefined;
|
|
138
|
+
}>, {
|
|
139
|
+
sample_id: string;
|
|
140
|
+
evidence_scope: "all" | "latest" | "session";
|
|
141
|
+
include_strings: boolean;
|
|
142
|
+
topk: number;
|
|
143
|
+
semantic_scope: "all" | "latest" | "session";
|
|
144
|
+
module_limit: number;
|
|
145
|
+
min_module_size: number;
|
|
146
|
+
include_imports: boolean;
|
|
147
|
+
role_focus_areas: string[];
|
|
148
|
+
role_priority_order: string[];
|
|
149
|
+
persist_artifact: boolean;
|
|
150
|
+
temperature: number;
|
|
151
|
+
analysis_goal: string;
|
|
152
|
+
auto_apply: boolean;
|
|
153
|
+
max_tokens: number;
|
|
154
|
+
include_context: "none" | "thisServer" | "allServers";
|
|
155
|
+
cost_priority: number;
|
|
156
|
+
speed_priority: number;
|
|
157
|
+
intelligence_priority: number;
|
|
158
|
+
session_tag?: string | undefined;
|
|
159
|
+
evidence_session_tag?: string | undefined;
|
|
160
|
+
semantic_session_tag?: string | undefined;
|
|
161
|
+
role_target?: string | undefined;
|
|
162
|
+
model_hint?: string | undefined;
|
|
163
|
+
system_prompt?: string | undefined;
|
|
164
|
+
}, {
|
|
165
|
+
sample_id: string;
|
|
166
|
+
session_tag?: string | undefined;
|
|
167
|
+
evidence_scope?: "all" | "latest" | "session" | undefined;
|
|
168
|
+
include_strings?: boolean | undefined;
|
|
169
|
+
topk?: number | undefined;
|
|
170
|
+
evidence_session_tag?: string | undefined;
|
|
171
|
+
semantic_scope?: "all" | "latest" | "session" | undefined;
|
|
172
|
+
semantic_session_tag?: string | undefined;
|
|
173
|
+
module_limit?: number | undefined;
|
|
174
|
+
min_module_size?: number | undefined;
|
|
175
|
+
include_imports?: boolean | undefined;
|
|
176
|
+
role_target?: string | undefined;
|
|
177
|
+
role_focus_areas?: string[] | undefined;
|
|
178
|
+
role_priority_order?: string[] | undefined;
|
|
179
|
+
persist_artifact?: boolean | undefined;
|
|
180
|
+
temperature?: number | undefined;
|
|
181
|
+
analysis_goal?: string | undefined;
|
|
182
|
+
auto_apply?: boolean | undefined;
|
|
183
|
+
max_tokens?: number | undefined;
|
|
184
|
+
include_context?: "none" | "thisServer" | "allServers" | undefined;
|
|
185
|
+
model_hint?: string | undefined;
|
|
186
|
+
cost_priority?: number | undefined;
|
|
187
|
+
speed_priority?: number | undefined;
|
|
188
|
+
intelligence_priority?: number | undefined;
|
|
189
|
+
system_prompt?: string | undefined;
|
|
190
|
+
}>;
|
|
191
|
+
export declare const codeModuleReviewOutputSchema: z.ZodObject<{
|
|
192
|
+
ok: z.ZodBoolean;
|
|
193
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
194
|
+
sample_id: z.ZodString;
|
|
195
|
+
review_status: z.ZodEnum<["sampled_and_applied", "sampled_only", "prompt_contract_only", "no_targets", "sampling_parse_failed"]>;
|
|
196
|
+
prompt_name: z.ZodLiteral<"reverse.module_reconstruction_review">;
|
|
197
|
+
prompt_arguments: z.ZodObject<{
|
|
198
|
+
analysis_goal: z.ZodString;
|
|
199
|
+
prepared_bundle_json: z.ZodString;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
prepared_bundle_json: string;
|
|
202
|
+
analysis_goal: string;
|
|
203
|
+
}, {
|
|
204
|
+
prepared_bundle_json: string;
|
|
205
|
+
analysis_goal: string;
|
|
206
|
+
}>;
|
|
207
|
+
task_prompt: z.ZodString;
|
|
208
|
+
client: z.ZodObject<{
|
|
209
|
+
name: z.ZodNullable<z.ZodString>;
|
|
210
|
+
version: z.ZodNullable<z.ZodString>;
|
|
211
|
+
sampling_available: z.ZodBoolean;
|
|
212
|
+
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
name: string | null;
|
|
214
|
+
version: string | null;
|
|
215
|
+
sampling_available: boolean;
|
|
216
|
+
}, {
|
|
217
|
+
name: string | null;
|
|
218
|
+
version: string | null;
|
|
219
|
+
sampling_available: boolean;
|
|
220
|
+
}>;
|
|
221
|
+
prepare: z.ZodObject<{
|
|
222
|
+
prepared_count: z.ZodNumber;
|
|
223
|
+
artifact_id: z.ZodNullable<z.ZodString>;
|
|
224
|
+
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
prepared_count: number;
|
|
226
|
+
artifact_id: string | null;
|
|
227
|
+
}, {
|
|
228
|
+
prepared_count: number;
|
|
229
|
+
artifact_id: string | null;
|
|
230
|
+
}>;
|
|
231
|
+
sampling: z.ZodObject<{
|
|
232
|
+
attempted: z.ZodBoolean;
|
|
233
|
+
model: z.ZodNullable<z.ZodString>;
|
|
234
|
+
stop_reason: z.ZodNullable<z.ZodString>;
|
|
235
|
+
response_text: z.ZodNullable<z.ZodString>;
|
|
236
|
+
parsed_review_count: z.ZodNumber;
|
|
237
|
+
}, "strip", z.ZodTypeAny, {
|
|
238
|
+
attempted: boolean;
|
|
239
|
+
model: string | null;
|
|
240
|
+
stop_reason: string | null;
|
|
241
|
+
response_text: string | null;
|
|
242
|
+
parsed_review_count: number;
|
|
243
|
+
}, {
|
|
244
|
+
attempted: boolean;
|
|
245
|
+
model: string | null;
|
|
246
|
+
stop_reason: string | null;
|
|
247
|
+
response_text: string | null;
|
|
248
|
+
parsed_review_count: number;
|
|
249
|
+
}>;
|
|
250
|
+
apply: z.ZodObject<{
|
|
251
|
+
attempted: z.ZodBoolean;
|
|
252
|
+
accepted_count: z.ZodNumber;
|
|
253
|
+
rejected_count: z.ZodNumber;
|
|
254
|
+
artifact_id: z.ZodNullable<z.ZodString>;
|
|
255
|
+
}, "strip", z.ZodTypeAny, {
|
|
256
|
+
attempted: boolean;
|
|
257
|
+
accepted_count: number;
|
|
258
|
+
rejected_count: number;
|
|
259
|
+
artifact_id: string | null;
|
|
260
|
+
}, {
|
|
261
|
+
attempted: boolean;
|
|
262
|
+
accepted_count: number;
|
|
263
|
+
rejected_count: number;
|
|
264
|
+
artifact_id: string | null;
|
|
265
|
+
}>;
|
|
266
|
+
confidence_policy: z.ZodObject<{
|
|
267
|
+
calibrated: z.ZodBoolean;
|
|
268
|
+
review_scores_are_heuristic: z.ZodBoolean;
|
|
269
|
+
meaning: z.ZodString;
|
|
270
|
+
}, "strip", z.ZodTypeAny, {
|
|
271
|
+
calibrated: boolean;
|
|
272
|
+
meaning: string;
|
|
273
|
+
review_scores_are_heuristic: boolean;
|
|
274
|
+
}, {
|
|
275
|
+
calibrated: boolean;
|
|
276
|
+
meaning: string;
|
|
277
|
+
review_scores_are_heuristic: boolean;
|
|
278
|
+
}>;
|
|
279
|
+
next_steps: z.ZodArray<z.ZodString, "many">;
|
|
280
|
+
}, "strip", z.ZodTypeAny, {
|
|
281
|
+
sample_id: string;
|
|
282
|
+
client: {
|
|
283
|
+
name: string | null;
|
|
284
|
+
version: string | null;
|
|
285
|
+
sampling_available: boolean;
|
|
286
|
+
};
|
|
287
|
+
next_steps: string[];
|
|
288
|
+
sampling: {
|
|
289
|
+
attempted: boolean;
|
|
290
|
+
model: string | null;
|
|
291
|
+
stop_reason: string | null;
|
|
292
|
+
response_text: string | null;
|
|
293
|
+
parsed_review_count: number;
|
|
294
|
+
};
|
|
295
|
+
prompt_name: "reverse.module_reconstruction_review";
|
|
296
|
+
prompt_arguments: {
|
|
297
|
+
prepared_bundle_json: string;
|
|
298
|
+
analysis_goal: string;
|
|
299
|
+
};
|
|
300
|
+
task_prompt: string;
|
|
301
|
+
review_status: "sampled_and_applied" | "sampled_only" | "prompt_contract_only" | "no_targets" | "sampling_parse_failed";
|
|
302
|
+
prepare: {
|
|
303
|
+
prepared_count: number;
|
|
304
|
+
artifact_id: string | null;
|
|
305
|
+
};
|
|
306
|
+
apply: {
|
|
307
|
+
attempted: boolean;
|
|
308
|
+
accepted_count: number;
|
|
309
|
+
rejected_count: number;
|
|
310
|
+
artifact_id: string | null;
|
|
311
|
+
};
|
|
312
|
+
confidence_policy: {
|
|
313
|
+
calibrated: boolean;
|
|
314
|
+
meaning: string;
|
|
315
|
+
review_scores_are_heuristic: boolean;
|
|
316
|
+
};
|
|
317
|
+
}, {
|
|
318
|
+
sample_id: string;
|
|
319
|
+
client: {
|
|
320
|
+
name: string | null;
|
|
321
|
+
version: string | null;
|
|
322
|
+
sampling_available: boolean;
|
|
323
|
+
};
|
|
324
|
+
next_steps: string[];
|
|
325
|
+
sampling: {
|
|
326
|
+
attempted: boolean;
|
|
327
|
+
model: string | null;
|
|
328
|
+
stop_reason: string | null;
|
|
329
|
+
response_text: string | null;
|
|
330
|
+
parsed_review_count: number;
|
|
331
|
+
};
|
|
332
|
+
prompt_name: "reverse.module_reconstruction_review";
|
|
333
|
+
prompt_arguments: {
|
|
334
|
+
prepared_bundle_json: string;
|
|
335
|
+
analysis_goal: string;
|
|
336
|
+
};
|
|
337
|
+
task_prompt: string;
|
|
338
|
+
review_status: "sampled_and_applied" | "sampled_only" | "prompt_contract_only" | "no_targets" | "sampling_parse_failed";
|
|
339
|
+
prepare: {
|
|
340
|
+
prepared_count: number;
|
|
341
|
+
artifact_id: string | null;
|
|
342
|
+
};
|
|
343
|
+
apply: {
|
|
344
|
+
attempted: boolean;
|
|
345
|
+
accepted_count: number;
|
|
346
|
+
rejected_count: number;
|
|
347
|
+
artifact_id: string | null;
|
|
348
|
+
};
|
|
349
|
+
confidence_policy: {
|
|
350
|
+
calibrated: boolean;
|
|
351
|
+
meaning: string;
|
|
352
|
+
review_scores_are_heuristic: boolean;
|
|
353
|
+
};
|
|
354
|
+
}>>;
|
|
355
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
356
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
357
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
358
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
359
|
+
elapsed_ms: z.ZodNumber;
|
|
360
|
+
tool: z.ZodString;
|
|
361
|
+
}, "strip", z.ZodTypeAny, {
|
|
362
|
+
elapsed_ms: number;
|
|
363
|
+
tool: string;
|
|
364
|
+
}, {
|
|
365
|
+
elapsed_ms: number;
|
|
366
|
+
tool: string;
|
|
367
|
+
}>>;
|
|
368
|
+
}, "strip", z.ZodTypeAny, {
|
|
369
|
+
ok: boolean;
|
|
370
|
+
data?: {
|
|
371
|
+
sample_id: string;
|
|
372
|
+
client: {
|
|
373
|
+
name: string | null;
|
|
374
|
+
version: string | null;
|
|
375
|
+
sampling_available: boolean;
|
|
376
|
+
};
|
|
377
|
+
next_steps: string[];
|
|
378
|
+
sampling: {
|
|
379
|
+
attempted: boolean;
|
|
380
|
+
model: string | null;
|
|
381
|
+
stop_reason: string | null;
|
|
382
|
+
response_text: string | null;
|
|
383
|
+
parsed_review_count: number;
|
|
384
|
+
};
|
|
385
|
+
prompt_name: "reverse.module_reconstruction_review";
|
|
386
|
+
prompt_arguments: {
|
|
387
|
+
prepared_bundle_json: string;
|
|
388
|
+
analysis_goal: string;
|
|
389
|
+
};
|
|
390
|
+
task_prompt: string;
|
|
391
|
+
review_status: "sampled_and_applied" | "sampled_only" | "prompt_contract_only" | "no_targets" | "sampling_parse_failed";
|
|
392
|
+
prepare: {
|
|
393
|
+
prepared_count: number;
|
|
394
|
+
artifact_id: string | null;
|
|
395
|
+
};
|
|
396
|
+
apply: {
|
|
397
|
+
attempted: boolean;
|
|
398
|
+
accepted_count: number;
|
|
399
|
+
rejected_count: number;
|
|
400
|
+
artifact_id: string | null;
|
|
401
|
+
};
|
|
402
|
+
confidence_policy: {
|
|
403
|
+
calibrated: boolean;
|
|
404
|
+
meaning: string;
|
|
405
|
+
review_scores_are_heuristic: boolean;
|
|
406
|
+
};
|
|
407
|
+
} | undefined;
|
|
408
|
+
metrics?: {
|
|
409
|
+
elapsed_ms: number;
|
|
410
|
+
tool: string;
|
|
411
|
+
} | undefined;
|
|
412
|
+
warnings?: string[] | undefined;
|
|
413
|
+
errors?: string[] | undefined;
|
|
414
|
+
artifacts?: any[] | undefined;
|
|
415
|
+
}, {
|
|
416
|
+
ok: boolean;
|
|
417
|
+
data?: {
|
|
418
|
+
sample_id: string;
|
|
419
|
+
client: {
|
|
420
|
+
name: string | null;
|
|
421
|
+
version: string | null;
|
|
422
|
+
sampling_available: boolean;
|
|
423
|
+
};
|
|
424
|
+
next_steps: string[];
|
|
425
|
+
sampling: {
|
|
426
|
+
attempted: boolean;
|
|
427
|
+
model: string | null;
|
|
428
|
+
stop_reason: string | null;
|
|
429
|
+
response_text: string | null;
|
|
430
|
+
parsed_review_count: number;
|
|
431
|
+
};
|
|
432
|
+
prompt_name: "reverse.module_reconstruction_review";
|
|
433
|
+
prompt_arguments: {
|
|
434
|
+
prepared_bundle_json: string;
|
|
435
|
+
analysis_goal: string;
|
|
436
|
+
};
|
|
437
|
+
task_prompt: string;
|
|
438
|
+
review_status: "sampled_and_applied" | "sampled_only" | "prompt_contract_only" | "no_targets" | "sampling_parse_failed";
|
|
439
|
+
prepare: {
|
|
440
|
+
prepared_count: number;
|
|
441
|
+
artifact_id: string | null;
|
|
442
|
+
};
|
|
443
|
+
apply: {
|
|
444
|
+
attempted: boolean;
|
|
445
|
+
accepted_count: number;
|
|
446
|
+
rejected_count: number;
|
|
447
|
+
artifact_id: string | null;
|
|
448
|
+
};
|
|
449
|
+
confidence_policy: {
|
|
450
|
+
calibrated: boolean;
|
|
451
|
+
meaning: string;
|
|
452
|
+
review_scores_are_heuristic: boolean;
|
|
453
|
+
};
|
|
454
|
+
} | undefined;
|
|
455
|
+
metrics?: {
|
|
456
|
+
elapsed_ms: number;
|
|
457
|
+
tool: string;
|
|
458
|
+
} | undefined;
|
|
459
|
+
warnings?: string[] | undefined;
|
|
460
|
+
errors?: string[] | undefined;
|
|
461
|
+
artifacts?: any[] | undefined;
|
|
462
|
+
}>;
|
|
463
|
+
export declare const codeModuleReviewToolDefinition: ToolDefinition;
|
|
464
|
+
type SamplingResult = CreateMessageResult | CreateMessageResultWithTools;
|
|
465
|
+
interface CodeModuleReviewDependencies {
|
|
466
|
+
prepareHandler?: (args: ToolArgs) => Promise<WorkerResult>;
|
|
467
|
+
applyHandler?: (args: ToolArgs) => Promise<WorkerResult>;
|
|
468
|
+
samplingRequester?: (params: CreateMessageRequest['params']) => Promise<SamplingResult>;
|
|
469
|
+
clientCapabilitiesProvider?: () => ClientCapabilities | undefined;
|
|
470
|
+
clientVersionProvider?: () => Implementation | undefined;
|
|
471
|
+
}
|
|
472
|
+
export declare function createCodeModuleReviewHandler(workspaceManager: WorkspaceManager, database: DatabaseManager, cacheManager: CacheManager, mcpServer?: MCPServer, dependencies?: CodeModuleReviewDependencies): (args: ToolArgs) => Promise<WorkerResult>;
|
|
473
|
+
export {};
|
|
474
|
+
//# sourceMappingURL=code-module-review.d.ts.map
|