exoproc 0.1.0 → 0.6.2

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 (64) hide show
  1. package/LICENSE +21 -235
  2. package/README.md +68 -63
  3. package/dist/capstone.dll +0 -0
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +74138 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/compile.d.ts +8 -0
  9. package/dist/commands/compile.d.ts.map +1 -0
  10. package/dist/commands/compile.js +33 -0
  11. package/dist/commands/compile.js.map +1 -0
  12. package/dist/commands/exec.d.ts +7 -0
  13. package/dist/commands/exec.d.ts.map +1 -0
  14. package/dist/commands/exec.js +39 -0
  15. package/dist/commands/exec.js.map +1 -0
  16. package/dist/commands/ps.d.ts +4 -0
  17. package/dist/commands/ps.d.ts.map +1 -0
  18. package/dist/commands/ps.js +16 -0
  19. package/dist/commands/ps.js.map +1 -0
  20. package/dist/commands/run.d.ts +2 -0
  21. package/dist/commands/run.d.ts.map +1 -0
  22. package/dist/commands/run.js +23 -0
  23. package/dist/commands/run.js.map +1 -0
  24. package/dist/commands/screenshot.d.ts +8 -0
  25. package/dist/commands/screenshot.d.ts.map +1 -0
  26. package/dist/commands/screenshot.js +17 -0
  27. package/dist/commands/screenshot.js.map +1 -0
  28. package/dist/commands/windows.d.ts +4 -0
  29. package/dist/commands/windows.d.ts.map +1 -0
  30. package/dist/commands/windows.js +20 -0
  31. package/dist/commands/windows.js.map +1 -0
  32. package/dist/deps/capstone.dll +0 -0
  33. package/dist/deps/ecj-3.26.0.jar +0 -0
  34. package/dist/deps/ecj-3.46.100.jar +0 -0
  35. package/dist/deps/tiny-remapper-0.14.1-fat.jar +0 -0
  36. package/dist/doctor/index.d.ts +14 -0
  37. package/dist/doctor/index.d.ts.map +1 -0
  38. package/dist/doctor/index.js +37 -0
  39. package/dist/doctor/index.js.map +1 -0
  40. package/dist/index.d.ts +18 -8
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +106509 -10
  43. package/dist/index.js.map +1 -1
  44. package/dist/setup/clients.d.ts +3 -0
  45. package/dist/setup/clients.d.ts.map +1 -0
  46. package/dist/setup/clients.js +136 -0
  47. package/dist/setup/clients.js.map +1 -0
  48. package/dist/setup/config-writer.d.ts +10 -0
  49. package/dist/setup/config-writer.d.ts.map +1 -0
  50. package/dist/setup/config-writer.js +104 -0
  51. package/dist/setup/config-writer.js.map +1 -0
  52. package/dist/setup/index.d.ts +12 -0
  53. package/dist/setup/index.d.ts.map +1 -0
  54. package/dist/setup/index.js +445 -0
  55. package/dist/setup/index.js.map +1 -0
  56. package/dist/setup/skill-installer.d.ts +4 -0
  57. package/dist/setup/skill-installer.d.ts.map +1 -0
  58. package/dist/setup/skill-installer.js +115 -0
  59. package/dist/setup/skill-installer.js.map +1 -0
  60. package/dist/setup/types.d.ts +41 -0
  61. package/dist/setup/types.d.ts.map +1 -0
  62. package/dist/setup/types.js +2 -0
  63. package/dist/setup/types.js.map +1 -0
  64. package/package.json +38 -25
