@poolzin/pool-bot 2026.3.14 → 2026.3.16
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/CHANGELOG.md +7 -0
- package/dist/agents/checkpoint-manager.js +1 -2
- package/dist/build-info.json +3 -3
- package/docs/assets-evaluation.md +418 -0
- package/docs/commit-evaluation-42f463de4.md +362 -0
- package/docs/extensions-evaluation.md +696 -0
- package/docs/hexstrike-evaluation.md +514 -0
- package/docs/implementations-summary.md +300 -0
- package/extensions/agency-agents/poolbot.plugin.json +11 -0
- package/extensions/dexter/README.md +147 -0
- package/extensions/dexter/dist/agent.d.ts +44 -0
- package/extensions/dexter/dist/agent.js +265 -0
- package/extensions/dexter/dist/index.d.ts +12 -0
- package/extensions/dexter/dist/index.js +99 -0
- package/extensions/dexter/node_modules/.bin/tsc +21 -0
- package/extensions/dexter/node_modules/.bin/tsserver +21 -0
- package/extensions/dexter/package.json +33 -0
- package/extensions/dexter/poolbot.plugin.json +35 -0
- package/extensions/dexter/src/agent.ts +375 -0
- package/extensions/dexter/src/index.ts +129 -0
- package/extensions/dexter/tsconfig.json +20 -0
- package/extensions/hackingtool/README.md +75 -0
- package/extensions/hackingtool/dist/client.d.ts +34 -0
- package/extensions/hackingtool/dist/client.js +82 -0
- package/extensions/hackingtool/dist/index.d.ts +12 -0
- package/extensions/hackingtool/dist/index.js +163 -0
- package/extensions/hackingtool/dist/server-manager.d.ts +25 -0
- package/extensions/hackingtool/dist/server-manager.js +107 -0
- package/extensions/hackingtool/node_modules/.bin/tsc +21 -0
- package/extensions/hackingtool/node_modules/.bin/tsserver +21 -0
- package/extensions/hackingtool/package.json +36 -0
- package/extensions/hackingtool/poolbot.plugin.json +55 -0
- package/extensions/hackingtool/src/client.ts +120 -0
- package/extensions/hackingtool/src/index.ts +181 -0
- package/extensions/hackingtool/src/server/hackingtool_mcp.py +454 -0
- package/extensions/hackingtool/src/server/requirements.txt +2 -0
- package/extensions/hackingtool/src/server-manager.ts +128 -0
- package/extensions/hackingtool/tsconfig.json +20 -0
- package/extensions/hexstrike-ai/README.md +693 -44
- package/extensions/hexstrike-ai/src/client.test.ts +335 -0
- package/extensions/hexstrike-ai/src/server-manager.test.ts +286 -0
- package/extensions/page-agent/poolbot.plugin.json +24 -0
- package/extensions/xyops/poolbot.plugin.json +21 -0
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { spawn, ChildProcess } from "child_process";
|
|
2
|
+
import { EventEmitter } from "events";
|
|
3
|
+
import { dirname, resolve } from "path";
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
|
|
8
|
+
interface ServerManagerConfig {
|
|
9
|
+
port?: number;
|
|
10
|
+
host?: string;
|
|
11
|
+
pythonPath?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class HackingToolServerManager extends EventEmitter {
|
|
15
|
+
private port: number;
|
|
16
|
+
private host: string;
|
|
17
|
+
private pythonPath: string;
|
|
18
|
+
private process: ChildProcess | null = null;
|
|
19
|
+
private isRunning = false;
|
|
20
|
+
private healthCheckInterval?: NodeJS.Timeout;
|
|
21
|
+
|
|
22
|
+
constructor(config: ServerManagerConfig = {}) {
|
|
23
|
+
super();
|
|
24
|
+
this.port = config.port ?? 8889;
|
|
25
|
+
this.host = config.host ?? "127.0.0.1";
|
|
26
|
+
this.pythonPath = config.pythonPath ?? "python3";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async start(): Promise<void> {
|
|
30
|
+
if (this.isRunning) {
|
|
31
|
+
throw new Error("Server is already running");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const serverScript = resolve(__dirname, "./server/hackingtool_mcp.py");
|
|
35
|
+
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
try {
|
|
38
|
+
this.process = spawn(this.pythonPath, [
|
|
39
|
+
serverScript,
|
|
40
|
+
"--port",
|
|
41
|
+
this.port.toString(),
|
|
42
|
+
"--host",
|
|
43
|
+
this.host,
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
this.process.stdout?.on("data", (data) => {
|
|
47
|
+
const output = data.toString();
|
|
48
|
+
this.emit("output", output);
|
|
49
|
+
|
|
50
|
+
if (output.includes("running on")) {
|
|
51
|
+
this.isRunning = true;
|
|
52
|
+
this.startHealthChecks();
|
|
53
|
+
resolve();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
this.process.stderr?.on("data", (data) => {
|
|
58
|
+
const error = data.toString();
|
|
59
|
+
this.emit("error", error);
|
|
60
|
+
if (!this.isRunning) {
|
|
61
|
+
reject(new Error(`Server failed to start: ${error}`));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
this.process.on("error", (err) => {
|
|
66
|
+
this.isRunning = false;
|
|
67
|
+
reject(new Error(`Spawn error: ${err.message}`));
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
this.process.on("exit", (code) => {
|
|
71
|
+
this.isRunning = false;
|
|
72
|
+
this.stopHealthChecks();
|
|
73
|
+
this.emit("exit", code);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
if (!this.isRunning) {
|
|
78
|
+
reject(new Error("Server startup timeout"));
|
|
79
|
+
}
|
|
80
|
+
}, 10000);
|
|
81
|
+
} catch (err) {
|
|
82
|
+
reject(err);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async stop(): Promise<void> {
|
|
88
|
+
if (!this.process || !this.isRunning) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return new Promise((resolve) => {
|
|
93
|
+
this.stopHealthChecks();
|
|
94
|
+
this.process?.kill("SIGTERM");
|
|
95
|
+
this.isRunning = false;
|
|
96
|
+
this.process = null;
|
|
97
|
+
resolve();
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
getStatus(): { running: boolean; port: number; host: string } {
|
|
102
|
+
return {
|
|
103
|
+
running: this.isRunning,
|
|
104
|
+
port: this.port,
|
|
105
|
+
host: this.host,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
private startHealthChecks(): void {
|
|
110
|
+
this.healthCheckInterval = setInterval(async () => {
|
|
111
|
+
try {
|
|
112
|
+
const response = await fetch(`http://${this.host}:${this.port}/health`);
|
|
113
|
+
if (!response.ok) {
|
|
114
|
+
this.emit("health_check_failed", "Health check returned non-OK status");
|
|
115
|
+
}
|
|
116
|
+
} catch (err) {
|
|
117
|
+
this.emit("health_check_failed", err instanceof Error ? err.message : String(err));
|
|
118
|
+
}
|
|
119
|
+
}, 30000);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
private stopHealthChecks(): void {
|
|
123
|
+
if (this.healthCheckInterval) {
|
|
124
|
+
clearInterval(this.healthCheckInterval);
|
|
125
|
+
this.healthCheckInterval = undefined;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"rootDir": "./src",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"baseUrl": ".",
|
|
14
|
+
"paths": {
|
|
15
|
+
"poolbot/*": ["../../packages/poolbot/*"]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"include": ["src/**/*"],
|
|
19
|
+
"exclude": ["node_modules", "dist"]
|
|
20
|
+
}
|