dominusnode-composio 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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 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,217 @@
1
+ Metadata-Version: 2.1
2
+ Name: dominusnode-composio
3
+ Version: 1.0.0
4
+ Summary: DomiNode tools for Composio -- 22 proxy, wallet, and team management actions
5
+ License: MIT
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: httpx>=0.25.0
10
+ Provides-Extra: dev
11
+ Requires-Dist: pytest>=7.0; extra == "dev"
12
+
13
+ # dominusnode-composio
14
+
15
+ Composio toolkit for the [DomiNode](https://dominusnode.com) rotating proxy-as-a-service platform. Provides 22 Composio-compatible actions for proxy management, wallet operations, team administration, and payment processing.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install dominusnode-composio
21
+ ```
22
+
23
+ Or install from source:
24
+
25
+ ```bash
26
+ cd integrations/composio
27
+ pip install -e ".[dev]"
28
+ ```
29
+
30
+ ## Environment Setup
31
+
32
+ Set your DomiNode API key as an environment variable:
33
+
34
+ ```bash
35
+ export DOMINUSNODE_API_KEY="dn_live_your_api_key_here"
36
+ ```
37
+
38
+ Optionally configure the API base URL and proxy host:
39
+
40
+ ```bash
41
+ export DOMINUSNODE_BASE_URL="https://api.dominusnode.com"
42
+ export DOMINUSNODE_PROXY_HOST="proxy.dominusnode.com"
43
+ export DOMINUSNODE_PROXY_PORT="8080"
44
+ ```
45
+
46
+ ## Quick Start
47
+
48
+ ```python
49
+ from dominusnode_composio import DominusNodeToolkit
50
+
51
+ # Create toolkit (picks up DOMINUSNODE_API_KEY from environment)
52
+ toolkit = DominusNodeToolkit()
53
+
54
+ # Or pass the API key explicitly
55
+ toolkit = DominusNodeToolkit(api_key="dn_live_...")
56
+
57
+ # Check wallet balance
58
+ print(toolkit.check_balance())
59
+
60
+ # Fetch a URL through rotating proxies
61
+ print(toolkit.proxied_fetch(url="https://example.com", country="US"))
62
+
63
+ # Get Composio-compatible action definitions
64
+ actions = toolkit.get_actions()
65
+ for action in actions:
66
+ print(f"{action['name']}: {action['description']}")
67
+ ```
68
+
69
+ ## Actions (22 total)
70
+
71
+ ### Proxy Actions
72
+
73
+ | Action | Description | Required Parameters |
74
+ |--------|-------------|-------------------|
75
+ | `DOMINUSNODE_PROXIED_FETCH` | Fetch URL through rotating proxy | `url` |
76
+ | `DOMINUSNODE_GET_PROXY_CONFIG` | Get proxy configuration | - |
77
+ | `DOMINUSNODE_LIST_SESSIONS` | List active proxy sessions | - |
78
+
79
+ ### Wallet Actions
80
+
81
+ | Action | Description | Required Parameters |
82
+ |--------|-------------|-------------------|
83
+ | `DOMINUSNODE_CHECK_BALANCE` | Check wallet balance | - |
84
+ | `DOMINUSNODE_CHECK_USAGE` | Check usage statistics | - |
85
+ | `DOMINUSNODE_TOPUP_PAYPAL` | Create PayPal top-up order | `amount_cents` |
86
+
87
+ ### Agentic Wallet Actions
88
+
89
+ | Action | Description | Required Parameters |
90
+ |--------|-------------|-------------------|
91
+ | `DOMINUSNODE_CREATE_AGENTIC_WALLET` | Create sub-wallet with spending limit | `label`, `spending_limit_cents` |
92
+ | `DOMINUSNODE_FUND_AGENTIC_WALLET` | Fund agentic wallet from main wallet | `wallet_id`, `amount_cents` |
93
+ | `DOMINUSNODE_AGENTIC_WALLET_BALANCE` | Check agentic wallet balance | `wallet_id` |
94
+ | `DOMINUSNODE_LIST_AGENTIC_WALLETS` | List all agentic wallets | - |
95
+ | `DOMINUSNODE_AGENTIC_TRANSACTIONS` | Get agentic wallet transactions | `wallet_id` |
96
+ | `DOMINUSNODE_FREEZE_AGENTIC_WALLET` | Freeze agentic wallet | `wallet_id` |
97
+ | `DOMINUSNODE_UNFREEZE_AGENTIC_WALLET` | Unfreeze agentic wallet | `wallet_id` |
98
+ | `DOMINUSNODE_DELETE_AGENTIC_WALLET` | Delete agentic wallet | `wallet_id` |
99
+
100
+ ### Team Actions
101
+
102
+ | Action | Description | Required Parameters |
103
+ |--------|-------------|-------------------|
104
+ | `DOMINUSNODE_CREATE_TEAM` | Create team with shared wallet | `name` |
105
+ | `DOMINUSNODE_LIST_TEAMS` | List all teams | - |
106
+ | `DOMINUSNODE_TEAM_DETAILS` | Get team details | `team_id` |
107
+ | `DOMINUSNODE_TEAM_FUND` | Fund team wallet | `team_id`, `amount_cents` |
108
+ | `DOMINUSNODE_TEAM_CREATE_KEY` | Create team API key | `team_id`, `label` |
109
+ | `DOMINUSNODE_TEAM_USAGE` | Get team usage history | `team_id` |
110
+ | `DOMINUSNODE_UPDATE_TEAM` | Update team settings | `team_id` |
111
+ | `DOMINUSNODE_UPDATE_TEAM_MEMBER_ROLE` | Change member role | `team_id`, `user_id`, `role` |
112
+
113
+ ### Protocol Actions
114
+
115
+ | Action | Description | Required Parameters |
116
+ |--------|-------------|-------------------|
117
+ | `DOMINUSNODE_X402_INFO` | Get x402 micropayment info | - |
118
+
119
+ ## Usage Examples
120
+
121
+ ### Proxied Fetch with Geo-Targeting
122
+
123
+ ```python
124
+ # Fetch through a US datacenter proxy ($3/GB)
125
+ result = toolkit.proxied_fetch(
126
+ url="https://example.com",
127
+ country="US",
128
+ proxy_type="dc",
129
+ )
130
+
131
+ # Fetch through a German residential proxy ($5/GB)
132
+ result = toolkit.proxied_fetch(
133
+ url="https://example.de",
134
+ country="DE",
135
+ proxy_type="residential",
136
+ )
137
+ ```
138
+
139
+ ### Agentic Wallet Management
140
+
141
+ ```python
142
+ import json
143
+
144
+ # Create a sub-wallet for an AI agent with $10 spending limit
145
+ wallet = json.loads(toolkit.create_agentic_wallet(
146
+ label="Research Agent",
147
+ spending_limit_cents=1000,
148
+ ))
149
+
150
+ # Fund it with $5 from main wallet
151
+ toolkit.fund_agentic_wallet(
152
+ wallet_id=wallet["id"],
153
+ amount_cents=500,
154
+ )
155
+
156
+ # Check balance
157
+ print(toolkit.agentic_wallet_balance(wallet_id=wallet["id"]))
158
+
159
+ # Freeze if needed
160
+ toolkit.freeze_agentic_wallet(wallet_id=wallet["id"])
161
+ ```
162
+
163
+ ### Team Management
164
+
165
+ ```python
166
+ import json
167
+
168
+ # Create a team
169
+ team = json.loads(toolkit.create_team(name="Research Team", max_members=10))
170
+
171
+ # Fund the team wallet
172
+ toolkit.team_fund(team_id=team["id"], amount_cents=5000)
173
+
174
+ # Create a team API key
175
+ key = json.loads(toolkit.team_create_key(
176
+ team_id=team["id"],
177
+ label="Agent Key",
178
+ ))
179
+ ```
180
+
181
+ ### Composio Action Discovery
182
+
183
+ ```python
184
+ # Get all Composio-compatible action definitions
185
+ actions = toolkit.get_actions()
186
+ for action in actions:
187
+ print(f"{action['name']}: {action['description']}")
188
+ print(f" Parameters: {list(action['parameters'].keys())}")
189
+ # Each action has a 'handler' callable
190
+ # handler = action['handler']
191
+ ```
192
+
193
+ ## Security
194
+
195
+ This toolkit includes comprehensive security measures:
196
+
197
+ - **SSRF Prevention**: Blocks requests to private IPs (10.x, 172.16-31.x, 192.168.x, 127.x, 0.0.0.0/8, 169.254.x, 100.64-127.x CGNAT, 224+ multicast), IPv6 loopback/ULA/link-local, IPv4-mapped/compatible IPv6, Teredo (2001:0000::/32), 6to4 (2002::/16), hex/octal/decimal encoded IPs
198
+ - **DNS Rebinding Protection**: Resolves hostnames and validates all IP addresses before connecting
199
+ - **TLD Blocking**: .localhost, .local, .internal, .arpa
200
+ - **Credential Protection**: Embedded URL credentials blocked; API keys scrubbed from all error output
201
+ - **OFAC Compliance**: Cuba, Iran, North Korea, Russia, Syria blocked for geo-targeting
202
+ - **HTTP Method Restriction**: Only GET, HEAD, OPTIONS allowed through proxy
203
+ - **Prototype Pollution Prevention**: Dangerous keys stripped from all JSON responses
204
+ - **Response Limits**: 10 MB body cap, 4000 char truncation for LLM context
205
+ - **Redirect Disabled**: No redirect following to prevent open redirect abuse
206
+
207
+ ## Running Tests
208
+
209
+ ```bash
210
+ cd integrations/composio
211
+ pip install -e ".[dev]"
212
+ pytest tests/ -v
213
+ ```
214
+
215
+ ## License
216
+
217
+ MIT
@@ -0,0 +1,205 @@
1
+ # dominusnode-composio
2
+
3
+ Composio toolkit for the [DomiNode](https://dominusnode.com) rotating proxy-as-a-service platform. Provides 22 Composio-compatible actions for proxy management, wallet operations, team administration, and payment processing.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install dominusnode-composio
9
+ ```
10
+
11
+ Or install from source:
12
+
13
+ ```bash
14
+ cd integrations/composio
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
+ export DOMINUSNODE_PROXY_PORT="8080"
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ```python
37
+ from dominusnode_composio import DominusNodeToolkit
38
+
39
+ # Create toolkit (picks up DOMINUSNODE_API_KEY from environment)
40
+ toolkit = DominusNodeToolkit()
41
+
42
+ # Or pass the API key explicitly
43
+ toolkit = DominusNodeToolkit(api_key="dn_live_...")
44
+
45
+ # Check wallet balance
46
+ print(toolkit.check_balance())
47
+
48
+ # Fetch a URL through rotating proxies
49
+ print(toolkit.proxied_fetch(url="https://example.com", country="US"))
50
+
51
+ # Get Composio-compatible action definitions
52
+ actions = toolkit.get_actions()
53
+ for action in actions:
54
+ print(f"{action['name']}: {action['description']}")
55
+ ```
56
+
57
+ ## Actions (22 total)
58
+
59
+ ### Proxy Actions
60
+
61
+ | Action | Description | Required Parameters |
62
+ |--------|-------------|-------------------|
63
+ | `DOMINUSNODE_PROXIED_FETCH` | Fetch URL through rotating proxy | `url` |
64
+ | `DOMINUSNODE_GET_PROXY_CONFIG` | Get proxy configuration | - |
65
+ | `DOMINUSNODE_LIST_SESSIONS` | List active proxy sessions | - |
66
+
67
+ ### Wallet Actions
68
+
69
+ | Action | Description | Required Parameters |
70
+ |--------|-------------|-------------------|
71
+ | `DOMINUSNODE_CHECK_BALANCE` | Check wallet balance | - |
72
+ | `DOMINUSNODE_CHECK_USAGE` | Check usage statistics | - |
73
+ | `DOMINUSNODE_TOPUP_PAYPAL` | Create PayPal top-up order | `amount_cents` |
74
+
75
+ ### Agentic Wallet Actions
76
+
77
+ | Action | Description | Required Parameters |
78
+ |--------|-------------|-------------------|
79
+ | `DOMINUSNODE_CREATE_AGENTIC_WALLET` | Create sub-wallet with spending limit | `label`, `spending_limit_cents` |
80
+ | `DOMINUSNODE_FUND_AGENTIC_WALLET` | Fund agentic wallet from main wallet | `wallet_id`, `amount_cents` |
81
+ | `DOMINUSNODE_AGENTIC_WALLET_BALANCE` | Check agentic wallet balance | `wallet_id` |
82
+ | `DOMINUSNODE_LIST_AGENTIC_WALLETS` | List all agentic wallets | - |
83
+ | `DOMINUSNODE_AGENTIC_TRANSACTIONS` | Get agentic wallet transactions | `wallet_id` |
84
+ | `DOMINUSNODE_FREEZE_AGENTIC_WALLET` | Freeze agentic wallet | `wallet_id` |
85
+ | `DOMINUSNODE_UNFREEZE_AGENTIC_WALLET` | Unfreeze agentic wallet | `wallet_id` |
86
+ | `DOMINUSNODE_DELETE_AGENTIC_WALLET` | Delete agentic wallet | `wallet_id` |
87
+
88
+ ### Team Actions
89
+
90
+ | Action | Description | Required Parameters |
91
+ |--------|-------------|-------------------|
92
+ | `DOMINUSNODE_CREATE_TEAM` | Create team with shared wallet | `name` |
93
+ | `DOMINUSNODE_LIST_TEAMS` | List all teams | - |
94
+ | `DOMINUSNODE_TEAM_DETAILS` | Get team details | `team_id` |
95
+ | `DOMINUSNODE_TEAM_FUND` | Fund team wallet | `team_id`, `amount_cents` |
96
+ | `DOMINUSNODE_TEAM_CREATE_KEY` | Create team API key | `team_id`, `label` |
97
+ | `DOMINUSNODE_TEAM_USAGE` | Get team usage history | `team_id` |
98
+ | `DOMINUSNODE_UPDATE_TEAM` | Update team settings | `team_id` |
99
+ | `DOMINUSNODE_UPDATE_TEAM_MEMBER_ROLE` | Change member role | `team_id`, `user_id`, `role` |
100
+
101
+ ### Protocol Actions
102
+
103
+ | Action | Description | Required Parameters |
104
+ |--------|-------------|-------------------|
105
+ | `DOMINUSNODE_X402_INFO` | Get x402 micropayment info | - |
106
+
107
+ ## Usage Examples
108
+
109
+ ### Proxied Fetch with Geo-Targeting
110
+
111
+ ```python
112
+ # Fetch through a US datacenter proxy ($3/GB)
113
+ result = toolkit.proxied_fetch(
114
+ url="https://example.com",
115
+ country="US",
116
+ proxy_type="dc",
117
+ )
118
+
119
+ # Fetch through a German residential proxy ($5/GB)
120
+ result = toolkit.proxied_fetch(
121
+ url="https://example.de",
122
+ country="DE",
123
+ proxy_type="residential",
124
+ )
125
+ ```
126
+
127
+ ### Agentic Wallet Management
128
+
129
+ ```python
130
+ import json
131
+
132
+ # Create a sub-wallet for an AI agent with $10 spending limit
133
+ wallet = json.loads(toolkit.create_agentic_wallet(
134
+ label="Research Agent",
135
+ spending_limit_cents=1000,
136
+ ))
137
+
138
+ # Fund it with $5 from main wallet
139
+ toolkit.fund_agentic_wallet(
140
+ wallet_id=wallet["id"],
141
+ amount_cents=500,
142
+ )
143
+
144
+ # Check balance
145
+ print(toolkit.agentic_wallet_balance(wallet_id=wallet["id"]))
146
+
147
+ # Freeze if needed
148
+ toolkit.freeze_agentic_wallet(wallet_id=wallet["id"])
149
+ ```
150
+
151
+ ### Team Management
152
+
153
+ ```python
154
+ import json
155
+
156
+ # Create a team
157
+ team = json.loads(toolkit.create_team(name="Research Team", max_members=10))
158
+
159
+ # Fund the team wallet
160
+ toolkit.team_fund(team_id=team["id"], amount_cents=5000)
161
+
162
+ # Create a team API key
163
+ key = json.loads(toolkit.team_create_key(
164
+ team_id=team["id"],
165
+ label="Agent Key",
166
+ ))
167
+ ```
168
+
169
+ ### Composio Action Discovery
170
+
171
+ ```python
172
+ # Get all Composio-compatible action definitions
173
+ actions = toolkit.get_actions()
174
+ for action in actions:
175
+ print(f"{action['name']}: {action['description']}")
176
+ print(f" Parameters: {list(action['parameters'].keys())}")
177
+ # Each action has a 'handler' callable
178
+ # handler = action['handler']
179
+ ```
180
+
181
+ ## Security
182
+
183
+ This toolkit includes comprehensive security measures:
184
+
185
+ - **SSRF Prevention**: Blocks requests to private IPs (10.x, 172.16-31.x, 192.168.x, 127.x, 0.0.0.0/8, 169.254.x, 100.64-127.x CGNAT, 224+ multicast), IPv6 loopback/ULA/link-local, IPv4-mapped/compatible IPv6, Teredo (2001:0000::/32), 6to4 (2002::/16), hex/octal/decimal encoded IPs
186
+ - **DNS Rebinding Protection**: Resolves hostnames and validates all IP addresses before connecting
187
+ - **TLD Blocking**: .localhost, .local, .internal, .arpa
188
+ - **Credential Protection**: Embedded URL credentials blocked; API keys scrubbed from all error output
189
+ - **OFAC Compliance**: Cuba, Iran, North Korea, Russia, Syria blocked for geo-targeting
190
+ - **HTTP Method Restriction**: Only GET, HEAD, OPTIONS allowed through proxy
191
+ - **Prototype Pollution Prevention**: Dangerous keys stripped from all JSON responses
192
+ - **Response Limits**: 10 MB body cap, 4000 char truncation for LLM context
193
+ - **Redirect Disabled**: No redirect following to prevent open redirect abuse
194
+
195
+ ## Running Tests
196
+
197
+ ```bash
198
+ cd integrations/composio
199
+ pip install -e ".[dev]"
200
+ pytest tests/ -v
201
+ ```
202
+
203
+ ## License
204
+
205
+ MIT
@@ -0,0 +1,5 @@
1
+ """DomiNode tools for Composio AI platform."""
2
+ from dominusnode_composio.tools import DominusNodeToolkit
3
+
4
+ __version__ = "1.0.0"
5
+ __all__ = ["DominusNodeToolkit"]