@dominusnode/gemini-functions 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # DomiNode Google Gemini / Vertex AI Function Declarations
1
+ # Dominus Node Google Gemini / Vertex AI Function Declarations
2
2
 
3
- Gemini-format function declarations and handler implementations for the DomiNode rotating proxy-as-a-service platform. These declarations allow Google Gemini and Vertex AI models to interact with DomiNode's proxy network, wallet, agentic wallet, and team APIs via function calling.
3
+ Gemini-format function declarations and handler implementations for the Dominus Node rotating proxy-as-a-service platform. These declarations allow Google Gemini and Vertex AI models to interact with Dominus Node's proxy network, wallet, agentic wallet, and team APIs via function calling.
4
4
 
5
5
  ## What This Is
6
6
 
@@ -9,8 +9,8 @@ This directory contains:
9
9
  | File | Description |
10
10
  |------|-------------|
11
11
  | `functions.json` | Array of 22 Gemini `FunctionDeclaration` objects |
12
- | `handler.ts` | TypeScript handler that dispatches function calls to the DomiNode API |
13
- | `handler.py` | Python handler that dispatches function calls to the DomiNode API |
12
+ | `handler.ts` | TypeScript handler that dispatches function calls to the Dominus Node API |
13
+ | `handler.py` | Python handler that dispatches function calls to the Dominus Node API |
14
14
 
