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,212 @@
1
+ /**
2
+ * ghidra.health MCP Tool
3
+ *
4
+ * Performs both environment validation and an optional downstream live probe
5
+ * against a real analyzed sample/project to verify end-to-end usability.
6
+ */
7
+ import { z } from 'zod';
8
+ import { checkGhidraHealth, } from '../ghidra-config.js';
9
+ import { findBestGhidraAnalysis, getGhidraReadiness, parseGhidraAnalysisMetadata, } from '../ghidra-analysis-status.js';
10
+ import { DecompilerWorker } from '../decompiler-worker.js';
11
+ export const ghidraHealthInputSchema = z.object({
12
+ timeout_ms: z
13
+ .number()
14
+ .int()
15
+ .min(1000)
16
+ .max(60000)
17
+ .optional()
18
+ .default(8000)
19
+ .describe('Timeout for launch probe and downstream live probes in milliseconds'),
20
+ sample_id: z
21
+ .string()
22
+ .optional()
23
+ .describe('Optional sample ID to use for the end-to-end downstream probe'),
24
+ include_end_to_end: z
25
+ .boolean()
26
+ .optional()
27
+ .default(true)
28
+ .describe('Attempt decompile/CFG live probes against a reusable analyzed sample'),
29
+ stale_running_ms: z
30
+ .number()
31
+ .int()
32
+ .min(1000)
33
+ .nullable()
34
+ .optional()
35
+ .describe('Optional stale-analysis reap threshold in milliseconds. Omit or null to disable auto-reaping.'),
36
+ });
37
+ export const ghidraHealthToolDefinition = {
38
+ name: 'ghidra.health',
39
+ description: 'Run a Ghidra environment health check plus optional end-to-end downstream probes using a real analyzed sample/project.',
40
+ inputSchema: ghidraHealthInputSchema,
41
+ };
42
+ function jsonResult(payload, isError) {
43
+ return {
44
+ content: [
45
+ {
46
+ type: 'text',
47
+ text: JSON.stringify(payload, null, 2),
48
+ },
49
+ ],
50
+ isError,
51
+ };
52
+ }
53
+ function normalizeProbeError(error) {
54
+ return error instanceof Error ? error.message : String(error);
55
+ }
56
+ function selectProbeAnalysis(database, sampleId) {
57
+ if (!database) {
58
+ return null;
59
+ }
60
+ if (sampleId) {
61
+ const selected = findBestGhidraAnalysis(database.findAnalysesBySample(sampleId), 'function_index');
62
+ return selected ? { sampleId, analysis: selected } : null;
63
+ }
64
+ for (const sample of database.findRecentSamples(50)) {
65
+ const selected = findBestGhidraAnalysis(database.findAnalysesBySample(sample.id), 'function_index');
66
+ if (selected) {
67
+ return { sampleId: sample.id, analysis: selected };
68
+ }
69
+ }
70
+ return null;
71
+ }
72
+ function selectProbeTarget(database, sampleId, analysis) {
73
+ const readiness = getGhidraReadiness(analysis);
74
+ const metadata = parseGhidraAnalysisMetadata(analysis.output_json);
75
+ return (readiness.decompile.target ||
76
+ readiness.cfg.target ||
77
+ metadata.end_to_end_probe?.target ||
78
+ database.findFunctions(sampleId).find((func) => typeof func.address === 'string' && func.address.length > 0)
79
+ ?.address);
80
+ }
81
+ export function createGhidraHealthHandler(workspaceManager, database, dependencies) {
82
+ const runHealthCheck = dependencies?.checkGhidra || checkGhidraHealth;
83
+ const decompilerWorker = dependencies?.decompilerWorker ||
84
+ (workspaceManager && database ? new DecompilerWorker(database, workspaceManager) : undefined);
85
+ return async (args) => {
86
+ try {
87
+ const input = ghidraHealthInputSchema.parse(args);
88
+ const result = runHealthCheck(input.timeout_ms);
89
+ const warnings = [...result.warnings];
90
+ const errors = [...result.errors];
91
+ let reapedAnalyses = [];
92
+ if (database && typeof input.stale_running_ms === 'number') {
93
+ reapedAnalyses = database
94
+ .reapStaleAnalyses(input.stale_running_ms, input.sample_id)
95
+ .map((analysis) => analysis.id);
96
+ if (reapedAnalyses.length > 0) {
97
+ warnings.push(`Reaped ${reapedAnalyses.length} stale persisted running analysis record(s) before probing downstream capabilities.`);
98
+ }
99
+ }
100
+ const probeSelection = selectProbeAnalysis(database, input.sample_id);
101
+ let downstream;
102
+ let downstreamOk = true;
103
+ if (input.include_end_to_end) {
104
+ if (!database || !workspaceManager || !decompilerWorker) {
105
+ warnings.push('End-to-end probe skipped because workspace/database dependencies are unavailable in this handler.');
106
+ downstream = {
107
+ attempted: false,
108
+ available: false,
109
+ reason: 'missing_handler_dependencies',
110
+ };
111
+ }
112
+ else if (input.sample_id && !probeSelection) {
113
+ downstream = {
114
+ attempted: false,
115
+ available: false,
116
+ sample_id: input.sample_id,
117
+ reason: 'no_reusable_ghidra_analysis_for_sample',
118
+ };
119
+ warnings.push(`No reusable Ghidra analysis with function-index readiness was found for sample ${input.sample_id}.`);
120
+ }
121
+ else if (!probeSelection) {
122
+ downstream = {
123
+ attempted: false,
124
+ available: false,
125
+ reason: 'no_recent_analyzed_sample_available',
126
+ };
127
+ warnings.push('No recent analyzed sample was available for an end-to-end downstream probe. Environment-only status may overstate readiness.');
128
+ }
129
+ else {
130
+ const readiness = getGhidraReadiness(probeSelection.analysis);
131
+ const metadata = parseGhidraAnalysisMetadata(probeSelection.analysis.output_json);
132
+ const target = selectProbeTarget(database, probeSelection.sampleId, probeSelection.analysis);
133
+ downstream = {
134
+ attempted: true,
135
+ available: true,
136
+ sample_id: probeSelection.sampleId,
137
+ analysis_id: probeSelection.analysis.id,
138
+ analysis_status: probeSelection.analysis.status,
139
+ probe_target: target || null,
140
+ persisted_capabilities: readiness,
141
+ persisted_probe: metadata.end_to_end_probe || null,
142
+ };
143
+ if (!target) {
144
+ downstreamOk = false;
145
+ warnings.push(`No probe target function could be selected for sample ${probeSelection.sampleId}; downstream verification is incomplete.`);
146
+ downstream.live_probe = {
147
+ decompile: { ok: false, error: 'No probe target function available' },
148
+ cfg: { ok: false, error: 'No probe target function available' },
149
+ };
150
+ }
151
+ else {
152
+ const liveProbe = {
153
+ decompile: { ok: false, error: undefined },
154
+ cfg: { ok: false, error: undefined },
155
+ };
156
+ try {
157
+ const decompiled = await decompilerWorker.decompileFunction(probeSelection.sampleId, target, false, input.timeout_ms);
158
+ liveProbe.decompile = {
159
+ ok: true,
160
+ pseudocode_length: decompiled.pseudocode.length,
161
+ callers: decompiled.callers.length,
162
+ callees: decompiled.callees.length,
163
+ };
164
+ }
165
+ catch (error) {
166
+ downstreamOk = false;
167
+ liveProbe.decompile = {
168
+ ok: false,
169
+ error: normalizeProbeError(error),
170
+ };
171
+ }
172
+ try {
173
+ const cfg = await decompilerWorker.getFunctionCFG(probeSelection.sampleId, target, input.timeout_ms);
174
+ liveProbe.cfg = {
175
+ ok: true,
176
+ node_count: cfg.nodes.length,
177
+ edge_count: cfg.edges.length,
178
+ };
179
+ }
180
+ catch (error) {
181
+ downstreamOk = false;
182
+ liveProbe.cfg = {
183
+ ok: false,
184
+ error: normalizeProbeError(error),
185
+ };
186
+ }
187
+ downstream.live_probe = liveProbe;
188
+ }
189
+ }
190
+ }
191
+ const ok = result.ok && (!input.include_end_to_end || downstreamOk);
192
+ return jsonResult({
193
+ ok,
194
+ data: {
195
+ environment: result,
196
+ downstream,
197
+ reaped_persisted_analysis_ids: reapedAnalyses,
198
+ reaped_persisted_analysis_count: reapedAnalyses.length,
199
+ },
200
+ errors: errors.length > 0 ? errors : undefined,
201
+ warnings: warnings.length > 0 ? warnings : undefined,
202
+ }, !ok);
203
+ }
204
+ catch (error) {
205
+ return jsonResult({
206
+ ok: false,
207
+ errors: [normalizeProbeError(error)],
208
+ }, true);
209
+ }
210
+ };
211
+ }
212
+ //# sourceMappingURL=ghidra-health.js.map
@@ -0,0 +1,209 @@
1
+ /**
2
+ * ioc.export tool
3
+ * Export layered IOC data and optional ATT&CK mapping in JSON / CSV / STIX 2.1.
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 IOCExportInputSchema: z.ZodObject<{
11
+ sample_id: z.ZodString;
12
+ format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["json", "csv", "stix2"]>>>;
13
+ include_attack_map: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
14
+ include_low_confidence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
15
+ max_iocs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
16
+ persist_artifact: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
17
+ force_refresh: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ sample_id: string;
20
+ force_refresh: boolean;
21
+ persist_artifact: boolean;
22
+ format: "json" | "csv" | "stix2";
23
+ include_low_confidence: boolean;
24
+ include_attack_map: boolean;
25
+ max_iocs: number;
26
+ }, {
27
+ sample_id: string;
28
+ force_refresh?: boolean | undefined;
29
+ persist_artifact?: boolean | undefined;
30
+ format?: "json" | "csv" | "stix2" | undefined;
31
+ include_low_confidence?: boolean | undefined;
32
+ include_attack_map?: boolean | undefined;
33
+ max_iocs?: number | undefined;
34
+ }>;
35
+ export type IOCExportInput = z.infer<typeof IOCExportInputSchema>;
36
+ export declare const IOCExportOutputSchema: z.ZodObject<{
37
+ ok: z.ZodBoolean;
38
+ data: z.ZodOptional<z.ZodObject<{
39
+ sample_id: z.ZodString;
40
+ format: z.ZodEnum<["json", "csv", "stix2"]>;
41
+ tool_version: z.ZodString;
42
+ ioc_count: z.ZodNumber;
43
+ iocs: z.ZodArray<z.ZodObject<{
44
+ type: z.ZodString;
45
+ value: z.ZodString;
46
+ confidence: z.ZodEnum<["high", "medium", "low"]>;
47
+ source: z.ZodString;
48
+ tags: z.ZodArray<z.ZodString, "many">;
49
+ }, "strip", z.ZodTypeAny, {
50
+ value: string;
51
+ type: string;
52
+ tags: string[];
53
+ source: string;
54
+ confidence: "high" | "low" | "medium";
55
+ }, {
56
+ value: string;
57
+ type: string;
58
+ tags: string[];
59
+ source: string;
60
+ confidence: "high" | "low" | "medium";
61
+ }>, "many">;
62
+ content: z.ZodString;
63
+ mime_type: z.ZodString;
64
+ attack_technique_count: z.ZodNumber;
65
+ artifact: z.ZodOptional<z.ZodObject<{
66
+ id: z.ZodString;
67
+ path: z.ZodString;
68
+ type: z.ZodString;
69
+ sha256: z.ZodString;
70
+ mime: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ path: string;
73
+ type: string;
74
+ id: string;
75
+ sha256: string;
76
+ mime: string;
77
+ }, {
78
+ path: string;
79
+ type: string;
80
+ id: string;
81
+ sha256: string;
82
+ mime: string;
83
+ }>>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ sample_id: string;
86
+ tool_version: string;
87
+ iocs: {
88
+ value: string;
89
+ type: string;
90
+ tags: string[];
91
+ source: string;
92
+ confidence: "high" | "low" | "medium";
93
+ }[];
94
+ content: string;
95
+ format: "json" | "csv" | "stix2";
96
+ ioc_count: number;
97
+ mime_type: string;
98
+ attack_technique_count: number;
99
+ artifact?: {
100
+ path: string;
101
+ type: string;
102
+ id: string;
103
+ sha256: string;
104
+ mime: string;
105
+ } | undefined;
106
+ }, {
107
+ sample_id: string;
108
+ tool_version: string;
109
+ iocs: {
110
+ value: string;
111
+ type: string;
112
+ tags: string[];
113
+ source: string;
114
+ confidence: "high" | "low" | "medium";
115
+ }[];
116
+ content: string;
117
+ format: "json" | "csv" | "stix2";
118
+ ioc_count: number;
119
+ mime_type: string;
120
+ attack_technique_count: number;
121
+ artifact?: {
122
+ path: string;
123
+ type: string;
124
+ id: string;
125
+ sha256: string;
126
+ mime: string;
127
+ } | undefined;
128
+ }>>;
129
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
130
+ errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
131
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
132
+ metrics: z.ZodOptional<z.ZodObject<{
133
+ elapsed_ms: z.ZodNumber;
134
+ tool: z.ZodString;
135
+ }, "strip", z.ZodTypeAny, {
136
+ elapsed_ms: number;
137
+ tool: string;
138
+ }, {
139
+ elapsed_ms: number;
140
+ tool: string;
141
+ }>>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ ok: boolean;
144
+ metrics?: {
145
+ elapsed_ms: number;
146
+ tool: string;
147
+ } | undefined;
148
+ data?: {
149
+ sample_id: string;
150
+ tool_version: string;
151
+ iocs: {
152
+ value: string;
153
+ type: string;
154
+ tags: string[];
155
+ source: string;
156
+ confidence: "high" | "low" | "medium";
157
+ }[];
158
+ content: string;
159
+ format: "json" | "csv" | "stix2";
160
+ ioc_count: number;
161
+ mime_type: string;
162
+ attack_technique_count: number;
163
+ artifact?: {
164
+ path: string;
165
+ type: string;
166
+ id: string;
167
+ sha256: string;
168
+ mime: string;
169
+ } | undefined;
170
+ } | undefined;
171
+ warnings?: string[] | undefined;
172
+ errors?: string[] | undefined;
173
+ artifacts?: any[] | undefined;
174
+ }, {
175
+ ok: boolean;
176
+ metrics?: {
177
+ elapsed_ms: number;
178
+ tool: string;
179
+ } | undefined;
180
+ data?: {
181
+ sample_id: string;
182
+ tool_version: string;
183
+ iocs: {
184
+ value: string;
185
+ type: string;
186
+ tags: string[];
187
+ source: string;
188
+ confidence: "high" | "low" | "medium";
189
+ }[];
190
+ content: string;
191
+ format: "json" | "csv" | "stix2";
192
+ ioc_count: number;
193
+ mime_type: string;
194
+ attack_technique_count: number;
195
+ artifact?: {
196
+ path: string;
197
+ type: string;
198
+ id: string;
199
+ sha256: string;
200
+ mime: string;
201
+ } | undefined;
202
+ } | undefined;
203
+ warnings?: string[] | undefined;
204
+ errors?: string[] | undefined;
205
+ artifacts?: any[] | undefined;
206
+ }>;
207
+ export declare const iocExportToolDefinition: ToolDefinition;
208
+ export declare function createIOCExportHandler(workspaceManager: WorkspaceManager, database: DatabaseManager, cacheManager: CacheManager): (args: ToolArgs) => Promise<WorkerResult>;
209
+ //# sourceMappingURL=ioc-export.d.ts.map