@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.
Files changed (128) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +147 -69
  3. package/dist/.buildstamp +1 -1
  4. package/dist/agents/error-classifier.js +26 -77
  5. package/dist/agents/skills/security.js +1 -7
  6. package/dist/build-info.json +3 -3
  7. package/dist/cli/cron-cli/register.cron-dashboard.js +339 -0
  8. package/dist/cli/cron-cli/register.js +2 -0
  9. package/dist/cli/errors.js +187 -0
  10. package/dist/cli/program/command-registry.js +13 -0
  11. package/dist/cli/program/register.maintenance.js +21 -0
  12. package/dist/cli/program/register.subclis.js +9 -0
  13. package/dist/cli/swarm-cli/register.js +8 -0
  14. package/dist/cli/swarm-cli/register.swarm-status.js +488 -0
  15. package/dist/cli/telemetry-cli/register.js +10 -0
  16. package/dist/cli/telemetry-cli/register.telemetry-alerts.js +176 -0
  17. package/dist/cli/telemetry-cli/register.telemetry-metrics.js +323 -0
  18. package/dist/cli/telemetry-cli/register.telemetry-status.js +179 -0
  19. package/dist/commands/doctor-checks.js +498 -0
  20. package/dist/context-engine/index.js +1 -1
  21. package/dist/context-engine/legacy.js +1 -3
  22. package/dist/context-engine/summarizing.js +5 -8
  23. package/dist/cron/service/timer.js +18 -0
  24. package/dist/gateway/protocol/index.js +5 -2
  25. package/dist/gateway/protocol/schema/error-codes.js +1 -0
  26. package/dist/gateway/protocol/schema/swarm.js +80 -0
  27. package/dist/gateway/protocol/schema.js +1 -0
  28. package/dist/gateway/server-close.js +4 -0
  29. package/dist/gateway/server-constants.js +1 -0
  30. package/dist/gateway/server-cron.js +29 -0
  31. package/dist/gateway/server-maintenance.js +35 -2
  32. package/dist/gateway/server-methods/swarm.js +58 -0
  33. package/dist/gateway/server-methods/telemetry.js +71 -0
  34. package/dist/gateway/server-methods-list.js +8 -0
  35. package/dist/gateway/server-methods.js +9 -2
  36. package/dist/gateway/server.impl.js +33 -16
  37. package/dist/infra/abort-pattern.js +4 -4
  38. package/dist/infra/retry.js +3 -1
  39. package/dist/skills/commands.js +7 -25
  40. package/dist/skills/index.js +14 -17
  41. package/dist/skills/parser.js +12 -27
  42. package/dist/skills/registry.js +3 -6
  43. package/dist/skills/security.js +2 -8
  44. package/dist/swarm/service.js +247 -0
  45. package/dist/telemetry/alert-engine.js +258 -0
  46. package/dist/telemetry/cron-instrumentation.js +49 -0
  47. package/dist/telemetry/gateway-instrumentation.js +80 -0
  48. package/dist/telemetry/instrumentation.js +66 -0
  49. package/dist/telemetry/service.js +345 -0
  50. package/dist/tui/components/assistant-message.js +6 -2
  51. package/dist/tui/components/hyperlink-markdown.js +32 -0
  52. package/dist/tui/components/searchable-select-list.js +12 -1
  53. package/dist/tui/components/user-message.js +6 -2
  54. package/dist/tui/index.js +22 -6
  55. package/dist/tui/theme/theme-detection.js +226 -0
  56. package/dist/tui/tui-command-handlers.js +20 -0
  57. package/dist/tui/tui-formatters.js +4 -3
  58. package/dist/tui/utils/ctrl-c-handler.js +67 -0
  59. package/dist/tui/utils/osc8-hyperlinks.js +208 -0
  60. package/dist/tui/utils/safe-stop.js +180 -0
  61. package/dist/tui/utils/session-key-utils.js +81 -0
  62. package/dist/tui/utils/text-sanitization.js +284 -0
  63. package/dist/utils/lru-cache.js +116 -0
  64. package/dist/utils/performance.js +199 -0
  65. package/dist/utils/retry.js +240 -0
  66. package/docs/MELHORIAS_IMPLEMENTADAS.md +228 -0
  67. package/docs/MELHORIAS_PROFISSIONAIS.md +282 -0
  68. package/docs/PLANO_ACAO_TUI.md +357 -0
  69. package/docs/PROGRESSO_TUI.md +66 -0
  70. package/docs/RELATORIO_FINAL.md +217 -0
  71. package/docs/diagnostico-shell-completion.md +265 -0
  72. package/docs/features/advanced-memory.md +585 -0
  73. package/docs/features/discord-components-v2.md +277 -0
  74. package/docs/features/swarm.md +100 -0
  75. package/docs/features/telemetry.md +284 -0
  76. package/docs/integrations/INTEGRATION_PLAN.md +665 -345
  77. package/docs/models/provider-infrastructure.md +400 -0
  78. package/docs/security/exec-approvals.md +294 -0
  79. package/extensions/bluebubbles/package.json +1 -1
  80. package/extensions/copilot-proxy/package.json +1 -1
  81. package/extensions/diagnostics-otel/package.json +1 -1
  82. package/extensions/discord/package.json +1 -1
  83. package/extensions/feishu/package.json +1 -1
  84. package/extensions/google-antigravity-auth/package.json +1 -1
  85. package/extensions/google-gemini-cli-auth/package.json +1 -1
  86. package/extensions/googlechat/package.json +1 -1
  87. package/extensions/hexstrike-bridge/README.md +119 -0
  88. package/extensions/hexstrike-bridge/index.test.ts +247 -0
  89. package/extensions/hexstrike-bridge/index.ts +487 -0
  90. package/extensions/hexstrike-bridge/package.json +17 -0
  91. package/extensions/imessage/package.json +1 -1
  92. package/extensions/irc/package.json +1 -1
  93. package/extensions/line/package.json +1 -1
  94. package/extensions/llm-task/package.json +1 -1
  95. package/extensions/lobster/package.json +1 -1
  96. package/extensions/matrix/CHANGELOG.md +10 -0
  97. package/extensions/matrix/package.json +1 -1
  98. package/extensions/mattermost/package.json +1 -1
  99. package/extensions/mavalie/README.md +97 -0
  100. package/extensions/mavalie/package.json +15 -0
  101. package/extensions/mavalie/src/index.ts +62 -0
  102. package/extensions/mcp-server/index.ts +14 -0
  103. package/extensions/mcp-server/package.json +11 -0
  104. package/extensions/mcp-server/src/service.ts +540 -0
  105. package/extensions/memory-core/package.json +1 -1
  106. package/extensions/memory-lancedb/package.json +1 -1
  107. package/extensions/minimax-portal-auth/package.json +1 -1
  108. package/extensions/msteams/CHANGELOG.md +10 -0
  109. package/extensions/msteams/package.json +1 -1
  110. package/extensions/nextcloud-talk/package.json +1 -1
  111. package/extensions/nostr/CHANGELOG.md +10 -0
  112. package/extensions/nostr/package.json +1 -1
  113. package/extensions/open-prose/package.json +1 -1
  114. package/extensions/openai-codex-auth/package.json +1 -1
  115. package/extensions/signal/package.json +1 -1
  116. package/extensions/slack/package.json +1 -1
  117. package/extensions/telegram/package.json +1 -1
  118. package/extensions/tlon/package.json +1 -1
  119. package/extensions/twitch/CHANGELOG.md +10 -0
  120. package/extensions/twitch/package.json +1 -1
  121. package/extensions/voice-call/CHANGELOG.md +10 -0
  122. package/extensions/voice-call/package.json +1 -1
  123. package/extensions/whatsapp/package.json +1 -1
  124. package/extensions/zalo/CHANGELOG.md +10 -0
  125. package/extensions/zalo/package.json +1 -1
  126. package/extensions/zalouser/CHANGELOG.md +10 -0
  127. package/extensions/zalouser/package.json +1 -1
  128. package/package.json +8 -1