@@ -0,0 +1,445 @@
1
+ // @bun
2
+ // packages/exoproc/src/setup/index.ts
3
+ import { homedir } from "os";
4
+ import { join as join3 } from "path";
5
+
6
+ // packages/exoproc/src/setup/clients.ts
7
+ import { existsSync } from "fs";
8
+ import { dirname, join } from "path";
9
+ var SUPPORTED_CLIENTS = [
10
+ {
11
+ id: "claude_code",
12
+ displayName: "Claude Code",
13
+ format: "json",
14
+ getConfigPaths: (ctx) => [join(ctx.home, ".claude.json")],
15
+ getSkillPaths: (ctx) => [
16
+ join(ctx.home, ".claude", "skills", "exoproc", "SKILL.md"),
17
+ join(ctx.home, ".claude", "commands", "exoproc.md")
18
+ ],
19
+ detect: (ctx) => existsSync(join(ctx.home, ".claude")) || existsSync(join(ctx.home, ".claude.json"))
20
+ },
21
+ {
22
+ id: "cursor",
23
+ displayName: "Cursor",
24
+ format: "json",
25
+ getConfigPaths: (ctx) => {
26
+ const paths = [join(ctx.home, ".cursor", "mcp.json")];
27
+ const localCursor = join(ctx.cwd, ".cursor");
28
+ if (existsSync(localCursor)) {
29
+ paths.push(join(localCursor, "mcp.json"));
30
+ }
31
+ return paths;
32
+ },
33
+ getSkillPaths: (ctx) => [
34
+ join(ctx.home, ".cursor", "rules", "exoproc.mdc")
35
+ ],
36
+ detect: (ctx) => existsSync(join(ctx.home, ".cursor")) || existsSync(join(ctx.cwd, ".cursor"))
37
+ },
38
+ {
39
+ id: "windsurf",
40
+ displayName: "Windsurf",
41
+ format: "json",
42
+ getConfigPaths: (ctx) => [
43
+ join(ctx.home, ".codeium", "windsurf", "mcp_config.json")
44
+ ],
45
+ detect: (ctx) => existsSync(join(ctx.home, ".codeium", "windsurf"))
46
+ },
47
+ {
48
+ id: "claude_desktop",
49
+ displayName: "Claude Desktop",
50
+ format: "json",
51
+ getConfigPaths: (ctx) => {
52
+ if (ctx.platform === "win32") {
53
+ const appData = ctx.env.APPDATA || join(ctx.home, "AppData", "Roaming");
54
+ return [join(appData, "Claude", "claude_desktop_config.json")];
55
+ }
56
+ if (ctx.platform === "darwin") {
57
+ return [
58
+ join(ctx.home, "Library", "Application Support", "Claude", "claude_desktop_config.json")
59
+ ];
60
+ }
61
+ return [
62
+ join(ctx.home, ".config", "Claude", "claude_desktop_config.json")
63
+ ];
64
+ },
65
+ detect: (ctx) => {
66
+ const paths = SUPPORTED_CLIENTS.find((c) => c.id === "claude_desktop").getConfigPaths(ctx);
67
+ return paths.some((p) => existsSync(dirname(p)) || existsSync(p));
68
+ }
69
+ },
70
+ {
71
+ id: "gemini_cli",
72
+ displayName: "Gemini CLI / Antigravity",
73
+ format: "json",
74
+ getConfigPaths: (ctx) => {
75
+ const paths = [
76
+ join(ctx.home, ".gemini", "antigravity", "mcp_config.json"),
77
+ join(ctx.home, ".gemini", "settings.json")
78
+ ];
79
+ if (existsSync(join(ctx.cwd, ".gemini"))) {
80
+ paths.push(join(ctx.cwd, ".gemini", "mcp_config.json"));
81
+ }
82
+ return paths;
83
+ },
84
+ getSkillPaths: (ctx) => [
85
+ join(ctx.home, ".gemini", "antigravity", "skills", "exoproc", "SKILL.md"),
86
+ join(ctx.home, ".agents", "skills", "exoproc", "SKILL.md")
87
+ ],
88
+ detect: (ctx) => existsSync(join(ctx.home, ".gemini")) || existsSync(join(ctx.home, ".agents"))
89
+ },
90
+ {
91
+ id: "cline",
92
+ displayName: "VS Code Cline / Roo Code",
93
+ format: "json",
94
+ getConfigPaths: (ctx) => {
95
+ const paths = [];
96
+ const codeDir = ctx.platform === "win32" ? join(ctx.env.APPDATA || join(ctx.home, "AppData", "Roaming"), "Code", "User", "globalStorage") : ctx.platform === "darwin" ? join(ctx.home, "Library", "Application Support", "Code", "User", "globalStorage") : join(ctx.home, ".config", "Code", "User", "globalStorage");
97
+ paths.push(join(codeDir, "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), join(codeDir, "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"));
98
+ if (existsSync(join(ctx.cwd, ".vscode"))) {
99
+ paths.push(join(ctx.cwd, ".vscode", "mcp.json"));
100
+ }
101
+ return paths;
102
+ },
103
+ detect: (ctx) => {
104
+ const paths = SUPPORTED_CLIENTS.find((c) => c.id === "cline").getConfigPaths(ctx);
105
+ return paths.some((p) => existsSync(dirname(p)) || existsSync(p));
106
+ }
107
+ },
108
+ {
109
+ id: "opencode",
110
+ displayName: "OpenCode",
111
+ format: "json",
112
+ getConfigPaths: (ctx) => [
113
+ join(ctx.home, ".config", "opencode", "opencode.json"),
114
+ join(ctx.home, ".config", "opencode", "mcp.json")
115
+ ],
116
+ detect: (ctx) => existsSync(join(ctx.home, ".config", "opencode"))
117
+ },
118
+ {
119
+ id: "zed",
120
+ displayName: "Zed",
121
+ format: "zed",
122
+ getConfigPaths: (ctx) => {
123
+ if (ctx.platform === "win32") {
124
+ const appData = ctx.env.APPDATA || join(ctx.home, "AppData", "Roaming");
125
+ return [join(appData, "Zed", "settings.json")];
126
+ }
127
+ return [join(ctx.home, ".config", "zed", "settings.json")];
128
+ },
129
+ detect: (ctx) => {
130
+ const paths = SUPPORTED_CLIENTS.find((c) => c.id === "zed").getConfigPaths(ctx);
131
+ return paths.some((p) => existsSync(dirname(p)) || existsSync(p));
132
+ }
133
+ }
134
+ ];
135
+
136
+ // packages/exoproc/src/setup/config-writer.ts
137
+ import {
138
+ copyFileSync,
139
+ existsSync as existsSync2,
140
+ mkdirSync,
141
+ readFileSync,
142
+ writeFileSync
143
+ } from "fs";
144
+ import { dirname as dirname2 } from "path";
145
+ function parseJsonc(content) {
146
+ const cleaned = content.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^\\:])\/\/.*$/gm, "$1").replace(/,\s*([}\]])/g, "$1");
147
+ return JSON.parse(cleaned);
148
+ }
149
+ function isClientConfigured(client, configPath, command) {
150
+ if (!existsSync2(configPath))
151
+ return false;
152
+ try {
153
+ const raw = readFileSync(configPath, "utf8");
154
+ const doc = parseJsonc(raw);
155
+ if (client.format === "zed") {
156
+ const entry = doc?.context_servers?.exoproc;
157
+ if (!entry)
158
+ return false;
159
+ const cmdPath = entry?.command?.path;
160
+ const cmdArgs = entry?.command?.args;
161
+ return cmdPath === command[0] && Array.isArray(cmdArgs) && cmdArgs.join(" ") === command.slice(1).join(" ");
162
+ } else {
163
+ const entry = doc?.mcpServers?.exoproc;
164
+ if (!entry)
165
+ return false;
166
+ return entry.command === command[0] && Array.isArray(entry.args) && entry.args.join(" ") === command.slice(1).join(" ");
167
+ }
168
+ } catch {
169
+ return false;
170
+ }
171
+ }
172
+ function updateClientConfig(client, configPath, command, dryRun = false) {
173
+ try {
174
+ let doc = {};
175
+ if (existsSync2(configPath)) {
176
+ const content = readFileSync(configPath, "utf8");
177
+ try {
178
+ doc = parseJsonc(content);
179
+ } catch (err) {
180
+ return {
181
+ path: configPath,
182
+ status: "failed",
183
+ error: `Existing config at ${configPath} is not valid JSON/JSONC: ${err.message}`
184
+ };
185
+ }
186
+ }
187
+ if (isClientConfigured(client, configPath, command)) {
188
+ return { path: configPath, status: "already_current" };
189
+ }
190
+ if (dryRun) {
191
+ return { path: configPath, status: "configured" };
192
+ }
193
+ const dir = dirname2(configPath);
194
+ if (!existsSync2(dir)) {
195
+ mkdirSync(dir, { recursive: true });
196
+ }
197
+ let backupPath;
198
+ if (existsSync2(configPath)) {
199
+ backupPath = `${configPath}.exoproc.bak`;
200
+ copyFileSync(configPath, backupPath);
201
+ }
202
+ if (client.format === "zed") {
203
+ doc.context_servers = doc.context_servers || {};
204
+ doc.context_servers.exoproc = {
205
+ command: {
206
+ path: command[0],
207
+ args: command.slice(1)
208
+ }
209
+ };
210
+ } else {
211
+ doc.mcpServers = doc.mcpServers || {};
212
+ doc.mcpServers.exoproc = {
213
+ command: command[0],
214
+ args: command.slice(1)
215
+ };
216
+ }
217
+ writeFileSync(configPath, JSON.stringify(doc, null, 2) + `
218
+ `, "utf8");
219
+ return {
220
+ path: configPath,
221
+ status: "configured",
222
+ backupPath
223
+ };
224
+ } catch (err) {
225
+ return {
226
+ path: configPath,
227
+ status: "failed",
228
+ error: err?.message || String(err)
229
+ };
230
+ }
231
+ }
232
+
233
+ // packages/exoproc/src/setup/skill-installer.ts
234
+ import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
235
+ import { dirname as dirname3, join as join2 } from "path";
236
+ var DEFAULT_SKILL_CONTENT = `---
237
+ name: exoproc
238
+ description: >-
239
+ Native Windows x64 reverse engineering, thread hijacking (nthread), function redirection (minhook 5-byte detour), memory inspection, live Win32 code execution, remote desktop inspection, and JVM analysis via the Exoproc MCP Server.
240
+ ---
241
+
242
+ # Exoproc MCP Server Guide
243
+
244
+ Exoproc is a dedicated **Model Context Protocol (MCP)** server for native Windows x64 reverse engineering, thread hijacking (\`nthread\`), function redirection (\`minhook\`), live process instrumentation, and remote desktop inspection.
245
+
246
+ > **Important Rule for AI Agents:** When asked to automate, inspect, or instrument a live process (e.g., typing into Notepad, reading/writing memory, calling Win32 APIs, or hooking functions), **use the Exoproc MCP tools directly**. Do **not** search the workspace repository source code unless explicitly asked to modify Exoproc itself.
247
+
248
+ ---
249
+
250
+ ## 1. Single Active Accessor Session Lifecycle (Mandatory Workflow)
251
+
252
+ The MCP server maintains **at most ONE active accessor session** at any time.
253
+
254
+ ### The Required 3-Step Lifecycle:
255
+ \`\`\`
256
+ 1. list_processes / list_windows --> Find target PID
257
+ 2. open_accessor({ pid }) --> Opens the single active session (returns sessionId)
258
+ 3. execute_code / read_memory / ...--> Operates on the active session
259
+ 4. close_accessor({}) --> Restores target thread execution and closes session
260
+ \`\`\`
261
+
262
+ - **\`open_accessor({ pid: number })\` is mandatory:** \`execute_code\` and memory tools will NOT automatically open an accessor for you. You must explicitly open the session first.
263
+ - **Single active session:** Only 1 process can be attached at a time. If you attempt to call \`open_accessor\` while a session is already active, it will return an error instructing you to call \`close_accessor\` first.
264
+ - **Convenience in subsequent calls:** Once \`open_accessor\` is called, tools like \`execute_code({ code: ... })\`, \`read_memory(...)\`, \`write_memory(...)\`, etc. automatically operate on the currently active session \u2014 you do not even need to pass \`session\` on every call.
265
+ - **Clean exit:** Always call \`close_accessor({})\` when you are done with your task.
266
+
267
+ ---
268
+
269
+ ## 2. C-Style Win32 Code Execution (\`execute_code\` & \`execute_local_code\`)
270
+
271
+ Inside \`execute_code\`, write real Win32 C code as if \`<windows.h>\` were already included at the top:
272
+
273
+ ### Pre-Included Globally in Scope:
274
+ 1. **All Win32 \`#define\` Constants:**
275
+ - Window messages: \`WM_SETTEXT\`, \`WM_GETTEXT\`, \`WM_CHAR\`, \`WM_KEYDOWN\`, \`WM_KEYUP\`, \`WM_COMMAND\`, \`WM_CLOSE\`, etc.
276
+ - Edit & Button messages: \`EM_SETSEL\`, \`EM_REPLACESEL\`, \`EM_GETSEL\`, \`BM_CLICK\`, etc.
277
+ - Virtual keys: \`VK_RETURN\`, \`VK_ESCAPE\`, \`VK_SPACE\`, \`VK_BACK\`, \`VK_TAB\`, etc.
278
+ 2. **All Win32 Structs:**
279
+ - \`RECT\`, \`POINT\`, \`SIZE\`, \`MSG\`, \`WNDCLASSEXW\`, \`MEMORY_BASIC_INFORMATION\`, etc.
280
+ 3. **C-Style Types & Buffer Out-Parameters:**
281
+ - **\`WCHAR(256)\`** / **\`new WCHAR(256)\`**: Wide string buffer (UTF-16LE) with \`.text\`.
282
+ - **\`CHAR(256)\`** / **\`new CHAR(256)\`**: ANSI string buffer (UTF-8) with \`.text\`.
283
+ - **Scalar Out-Parameters:** \`DWORD()\`, \`INT()\`, \`UINT()\`, \`BOOL()\`, \`HWND()\`. Read via \`.value\` or \`+val\`.
284
+ 4. **All Win32 API Functions:**
285
+ - \`SendMessage\`, \`PostMessage\`, \`FindWindow\`, \`FindWindowEx\`, \`GetWindowRect\`, \`SetWindowText\`, \`GetWindowText\`, \`VirtualAlloc\`, \`VirtualProtect\`, \`VirtualFree\`, \`malloc\`, \`free\`, etc.
286
+
287
+ ---
288
+
289
+ ## 3. MCP Tool Catalog
290
+
291
+ - **\`list_processes\`**: Discover running processes.
292
+ - **\`spawn_process\`**: Launch an executable application.
293
+ - **\`open_accessor\`**: Attach to a target process and start active session.
294
+ - **\`close_accessor\`**: Detach and close active session.
295
+ - **\`execute_code\`**: Run C-style Win32 code inside the attached target.
296
+ - **\`execute_local_code\`**: Run C-style Win32 code locally in the runner.
297
+ - **\`read_memory\`**: Read memory bytes (returns hex, ascii, u32, u64).
298
+ - **\`write_memory\`**: Write hex bytes to target memory.
299
+ - **\`scan_pattern\`**: AOB pattern search with \`?\` wildcards.
300
+ - **\`allocate_memory\`**: Allocate virtual memory inside target.
301
+ - **\`minhook_install\`**: Install 5-byte relative JMP trampoline detour hook.
302
+ - **\`minhook_remove\`**: Remove minhook and restore original function prologue.
303
+ - **\`list_hooks\`**: List active hooks.
304
+ - **\`nthread_call\`**: Call function via thread context redirection without CreateRemoteThread.
305
+ - **\`compile_c\` / \`compile_shellcode\`**: Compile C code into standalone x86_64 machine code / shellcode.
306
+ - **\`disassemble\`**: Disassemble machine code bytes into assembly instructions.
307
+ - **\`simulate_run\`**: Offline virtual x86_64 CPU simulation.
308
+ - **\`list_windows\`**: Enumerate visible desktop windows and child edit controls.
309
+ - **\`take_screenshot\`**: Capture PNG screenshot of desktop or window.
310
+ - **\`jvm_inspect_jar\`**: Inspect JAR archive classes and packages.
311
+ `;
312
+ function getSkillContent() {
313
+ const candidates = [
314
+ join2(process.cwd(), ".agents", "skills", "exoproc", "SKILL.md"),
315
+ join2(process.cwd(), "..", "..", ".agents", "skills", "exoproc", "SKILL.md")
316
+ ];
317
+ for (const c of candidates) {
318
+ if (existsSync3(c)) {
319
+ try {
320
+ return readFileSync2(c, "utf8");
321
+ } catch {}
322
+ }
323
+ }
324
+ return DEFAULT_SKILL_CONTENT;
325
+ }
326
+ function installSkills(paths, dryRun = false) {
327
+ const content = getSkillContent();
328
+ const installed = [];
329
+ for (const targetPath of paths) {
330
+ try {
331
+ if (!dryRun) {
332
+ const dir = dirname3(targetPath);
333
+ if (!existsSync3(dir)) {
334
+ mkdirSync2(dir, { recursive: true });
335
+ }
336
+ writeFileSync2(targetPath, content, "utf8");
337
+ }
338
+ installed.push(targetPath);
339
+ } catch (err) {
340
+ console.error(`Failed to install skill to ${targetPath}:`, err);
341
+ }
342
+ }
343
+ return installed;
344
+ }
345
+
346
+ // packages/exoproc/src/setup/index.ts
347
+ function createSetupContext(options) {
348
+ const home = homedir();
349
+ const platform = process.platform;
350
+ const env = process.env;
351
+ const cwd = process.cwd();
352
+ let command = options?.command;
353
+ if (!command || command.length === 0) {
354
+ if (options?.dev) {
355
+ const localDist = join3(cwd, "packages", "exoproc", "dist", "cli.js");
356
+ command = ["bun", localDist, "mcp"];
357
+ } else {
358
+ command = ["bun", "x", "exoproc", "mcp"];
359
+ }
360
+ }
361
+ return {
362
+ home,
363
+ platform,
364
+ env,
365
+ cwd,
366
+ command
367
+ };
368
+ }
369
+ function detectClients(ctx) {
370
+ const results = [];
371
+ for (const client of SUPPORTED_CLIENTS) {
372
+ const detected = client.detect(ctx);
373
+ const configPaths = client.getConfigPaths(ctx);
374
+ const primaryConfig = configPaths[0] ?? "";
375
+ const alreadyConfigured = isClientConfigured(client, primaryConfig, ctx.command);
376
+ const skillPaths = client.getSkillPaths ? client.getSkillPaths(ctx) : [];
377
+ results.push({
378
+ client,
379
+ detected,
380
+ configPath: primaryConfig,
381
+ alreadyConfigured,
382
+ skillPaths
383
+ });
384
+ }
385
+ return results;
386
+ }
387
+ async function runSetup(options = {}) {
388
+ const ctx = createSetupContext({
389
+ command: options.command,
390
+ dev: options.dev
391
+ });
392
+ const statuses = detectClients(ctx);
393
+ const targetStatuses = statuses.filter((st) => {
394
+ if (options.clients && options.clients.length > 0) {
395
+ return options.clients.includes(st.client.id);
396
+ }
397
+ return st.detected;
398
+ });
399
+ const summary = {
400
+ configured: [],
401
+ alreadyCurrent: [],
402
+ failed: [],
403
+ skillsInstalled: [],
404
+ dryRun: !!options.dryRun
405
+ };
406
+ for (const st of targetStatuses) {
407
+ if (options.skillOnly) {
408
+ if (st.skillPaths.length > 0) {
409
+ const installed = installSkills(st.skillPaths, options.dryRun);
410
+ summary.skillsInstalled.push(...installed);
411
+ }
412
+ continue;
413
+ }
414
+ const configPaths = st.client.getConfigPaths(ctx);
415
+ for (const cfgPath of configPaths) {
416
+ const res = updateClientConfig(st.client, cfgPath, ctx.command, options.dryRun);
417
+ if (res.status === "configured") {
418
+ summary.configured.push(`${st.client.displayName} (${cfgPath})`);
419
+ } else if (res.status === "already_current") {
420
+ summary.alreadyCurrent.push(`${st.client.displayName} (${cfgPath})`);
421
+ } else if (res.status === "failed") {
422
+ summary.failed.push({
423
+ client: st.client.displayName,
424
+ error: res.error || "Unknown error"
425
+ });
426
+ }
427
+ }
428
+ if (st.skillPaths.length > 0) {
429
+ const installed = installSkills(st.skillPaths, options.dryRun);
430
+ summary.skillsInstalled.push(...installed);
431
+ }
432
+ }
433
+ return summary;
434
+ }
435
+ export {
436
+ DEFAULT_SKILL_CONTENT,
437
+ SUPPORTED_CLIENTS,
438
+ createSetupContext,
439
+ detectClients,
440
+ getSkillContent,
441
+ installSkills,
442
+ isClientConfigured,
443
+ runSetup,
444
+ updateClientConfig
445
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/setup/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ export declare const DEFAULT_SKILL_CONTENT = "---\nname: exoproc\ndescription: >-\n Native Windows x64 reverse engineering, thread hijacking (nthread), function redirection (minhook 5-byte detour), memory inspection, live Win32 code execution, remote desktop inspection, and JVM analysis via the Exoproc MCP Server.\n---\n\n# Exoproc MCP Server Guide\n\nExoproc is a dedicated **Model Context Protocol (MCP)** server for native Windows x64 reverse engineering, thread hijacking (`nthread`), function redirection (`minhook`), live process instrumentation, and remote desktop inspection.\n\n> **Important Rule for AI Agents:** When asked to automate, inspect, or instrument a live process (e.g., typing into Notepad, reading/writing memory, calling Win32 APIs, or hooking functions), **use the Exoproc MCP tools directly**. Do **not** search the workspace repository source code unless explicitly asked to modify Exoproc itself.\n\n---\n\n## 1. Single Active Accessor Session Lifecycle (Mandatory Workflow)\n\nThe MCP server maintains **at most ONE active accessor session** at any time.\n\n### The Required 3-Step Lifecycle:\n```\n1. list_processes / list_windows --> Find target PID\n2. open_accessor({ pid }) --> Opens the single active session (returns sessionId)\n3. execute_code / read_memory / ...--> Operates on the active session\n4. close_accessor({}) --> Restores target thread execution and closes session\n```\n\n- **`open_accessor({ pid: number })` is mandatory:** `execute_code` and memory tools will NOT automatically open an accessor for you. You must explicitly open the session first.\n- **Single active session:** Only 1 process can be attached at a time. If you attempt to call `open_accessor` while a session is already active, it will return an error instructing you to call `close_accessor` first.\n- **Convenience in subsequent calls:** Once `open_accessor` is called, tools like `execute_code({ code: ... })`, `read_memory(...)`, `write_memory(...)`, etc. automatically operate on the currently active session \u2014 you do not even need to pass `session` on every call.\n- **Clean exit:** Always call `close_accessor({})` when you are done with your task.\n\n---\n\n## 2. C-Style Win32 Code Execution (`execute_code` & `execute_local_code`)\n\nInside `execute_code`, write real Win32 C code as if `<windows.h>` were already included at the top:\n\n### Pre-Included Globally in Scope:\n1. **All Win32 `#define` Constants:**\n - Window messages: `WM_SETTEXT`, `WM_GETTEXT`, `WM_CHAR`, `WM_KEYDOWN`, `WM_KEYUP`, `WM_COMMAND`, `WM_CLOSE`, etc.\n - Edit & Button messages: `EM_SETSEL`, `EM_REPLACESEL`, `EM_GETSEL`, `BM_CLICK`, etc.\n - Virtual keys: `VK_RETURN`, `VK_ESCAPE`, `VK_SPACE`, `VK_BACK`, `VK_TAB`, etc.\n2. **All Win32 Structs:**\n - `RECT`, `POINT`, `SIZE`, `MSG`, `WNDCLASSEXW`, `MEMORY_BASIC_INFORMATION`, etc.\n3. **C-Style Types & Buffer Out-Parameters:**\n - **`WCHAR(256)`** / **`new WCHAR(256)`**: Wide string buffer (UTF-16LE) with `.text`.\n - **`CHAR(256)`** / **`new CHAR(256)`**: ANSI string buffer (UTF-8) with `.text`.\n - **Scalar Out-Parameters:** `DWORD()`, `INT()`, `UINT()`, `BOOL()`, `HWND()`. Read via `.value` or `+val`.\n4. **All Win32 API Functions:**\n - `SendMessage`, `PostMessage`, `FindWindow`, `FindWindowEx`, `GetWindowRect`, `SetWindowText`, `GetWindowText`, `VirtualAlloc`, `VirtualProtect`, `VirtualFree`, `malloc`, `free`, etc.\n\n---\n\n## 3. MCP Tool Catalog\n\n- **`list_processes`**: Discover running processes.\n- **`spawn_process`**: Launch an executable application.\n- **`open_accessor`**: Attach to a target process and start active session.\n- **`close_accessor`**: Detach and close active session.\n- **`execute_code`**: Run C-style Win32 code inside the attached target.\n- **`execute_local_code`**: Run C-style Win32 code locally in the runner.\n- **`read_memory`**: Read memory bytes (returns hex, ascii, u32, u64).\n- **`write_memory`**: Write hex bytes to target memory.\n- **`scan_pattern`**: AOB pattern search with `?` wildcards.\n- **`allocate_memory`**: Allocate virtual memory inside target.\n- **`minhook_install`**: Install 5-byte relative JMP trampoline detour hook.\n- **`minhook_remove`**: Remove minhook and restore original function prologue.\n- **`list_hooks`**: List active hooks.\n- **`nthread_call`**: Call function via thread context redirection without CreateRemoteThread.\n- **`compile_c` / `compile_shellcode`**: Compile C code into standalone x86_64 machine code / shellcode.\n- **`disassemble`**: Disassemble machine code bytes into assembly instructions.\n- **`simulate_run`**: Offline virtual x86_64 CPU simulation.\n- **`list_windows`**: Enumerate visible desktop windows and child edit controls.\n- **`take_screenshot`**: Capture PNG screenshot of desktop or window.\n- **`jvm_inspect_jar`**: Inspect JAR archive classes and packages.\n";
2
+ export declare function getSkillContent(): string;
3
+ export declare function installSkills(paths: string[], dryRun?: boolean): string[];
4
+ //# sourceMappingURL=skill-installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-installer.d.ts","sourceRoot":"","sources":["../../src/setup/skill-installer.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,8uJA2EjC,CAAC;AAEF,wBAAgB,eAAe,IAAI,MAAM,CAcxC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,UAAQ,GAAG,MAAM,EAAE,CAkBvE"}
@@ -0,0 +1,115 @@
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ export const DEFAULT_SKILL_CONTENT = `---
4
+ name: exoproc
5
+ description: >-
6
+ Native Windows x64 reverse engineering, thread hijacking (nthread), function redirection (minhook 5-byte detour), memory inspection, live Win32 code execution, remote desktop inspection, and JVM analysis via the Exoproc MCP Server.
7
+ ---
8
+
9
+ # Exoproc MCP Server Guide
10
+
11
+ Exoproc is a dedicated **Model Context Protocol (MCP)** server for native Windows x64 reverse engineering, thread hijacking (\`nthread\`), function redirection (\`minhook\`), live process instrumentation, and remote desktop inspection.
12
+
13
+ > **Important Rule for AI Agents:** When asked to automate, inspect, or instrument a live process (e.g., typing into Notepad, reading/writing memory, calling Win32 APIs, or hooking functions), **use the Exoproc MCP tools directly**. Do **not** search the workspace repository source code unless explicitly asked to modify Exoproc itself.
14
+
15
+ ---
16
+
17
+ ## 1. Single Active Accessor Session Lifecycle (Mandatory Workflow)
18
+
19
+ The MCP server maintains **at most ONE active accessor session** at any time.
20
+
21
+ ### The Required 3-Step Lifecycle:
22
+ \`\`\`
23
+ 1. list_processes / list_windows --> Find target PID
24
+ 2. open_accessor({ pid }) --> Opens the single active session (returns sessionId)
25
+ 3. execute_code / read_memory / ...--> Operates on the active session
26
+ 4. close_accessor({}) --> Restores target thread execution and closes session
27
+ \`\`\`
28
+
29
+ - **\`open_accessor({ pid: number })\` is mandatory:** \`execute_code\` and memory tools will NOT automatically open an accessor for you. You must explicitly open the session first.
30
+ - **Single active session:** Only 1 process can be attached at a time. If you attempt to call \`open_accessor\` while a session is already active, it will return an error instructing you to call \`close_accessor\` first.
31
+ - **Convenience in subsequent calls:** Once \`open_accessor\` is called, tools like \`execute_code({ code: ... })\`, \`read_memory(...)\`, \`write_memory(...)\`, etc. automatically operate on the currently active session — you do not even need to pass \`session\` on every call.
32
+ - **Clean exit:** Always call \`close_accessor({})\` when you are done with your task.
33
+
34
+ ---
35
+
36
+ ## 2. C-Style Win32 Code Execution (\`execute_code\` & \`execute_local_code\`)
37
+
38
+ Inside \`execute_code\`, write real Win32 C code as if \`<windows.h>\` were already included at the top:
39
+
40
+ ### Pre-Included Globally in Scope:
41
+ 1. **All Win32 \`#define\` Constants:**
42
+ - Window messages: \`WM_SETTEXT\`, \`WM_GETTEXT\`, \`WM_CHAR\`, \`WM_KEYDOWN\`, \`WM_KEYUP\`, \`WM_COMMAND\`, \`WM_CLOSE\`, etc.
43
+ - Edit & Button messages: \`EM_SETSEL\`, \`EM_REPLACESEL\`, \`EM_GETSEL\`, \`BM_CLICK\`, etc.
44
+ - Virtual keys: \`VK_RETURN\`, \`VK_ESCAPE\`, \`VK_SPACE\`, \`VK_BACK\`, \`VK_TAB\`, etc.
45
+ 2. **All Win32 Structs:**
46
+ - \`RECT\`, \`POINT\`, \`SIZE\`, \`MSG\`, \`WNDCLASSEXW\`, \`MEMORY_BASIC_INFORMATION\`, etc.
47
+ 3. **C-Style Types & Buffer Out-Parameters:**
48
+ - **\`WCHAR(256)\`** / **\`new WCHAR(256)\`**: Wide string buffer (UTF-16LE) with \`.text\`.
49
+ - **\`CHAR(256)\`** / **\`new CHAR(256)\`**: ANSI string buffer (UTF-8) with \`.text\`.
50
+ - **Scalar Out-Parameters:** \`DWORD()\`, \`INT()\`, \`UINT()\`, \`BOOL()\`, \`HWND()\`. Read via \`.value\` or \`+val\`.
51
+ 4. **All Win32 API Functions:**
52
+ - \`SendMessage\`, \`PostMessage\`, \`FindWindow\`, \`FindWindowEx\`, \`GetWindowRect\`, \`SetWindowText\`, \`GetWindowText\`, \`VirtualAlloc\`, \`VirtualProtect\`, \`VirtualFree\`, \`malloc\`, \`free\`, etc.
53
+
54
+ ---
55
+
56
+ ## 3. MCP Tool Catalog
57
+
58
+ - **\`list_processes\`**: Discover running processes.
59
+ - **\`spawn_process\`**: Launch an executable application.
60
+ - **\`open_accessor\`**: Attach to a target process and start active session.
61
+ - **\`close_accessor\`**: Detach and close active session.
62
+ - **\`execute_code\`**: Run C-style Win32 code inside the attached target.
63
+ - **\`execute_local_code\`**: Run C-style Win32 code locally in the runner.
64
+ - **\`read_memory\`**: Read memory bytes (returns hex, ascii, u32, u64).
65
+ - **\`write_memory\`**: Write hex bytes to target memory.
66
+ - **\`scan_pattern\`**: AOB pattern search with \`?\` wildcards.
67
+ - **\`allocate_memory\`**: Allocate virtual memory inside target.
68
+ - **\`minhook_install\`**: Install 5-byte relative JMP trampoline detour hook.
69
+ - **\`minhook_remove\`**: Remove minhook and restore original function prologue.
70
+ - **\`list_hooks\`**: List active hooks.
71
+ - **\`nthread_call\`**: Call function via thread context redirection without CreateRemoteThread.
72
+ - **\`compile_c\` / \`compile_shellcode\`**: Compile C code into standalone x86_64 machine code / shellcode.
73
+ - **\`disassemble\`**: Disassemble machine code bytes into assembly instructions.
74
+ - **\`simulate_run\`**: Offline virtual x86_64 CPU simulation.
75
+ - **\`list_windows\`**: Enumerate visible desktop windows and child edit controls.
76
+ - **\`take_screenshot\`**: Capture PNG screenshot of desktop or window.
77
+ - **\`jvm_inspect_jar\`**: Inspect JAR archive classes and packages.
78
+ `;
79
+ export function getSkillContent() {
80
+ // Try loading from repo skill if present
81
+ const candidates = [
82
+ join(process.cwd(), '.agents', 'skills', 'exoproc', 'SKILL.md'),
83
+ join(process.cwd(), '..', '..', '.agents', 'skills', 'exoproc', 'SKILL.md'),
84
+ ];
85
+ for (const c of candidates) {
86
+ if (existsSync(c)) {
87
+ try {
88
+ return readFileSync(c, 'utf8');
89
+ }
90
+ catch { }
91
+ }
92
+ }
93
+ return DEFAULT_SKILL_CONTENT;
94
+ }
95
+ export function installSkills(paths, dryRun = false) {
96
+ const content = getSkillContent();
97
+ const installed = [];
98
+ for (const targetPath of paths) {
99
+ try {
100
+ if (!dryRun) {
101
+ const dir = dirname(targetPath);
102
+ if (!existsSync(dir)) {
103
+ mkdirSync(dir, { recursive: true });
104
+ }
105
+ writeFileSync(targetPath, content, 'utf8');
106
+ }
107
+ installed.push(targetPath);
108
+ }
109
+ catch (err) {
110
+ console.error(`Failed to install skill to ${targetPath}:`, err);
111
+ }
112
+ }
113
+ return installed;
114
+ }
115
+ //# sourceMappingURL=skill-installer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-installer.js","sourceRoot":"","sources":["../../src/setup/skill-installer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EpC,CAAC;AAEF,MAAM,UAAU,eAAe;IAC7B,yCAAyC;IACzC,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC;QAC/D,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC;KAC5E,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;YAClB,IAAI,CAAC;gBACH,OAAO,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;YACjC,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACZ,CAAC;IACH,CAAC;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAe,EAAE,MAAM,GAAG,KAAK;IAC3D,MAAM,OAAO,GAAG,eAAe,EAAE,CAAC;IAClC,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,KAAK,MAAM,UAAU,IAAI,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;gBAChC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;oBACrB,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBACtC,CAAC;gBACD,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAC7C,CAAC;YACD,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,8BAA8B,UAAU,GAAG,EAAE,GAAG,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,41 @@
1
+ export interface SetupContext {
2
+ home: string;
3
+ platform: NodeJS.Platform;
4
+ env: NodeJS.ProcessEnv;
5
+ cwd: string;
6
+ command: string[];
7
+ }
8
+ export interface ClientDefinition {
9
+ id: string;
10
+ displayName: string;
11
+ format: 'json' | 'zed';
12
+ getConfigPaths: (ctx: SetupContext) => string[];
13
+ getSkillPaths?: (ctx: SetupContext) => string[];
14
+ detect: (ctx: SetupContext) => boolean;
15
+ }
16
+ export interface ClientConfigStatus {
17
+ client: ClientDefinition;
18
+ detected: boolean;
19
+ configPath: string;
20
+ alreadyConfigured: boolean;
21
+ skillPaths: string[];
22
+ }
23
+ export interface SetupOptions {
24
+ yes?: boolean;
25
+ clients?: string[];
26
+ dryRun?: boolean;
27
+ command?: string[];
28
+ skillOnly?: boolean;
29
+ dev?: boolean;
30
+ }
31
+ export interface SetupSummary {
32
+ configured: string[];
33
+ alreadyCurrent: string[];
34
+ failed: Array<{
35
+ client: string;
36
+ error: string;
37
+ }>;
38
+ skillsInstalled: string[];
39
+ dryRun: boolean;
40
+ }
41
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/setup/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;IACvB,cAAc,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,MAAM,EAAE,CAAC;IAChD,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,MAAM,EAAE,CAAC;IAChD,MAAM,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/setup/types.ts"],"names":[],"mappings":""}