@poolzin/pool-bot 2026.3.9 → 2026.3.11
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 +35 -0
- package/README.md +147 -69
- package/dist/.buildstamp +1 -1
- package/dist/agents/error-classifier.js +26 -77
- package/dist/agents/skills/security.js +1 -7
- package/dist/build-info.json +3 -3
- package/dist/cli/cron-cli/register.cron-dashboard.js +339 -0
- package/dist/cli/cron-cli/register.js +2 -0
- package/dist/cli/errors.js +187 -0
- package/dist/cli/program/command-registry.js +13 -0
- package/dist/cli/program/register.maintenance.js +21 -0
- package/dist/cli/program/register.subclis.js +9 -0
- package/dist/cli/swarm-cli/register.js +8 -0
- package/dist/cli/swarm-cli/register.swarm-status.js +488 -0
- package/dist/cli/telemetry-cli/register.js +10 -0
- package/dist/cli/telemetry-cli/register.telemetry-alerts.js +176 -0
- package/dist/cli/telemetry-cli/register.telemetry-metrics.js +323 -0
- package/dist/cli/telemetry-cli/register.telemetry-status.js +179 -0
- package/dist/commands/doctor-checks.js +498 -0
- package/dist/context-engine/index.js +1 -1
- package/dist/context-engine/legacy.js +1 -3
- package/dist/context-engine/summarizing.js +5 -8
- package/dist/cron/service/timer.js +18 -0
- package/dist/gateway/protocol/index.js +5 -2
- package/dist/gateway/protocol/schema/error-codes.js +1 -0
- package/dist/gateway/protocol/schema/swarm.js +80 -0
- package/dist/gateway/protocol/schema.js +1 -0
- package/dist/gateway/server-close.js +4 -0
- package/dist/gateway/server-constants.js +1 -0
- package/dist/gateway/server-cron.js +29 -0
- package/dist/gateway/server-maintenance.js +35 -2
- package/dist/gateway/server-methods/swarm.js +58 -0
- package/dist/gateway/server-methods/telemetry.js +71 -0
- package/dist/gateway/server-methods-list.js +8 -0
- package/dist/gateway/server-methods.js +9 -2
- package/dist/gateway/server.impl.js +33 -16
- package/dist/infra/abort-pattern.js +4 -4
- package/dist/infra/retry.js +3 -1
- package/dist/skills/commands.js +7 -25
- package/dist/skills/index.js +14 -17
- package/dist/skills/parser.js +12 -27
- package/dist/skills/registry.js +3 -6
- package/dist/skills/security.js +2 -8
- package/dist/swarm/service.js +247 -0
- package/dist/telemetry/alert-engine.js +258 -0
- package/dist/telemetry/cron-instrumentation.js +49 -0
- package/dist/telemetry/gateway-instrumentation.js +80 -0
- package/dist/telemetry/instrumentation.js +66 -0
- package/dist/telemetry/service.js +345 -0
- package/dist/tui/components/assistant-message.js +6 -2
- package/dist/tui/components/hyperlink-markdown.js +32 -0
- package/dist/tui/components/searchable-select-list.js +12 -1
- package/dist/tui/components/user-message.js +6 -2
- package/dist/tui/index.js +22 -6
- package/dist/tui/theme/theme-detection.js +226 -0
- package/dist/tui/tui-command-handlers.js +20 -0
- package/dist/tui/tui-formatters.js +4 -3
- package/dist/tui/utils/ctrl-c-handler.js +67 -0
- package/dist/tui/utils/osc8-hyperlinks.js +208 -0
- package/dist/tui/utils/safe-stop.js +180 -0
- package/dist/tui/utils/session-key-utils.js +81 -0
- package/dist/tui/utils/text-sanitization.js +284 -0
- package/dist/utils/lru-cache.js +116 -0
- package/dist/utils/performance.js +199 -0
- package/dist/utils/retry.js +240 -0
- package/docs/MELHORIAS_IMPLEMENTADAS.md +228 -0
- package/docs/MELHORIAS_PROFISSIONAIS.md +282 -0
- package/docs/PLANO_ACAO_TUI.md +357 -0
- package/docs/PROGRESSO_TUI.md +66 -0
- package/docs/RELATORIO_FINAL.md +217 -0
- package/docs/diagnostico-shell-completion.md +265 -0
- package/docs/features/advanced-memory.md +585 -0
- package/docs/features/discord-components-v2.md +277 -0
- package/docs/features/swarm.md +100 -0
- package/docs/features/telemetry.md +284 -0
- package/docs/integrations/INTEGRATION_PLAN.md +665 -345
- package/docs/models/provider-infrastructure.md +400 -0
- package/docs/security/exec-approvals.md +294 -0
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/hexstrike-bridge/README.md +119 -0
- package/extensions/hexstrike-bridge/index.test.ts +247 -0
- package/extensions/hexstrike-bridge/index.ts +487 -0
- package/extensions/hexstrike-bridge/package.json +17 -0
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +10 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/mavalie/README.md +97 -0
- package/extensions/mavalie/package.json +15 -0
- package/extensions/mavalie/src/index.ts +62 -0
- package/extensions/mcp-server/index.ts +14 -0
- package/extensions/mcp-server/package.json +11 -0
- package/extensions/mcp-server/src/service.ts +540 -0
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +10 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +10 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai-codex-auth/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +10 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +10 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +10 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +10 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +8 -1
|
@@ -1,424 +1,744 @@
|
|
|
1
|
-
# PoolBot Integration
|
|
1
|
+
# PoolBot Integration Plan: Page Agent, HexStrike AI, and xyOps
|
|
2
2
|
|
|
3
3
|
## Executive Summary
|
|
4
4
|
|
|
5
|
-
This document outlines
|
|
5
|
+
This document outlines a professional integration strategy for three external projects into PoolBot to create a **complete and independent** AI-powered automation platform. The integration follows PoolBot's existing plugin architecture, maintains backward compatibility, and adds significant new capabilities.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. **HexStrike AI** - MCP-based cybersecurity platform with 150+ security tools
|
|
9
|
-
3. **xyOps** - Job scheduling, workflow automation, and monitoring platform
|
|
7
|
+
## Projects Overview
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
### 1. Page Agent (Alibaba Research)
|
|
10
|
+
- **Type**: Browser automation agent
|
|
11
|
+
- **Language**: TypeScript/JavaScript
|
|
12
|
+
- **Key Features**: Text-based DOM manipulation, multi-page workflows, Chrome extension
|
|
13
|
+
- **Integration Value**: Enhanced browser automation beyond current Playwright-based system
|
|
14
|
+
|
|
15
|
+
### 2. HexStrike AI
|
|
16
|
+
- **Type**: Cybersecurity platform
|
|
17
|
+
- **Language**: Python (FastMCP server)
|
|
18
|
+
- **Key Features**: 150+ security tools, 12+ AI agents, autonomous pentesting
|
|
19
|
+
- **Integration Value**: Security scanning, penetration testing, vulnerability assessment
|
|
20
|
+
|
|
21
|
+
### 3. xyOps
|
|
22
|
+
- **Type**: Workflow automation & monitoring
|
|
23
|
+
- **Language**: Node.js
|
|
24
|
+
- **Key Features**: Visual workflow editor, job scheduling, alerting, incident response
|
|
25
|
+
- **Integration Value**: Infrastructure automation, monitoring, incident management
|
|
26
|
+
|
|
27
|
+
## PoolBot Architecture Analysis
|
|
12
28
|
|
|
13
29
|
### Existing Systems
|
|
14
30
|
|
|
15
|
-
|
|
|
16
|
-
|
|
17
|
-
| **
|
|
18
|
-
| **
|
|
19
|
-
| **
|
|
20
|
-
| **
|
|
21
|
-
| **
|
|
22
|
-
| **
|
|
23
|
-
| **
|
|
24
|
-
| **Memory/Embeddings** | `src/memory/` | Sophisticated embedding system | No changes needed |
|
|
31
|
+
| Component | Current Implementation | Integration Point |
|
|
32
|
+
|-----------|----------------------|-------------------|
|
|
33
|
+
| **Browser** | Playwright-based (`src/browser/`) | Page Agent as alternative driver |
|
|
34
|
+
| **Plugins** | Full plugin system (`src/plugins/`) | All 3 projects as plugins |
|
|
35
|
+
| **ACP** | Agent Communication Protocol (`src/acp/`) | Extend for external tool servers |
|
|
36
|
+
| **MCP** | Partial via mcporter (`src/memory/qmd-manager.ts`) | Full MCP client support |
|
|
37
|
+
| **Skills** | New skill system (`src/skills/`) | Project-specific skills |
|
|
38
|
+
| **Gateway** | WebSocket gateway (`src/gateway/`) | Route external requests |
|
|
39
|
+
| **CLI** | Comprehensive CLI (`src/cli/`) | New commands for integrations |
|
|
25
40
|
|
|
26
|
-
### Key
|
|
41
|
+
### Key Architectural Decisions
|
|
27
42
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
serviceType: string; // "browser", "security", "workflow"
|
|
33
|
-
commands: string[]; // Available commands
|
|
34
|
-
caps: string[]; // Capabilities
|
|
35
|
-
connection: ServiceConnection;
|
|
36
|
-
}
|
|
43
|
+
1. **Plugin-First Approach**: All integrations implemented as PoolBot plugins
|
|
44
|
+
2. **MCP Bridge**: HexStrike AI exposed via MCP protocol
|
|
45
|
+
3. **Skill Wrappers**: Each project wrapped in PoolBot skill format
|
|
46
|
+
4. **No Core Changes**: Additive only - no modifications to existing code
|
|
37
47
|
|
|
38
|
-
|
|
39
|
-
interface ServiceProxyHandler {
|
|
40
|
-
method: string; // e.g., "pageagent.navigate"
|
|
41
|
-
handler: GatewayRequestHandler;
|
|
42
|
-
serviceConfig: ServiceConfig;
|
|
43
|
-
}
|
|
48
|
+
## Integration Architecture
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
```
|
|
51
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
52
|
+
│ PoolBot Core │
|
|
53
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
54
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
|
|
55
|
+
│ │ Skills │ │ Plugins │ │ ACP │ │ Gateway │ │
|
|
56
|
+
│ │ System │ │ System │ │ Protocol │ │ Server │ │
|
|
57
|
+
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ └──────────┬──────────┘ │
|
|
58
|
+
│ │ │ │ │ │
|
|
59
|
+
│ └────────────────┴────────────────┴────────────────────┘ │
|
|
60
|
+
│ │ │
|
|
61
|
+
│ Integration Layer │
|
|
62
|
+
│ ┌───────────────┼───────────────┐ │
|
|
63
|
+
│ ▼ ▼ ▼ │
|
|
64
|
+
│ ┌─────────────────┐ ┌──────────┐ ┌─────────────────┐ │
|
|
65
|
+
│ │ Page Agent │ │ HexStrike│ │ xyOps │ │
|
|
66
|
+
│ │ Plugin │ │ AI Plugin│ │ Plugin │ │
|
|
67
|
+
│ │ │ │ │ │ │ │
|
|
68
|
+
│ │ • Browser driver│ │• MCP │ │• Workflow │ │
|
|
69
|
+
│ │ • DOM agent │ │ client │ │ scheduler │ │
|
|
70
|
+
│ │ • Multi-page │ │• Security│ │• Monitoring │ │
|
|
71
|
+
│ │ workflows │ │ tools │ │• Alerting │ │
|
|
72
|
+
│ └────────┬────────┘ └────┬─────┘ └────────┬────────┘ │
|
|
73
|
+
│ │ │ │ │
|
|
74
|
+
│ ▼ ▼ ▼ │
|
|
75
|
+
│ ┌─────────────────┐ ┌──────────┐ ┌─────────────────┐ │
|
|
76
|
+
│ │ Page Agent Core │ │HexStrike │ │ xyOps Core │ │
|
|
77
|
+
│ │ (npm package) │ │Server │ │ (Node.js) │ │
|
|
78
|
+
│ └─────────────────┘ └──────────┘ └─────────────────┘ │
|
|
79
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
57
80
|
```
|
|
58
81
|
|
|
59
|
-
## Integration
|
|
82
|
+
## Detailed Integration Plans
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 1. Page Agent Integration
|
|
60
87
|
|
|
61
|
-
###
|
|
88
|
+
### Overview
|
|
89
|
+
Page Agent provides text-based browser automation with natural language understanding. Unlike PoolBot's current Playwright-based browser which requires precise selectors, Page Agent uses AI to understand and interact with web pages semantically.
|
|
62
90
|
|
|
63
|
-
|
|
64
|
-
- Lower latency (no image encoding/decoding)
|
|
65
|
-
- Better for structured data extraction
|
|
66
|
-
- Multi-page task support via Chrome extension
|
|
91
|
+
### Integration Strategy
|
|
67
92
|
|
|
68
|
-
|
|
93
|
+
#### Option A: Browser Driver Plugin (Recommended)
|
|
94
|
+
Implement Page Agent as an alternative browser driver alongside Playwright.
|
|
69
95
|
|
|
96
|
+
**Files to Create:**
|
|
70
97
|
```
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
│
|
|
76
|
-
│
|
|
77
|
-
│
|
|
78
|
-
│
|
|
79
|
-
│
|
|
80
|
-
│
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
│ Page Agent Core │
|
|
86
|
-
│ (@page-agent/*) │
|
|
87
|
-
└─────────────────┘
|
|
98
|
+
extensions/page-agent/
|
|
99
|
+
├── package.json
|
|
100
|
+
├── poolbot.plugin.json
|
|
101
|
+
├── src/
|
|
102
|
+
│ ├── index.ts # Plugin entry point
|
|
103
|
+
│ ├── driver.ts # Page Agent driver implementation
|
|
104
|
+
│ ├── tools.ts # Agent tools for browser control
|
|
105
|
+
│ ├── skills/
|
|
106
|
+
│ │ ├── browser-control.md
|
|
107
|
+
│ │ ├── form-filling.md
|
|
108
|
+
│ │ └── data-extraction.md
|
|
109
|
+
│ └── types.ts
|
|
110
|
+
├── README.md
|
|
111
|
+
└── tsconfig.json
|
|
88
112
|
```
|
|
89
113
|
|
|
90
|
-
**
|
|
91
|
-
- New file: `src/browser/routes/page-agent.ts`
|
|
92
|
-
- Extends existing browser route dispatcher
|
|
93
|
-
- Uses Page Agent's npm packages: `@page-agent/core`, `@page-agent/page-controller`
|
|
94
|
-
- Adds new agent contract methods for text-based interaction
|
|
114
|
+
**Key Components:**
|
|
95
115
|
|
|
96
|
-
**
|
|
116
|
+
1. **Driver Implementation** (`driver.ts`)
|
|
97
117
|
```typescript
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
parameters: { selectors: Record<string, string> }
|
|
118
|
+
// Wraps @page-agent/core for PoolBot integration
|
|
119
|
+
export class PageAgentDriver implements BrowserDriver {
|
|
120
|
+
private agent: PageAgentCore;
|
|
121
|
+
|
|
122
|
+
async navigate(url: string): Promise<void>;
|
|
123
|
+
async act(instruction: string): Promise<ActionResult>;
|
|
124
|
+
async extract(query: string): Promise<ExtractResult>;
|
|
125
|
+
async observe(): Promise<PageObservation>;
|
|
107
126
|
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
2. **Agent Tools** (`tools.ts`)
|
|
130
|
+
```typescript
|
|
131
|
+
// Tools registered with PoolBot agent system
|
|
132
|
+
export const pageAgentTools: AnyAgentTool[] = [
|
|
133
|
+
{
|
|
134
|
+
name: "browser_navigate",
|
|
135
|
+
description: "Navigate to a URL using natural language understanding",
|
|
136
|
+
parameters: z.object({ url: z.string(), goal: z.string().optional() }),
|
|
137
|
+
execute: async ({ url, goal }) => { /* ... */ }
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "browser_act",
|
|
141
|
+
description: "Perform an action on the current page (click, type, scroll)",
|
|
142
|
+
parameters: z.object({ instruction: z.string() }),
|
|
143
|
+
execute: async ({ instruction }) => { /* ... */ }
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "browser_extract",
|
|
147
|
+
description: "Extract data from the page using natural language query",
|
|
148
|
+
parameters: z.object({ query: z.string() }),
|
|
149
|
+
execute: async ({ query }) => { /* ... */ }
|
|
150
|
+
}
|
|
151
|
+
];
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
3. **Skills** (in `skills/`)
|
|
155
|
+
- `browser-control.md`: Core browser navigation and control
|
|
156
|
+
- `form-filling.md`: Intelligent form detection and filling
|
|
157
|
+
- `data-extraction.md`: Structured data extraction from web pages
|
|
158
|
+
|
|
159
|
+
#### Option B: Standalone Service
|
|
160
|
+
Run Page Agent as a separate service that PoolBot communicates with via HTTP.
|
|
161
|
+
|
|
162
|
+
**Pros:**
|
|
163
|
+
- Isolated from PoolBot process
|
|
164
|
+
- Can use different Node.js version if needed
|
|
165
|
+
- Easier to update independently
|
|
166
|
+
|
|
167
|
+
**Cons:**
|
|
168
|
+
- Additional service management overhead
|
|
169
|
+
- Network latency
|
|
170
|
+
- More complex deployment
|
|
171
|
+
|
|
172
|
+
### Implementation Phases
|
|
173
|
+
|
|
174
|
+
#### Phase 1: Basic Integration (Week 1-2)
|
|
175
|
+
- [ ] Create plugin structure
|
|
176
|
+
- [ ] Implement basic driver wrapper
|
|
177
|
+
- [ ] Add 3 core tools (navigate, act, extract)
|
|
178
|
+
- [ ] Create 1 skill (browser-control)
|
|
179
|
+
- [ ] Write tests
|
|
180
|
+
|
|
181
|
+
#### Phase 2: Advanced Features (Week 3-4)
|
|
182
|
+
- [ ] Multi-page workflow support
|
|
183
|
+
- [ ] Chrome extension integration
|
|
184
|
+
- [ ] Session persistence
|
|
185
|
+
- [ ] Additional skills (form-filling, data-extraction)
|
|
186
|
+
- [ ] Documentation
|
|
187
|
+
|
|
188
|
+
#### Phase 3: Optimization (Week 5-6)
|
|
189
|
+
- [ ] Performance tuning
|
|
190
|
+
- [ ] Error recovery
|
|
191
|
+
- [ ] Integration with existing PoolBot browser profiles
|
|
192
|
+
- [ ] CLI commands for Page Agent management
|
|
193
|
+
|
|
194
|
+
### Dependencies
|
|
195
|
+
```json
|
|
108
196
|
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
197
|
+
"dependencies": {
|
|
198
|
+
"@page-agent/core": "^1.x",
|
|
199
|
+
"@page-agent/page-controller": "^1.x",
|
|
200
|
+
"poolbot": "workspace:*"
|
|
201
|
+
}
|
|
112
202
|
}
|
|
113
203
|
```
|
|
114
204
|
|
|
115
|
-
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## 2. HexStrike AI Integration
|
|
116
208
|
|
|
117
|
-
|
|
118
|
-
-
|
|
119
|
-
- CTF solving
|
|
120
|
-
- Bug bounty automation
|
|
121
|
-
- CVE intelligence
|
|
122
|
-
- Compliance scanning
|
|
209
|
+
### Overview
|
|
210
|
+
HexStrike AI is a Python-based cybersecurity platform with 150+ tools and 12+ AI agents. It uses FastMCP protocol for AI agent communication, making it ideal for integration via PoolBot's MCP support.
|
|
123
211
|
|
|
124
|
-
|
|
212
|
+
### Integration Strategy
|
|
213
|
+
|
|
214
|
+
#### MCP Client Bridge (Recommended)
|
|
215
|
+
Expose HexStrike AI as an MCP server that PoolBot can communicate with.
|
|
216
|
+
|
|
217
|
+
**Architecture:**
|
|
218
|
+
```
|
|
219
|
+
PoolBot → MCP Client → HexStrike AI Server → Security Tools
|
|
220
|
+
```
|
|
125
221
|
|
|
222
|
+
**Files to Create:**
|
|
126
223
|
```
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
│
|
|
132
|
-
│
|
|
133
|
-
│
|
|
134
|
-
│
|
|
135
|
-
│
|
|
136
|
-
│
|
|
137
|
-
│
|
|
138
|
-
│
|
|
139
|
-
│
|
|
140
|
-
|
|
141
|
-
│
|
|
142
|
-
│
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
│ │
|
|
146
|
-
└─────────────────────────────────────────────────────────────┘
|
|
147
|
-
│
|
|
148
|
-
│ HTTP/MCP
|
|
149
|
-
▼
|
|
150
|
-
┌─────────────────┐
|
|
151
|
-
│ HexStrike AI │
|
|
152
|
-
│ Flask API:8888 │
|
|
153
|
-
│ FastMCP Server │
|
|
154
|
-
└─────────────────┘
|
|
224
|
+
extensions/hexstrike-ai/
|
|
225
|
+
├── package.json
|
|
226
|
+
├── poolbot.plugin.json
|
|
227
|
+
├── src/
|
|
228
|
+
│ ├── index.ts # Plugin entry point
|
|
229
|
+
│ ├── mcp-client.ts # MCP client implementation
|
|
230
|
+
│ ├── tools.ts # Security tool wrappers
|
|
231
|
+
│ ├── skills/
|
|
232
|
+
│ │ ├── reconnaissance.md
|
|
233
|
+
│ │ ├── vulnerability-scanning.md
|
|
234
|
+
│ │ ├── penetration-testing.md
|
|
235
|
+
│ │ └── ctf-solving.md
|
|
236
|
+
│ └── types.ts
|
|
237
|
+
├── python-bridge/ # Optional: Python bridge for direct integration
|
|
238
|
+
│ ├── bridge.py
|
|
239
|
+
│ └── requirements.txt
|
|
240
|
+
├── README.md
|
|
241
|
+
└── tsconfig.json
|
|
155
242
|
```
|
|
156
243
|
|
|
157
|
-
**
|
|
158
|
-
- New file: `src/gateway/server-methods/hexstrike.ts`
|
|
159
|
-
- MCP client wrapper: `src/integrations/mcp/client.ts`
|
|
160
|
-
- Service discovery from HexStrike's OpenAPI spec
|
|
161
|
-
- Python process management (HexStrike requires Python backend)
|
|
244
|
+
**Key Components:**
|
|
162
245
|
|
|
163
|
-
**
|
|
246
|
+
1. **MCP Client** (`mcp-client.ts`)
|
|
164
247
|
```typescript
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
{
|
|
176
|
-
name: "security_test_sql_injection",
|
|
177
|
-
description: "Test for SQL injection using sqlmap",
|
|
178
|
-
parameters: { url: string, parameters?: string[] }
|
|
248
|
+
// Communicates with HexStrike AI FastMCP server
|
|
249
|
+
export class HexStrikeMcpClient {
|
|
250
|
+
private serverUrl: string;
|
|
251
|
+
private tools: Map<string, McpTool>;
|
|
252
|
+
|
|
253
|
+
async connect(): Promise<void>;
|
|
254
|
+
async listTools(): Promise<McpTool[]>;
|
|
255
|
+
async callTool(name: string, params: unknown): Promise<ToolResult>;
|
|
256
|
+
async scanTarget(target: string, scanType: ScanType): Promise<ScanResult>;
|
|
179
257
|
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
2. **Security Tools** (`tools.ts`)
|
|
261
|
+
```typescript
|
|
262
|
+
// High-level security tools for PoolBot agents
|
|
263
|
+
export const hexstrikeTools: AnyAgentTool[] = [
|
|
264
|
+
{
|
|
265
|
+
name: "security_scan",
|
|
266
|
+
description: "Perform security scan on a target",
|
|
267
|
+
parameters: z.object({
|
|
268
|
+
target: z.string(),
|
|
269
|
+
scanType: z.enum(["port", "vulnerability", "web", "full"])
|
|
270
|
+
}),
|
|
271
|
+
execute: async ({ target, scanType }) => { /* ... */ }
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: "pentest_agent",
|
|
275
|
+
description: "Deploy AI pentesting agent for autonomous security testing",
|
|
276
|
+
parameters: z.object({
|
|
277
|
+
target: z.string(),
|
|
278
|
+
scope: z.string(),
|
|
279
|
+
duration: z.number().optional()
|
|
280
|
+
}),
|
|
281
|
+
execute: async ({ target, scope, duration }) => { /* ... */ }
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: "cve_lookup",
|
|
285
|
+
description: "Look up CVE information and available exploits",
|
|
286
|
+
parameters: z.object({ cveId: z.string() }),
|
|
287
|
+
execute: async ({ cveId }) => { /* ... */ }
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: "exploit_generate",
|
|
291
|
+
description: "Generate exploit code for a vulnerability",
|
|
292
|
+
parameters: z.object({
|
|
293
|
+
vulnerability: z.string(),
|
|
294
|
+
target: z.string()
|
|
295
|
+
}),
|
|
296
|
+
execute: async ({ vulnerability, target }) => { /* ... */ }
|
|
297
|
+
}
|
|
298
|
+
];
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
3. **Skills** (in `skills/`)
|
|
302
|
+
- `reconnaissance.md`: Network and target reconnaissance
|
|
303
|
+
- `vulnerability-scanning.md`: Automated vulnerability assessment
|
|
304
|
+
- `penetration-testing.md`: Ethical hacking and pentesting workflows
|
|
305
|
+
- `ctf-solving.md`: Capture The Flag automation
|
|
306
|
+
|
|
307
|
+
#### Alternative: Direct Python Bridge
|
|
308
|
+
For deeper integration, create a Python bridge that runs HexStrike AI tools directly.
|
|
309
|
+
|
|
310
|
+
**Pros:**
|
|
311
|
+
- No separate server needed
|
|
312
|
+
- Lower latency
|
|
313
|
+
- Direct access to all tools
|
|
314
|
+
|
|
315
|
+
**Cons:**
|
|
316
|
+
- Python dependency management
|
|
317
|
+
- Process isolation concerns
|
|
318
|
+
- More complex error handling
|
|
319
|
+
|
|
320
|
+
### Implementation Phases
|
|
321
|
+
|
|
322
|
+
#### Phase 1: MCP Integration (Week 1-2)
|
|
323
|
+
- [ ] Create MCP client for HexStrike AI
|
|
324
|
+
- [ ] Implement tool discovery
|
|
325
|
+
- [ ] Add 4 core security tools
|
|
326
|
+
- [ ] Create 2 skills (reconnaissance, vulnerability-scanning)
|
|
327
|
+
- [ ] Configuration management
|
|
328
|
+
|
|
329
|
+
#### Phase 2: Advanced Features (Week 3-4)
|
|
330
|
+
- [ ] Autonomous pentesting agent integration
|
|
331
|
+
- [ ] CTF solver integration
|
|
332
|
+
- [ ] Report generation
|
|
333
|
+
- [ ] Additional skills (pentesting, ctf-solving)
|
|
334
|
+
- [ ] Security-focused CLI commands
|
|
335
|
+
|
|
336
|
+
#### Phase 3: Hardening (Week 5-6)
|
|
337
|
+
- [ ] Security scanning of integration itself
|
|
338
|
+
- [ ] Permission system for security tools
|
|
339
|
+
- [ ] Audit logging
|
|
340
|
+
- [ ] Documentation and usage guidelines
|
|
341
|
+
|
|
342
|
+
### Dependencies
|
|
343
|
+
```json
|
|
180
344
|
{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
345
|
+
"dependencies": {
|
|
346
|
+
"@anthropic-ai/mcp": "^1.x",
|
|
347
|
+
"poolbot": "workspace:*"
|
|
348
|
+
},
|
|
349
|
+
"optionalDependencies": {
|
|
350
|
+
"python-bridge": "^1.x" // For direct Python integration
|
|
351
|
+
}
|
|
184
352
|
}
|
|
185
353
|
```
|
|
186
354
|
|
|
187
|
-
###
|
|
355
|
+
### Security Considerations
|
|
356
|
+
- All security tools require explicit user authorization
|
|
357
|
+
- Audit logging for all security operations
|
|
358
|
+
- Scope limitations to prevent unauthorized scanning
|
|
359
|
+
- Safe defaults (dry-run mode for destructive operations)
|
|
360
|
+
|
|
361
|
+
---
|
|
188
362
|
|
|
189
|
-
|
|
190
|
-
- Scheduled agent tasks
|
|
191
|
-
- Visual workflow editor
|
|
192
|
-
- Incident response automation
|
|
193
|
-
- Server monitoring integration
|
|
363
|
+
## 3. xyOps Integration
|
|
194
364
|
|
|
195
|
-
|
|
365
|
+
### Overview
|
|
366
|
+
xyOps is a Node.js-based workflow automation, job scheduling, and monitoring platform. It provides visual workflow editing, alerting, and incident response capabilities.
|
|
196
367
|
|
|
368
|
+
### Integration Strategy
|
|
369
|
+
|
|
370
|
+
#### Plugin + Service Integration (Recommended)
|
|
371
|
+
Implement xyOps as a PoolBot plugin that can optionally integrate with a running xyOps instance.
|
|
372
|
+
|
|
373
|
+
**Files to Create:**
|
|
197
374
|
```
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
│
|
|
203
|
-
│
|
|
204
|
-
│
|
|
205
|
-
│
|
|
206
|
-
│
|
|
207
|
-
│
|
|
208
|
-
│
|
|
209
|
-
│
|
|
210
|
-
│
|
|
211
|
-
│
|
|
212
|
-
│
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
│ xyOps Server │
|
|
219
|
-
│ Node.js API │
|
|
220
|
-
│ MongoDB/Redis │
|
|
221
|
-
└─────────────────┘
|
|
375
|
+
extensions/xyops/
|
|
376
|
+
├── package.json
|
|
377
|
+
├── poolbot.plugin.json
|
|
378
|
+
├── src/
|
|
379
|
+
│ ├── index.ts # Plugin entry
|
|
380
|
+
│ ├── client.ts # xyOps API client
|
|
381
|
+
│ ├── scheduler.ts # Job scheduling integration
|
|
382
|
+
│ ├── workflows.ts # Workflow management
|
|
383
|
+
│ ├── monitoring.ts # Monitoring integration
|
|
384
|
+
│ ├── tools.ts # Agent tools
|
|
385
|
+
│ ├── skills/
|
|
386
|
+
│ │ ├── workflow-automation.md
|
|
387
|
+
│ │ ├── job-scheduling.md
|
|
388
|
+
│ │ ├── monitoring.md
|
|
389
|
+
│ │ └── incident-response.md
|
|
390
|
+
│ └── types.ts
|
|
391
|
+
├── embedded-server/ # Optional: embedded xyOps server
|
|
392
|
+
│ └── index.ts
|
|
393
|
+
├── README.md
|
|
394
|
+
└── tsconfig.json
|
|
222
395
|
```
|
|
223
396
|
|
|
224
|
-
**
|
|
225
|
-
- New plugin: `extensions/xyops/` or `src/integrations/xyops/`
|
|
226
|
-
- Gateway methods: `src/gateway/server-methods/xyops.ts`
|
|
227
|
-
- Workflow definition format compatible with xyOps
|
|
228
|
-
- Bidirectional event streaming
|
|
397
|
+
**Key Components:**
|
|
229
398
|
|
|
230
|
-
**
|
|
399
|
+
1. **API Client** (`client.ts`)
|
|
231
400
|
```typescript
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
401
|
+
// Client for xyOps REST API
|
|
402
|
+
export class XyOpsClient {
|
|
403
|
+
private baseUrl: string;
|
|
404
|
+
private apiKey: string;
|
|
405
|
+
|
|
406
|
+
async createWorkflow(definition: WorkflowDefinition): Promise<Workflow>;
|
|
407
|
+
async scheduleJob(job: JobDefinition): Promise<ScheduledJob>;
|
|
408
|
+
async getMetrics(): Promise<SystemMetrics>;
|
|
409
|
+
async createAlert(rule: AlertRule): Promise<Alert>;
|
|
410
|
+
async createTicket(incident: Incident): Promise<Ticket>;
|
|
236
411
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
{
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
2. **Scheduler Integration** (`scheduler.ts`)
|
|
415
|
+
```typescript
|
|
416
|
+
// Integrates with PoolBot's cron system
|
|
417
|
+
export class XyOpsScheduler {
|
|
418
|
+
async scheduleAgentTask(
|
|
419
|
+
task: string,
|
|
420
|
+
schedule: CronExpression,
|
|
421
|
+
params: unknown
|
|
422
|
+
): Promise<ScheduledTask>;
|
|
423
|
+
|
|
424
|
+
async listScheduledTasks(): Promise<ScheduledTask[]>;
|
|
425
|
+
async cancelTask(taskId: string): Promise<void>;
|
|
246
426
|
}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
3. **Agent Tools** (`tools.ts`)
|
|
430
|
+
```typescript
|
|
431
|
+
// Workflow and automation tools
|
|
432
|
+
export const xyopsTools: AnyAgentTool[] = [
|
|
433
|
+
{
|
|
434
|
+
name: "workflow_create",
|
|
435
|
+
description: "Create a new automated workflow",
|
|
436
|
+
parameters: z.object({
|
|
437
|
+
name: z.string(),
|
|
438
|
+
steps: z.array(z.object({
|
|
439
|
+
action: z.string(),
|
|
440
|
+
params: z.record(z.unknown())
|
|
441
|
+
})),
|
|
442
|
+
triggers: z.array(z.string()).optional()
|
|
443
|
+
}),
|
|
444
|
+
execute: async ({ name, steps, triggers }) => { /* ... */ }
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
name: "job_schedule",
|
|
448
|
+
description: "Schedule a recurring job",
|
|
449
|
+
parameters: z.object({
|
|
450
|
+
name: z.string(),
|
|
451
|
+
schedule: z.string(), // Cron expression
|
|
452
|
+
task: z.string(),
|
|
453
|
+
params: z.record(z.unknown()).optional()
|
|
454
|
+
}),
|
|
455
|
+
execute: async ({ name, schedule, task, params }) => { /* ... */ }
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: "monitor_setup",
|
|
459
|
+
description: "Set up monitoring for a service or metric",
|
|
460
|
+
parameters: z.object({
|
|
461
|
+
target: z.string(),
|
|
462
|
+
metric: z.string(),
|
|
463
|
+
threshold: z.number(),
|
|
464
|
+
alertChannel: z.string()
|
|
465
|
+
}),
|
|
466
|
+
execute: async ({ target, metric, threshold, alertChannel }) => { /* ... */ }
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
name: "incident_create",
|
|
470
|
+
description: "Create an incident ticket",
|
|
471
|
+
parameters: z.object({
|
|
472
|
+
title: z.string(),
|
|
473
|
+
description: z.string(),
|
|
474
|
+
severity: z.enum(["low", "medium", "high", "critical"]),
|
|
475
|
+
assignee: z.string().optional()
|
|
476
|
+
}),
|
|
477
|
+
execute: async ({ title, description, severity, assignee }) => { /* ... */ }
|
|
478
|
+
}
|
|
479
|
+
];
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
4. **Skills** (in `skills/`)
|
|
483
|
+
- `workflow-automation.md`: Creating and managing automated workflows
|
|
484
|
+
- `job-scheduling.md`: Cron jobs and scheduled tasks
|
|
485
|
+
- `monitoring.md`: System and service monitoring
|
|
486
|
+
- `incident-response.md`: Incident management and ticketing
|
|
487
|
+
|
|
488
|
+
#### Embedded Server Option
|
|
489
|
+
xyOps can also be embedded as a service within PoolBot:
|
|
490
|
+
|
|
491
|
+
```typescript
|
|
492
|
+
// In embedded-server/index.ts
|
|
493
|
+
export function startEmbeddedXyOps(config: XyOpsConfig): Promise<XyOpsServer>;
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### Implementation Phases
|
|
497
|
+
|
|
498
|
+
#### Phase 1: API Integration (Week 1-2)
|
|
499
|
+
- [ ] Create xyOps API client
|
|
500
|
+
- [ ] Implement workflow CRUD operations
|
|
501
|
+
- [ ] Add 4 core tools (workflow_create, job_schedule, monitor_setup, incident_create)
|
|
502
|
+
- [ ] Create 2 skills (workflow-automation, job-scheduling)
|
|
503
|
+
- [ ] Configuration management
|
|
504
|
+
|
|
505
|
+
#### Phase 2: Embedded Features (Week 3-4)
|
|
506
|
+
- [ ] Optional embedded xyOps server
|
|
507
|
+
- [ ] Integration with PoolBot's cron system
|
|
508
|
+
- [ ] Monitoring dashboard
|
|
509
|
+
- [ ] Additional skills (monitoring, incident-response)
|
|
510
|
+
- [ ] CLI commands for workflow management
|
|
511
|
+
|
|
512
|
+
#### Phase 3: Advanced Automation (Week 5-6)
|
|
513
|
+
- [ ] Visual workflow editor integration
|
|
514
|
+
- [ ] AI-generated workflows
|
|
515
|
+
- [ ] Cross-system automation (trigger actions in other integrations)
|
|
516
|
+
- [ ] Advanced monitoring and alerting
|
|
517
|
+
|
|
518
|
+
### Dependencies
|
|
519
|
+
```json
|
|
247
520
|
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
521
|
+
"dependencies": {
|
|
522
|
+
"xyops": "^1.x", // If published to npm
|
|
523
|
+
"node-cron": "^3.x",
|
|
524
|
+
"poolbot": "workspace:*"
|
|
525
|
+
}
|
|
251
526
|
}
|
|
252
527
|
```
|
|
253
528
|
|
|
254
|
-
|
|
529
|
+
---
|
|
255
530
|
|
|
256
|
-
|
|
531
|
+
## Cross-Cutting Concerns
|
|
257
532
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
│ ├── index.ts
|
|
278
|
-
│ ├── client.ts
|
|
279
|
-
│ ├── gateway-methods.ts
|
|
280
|
-
│ ├── workflow-sync.ts
|
|
281
|
-
│ └── plugin.ts
|
|
282
|
-
└── index.ts
|
|
533
|
+
### 1. Unified CLI Experience
|
|
534
|
+
|
|
535
|
+
New CLI commands for managing integrations:
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
# Page Agent
|
|
539
|
+
poolbot browser agent <url> "find the login button and click it"
|
|
540
|
+
poolbot browser extract <url> "get all product prices"
|
|
541
|
+
|
|
542
|
+
# HexStrike AI
|
|
543
|
+
poolbot security scan <target> --type=full
|
|
544
|
+
poolbot security pentest <target> --scope=web
|
|
545
|
+
poolbot security cve CVE-2024-XXXX
|
|
546
|
+
|
|
547
|
+
# xyOps
|
|
548
|
+
poolbot workflow create --name="Daily Backup" --from-file=backup.yaml
|
|
549
|
+
poolbot workflow run <workflow-id>
|
|
550
|
+
poolbot schedule create --cron="0 2 * * *" --task="backup"
|
|
551
|
+
poolbot monitor status
|
|
283
552
|
```
|
|
284
553
|
|
|
285
|
-
###
|
|
554
|
+
### 2. Shared Configuration
|
|
286
555
|
|
|
287
|
-
|
|
288
|
-
// src/integrations/common/service-registry.ts
|
|
289
|
-
interface ExternalService {
|
|
290
|
-
id: string;
|
|
291
|
-
name: string;
|
|
292
|
-
type: 'browser' | 'security' | 'workflow' | 'custom';
|
|
293
|
-
status: 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
294
|
-
capabilities: string[];
|
|
295
|
-
tools: AnyAgentTool[];
|
|
296
|
-
gatewayMethods: string[];
|
|
297
|
-
config: ServiceConfig;
|
|
298
|
-
}
|
|
556
|
+
All integrations use PoolBot's config system:
|
|
299
557
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
558
|
+
```json
|
|
559
|
+
{
|
|
560
|
+
"integrations": {
|
|
561
|
+
"pageAgent": {
|
|
562
|
+
"enabled": true,
|
|
563
|
+
"driver": "page-agent",
|
|
564
|
+
"config": {
|
|
565
|
+
"model": "gpt-4",
|
|
566
|
+
"maxActions": 50
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"hexstrike": {
|
|
570
|
+
"enabled": true,
|
|
571
|
+
"serverUrl": "http://localhost:8888",
|
|
572
|
+
"apiKey": "${HEXSTRIKE_API_KEY}",
|
|
573
|
+
"allowedTargets": ["*.internal.company.com"]
|
|
574
|
+
},
|
|
575
|
+
"xyops": {
|
|
576
|
+
"enabled": true,
|
|
577
|
+
"serverUrl": "http://localhost:3000",
|
|
578
|
+
"embedded": false,
|
|
579
|
+
"webhookSecret": "${XYOPS_WEBHOOK_SECRET}"
|
|
580
|
+
}
|
|
581
|
+
}
|
|
306
582
|
}
|
|
307
583
|
```
|
|
308
584
|
|
|
309
|
-
###
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
xyops:
|
|
331
|
-
enabled: true
|
|
332
|
-
apiUrl: "http://localhost:3000"
|
|
333
|
-
wsUrl: "ws://localhost:3000/ws"
|
|
334
|
-
syncWorkflows: true
|
|
335
|
-
bidirectionalEvents: true
|
|
585
|
+
### 3. Event Integration
|
|
586
|
+
|
|
587
|
+
Integrations can emit and listen to events:
|
|
588
|
+
|
|
589
|
+
```typescript
|
|
590
|
+
// Example: xyOps workflow triggers Page Agent action
|
|
591
|
+
plugin.on("workflow:step:execute", async (event) => {
|
|
592
|
+
if (event.step.type === "browser_action") {
|
|
593
|
+
const result = await pageAgent.execute(event.step.instruction);
|
|
594
|
+
return { result };
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
|
|
598
|
+
// Example: HexStrike finding triggers xyOps incident
|
|
599
|
+
plugin.on("security:finding:critical", async (event) => {
|
|
600
|
+
await xyops.createIncident({
|
|
601
|
+
title: `Critical vulnerability found: ${event.cve}`,
|
|
602
|
+
severity: "critical",
|
|
603
|
+
description: event.details
|
|
604
|
+
});
|
|
605
|
+
});
|
|
336
606
|
```
|
|
337
607
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
### Phase 1: Foundation (Week 1)
|
|
341
|
-
- [ ] Create `src/integrations/` module structure
|
|
342
|
-
- [ ] Implement `IntegrationServiceRegistry`
|
|
343
|
-
- [ ] Add configuration schema and validation
|
|
344
|
-
- [ ] Create common connection manager
|
|
345
|
-
- [ ] Add integration status to `poolbot status`
|
|
346
|
-
|
|
347
|
-
### Phase 2: Page Agent Integration (Week 2)
|
|
348
|
-
- [ ] Install Page Agent npm packages
|
|
349
|
-
- [ ] Create browser route extensions
|
|
350
|
-
- [ ] Implement text-based DOM agent tools
|
|
351
|
-
- [ ] Add Chrome extension relay integration
|
|
352
|
-
- [ ] Tests and documentation
|
|
353
|
-
|
|
354
|
-
### Phase 3: HexStrike Integration (Week 3-4)
|
|
355
|
-
- [ ] Implement MCP client wrapper
|
|
356
|
-
- [ ] Create Python process manager
|
|
357
|
-
- [ ] Auto-generate tools from HexStrike schema
|
|
358
|
-
- [ ] Add security-specific gateway methods
|
|
359
|
-
- [ ] Implement tool allowlist/denylist
|
|
360
|
-
- [ ] Tests and documentation
|
|
361
|
-
|
|
362
|
-
### Phase 4: xyOps Integration (Week 5)
|
|
363
|
-
- [ ] Create xyOps API client
|
|
364
|
-
- [ ] Implement workflow sync
|
|
365
|
-
- [ ] Add bidirectional event streaming
|
|
366
|
-
- [ ] Create workflow agent tools
|
|
367
|
-
- [ ] Tests and documentation
|
|
368
|
-
|
|
369
|
-
### Phase 5: Polish (Week 6)
|
|
370
|
-
- [ ] Unified CLI commands: `poolbot integrations`
|
|
371
|
-
- [ ] Status dashboard for all integrations
|
|
372
|
-
- [ ] Documentation and examples
|
|
373
|
-
- [ ] Performance optimization
|
|
374
|
-
- [ ] Final testing
|
|
608
|
+
### 4. Shared Skills
|
|
375
609
|
|
|
376
|
-
|
|
610
|
+
Cross-project skills that combine capabilities:
|
|
377
611
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
-
|
|
381
|
-
|
|
612
|
+
```markdown
|
|
613
|
+
---
|
|
614
|
+
id: automated-security-audit
|
|
615
|
+
name: Automated Security Audit
|
|
616
|
+
version: 1.0.0
|
|
617
|
+
capabilities:
|
|
618
|
+
- browser
|
|
619
|
+
- security
|
|
620
|
+
- workflow
|
|
621
|
+
---
|
|
382
622
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
623
|
+
# Automated Security Audit
|
|
624
|
+
|
|
625
|
+
Perform comprehensive security audits combining browser automation,
|
|
626
|
+
vulnerability scanning, and automated reporting.
|
|
627
|
+
|
|
628
|
+
## Workflow
|
|
629
|
+
|
|
630
|
+
1. Use Page Agent to navigate and map the target application
|
|
631
|
+
2. Use HexStrike AI to scan for vulnerabilities
|
|
632
|
+
3. Use xyOps to schedule recurring scans
|
|
633
|
+
4. Generate and deliver audit reports
|
|
392
634
|
```
|
|
393
635
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
636
|
+
---
|
|
637
|
+
|
|
638
|
+
## Implementation Timeline
|
|
639
|
+
|
|
640
|
+
### Phase 1: Foundation (Weeks 1-2)
|
|
641
|
+
- [ ] Set up plugin development infrastructure
|
|
642
|
+
- [ ] Implement MCP client improvements for HexStrike
|
|
643
|
+
- [ ] Create shared integration utilities
|
|
644
|
+
- [ ] Begin Page Agent basic integration
|
|
645
|
+
|
|
646
|
+
### Phase 2: Core Integrations (Weeks 3-6)
|
|
647
|
+
- [ ] Complete Page Agent integration
|
|
648
|
+
- [ ] Complete HexStrike AI integration
|
|
649
|
+
- [ ] Begin xyOps integration
|
|
650
|
+
- [ ] Write comprehensive tests
|
|
651
|
+
|
|
652
|
+
### Phase 3: Advanced Features (Weeks 7-10)
|
|
653
|
+
- [ ] Complete xyOps integration
|
|
654
|
+
- [ ] Implement cross-integration features
|
|
655
|
+
- [ ] Add CLI commands
|
|
656
|
+
- [ ] Create documentation
|
|
657
|
+
|
|
658
|
+
### Phase 4: Polish & Release (Weeks 11-12)
|
|
659
|
+
- [ ] Performance optimization
|
|
660
|
+
- [ ] Security audit
|
|
661
|
+
- [ ] User documentation
|
|
662
|
+
- [ ] Release candidate
|
|
663
|
+
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
## Success Metrics
|
|
667
|
+
|
|
668
|
+
| Metric | Target |
|
|
669
|
+
|--------|--------|
|
|
670
|
+
| Page Agent tool coverage | 90% of core features |
|
|
671
|
+
| HexStrike AI tool coverage | 80% of security tools |
|
|
672
|
+
| xyOps API coverage | 100% of core APIs |
|
|
673
|
+
| Test coverage | >70% for each integration |
|
|
674
|
+
| Documentation completeness | 100% of public APIs |
|
|
675
|
+
| CLI command coverage | All major features |
|
|
398
676
|
|
|
399
|
-
|
|
677
|
+
---
|
|
400
678
|
|
|
401
|
-
|
|
402
|
-
2. **Independence**: Self-hosted, no external API dependencies
|
|
403
|
-
3. **Extensibility**: New integrations follow established patterns
|
|
404
|
-
4. **Maintainability**: Clean separation of concerns
|
|
405
|
-
5. **Performance**: Local execution where possible
|
|
679
|
+
## Risk Assessment
|
|
406
680
|
|
|
407
|
-
|
|
681
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
682
|
+
|------|------------|--------|------------|
|
|
683
|
+
| Page Agent API changes | Medium | Medium | Version pinning, abstraction layer |
|
|
684
|
+
| HexStrike Python deps | Medium | High | Containerization, optional integration |
|
|
685
|
+
| xyOps breaking changes | Low | Medium | API versioning, client abstraction |
|
|
686
|
+
| Security tool misuse | Low | High | Permission system, audit logging |
|
|
687
|
+
| Performance degradation | Medium | Medium | Lazy loading, caching, profiling |
|
|
408
688
|
|
|
409
|
-
|
|
410
|
-
|------|------------|
|
|
411
|
-
| Python dependency for HexStrike | Optional integration, clear error messages |
|
|
412
|
-
| Security tool misuse | Tool allowlist, approval workflows, audit logging |
|
|
413
|
-
| Performance overhead | Lazy loading, connection pooling, caching |
|
|
414
|
-
| Maintenance burden | Clean interfaces, automated tests, documentation |
|
|
689
|
+
---
|
|
415
690
|
|
|
416
691
|
## Conclusion
|
|
417
692
|
|
|
418
|
-
This integration
|
|
693
|
+
This integration plan provides a roadmap for making PoolBot a complete and independent AI automation platform. By leveraging the existing plugin architecture and following PoolBot's design principles, these integrations will:
|
|
694
|
+
|
|
695
|
+
1. **Enhance capabilities** without breaking existing functionality
|
|
696
|
+
2. **Maintain independence** through optional, modular integrations
|
|
697
|
+
3. **Follow best practices** for security, testing, and documentation
|
|
698
|
+
4. **Enable new use cases** across browser automation, security, and infrastructure
|
|
699
|
+
|
|
700
|
+
The phased approach allows for incremental delivery and user feedback, ensuring each integration meets production quality standards before moving to the next phase.
|
|
701
|
+
|
|
702
|
+
---
|
|
703
|
+
|
|
704
|
+
## Appendix: File Locations
|
|
705
|
+
|
|
706
|
+
### New Files
|
|
707
|
+
```
|
|
708
|
+
extensions/page-agent/
|
|
709
|
+
(see structure above)
|
|
710
|
+
|
|
711
|
+
extensions/hexstrike-ai/
|
|
712
|
+
(see structure above)
|
|
713
|
+
|
|
714
|
+
extensions/xyops/
|
|
715
|
+
(see structure above)
|
|
716
|
+
|
|
717
|
+
src/skills/integrations/
|
|
718
|
+
├── page-agent/
|
|
719
|
+
│ └── *.md
|
|
720
|
+
├── hexstrike/
|
|
721
|
+
│ └── *.md
|
|
722
|
+
└── xyops/
|
|
723
|
+
└── *.md
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
### Modified Files (minimal)
|
|
727
|
+
```
|
|
728
|
+
src/plugins/manifest.ts
|
|
729
|
+
- Add integration metadata fields
|
|
730
|
+
|
|
731
|
+
src/config/schema.ts
|
|
732
|
+
- Add integration config sections
|
|
733
|
+
|
|
734
|
+
src/cli/index.ts
|
|
735
|
+
- Register new CLI commands
|
|
736
|
+
```
|
|
419
737
|
|
|
420
|
-
|
|
421
|
-
-
|
|
422
|
-
-
|
|
423
|
-
-
|
|
424
|
-
-
|
|
738
|
+
### No Changes Required
|
|
739
|
+
- Core agent system
|
|
740
|
+
- Gateway server
|
|
741
|
+
- ACP protocol
|
|
742
|
+
- Existing plugin system
|
|
743
|
+
- Memory/embeddings system
|
|
744
|
+
- Browser system (Playwright driver)
|