@@ -1,424 +1,744 @@
1
- # PoolBot Integration Architecture Plan
1
+ # PoolBot Integration Plan: Page Agent, HexStrike AI, and xyOps
2
2
 
3
3
  ## Executive Summary
4
4
 
5
- This document outlines the integration strategy for three external projects into PoolBot to create a "complete and independent" AI agent platform:
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
- 1. **Page Agent** (Alibaba) - GUI browser automation via text-based DOM manipulation
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
- ## Current PoolBot Architecture Analysis
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
- | System | Location | Capabilities | Integration Point |
16
- |--------|----------|--------------|-------------------|
17
- | **Skills System** | `src/skills/` | Modular skill loading, progressive disclosure, security scanning | New skill type: `external-service` |
18
- | **Plugin System** | `src/plugins/` | Tools, hooks, HTTP handlers, CLI commands, gateway methods | Plugin adapters for external services |
19
- | **Browser Automation** | `src/browser/` | Playwright-based browser control, Chrome extension relay, agent routes | Extend with Page Agent's text-based DOM approach |
20
- | **Node Registry** | `src/gateway/node-registry.ts` | Distributed node management, command invocation | External services as "virtual nodes" |
21
- | **Gateway Methods** | `src/gateway/server-methods/` | RPC-style API endpoints | New methods for external service proxy |
22
- | **Agent Tools** | `src/agents/tools/` | LLM-callable tools | Auto-generated tools from external services |
23
- | **Context Engine** | `src/context-engine/` | Legacy + Summarizing implementations | No changes needed |
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 Integration Patterns
41
+ ### Key Architectural Decisions
27
42
 