15
15
  The function declarations follow the [Gemini function calling specification](https://ai.google.dev/docs/function_calling), using uppercase types (`STRING`, `INTEGER`, `OBJECT`, `BOOLEAN`, `ARRAY`) and embedding constraints in description text rather than using JSON Schema keywords like `minimum`, `maximum`, `enum`, or `default`.
16
16
 
@@ -18,7 +18,7 @@ The function declarations follow the [Gemini function calling specification](htt
18
18
 
19
19
  | Function | Description | Auth Required |
20
20
  |----------|-------------|---------------|
21
- | `dominusnode_proxied_fetch` | Make an HTTP request through DomiNode's rotating proxy network | Yes |
21
+ | `dominusnode_proxied_fetch` | Make an HTTP request through Dominus Node's rotating proxy network | Yes |
22
22
  | `dominusnode_check_balance` | Check wallet balance (cents, USD, currency) | Yes |
23
23
  | `dominusnode_check_usage` | Check usage stats for a time period (day/week/month) | Yes |
24
24
  | `dominusnode_get_proxy_config` | Get proxy endpoints, supported countries, geo-targeting info | Yes |
@@ -52,7 +52,7 @@ from handler import create_dominusnode_function_handler
52
52
  with open("functions.json") as f:
53
53
  declarations = json.load(f)
54
54
 
55
- # Create the DomiNode handler
55
+ # Create the Dominus Node handler
56
56
  dominusnode = create_dominusnode_function_handler(
57
57
  api_key="dn_live_your_api_key_here",
58
58
  base_url="https://api.dominusnode.com",
@@ -67,7 +67,7 @@ model = genai.GenerativeModel(
67
67
 
68
68
  # Start a chat
69
69
  chat = model.start_chat()
70
- response = chat.send_message("What is my DomiNode proxy balance?")
70
+ response = chat.send_message("What is my Dominus Node proxy balance?")
71
71
 
72
72
  # Handle function calls
73
73
  for part in response.parts:
package/dist/handler.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * DomiNode Gemini / Vertex AI function calling handler (TypeScript).
2
+ * Dominus Node Gemini / Vertex AI function calling handler (TypeScript).
3
3
  *
4
4
  * Provides a factory function that creates a handler for dispatching
5
- * Google Gemini function calls to the DomiNode REST API. Works with
5
+ * Google Gemini function calls to the Dominus Node REST API. Works with
6
6
  * Gemini, Vertex AI, or any system that uses Gemini-format function
7
7
  * declarations.
8
8
  *
@@ -40,23 +40,23 @@ declare function stripDangerousKeys(obj: unknown, depth?: number): void;
40
40
  declare function safeJsonParse<T>(text: string): T;
41
41
  declare function sanitizeError(message: string): string;
42
42
  export interface DominusNodeFunctionConfig {
43
- /** DomiNode API key (starts with dn_live_ or dn_test_). */
43
+ /** Dominus Node API key (starts with dn_live_ or dn_test_). */
44
44
  apiKey: string;
45
- /** Base URL of the DomiNode REST API. Defaults to https://api.dominusnode.com */
45
+ /** Base URL of the Dominus Node REST API. Defaults to https://api.dominusnode.com */
46
46
  baseUrl?: string;
47
47
  /** Request timeout in milliseconds. Defaults to 30000. */
48
48
  timeoutMs?: number;
49
49
  }
50
50
  /**
51
51
  * Handler function type returned by createDominusNodeFunctionHandler.
52
- * Dispatches function calls to the DomiNode API and returns JSON string results.
52
+ * Dispatches function calls to the Dominus Node API and returns JSON string results.
53
53
  */
54
54
  export type FunctionHandler = (name: string, args: Record<string, unknown>) => Promise<string>;
55
55
  /**
56
- * Create a DomiNode function handler for Gemini / Vertex AI function calling.
56
+ * Create a Dominus Node function handler for Gemini / Vertex AI function calling.
57
57
  *
58
58
  * Authenticates using the provided API key, then returns a handler function
59
- * that dispatches function calls to the appropriate DomiNode REST API endpoint.
59
+ * that dispatches function calls to the appropriate Dominus Node REST API endpoint.
60
60
  *
61
61
  * @param config - API key and optional base URL / timeout.
62
62
  * @returns A handler function: (name, args) => Promise<string>
package/dist/handler.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * DomiNode Gemini / Vertex AI function calling handler (TypeScript).
2
+ * Dominus Node Gemini / Vertex AI function calling handler (TypeScript).
3
3
  *
4
4
  * Provides a factory function that creates a handler for dispatching
5
- * Google Gemini function calls to the DomiNode REST API. Works with
5
+ * Google Gemini function calls to the Dominus Node REST API. Works with
6
6
  * Gemini, Vertex AI, or any system that uses Gemini-format function
7
7
  * declarations.
8
8
  *
@@ -377,10 +377,10 @@ function periodToDateRange(period) {
377
377
  return { since: since.toISOString(), until };
378
378
  }
379
379
  /**
380
- * Create a DomiNode function handler for Gemini / Vertex AI function calling.
380
+ * Create a Dominus Node function handler for Gemini / Vertex AI function calling.
381
381
  *
382
382
  * Authenticates using the provided API key, then returns a handler function
383
- * that dispatches function calls to the appropriate DomiNode REST API endpoint.
383
+ * that dispatches function calls to the appropriate Dominus Node REST API endpoint.
384
384
  *
385
385
  * @param config - API key and optional base URL / timeout.
386
386
  * @returns A handler function: (name, args) => Promise<string>
@@ -645,7 +645,7 @@ export function createDominusNodeFunctionHandler(config) {
645
645
  catch (err) {
646
646
  return JSON.stringify({
647
647
  error: `Proxy fetch failed: ${sanitizeError(err instanceof Error ? err.message : String(err))}`,
648
- hint: "Ensure the DomiNode proxy gateway is running and accessible.",
648
+ hint: "Ensure the Dominus Node proxy gateway is running and accessible.",
649
649
  });
650
650
  }
651
651
  }
package/functions.json CHANGED
@@ -1,7 +1,7 @@
1
1
  [
2
2
  {
3
3
  "name": "dominusnode_proxied_fetch",
4
- "description": "Make an HTTP request through DomiNode's rotating proxy network. Routes traffic through datacenter ($3/GB) or residential ($5/GB) proxies with optional geo-targeting. Useful for accessing geo-restricted content, avoiding IP blocks, or web scraping. Private/internal IPs and sanctioned countries (CU, IR, KP, RU, SY) are blocked.",
4
+ "description": "Make an HTTP request through Dominus Node's rotating proxy network. Routes traffic through datacenter ($3/GB) or residential ($5/GB) proxies with optional geo-targeting. Useful for accessing geo-restricted content, avoiding IP blocks, or web scraping. Private/internal IPs and sanctioned countries (CU, IR, KP, RU, SY) are blocked.",
5
5
  "parameters": {
6
6
  "type": "OBJECT",
7
7
  "properties": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "name": "dominusnode_check_balance",
34
- "description": "Check the current wallet balance for the authenticated DomiNode account. Returns balance in cents and USD, currency, and last top-up timestamp. The wallet uses a prepaid model -- top up first, then usage is debited automatically.",
34
+ "description": "Check the current wallet balance for the authenticated Dominus Node account. Returns balance in cents and USD, currency, and last top-up timestamp. The wallet uses a prepaid model -- top up first, then usage is debited automatically.",
35
35
  "parameters": {
36
36
  "type": "OBJECT",
37
37
  "properties": {},
@@ -40,7 +40,7 @@
40
40
  },
41
41
  {
42
42
  "name": "dominusnode_check_usage",
43
- "description": "Check proxy usage statistics for the authenticated DomiNode account. Returns total bytes transferred, total cost, and request count for the specified period. Useful for monitoring bandwidth consumption and spending.",
43
+ "description": "Check proxy usage statistics for the authenticated Dominus Node account. Returns total bytes transferred, total cost, and request count for the specified period. Useful for monitoring bandwidth consumption and spending.",
44
44
  "parameters": {
45
45
  "type": "OBJECT",
46
46
  "properties": {
@@ -54,7 +54,7 @@
54
54
  },
55
55
  {
56
56
  "name": "dominusnode_get_proxy_config",
57
- "description": "Get DomiNode proxy endpoint configuration and supported features. Returns HTTP and SOCKS5 proxy connection details, list of supported countries for geo-targeting, blocked/sanctioned countries, and geo-targeting capabilities. Use this to discover available proxy endpoints before making proxied requests.",
57
+ "description": "Get Dominus Node proxy endpoint configuration and supported features. Returns HTTP and SOCKS5 proxy connection details, list of supported countries for geo-targeting, blocked/sanctioned countries, and geo-targeting capabilities. Use this to discover available proxy endpoints before making proxied requests.",
58
58
  "parameters": {
59
59
  "type": "OBJECT",
60
60
  "properties": {},
@@ -63,7 +63,7 @@
63
63
  },
64
64
  {
65
65
  "name": "dominusnode_list_sessions",
66
- "description": "List all currently active proxy sessions for the authenticated DomiNode account. Returns session IDs, start times, and status. Useful for monitoring concurrent connections and debugging active proxy usage.",
66
+ "description": "List all currently active proxy sessions for the authenticated Dominus Node account. Returns session IDs, start times, and status. Useful for monitoring concurrent connections and debugging active proxy usage.",
67
67
  "parameters": {
68
68
  "type": "OBJECT",
69
69
  "properties": {},
@@ -362,7 +362,7 @@
362
362
  },
363
363
  {
364
364
  "name": "dominusnode_topup_paypal",
365
- "description": "Create a PayPal wallet top-up session. Initiates a PayPal payment for the specified amount to add funds to your DomiNode wallet. Returns a PayPal approval URL to complete the payment.",
365
+ "description": "Create a PayPal wallet top-up session. Initiates a PayPal payment for the specified amount to add funds to your Dominus Node wallet. Returns a PayPal approval URL to complete the payment.",
366
366
  "parameters": {
367
367
  "type": "OBJECT",
368
368
  "properties": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dominusnode/gemini-functions",
3
- "version": "1.0.0",
4
- "description": "DomiNode function declarations and handlers for Google Gemini / Vertex AI",
3
+ "version": "1.0.1",
4
+ "description": "Dominus Node function declarations and handlers for Google Gemini / Vertex AI",
5
5
  "main": "dist/handler.js",
6
6
  "types": "dist/handler.d.ts",
7
7
  "type": "module",