dominusnode-dify 1.0.0__py3-none-any.whl

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.

Potentially problematic release.


This version of dominusnode-dify might be problematic. Click here for more details.

@@ -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,241 @@
1
+ Metadata-Version: 2.1
2
+ Name: dominusnode-dify
3
+ Version: 1.0.0
4
+ Summary: DomiNode tool provider for Dify -- 22 proxy, wallet, and team management tools
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-dify
14
+
15
+ Dify tool provider for the [DomiNode](https://dominusnode.com) rotating proxy-as-a-service platform. Provides 22 tools for proxy management, wallet operations, team administration, and payment processing.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install dominusnode-dify
21
+ ```
22
+
23
+ Or install from source:
24
+
25
+ ```bash
26
+ cd integrations/dify
27
+ pip install -e ".[dev]"
28
+ ```
29
+
30
+ ## Dify Plugin Structure
31
+
32
+ This integration follows the Dify tool provider convention:
33
+
34
+ ```
35
+ integrations/dify/
36
+ provider/dominusnode.yaml # Provider definition (credentials)
37
+ tools/*.yaml # 22 tool YAML definitions
38
+ dominusnode_dify/tools.py # Python implementation
39
+ ```
40
+
41
+ ### Provider Credentials
42
+
43
+ The provider YAML (`provider/dominusnode.yaml`) defines three credentials:
44
+
45
+ | Credential | Type | Required | Default |
46
+ |-----------|------|----------|---------|
47
+ | `api_key` | secret-input | Yes | - |
48
+ | `base_url` | text-input | No | `https://api.dominusnode.com` |
49
+ | `proxy_host` | text-input | No | `proxy.dominusnode.com` |
50
+
51
+ ### Environment Variables
52
+
53
+ Alternatively, set environment variables:
54
+
55
+ ```bash
56
+ export DOMINUSNODE_API_KEY="dn_live_your_api_key_here"
57
+ export DOMINUSNODE_BASE_URL="https://api.dominusnode.com"
58
+ export DOMINUSNODE_PROXY_HOST="proxy.dominusnode.com"
59
+ export DOMINUSNODE_PROXY_PORT="8080"
60
+ ```
61
+
62
+ ## Quick Start (Python API)
63
+
64
+ ```python
65
+ from dominusnode_dify import DominusNodeProvider
66
+
67
+ # Create provider with Dify-style credentials dict
68
+ provider = DominusNodeProvider(credentials={
69
+ "api_key": "dn_live_...",
70
+ "base_url": "https://api.dominusnode.com",
71
+ "proxy_host": "proxy.dominusnode.com",
72
+ })
73
+
74
+ # Check wallet balance
75
+ result = provider.check_balance({})
76
+ print(result) # {"balanceCents": 5000}
77
+
78
+ # Fetch a URL through rotating proxies
79
+ result = provider.proxied_fetch({
80
+ "url": "https://example.com",
81
+ "country": "US",
82
+ "proxy_type": "dc",
83
+ })
84
+
85
+ # Use the tool dispatcher (how Dify invokes tools)
86
+ result = provider.invoke_tool("check_balance", {})
87
+ result = provider.invoke_tool("proxied_fetch", {"url": "https://example.com"})
88
+ ```
89
+
90
+ ## Tools (22 total)
91
+
92
+ ### Proxy Tools
93
+
94
+ | Tool | Description | Required Parameters |
95
+ |------|-------------|-------------------|
96
+ | `proxied_fetch` | Fetch URL through rotating proxy | `url` |
97
+ | `get_proxy_config` | Get proxy configuration | - |
98
+ | `list_sessions` | List active proxy sessions | - |
99
+
100
+ ### Wallet Tools
101
+
102
+ | Tool | Description | Required Parameters |
103
+ |------|-------------|-------------------|
104
+ | `check_balance` | Check wallet balance | - |
105
+ | `check_usage` | Check usage statistics | - |
106
+ | `topup_paypal` | Create PayPal top-up order | `amount_cents` |
107
+ | `x402_info` | Get x402 micropayment info | - |
108
+
109
+ ### Agentic Wallet Tools
110
+
111
+ | Tool | Description | Required Parameters |
112
+ |------|-------------|-------------------|
113
+ | `create_agentic_wallet` | Create sub-wallet with spending limit | `label`, `spending_limit_cents` |
114
+ | `fund_agentic_wallet` | Fund agentic wallet from main wallet | `wallet_id`, `amount_cents` |
115
+ | `agentic_wallet_balance` | Check agentic wallet balance | `wallet_id` |
116
+ | `list_agentic_wallets` | List all agentic wallets | - |
117
+ | `agentic_transactions` | Get agentic wallet transactions | `wallet_id` |
118
+ | `freeze_agentic_wallet` | Freeze agentic wallet | `wallet_id` |
119
+ | `unfreeze_agentic_wallet` | Unfreeze agentic wallet | `wallet_id` |
120
+ | `delete_agentic_wallet` | Delete agentic wallet | `wallet_id` |
121
+
122
+ ### Team Tools
123
+
124
+ | Tool | Description | Required Parameters |
125
+ |------|-------------|-------------------|
126
+ | `create_team` | Create team with shared wallet | `name` |
127
+ | `list_teams` | List all teams | - |
128
+ | `team_details` | Get team details | `team_id` |
129
+ | `team_fund` | Fund team wallet | `team_id`, `amount_cents` |
130
+ | `team_create_key` | Create team API key | `team_id`, `label` |
131
+ | `team_usage` | Get team usage history | `team_id` |
132
+ | `update_team` | Update team settings | `team_id` |
133
+ | `update_team_member_role` | Change member role | `team_id`, `user_id`, `role` |
134
+
135
+ ## Usage Examples
136
+
137
+ ### Proxied Fetch with Geo-Targeting
138
+
139
+ ```python
140
+ # Fetch through a US datacenter proxy ($3/GB)
141
+ result = provider.proxied_fetch({
142
+ "url": "https://example.com",
143
+ "country": "US",
144
+ "proxy_type": "dc",
145
+ })
146
+
147
+ # Fetch through a German residential proxy ($5/GB)
148
+ result = provider.proxied_fetch({
149
+ "url": "https://example.de",
150
+ "country": "DE",
151
+ "proxy_type": "residential",
152
+ })
153
+ ```
154
+
155
+ ### Agentic Wallet Management
156
+
157
+ ```python
158
+ # Create a sub-wallet for an AI agent with $10 spending limit
159
+ wallet = provider.create_agentic_wallet({
160
+ "label": "Research Agent",
161
+ "spending_limit_cents": 1000,
162
+ })
163
+
164
+ # Fund it with $5 from main wallet
165
+ provider.fund_agentic_wallet({
166
+ "wallet_id": wallet["id"],
167
+ "amount_cents": 500,
168
+ })
169
+
170
+ # Check balance
171
+ print(provider.agentic_wallet_balance({"wallet_id": wallet["id"]}))
172
+
173
+ # Freeze if needed
174
+ provider.freeze_agentic_wallet({"wallet_id": wallet["id"]})
175
+ ```
176
+
177
+ ### Team Management
178
+
179
+ ```python
180
+ # Create a team
181
+ team = provider.create_team({"name": "Research Team", "max_members": 10})
182
+
183
+ # Fund the team wallet
184
+ provider.team_fund({
185
+ "team_id": team["id"],
186
+ "amount_cents": 5000,
187
+ })
188
+
189
+ # Create a team API key
190
+ key = provider.team_create_key({
191
+ "team_id": team["id"],
192
+ "label": "Agent Key",
193
+ })
194
+ ```
195
+
196
+ ### Dify Tool Dispatch
197
+
198
+ ```python
199
+ # The invoke_tool method is designed for Dify's tool invocation system
200
+ result = provider.invoke_tool("proxied_fetch", {
201
+ "url": "https://example.com",
202
+ "country": "GB",
203
+ "proxy_type": "residential",
204
+ })
205
+
206
+ result = provider.invoke_tool("create_team", {
207
+ "name": "My Team",
208
+ "max_members": 5,
209
+ })
210
+
211
+ # List all available tools
212
+ tools = DominusNodeProvider.get_tools()
213
+ for tool in tools:
214
+ print(tool)
215
+ ```
216
+
217
+ ## Security
218
+
219
+ This integration includes comprehensive security measures:
220
+
221
+ - **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
222
+ - **DNS Rebinding Protection**: Resolves hostnames and validates all IP addresses before connecting
223
+ - **TLD Blocking**: .localhost, .local, .internal, .arpa
224
+ - **Credential Protection**: Embedded URL credentials blocked; API keys scrubbed from all error output
225
+ - **OFAC Compliance**: Cuba, Iran, North Korea, Russia, Syria blocked for geo-targeting
226
+ - **HTTP Method Restriction**: Only GET, HEAD, OPTIONS allowed through proxy
227
+ - **Prototype Pollution Prevention**: Dangerous keys stripped from all JSON responses
228
+ - **Response Limits**: 10 MB body cap, 4000 char truncation for LLM context
229
+ - **Redirect Disabled**: No redirect following to prevent open redirect abuse
230
+
231
+ ## Running Tests
232
+
233
+ ```bash
234
+ cd integrations/dify
235
+ pip install -e ".[dev]"
236
+ pytest tests/ -v
237
+ ```
238
+
239
+ ## License
240
+
241
+ MIT
@@ -0,0 +1,7 @@
1
+ dominusnode_dify/__init__.py,sha256=81K6C5TSF7BzaRaNzm5fSjc9E-Y4iACBnuC0WmcmK-4,1938
2
+ dominusnode_dify/tools.py,sha256=9CfvSsjMCUyNGMnQPGDLuSCQy47F72iqR5ixyVOlldA,57357
3
+ dominusnode_dify-1.0.0.dist-info/LICENSE,sha256=NBkjfgN0tpbJjWf7uqsPCOMgq7uuSEW4uaGDCpB8HbI,1069
4
+ dominusnode_dify-1.0.0.dist-info/METADATA,sha256=S08InLIZRK0GQl-AnVhDVGCCHrnh3sIbAZbklkEJPF0,7142
5
+ dominusnode_dify-1.0.0.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
6
+ dominusnode_dify-1.0.0.dist-info/top_level.txt,sha256=4oa3__-1Ex0jTd_aTboMFsFq_zfJoB06bKNVz34qX1o,17
7
+ dominusnode_dify-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (71.1.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ dominusnode_dify