28
- ```typescript
29
- // Pattern 1: External Service as Virtual Node
30
- interface ExternalServiceNode {
31
- nodeId: string; // e.g., "page-agent", "hexstrike-ai"
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
- // Pattern 2: Gateway Method Proxy
39
- interface ServiceProxyHandler {
40
- method: string; // e.g., "pageagent.navigate"
41
- handler: GatewayRequestHandler;
42
- serviceConfig: ServiceConfig;
43
- }
48
+ ## Integration Architecture
44
49
 
45
- // Pattern 3: Auto-Generated Agent Tools
46
- type ServiceToolGenerator = (
47
- serviceSchema: ServiceSchema
48
- ) => AnyAgentTool[];
49
-
50
- // Pattern 4: Plugin Adapter
51
- interface ExternalServicePlugin {
52
- id: string;
53
- serviceType: string;
54
- register: (api: PoolBotPluginApi) => void;
55
- activate: (api: PoolBotPluginApi) => Promise<void>;
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 Architecture
82
+ ## Detailed Integration Plans
83
+
84
+ ---
85
+
86
+ ## 1. Page Agent Integration
60
87
 
61
- ### 1. Page Agent Integration (Browser Enhancement)
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
- **Rationale**: Page Agent's text-based DOM manipulation complements PoolBot's existing screenshot-based browser automation. It provides:
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
- **Integration Approach**: **Browser Route Extension**
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
- │ PoolBot Browser System │
73
- ├─────────────────────────────────────────────────────────────┤
74
- │ Existing Routes │ New Page Agent Routes │
75
- ───────────────── │ ───────────────────── │
76
- GET /tabs │ POST /pageagent/navigate │
77
- POST /tabs/open │ POST /pageagent/act │
78
- POST /agent/snapshot│ POST /pageagent/extract │
79
- POST /agent/act POST /pageagent/scroll │
80
- ... WebSocket /pageagent/session │
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
- **Implementation**:
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
- **Agent Tools Generated**:
116
+ 1. **Driver Implementation** (`driver.ts`)
97
117
  ```typescript
