dominusnode-crewai 1.0.0__tar.gz

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.
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+ *.egg
8
+ .pytest_cache/
9
+ .coverage
10
+ htmlcov/
11
+ .venv/
12
+ venv/
13
+ .DS_Store
14
+ .idea/
15
+ .vscode/
16
+ *.swp
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 (2026-03-01)
4
+
5
+ - Initial release
6
+ - 4 CrewAI tools: proxy fetch, wallet balance, top-up (Stripe), top-up (PayPal)
7
+ - SSRF protection, credential scrubbing, OFAC compliance
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dominus Node
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,221 @@
1
+ Metadata-Version: 2.4
2
+ Name: dominusnode-crewai
3
+ Version: 1.0.0
4
+ Summary: CrewAI tools for DomiNode rotating proxy service
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: crewai[tools]>=0.28.0
9
+ Requires-Dist: dominusnode>=0.1.0
10
+ Requires-Dist: httpx>=0.24.0
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest; extra == 'dev'
13
+ Description-Content-Type: text/markdown
14
+
15
+ # dominusnode-crewai
16
+
17
+ CrewAI tools for the [DomiNode](https://dominusnode.com) rotating proxy-as-a-service platform. Gives your CrewAI agents the ability to fetch web content through rotating proxies, check wallet balance, and discover geo-targeting options.
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install dominusnode-crewai
23
+ ```
24
+
25
+ Or install from source:
26
+
27
+ ```bash
28
+ cd integrations/crewai
29
+ pip install -e ".[dev]"
30
+ ```
31
+
32
+ ## Environment Setup
33
+
34
+ Set your DomiNode API key as an environment variable:
35
+
36
+ ```bash
37
+ export DOMINUSNODE_API_KEY="dn_live_your_api_key_here"
38
+ ```
39
+
40
+ Optionally configure the API base URL and proxy host:
41
+
42
+ ```bash
43
+ export DOMINUSNODE_BASE_URL="https://api.dominusnode.com"
44
+ export DOMINUSNODE_PROXY_HOST="proxy.dominusnode.com"
45
+ ```
46
+
47
+ ## Quick Start
48
+
49
+ ```python
50
+ from crewai import Agent, Task, Crew
51
+ from dominusnode_crewai import (
52
+ DominusNodeWebScrapeTool,
53
+ DominusNodeBalanceTool,
54
+ DominusNodeGeoTargetTool,
55
+ )
56
+
57
+ # Create tools (picks up DOMINUSNODE_API_KEY from environment)
58
+ scrape_tool = DominusNodeWebScrapeTool()
59
+ balance_tool = DominusNodeBalanceTool()
60
+ geo_tool = DominusNodeGeoTargetTool()
61
+
62
+ # Or pass the API key explicitly
63
+ scrape_tool = DominusNodeWebScrapeTool(api_key="dn_live_...")
64
+
65
+ # Create a CrewAI agent with DomiNode tools
66
+ researcher = Agent(
67
+ role="Web Researcher",
68
+ goal="Gather competitive intelligence from geo-restricted sources",
69
+ backstory="You are a skilled researcher who can access content worldwide.",
70
+ tools=[scrape_tool, balance_tool, geo_tool],
71
+ verbose=True,
72
+ )
73
+
74
+ # Create a task
75
+ task = Task(
76
+ description=(
77
+ "Check our remaining proxy budget, then fetch the homepage of "
78
+ "https://example.com through a US datacenter proxy. Summarize "
79
+ "the content and report the remaining balance."
80
+ ),
81
+ expected_output="A summary of the page content and remaining budget.",
82
+ agent=researcher,
83
+ )
84
+
85
+ # Run the crew
86
+ crew = Crew(agents=[researcher], tasks=[task], verbose=True)
87
+ result = crew.kickoff()
88
+ print(result)
89
+ ```
90
+
91
+ ## Tools
92
+
93
+ ### DominusNodeWebScrapeTool
94
+
95
+ Fetch web page content through DomiNode's rotating proxy network.
96
+
97
+ **Parameters:**
98
+ | Parameter | Type | Required | Default | Description |
99
+ |-----------|------|----------|---------|-------------|
100
+ | `url` | str | Yes | - | The URL to fetch |
101
+ | `country` | str | No | None | Two-letter country code (e.g., "US", "GB", "DE") |
102
+ | `proxy_type` | str | No | "dc" | Proxy type: "dc" (datacenter, $3/GB) or "residential" ($5/GB) |
103
+
104
+ **Example output:**
105
+ ```
106
+ Status: 200
107
+ Content-Type: text/html; charset=utf-8
108
+ Body (1234 chars):
109
+ <html>...
110
+ ```
111
+
112
+ **Security:** URLs are validated to block SSRF attacks. Private IPs, localhost, metadata endpoints, file:// schemes, and other dangerous patterns are rejected.
113
+
114
+ ### DominusNodeBalanceTool
115
+
116
+ Check remaining proxy balance and estimate browsing budget.
117
+
118
+ **Parameters:** None
119
+
120
+ **Example output:**
121
+ ```
122
+ Wallet Balance: $30.00
123
+ Estimated remaining:
124
+ - Datacenter proxy: 10.00 GB (at $3.00/GB)
125
+ - Residential proxy: 6.00 GB (at $5.00/GB)
126
+ ```
127
+
128
+ ### DominusNodeGeoTargetTool
129
+
130
+ List available proxy server countries and geo-targeting options.
131
+
132
+ **Parameters:** None
133
+
134
+ **Example output:**
135
+ ```
136
+ DomiNode Geo-Targeting Options:
137
+ Supported countries: US, GB, DE, JP, BR
138
+ Blocked countries: CU, IR, KP, RU, SY
139
+ Targeting features: US state targeting, City targeting
140
+ US states: CA, NY, TX
141
+ Major US cities: Los Angeles, New York, Houston
142
+ Rotation interval: 1-60 minutes
143
+ ```
144
+
145
+ ## Example Crew Configuration
146
+
147
+ ```python
148
+ from crewai import Agent, Task, Crew, Process
149
+ from dominusnode_crewai import (
150
+ DominusNodeWebScrapeTool,
151
+ DominusNodeBalanceTool,
152
+ DominusNodeGeoTargetTool,
153
+ )
154
+
155
+ # Tools
156
+ scrape = DominusNodeWebScrapeTool()
157
+ balance = DominusNodeBalanceTool()
158
+ geo = DominusNodeGeoTargetTool()
159
+
160
+ # Agents
161
+ scout = Agent(
162
+ role="Geo Scout",
163
+ goal="Identify available proxy locations for the target region",
164
+ backstory="You map proxy coverage before the research team begins.",
165
+ tools=[geo, balance],
166
+ )
167
+
168
+ researcher = Agent(
169
+ role="Web Researcher",
170
+ goal="Collect data from target websites through rotating proxies",
171
+ backstory="You are an expert at gathering web data across different regions.",
172
+ tools=[scrape, balance],
173
+ )
174
+
175
+ analyst = Agent(
176
+ role="Data Analyst",
177
+ goal="Analyze and summarize the collected data",
178
+ backstory="You turn raw web data into actionable insights.",
179
+ )
180
+
181
+ # Tasks
182
+ scout_task = Task(
183
+ description="Check which countries are available for proxy routing and verify we have sufficient budget.",
184
+ expected_output="A report of available countries and current budget.",
185
+ agent=scout,
186
+ )
187
+
188
+ research_task = Task(
189
+ description="Fetch the pricing pages of https://example.com from US and GB proxies. Compare the content.",
190
+ expected_output="Raw content from both regions with noted differences.",
191
+ agent=researcher,
192
+ )
193
+
194
+ analysis_task = Task(
195
+ description="Analyze the collected data and produce a comparison report.",
196
+ expected_output="A structured comparison of pricing differences by region.",
197
+ agent=analyst,
198
+ )
199
+
200
+ # Crew
201
+ crew = Crew(
202
+ agents=[scout, researcher, analyst],
203
+ tasks=[scout_task, research_task, analysis_task],
204
+ process=Process.sequential,
205
+ verbose=True,
206
+ )
207
+
208
+ result = crew.kickoff()
209
+ ```
210
+
211
+ ## Running Tests
212
+
213
+ ```bash
214
+ cd integrations/crewai
215
+ pip install -e ".[dev]"
216
+ pytest tests/ -v
217
+ ```
218
+
219
+ ## License
220
+
221
+ MIT
@@ -0,0 +1,207 @@
1
+ # dominusnode-crewai
2
+
3
+ CrewAI tools for the [DomiNode](https://dominusnode.com) rotating proxy-as-a-service platform. Gives your CrewAI agents the ability to fetch web content through rotating proxies, check wallet balance, and discover geo-targeting options.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install dominusnode-crewai
9
+ ```
10
+
11
+ Or install from source:
12
+
13
+ ```bash
14
+ cd integrations/crewai
15
+ pip install -e ".[dev]"
16
+ ```
17
+
18
+ ## Environment Setup
19
+
20
+ Set your DomiNode API key as an environment variable:
21
+
22
+ ```bash
23
+ export DOMINUSNODE_API_KEY="dn_live_your_api_key_here"
24
+ ```
25
+
26
+ Optionally configure the API base URL and proxy host:
27
+
28
+ ```bash
29
+ export DOMINUSNODE_BASE_URL="https://api.dominusnode.com"
30
+ export DOMINUSNODE_PROXY_HOST="proxy.dominusnode.com"
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ ```python
36
+ from crewai import Agent, Task, Crew
37
+ from dominusnode_crewai import (
38
+ DominusNodeWebScrapeTool,
39
+ DominusNodeBalanceTool,
40
+ DominusNodeGeoTargetTool,
41
+ )
42
+
43
+ # Create tools (picks up DOMINUSNODE_API_KEY from environment)
44
+ scrape_tool = DominusNodeWebScrapeTool()
45
+ balance_tool = DominusNodeBalanceTool()
46
+ geo_tool = DominusNodeGeoTargetTool()
47
+
48
+ # Or pass the API key explicitly
49
+ scrape_tool = DominusNodeWebScrapeTool(api_key="dn_live_...")
50
+
51
+ # Create a CrewAI agent with DomiNode tools
52
+ researcher = Agent(
53
+ role="Web Researcher",
54
+ goal="Gather competitive intelligence from geo-restricted sources",
55
+ backstory="You are a skilled researcher who can access content worldwide.",
56
+ tools=[scrape_tool, balance_tool, geo_tool],
57
+ verbose=True,
58
+ )
59
+
60
+ # Create a task
61
+ task = Task(
62
+ description=(
63
+ "Check our remaining proxy budget, then fetch the homepage of "
64
+ "https://example.com through a US datacenter proxy. Summarize "
65
+ "the content and report the remaining balance."
66
+ ),
67
+ expected_output="A summary of the page content and remaining budget.",
68
+ agent=researcher,
69
+ )
70
+
71
+ # Run the crew
72
+ crew = Crew(agents=[researcher], tasks=[task], verbose=True)
73
+ result = crew.kickoff()
74
+ print(result)
75
+ ```
76
+
77
+ ## Tools
78
+
79
+ ### DominusNodeWebScrapeTool
80
+
81
+ Fetch web page content through DomiNode's rotating proxy network.
82
+
83
+ **Parameters:**
84
+ | Parameter | Type | Required | Default | Description |
85
+ |-----------|------|----------|---------|-------------|
86
+ | `url` | str | Yes | - | The URL to fetch |
87
+ | `country` | str | No | None | Two-letter country code (e.g., "US", "GB", "DE") |
88
+ | `proxy_type` | str | No | "dc" | Proxy type: "dc" (datacenter, $3/GB) or "residential" ($5/GB) |
89
+
90
+ **Example output:**
91
+ ```
92
+ Status: 200
93
+ Content-Type: text/html; charset=utf-8
94
+ Body (1234 chars):
95
+ <html>...
96
+ ```
97
+
98
+ **Security:** URLs are validated to block SSRF attacks. Private IPs, localhost, metadata endpoints, file:// schemes, and other dangerous patterns are rejected.
99
+
100
+ ### DominusNodeBalanceTool
101
+
102
+ Check remaining proxy balance and estimate browsing budget.
103
+
104
+ **Parameters:** None
105
+
106
+ **Example output:**
107
+ ```
108
+ Wallet Balance: $30.00
109
+ Estimated remaining:
110
+ - Datacenter proxy: 10.00 GB (at $3.00/GB)
111
+ - Residential proxy: 6.00 GB (at $5.00/GB)
112
+ ```
113
+
114
+ ### DominusNodeGeoTargetTool
115
+
116
+ List available proxy server countries and geo-targeting options.
117
+
118
+ **Parameters:** None
119
+
120
+ **Example output:**
121
+ ```
122
+ DomiNode Geo-Targeting Options:
123
+ Supported countries: US, GB, DE, JP, BR
124
+ Blocked countries: CU, IR, KP, RU, SY
125
+ Targeting features: US state targeting, City targeting
126
+ US states: CA, NY, TX
127
+ Major US cities: Los Angeles, New York, Houston
128
+ Rotation interval: 1-60 minutes
129
+ ```
130
+
131
+ ## Example Crew Configuration
132
+
133
+ ```python
134
+ from crewai import Agent, Task, Crew, Process
135
+ from dominusnode_crewai import (
136
+ DominusNodeWebScrapeTool,
137
+ DominusNodeBalanceTool,
138
+ DominusNodeGeoTargetTool,
139
+ )
140
+
141
+ # Tools
142
+ scrape = DominusNodeWebScrapeTool()
143
+ balance = DominusNodeBalanceTool()
144
+ geo = DominusNodeGeoTargetTool()
145
+
146
+ # Agents
147
+ scout = Agent(
148
+ role="Geo Scout",
149
+ goal="Identify available proxy locations for the target region",
150
+ backstory="You map proxy coverage before the research team begins.",
151
+ tools=[geo, balance],
152
+ )
153
+
154
+ researcher = Agent(
155
+ role="Web Researcher",
156
+ goal="Collect data from target websites through rotating proxies",
157
+ backstory="You are an expert at gathering web data across different regions.",
158
+ tools=[scrape, balance],
159
+ )
160
+
161
+ analyst = Agent(
162
+ role="Data Analyst",
163
+ goal="Analyze and summarize the collected data",
164
+ backstory="You turn raw web data into actionable insights.",
165
+ )
166
+
167
+ # Tasks
168
+ scout_task = Task(
169
+ description="Check which countries are available for proxy routing and verify we have sufficient budget.",
170
+ expected_output="A report of available countries and current budget.",
171
+ agent=scout,
172
+ )
173
+
174
+ research_task = Task(
175
+ description="Fetch the pricing pages of https://example.com from US and GB proxies. Compare the content.",
176
+ expected_output="Raw content from both regions with noted differences.",
177
+ agent=researcher,
178
+ )
179
+
180
+ analysis_task = Task(
181
+ description="Analyze the collected data and produce a comparison report.",
182
+ expected_output="A structured comparison of pricing differences by region.",
183
+ agent=analyst,
184
+ )
185
+
186
+ # Crew
187
+ crew = Crew(
188
+ agents=[scout, researcher, analyst],
189
+ tasks=[scout_task, research_task, analysis_task],
190
+ process=Process.sequential,
191
+ verbose=True,
192
+ )
193
+
194
+ result = crew.kickoff()
195
+ ```
196
+
197
+ ## Running Tests
198
+
199
+ ```bash
200
+ cd integrations/crewai
201
+ pip install -e ".[dev]"
202
+ pytest tests/ -v
203
+ ```
204
+
205
+ ## License
206
+
207
+ MIT
@@ -0,0 +1,60 @@
1
+ """Mock crewai and dominusnode modules before any test imports."""
2
+ import sys
3
+ from typing import Any, Optional
4
+ from unittest.mock import MagicMock
5
+
6
+ from pydantic import BaseModel, ConfigDict
7
+
8
+
9
+ # ── Flexible mock type ──────────────────────────────────────────────────
10
+
11
+ class _FlexType:
12
+ """Base that accepts any keyword arguments."""
13
+
14
+ def __init__(self, **kwargs):
15
+ for k, v in kwargs.items():
16
+ setattr(self, k, v)
17
+
18
+
19
+ class ProxyUrlOptions(_FlexType):
20
+ pass
21
+
22
+
23
+ # ── Mock dominusnode SDK ────────────────────────────────────────────────
24
+
25
+ dominusnode_mock = MagicMock()
26
+ dominusnode_types_mock = MagicMock()
27
+ dominusnode_types_mock.ProxyUrlOptions = ProxyUrlOptions
28
+ dominusnode_mock.DominusNodeClient = MagicMock
29
+ dominusnode_mock.types = dominusnode_types_mock
30
+
31
+ sys.modules.setdefault("dominusnode", dominusnode_mock)
32
+ sys.modules.setdefault("dominusnode.types", dominusnode_types_mock)
33
+
34
+
35
+ # ── Mock crewai ─────────────────────────────────────────────────────────
36
+
37
+ crewai_mock = MagicMock()
38
+ crewai_tools_mock = MagicMock()
39
+
40
+
41
+ class BaseTool(BaseModel):
42
+ """Mock crewai BaseTool using Pydantic BaseModel (like real CrewAI)."""
43
+
44
+ model_config = ConfigDict(arbitrary_types_allowed=True)
45
+
46
+ name: str = ""
47
+ description: str = ""
48
+
49
+ def _run(self, **kwargs: Any) -> str:
50
+ raise NotImplementedError
51
+
52
+
53
+ crewai_tools_mock.BaseTool = BaseTool
54
+ crewai_mock.tools = crewai_tools_mock
55
+ crewai_mock.Agent = MagicMock
56
+ crewai_mock.Task = MagicMock
57
+ crewai_mock.Crew = MagicMock
58
+
59
+ sys.modules.setdefault("crewai", crewai_mock)
60
+ sys.modules.setdefault("crewai.tools", crewai_tools_mock)
@@ -0,0 +1,60 @@
1
+ """CrewAI tools for DomiNode rotating proxy service.
2
+
3
+ Provides CrewAI-compatible tools for fetching web content through rotating
4
+ proxies, checking wallet balance, and listing available geo-targeting options
5
+ through the DomiNode platform.
6
+
7
+ Example::
8
+
9
+ from dominusnode_crewai import (
10
+ DominusNodeWebScrapeTool,
11
+ DominusNodeBalanceTool,
12
+ DominusNodeGeoTargetTool,
13
+ )
14
+
15
+ scrape_tool = DominusNodeWebScrapeTool(api_key="dn_live_...")
16
+ balance_tool = DominusNodeBalanceTool(api_key="dn_live_...")
17
+ geo_tool = DominusNodeGeoTargetTool(api_key="dn_live_...")
18
+
19
+ # Use with a CrewAI agent
20
+ from crewai import Agent
21
+ agent = Agent(
22
+ role="Web Researcher",
23
+ tools=[scrape_tool, balance_tool, geo_tool],
24
+ ...
25
+ )
26
+ """
27
+
28
+ from .tools import (
29
+ DominusNodeAgenticTransactionsTool,
30
+ DominusNodeAgenticWalletBalanceTool,
31
+ DominusNodeBalanceTool,
32
+ DominusNodeCreateAgenticWalletTool,
33
+ DominusNodeDeleteAgenticWalletTool,
34
+ DominusNodeFreezeAgenticWalletTool,
35
+ DominusNodeFundAgenticWalletTool,
36
+ DominusNodeGeoTargetTool,
37
+ DominusNodeListAgenticWalletsTool,
38
+ DominusNodeTopupPaypalTool,
39
+ DominusNodeUnfreezeAgenticWalletTool,
40
+ DominusNodeUpdateWalletPolicyTool,
41
+ DominusNodeWebScrapeTool,
42
+ DominusNodeX402InfoTool,
43
+ )
44
+
45
+ __all__ = [
46
+ "DominusNodeWebScrapeTool",
47
+ "DominusNodeBalanceTool",
48
+ "DominusNodeGeoTargetTool",
49
+ "DominusNodeTopupPaypalTool",
50
+ "DominusNodeX402InfoTool",
51
+ "DominusNodeCreateAgenticWalletTool",
52
+ "DominusNodeFundAgenticWalletTool",
53
+ "DominusNodeAgenticWalletBalanceTool",
54
+ "DominusNodeListAgenticWalletsTool",
55
+ "DominusNodeAgenticTransactionsTool",
56
+ "DominusNodeFreezeAgenticWalletTool",
57
+ "DominusNodeUnfreezeAgenticWalletTool",
58
+ "DominusNodeDeleteAgenticWalletTool",
59
+ "DominusNodeUpdateWalletPolicyTool",
60
+ ]