98
- {
99
- name: "browser_navigate_text",
100
- description: "Navigate to URL using text-based DOM approach",
101
- parameters: { url: string, waitFor?: string }
102
- }
103
- {
104
- name: "browser_extract_data",
105
- description: "Extract structured data from page using selectors",
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
- name: "browser_multi_page_task",
110
- description: "Execute task across multiple pages",
111
- parameters: { steps: Array<{action: string, target: string}> }
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
- ### 2. HexStrike AI Integration (Security Platform)
205
+ ---
206
+
207
+ ## 2. HexStrike AI Integration
116
208
 
117
- **Rationale**: HexStrike provides 150+ security tools and 12+ AI agents. Integration adds:
118
- - Penetration testing capabilities
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
- **Integration Approach**: **MCP Client + Virtual Node**
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
- │ PoolBot Gateway System │
129
- ├─────────────────────────────────────────────────────────────┤
130
- │ │
131
- ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
132
- │ Node Registry│◄───│ HexStrike │ │ Other Nodes │ │
133
- │ │ │ MCP Client │ │ │ │
134
- └───────┬───────┘ └──────────────┘ └──────────────┘ │
135
-
136
-
137
- ┌──────────────┐
138
- Gateway Methods │
139
- ───────────── │
140
- │ │ hexstrike.scan │
141
- hexstrike.exploit │
142
- hexstrike.ctf.solve │
143
- │ │ hexstrike.cve.lookup │
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
- **Implementation**:
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
- **Agent Tools Generated** (sample from 150+ tools):
246
+ 1. **MCP Client** (`mcp-client.ts`)
164
247
  ```typescript
165
- {
166
- name: "security_scan_port",
167
- description: "Scan ports using nmap",
168
- parameters: { target: string, ports?: string }
169
- }
170
- {
171
- name: "security_scan_vulnerability",
172
- description: "Run vulnerability scan using nuclei",
173
- parameters: { target: string, templates?: string[] }
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
- name: "security_solve_ctf",
182
- description: "Solve CTF challenge using AI agent",
183
- parameters: { challenge_type: string, description: string }
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
- ### 3. xyOps Integration (Workflow Automation)
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
- **Rationale**: xyOps adds job scheduling, workflow automation, and monitoring. Integration provides:
190
- - Scheduled agent tasks
191
- - Visual workflow editor
192
- - Incident response automation
193
- - Server monitoring integration
363
+ ## 3. xyOps Integration
194
364
 
195
- **Integration Approach**: **Plugin + Gateway Methods**
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
- │ PoolBot Workflow System │
200
- ├─────────────────────────────────────────────────────────────┤
201
- │ │
202
- ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
203
- │ Cron System │◄───│ xyOps │───►│ Job Queue │ │
204
- │ │ │ Integration │ │ │ │
205
- └──────────────┘ └──────────────┘ └──────────────┘ │
206
- │ │
207
- ▼ │
208
- ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
209
- Workflow │ │ xyOps API │ │ Monitoring │ │
210
- Definitions │◄───│ Client │───►│ Alerts │ │
211
- └──────────────┘ └──────────────┘ └──────────────┘
212
-
213
- └─────────────────────────────────────────────────────────────┘
214
-
215
- HTTP/WebSocket
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
- **Implementation**:
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
- **Agent Tools Generated**:
399
+ 1. **API Client** (`client.ts`)
231
400
  ```typescript
232
- {
233
- name: "workflow_create",
234
- description: "Create automated workflow",
235
- parameters: { name: string, triggers: Trigger[], actions: Action[] }
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
- name: "workflow_schedule",
239
- description: "Schedule recurring agent task",
240
- parameters: { cron: string, prompt: string, agentId?: string }
241
- }
242
- {
243
- name: "workflow_monitor",
244
- description: "Monitor system and alert on conditions",
245
- parameters: { metric: string, threshold: number, alertChannel: string }
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
- name: "workflow_incident_response",
249
- description: "Execute incident response playbook",
250
- parameters: { incident_type: string, severity: string }
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
- ## Unified Integration Layer
529
+ ---
255
530
 
256
- ### New Core Module: `src/integrations/`
531
+ ## Cross-Cutting Concerns
257
532
 
258
- ```
259
- src/integrations/
260
- ├── common/
261
- │ ├── types.ts # Shared integration types
262
- │ ├── service-registry.ts # External service registry
263
- │ ├── connection-manager.ts # Connection lifecycle management
264
- │ └── tool-generator.ts # Auto-generate agent tools from schemas
265
- ├── page-agent/
266
- │ ├── index.ts
267
- │ ├── routes.ts
268
- │ ├── client.ts
269
- │ └── tools.ts
270
- ├── hexstrike/
271
- │ ├── index.ts
272
- │ ├── mcp-client.ts
273
- │ ├── gateway-methods.ts
274
- │ ├── tool-adapter.ts
275
- │ └── process-manager.ts # Python process management
276
- ├── xyops/
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
- ### Service Registry
554
+ ### 2. Shared Configuration
286
555
 
287
- ```typescript
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
- class IntegrationServiceRegistry extends EventEmitter {
301
- register(service: ExternalService): void;
302
- unregister(serviceId: string): void;
303
- get(serviceId: string): ExternalService | undefined;
304
- listByType(type: string): ExternalService[];
305
- getAllTools(): AnyAgentTool[];
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
- ### Configuration Schema
310
-
311
- ```yaml
312
- # poolbot.yaml additions
313
- integrations:
314
- page-agent:
315
- enabled: true
316
- mode: "embedded" # or "external" for standalone
317
- chromeExtension: true
318
- defaultProfile: "default"
319
-
320
- hexstrike:
321
- enabled: true
322
- mode: "managed" # PoolBot manages Python process
323
- # mode: "external" # Connect to existing instance
324
- apiUrl: "http://localhost:8888"
325
- mcpEndpoint: "/mcp"
326
- tools:
327
- allowlist: [] # empty = all allowed
328
- denylist: [] # blocked tools
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
- ## Implementation Phases
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
- ## Security Considerations
610
+ Cross-project skills that combine capabilities:
377
611
 
378
- ### Sandboxing
379
- - HexStrike tools run in isolated Python subprocess
380
- - Network access restricted to configured endpoints
381
- - File system access limited to temp directories
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
- ### Tool Permissions
384
- ```typescript
385
- interface ToolPermissionPolicy {
386
- service: string;
387
- toolPattern: string; // glob pattern
388
- allowed: boolean;
389
- requireApproval: boolean;
390
- rateLimit?: number;
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
- ### Audit Logging
395
- - All external service calls logged
396
- - Tool invocations tracked with session correlation
397
- - Security tool results encrypted at rest
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
- ## Benefits
677
+ ---
400
678
 
401
- 1. **Completeness**: PoolBot becomes a full-stack AI agent platform
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
- ## Risk Mitigation
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
- | Risk | Mitigation |
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 architecture leverages PoolBot's existing plugin system, gateway methods, and node registry to seamlessly incorporate external capabilities. The modular design ensures each integration is optional, well-isolated, and follows established patterns.
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
- The result is a "complete and independent" AI agent platform that can:
421
- - Browse and interact with web pages (Page Agent)
422
- - Perform security assessments (HexStrike)
423
- - Automate workflows and schedules (xyOps)
424
- - All while maintaining PoolBot's core philosophy of local-first, privacy-respecting AI
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)