pygeai 0.2.7b42__py3-none-any.whl → 0.2.7b43__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.
@@ -92,6 +92,55 @@ The configuration file should be in JSON format with the following structure:
92
92
  }
93
93
  .fi
94
94
 
95
+ .SH PUBLIC TOOL REGISTRATION
96
+ Tools provided by both MCP and A2A servers can be published to GEAI under a public namespace
97
+ by including the \fBpublic_prefix\fR field in their configuration entry.
98
+
99
+ This allows tools to be registered under a well-defined global identifier, making them
100
+ discoverable and shareable across proxies and clients.
101
+
102
+ .SS MCP SERVER EXAMPLE WITH PUBLIC PREFIX
103
+ The following configuration registers all tools from the \fBpuppeteer\fR MCP server under
104
+ the public prefix \fIcom.globant.puppeteer\fR:
105
+
106
+ .nf
107
+ {
108
+ "mcpServers": {
109
+ "public_prefix": "com.globant.puppeteer",
110
+ "puppeteer": {
111
+ "command": "npx",
112
+ "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
113
+ }
114
+ }
115
+ }
116
+ .fi
117
+
118
+ .SS A2A SERVER EXAMPLE WITH PUBLIC PREFIX
119
+ The following configuration registers the tools provided by the \fBhello-world\fR A2A agent
120
+ under the prefix \fIcom.genexus.a2a.sampleagent\fR:
121
+
122
+ .nf
123
+ {
124
+ "a2aServers": {
125
+ "hello-world": {
126
+ "public_prefix": "com.genexus.a2a.sampleagent",
127
+ "url": "http://localhost:9999",
128
+ "headers": {
129
+ "Authorization": "Bearer fh84ff...."
130
+ }
131
+ }
132
+ }
133
+ }
134
+ .fi
135
+
136
+ .SS RESULTING TOOL IDENTIFIERS
137
+ When this prefix is set, all tools will be published using it. For example, a tool named
138
+ \fBtranslate_text\fR would be available as:
139
+
140
+ .nf
141
+ com.genexus.a2a.sampleagent.translate_text
142
+ .fi
143
+
95
144
  .SS 2. Proxy Authentication Configuration
96
145
  This section establishes the connection between the proxy and GEAI and manages user aliases.
97
146
  .TP
@@ -116,6 +165,33 @@ Generated new proxy ID: 37bae96b-bc99-4110-bb61-b912b28f9e32
116
165
  -> Insert proxy description:
117
166
  .fi
118
167
 
168
+ .SH PROXY CONFIGURATION PARAMETERS
169
+ During interactive setup, the following parameters are requested:
170
+
171
+ .TP
172
+ \fBproxy ID (UUID)\fR
173
+ A unique identifier for this proxy instance. If left empty, the automatically generated UUID
174
+ will be used.
175
+
176
+ .TP
177
+ \fBproxy API key\fR
178
+ The API key used to authenticate the proxy with the GEAI backend. This must be an API token
179
+ generated in GEAI for a specific project.
180
+
181
+ .TP
182
+ \fBproxy base URL\fR
183
+ The base URL of the GEAI installation this proxy will connect to.
184
+ For example: \fIhttps://api.beta.saia.ai\fR
185
+
186
+ .TP
187
+ \fBproxy name\fR
188
+ A human-readable name assigned to this instance of \fBgeai-proxy\fR. This name is stored under the configured alias.
189
+
190
+ .TP
191
+ \fBproxy description\fR
192
+ An optional description to help identify this proxy instance, especially when multiple proxies are used under different aliases.
193
+
194
+
119
195
  .SH USAGE
120
196
  To start the proxy server with a specific configuration and alias:
121
197
  .nf
pygeai/proxy/managers.py CHANGED
@@ -59,8 +59,8 @@ class ServerManager:
59
59
 
60
60
  for server in self.servers.values():
61
61
  Console.write_stdout(f"Listing tools for server {server.name}", end="")
62
- if server.public_preffix:
63
- Console.write_stdout(f" | access scope:public prefix: {server.public_preffix}")
62
+ if server.public_prefix:
63
+ Console.write_stdout(f" | access scope:public prefix: {server.public_prefix}")
64
64
  else:
65
65
  Console.write_stdout(" ! access scope:private")
66
66
 
pygeai/proxy/servers.py CHANGED
@@ -40,7 +40,7 @@ class ToolServer(ABC):
40
40
  self.config = config
41
41
  self.settings = settings
42
42
  self.name: str = sever_name
43
- self.public_preffix: str | None = None
43
+ self.public_prefix: str | None = None
44
44
  self.exit_stack: AsyncExitStack = AsyncExitStack()
45
45
 
46
46
  @abstractmethod
@@ -105,7 +105,7 @@ class A2AServer(ToolServer):
105
105
  """
106
106
  try:
107
107
  self.httpx_client = httpx.AsyncClient(timeout=60.0)
108
- self.public_preffix = self.config.get("publicpreffix")
108
+ self.public_prefix = self.config.get("public_prefix")
109
109
  headers = self.config.get("headers")
110
110
  if headers:
111
111
  self.httpx_client.headers.update(headers)
@@ -138,7 +138,7 @@ class A2AServer(ToolServer):
138
138
  }
139
139
  tools = []
140
140
  for skill in self.agent_card.skills:
141
- tools.append(ProxiedTool(self.name, skill.id, skill.description, self.public_preffix, input_schema))
141
+ tools.append(ProxiedTool(self.name, skill.id, skill.description, self.public_prefix, input_schema))
142
142
  return tools
143
143
 
144
144
  async def execute_tool(
@@ -197,7 +197,7 @@ class MCPServer(ToolServer):
197
197
  self.session: ClientSession | None = None
198
198
 
199
199
  async def initialize(self) -> None:
200
- self.public_preffix = self.config.get("publicpreffix")
200
+ self.public_prefix = self.config.get("public_prefix")
201
201
  transport = self.config.get("transport") or (
202
202
  "sse" if "uri" in self.config else "stdio"
203
203
  )
@@ -264,7 +264,7 @@ class MCPServer(ToolServer):
264
264
  self.name,
265
265
  tool.name,
266
266
  tool.description,
267
- self.public_preffix,
267
+ self.public_prefix,
268
268
  tool.inputSchema
269
269
  )
270
270
  )
pygeai/proxy/tool.py CHANGED
@@ -9,7 +9,7 @@ class ProxiedTool:
9
9
  :param server_name: str - Name of the server exposing the tool
10
10
  :param name: str - Name of the tool
11
11
  :param description: str - Description of the tool's functionality
12
- :param public_preffix: str - Public prefix of the tool
12
+ :param public_prefix: str - Public prefix of the tool
13
13
  :param input_schema: dict[str, Any] - JSON schema defining the expected input for the tool
14
14
  :return: ProxiedTool - Instance of the ProxiedTool class
15
15
  :raises: ValueError - If any required parameter is invalid or missing
@@ -20,7 +20,7 @@ class ProxiedTool:
20
20
  server_name: str,
21
21
  name: str,
22
22
  description: str,
23
- public_preffix: str,
23
+ public_prefix: str,
24
24
  input_schema: dict[str, Any]
25
25
  ) -> None:
26
26
  self.server_name: str = server_name
@@ -28,7 +28,7 @@ class ProxiedTool:
28
28
  self.openai_compatible_name: str = self._get_openai_compatible_name(name)
29
29
  self.description: str = description
30
30
  self.input_schema: dict[str, Any] = input_schema
31
- self.public_preffix: str = public_preffix
31
+ self.public_prefix: str = public_prefix
32
32
 
33
33
  def get_full_name(self) -> str:
34
34
  """Get the full name of the tool."""
@@ -36,12 +36,12 @@ class ProxiedTool:
36
36
 
37
37
  def is_public(self) -> bool:
38
38
  """Check if the tool is public."""
39
- return self.public_preffix is not None
39
+ return self.public_prefix is not None
40
40
 
41
41
  def get_public_name(self) -> str:
42
42
  """Get the public name of the tool."""
43
43
  return (
44
- f"{self.public_preffix}.{self.name if self.server_name in self.public_preffix else self.get_full_name()}"
44
+ f"{self.public_prefix}.{self.name if self.server_name in self.public_prefix else self.get_full_name()}"
45
45
  )
46
46
 
47
47
  def format_for_llm(self) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygeai
3
- Version: 0.2.7b42
3
+ Version: 0.2.7b43
4
4
  Summary: Software Development Kit to interact with Globant Enterprise AI.
5
5
  Author-email: Globant <geai-sdk@globant.com>
6
6
  License-Expression: MIT
@@ -167,7 +167,7 @@ pygeai/lab/tools/endpoints.py,sha256=VPd2jBSDW4rpCa4h3kBPWJ9JA2G2ecBYQop-lffTSbI
167
167
  pygeai/lab/tools/mappers.py,sha256=6xcR7lIOYrvUG8SERQIx_bsK-_To316BUql8UPLHWco,4978
168
168
  pygeai/man/__init__.py,sha256=gqGI92vUPt6RPweoWX3mTUYPWNDlm6aGUjQOnYXqthk,53
169
169
  pygeai/man/man1/__init__.py,sha256=CFvES6cP_sbhgpm-I-QSbPC1f7Bw7cFsMW2-sxm4FtM,54
170
- pygeai/man/man1/geai-proxy.1,sha256=QUFClbwUf6zIl7vpmFCDTg7vbk2D75m98G3BAGiD-OU,4084
170
+ pygeai/man/man1/geai-proxy.1,sha256=Q9li_XOxdCIHa2EWb_UuebJU3QKeyDju1lO4NVlpLnU,6255
171
171
  pygeai/man/man1/geai.1,sha256=dRJjqXLu4PRr5tELX-TveOrvp-J085rTV0NbqL5I30Q,51162
172
172
  pygeai/migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
173
173
  pygeai/migration/strategies.py,sha256=fedXqdtnAY57eeMI3RP5KhkjzVtYD654G51pMJb41fw,10041
@@ -186,9 +186,9 @@ pygeai/organization/limits/mappers.py,sha256=nINHaXOnZLnpc39PG3xf_7HX6tS9_-cT-H5
186
186
  pygeai/proxy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
187
187
  pygeai/proxy/clients.py,sha256=YPRUS3JAbEXgIGZ_dg8VwEXLxvG_hl51o70uudqjYB0,7857
188
188
  pygeai/proxy/config.py,sha256=41fACnnhB21OhnohVPW4sbM8aZbAAEgGo7-dUaM_fpM,5057
189
- pygeai/proxy/managers.py,sha256=swORE-WLtcTPglNpRc2AuHVjnbq0SX2ppnWQWYA44iQ,11134
190
- pygeai/proxy/servers.py,sha256=ys2bzIRIoBxEuzQOxviFaQGznm3CuymXHSkeKu4xm6U,11236
191
- pygeai/proxy/tool.py,sha256=BB6G5cg0768qz1tARB1pL0wBhSKr8SeWVGna0hfGmzg,2245
189
+ pygeai/proxy/managers.py,sha256=hXxVeWvkwfb7QrwOGcKyL9qW_wdNTxcpW84ppqwQ0SU,11132
190
+ pygeai/proxy/servers.py,sha256=ZJEnfT5gogTrr9LYir0kRkUDzW6RJjNFWceqN1sIeKM,11231
191
+ pygeai/proxy/tool.py,sha256=vG1THJNHCPNr5Y_3J7NlTu20hlATzsejOe07soPMDAE,2238
192
192
  pygeai/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
193
193
  pygeai/tests/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
194
194
  pygeai/tests/admin/test_clients.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -475,9 +475,9 @@ pygeai/vendor/a2a/utils/helpers.py,sha256=6Tbd8SVfXvdNEk6WYmLOjrAxkzFf1aIg8dkFfB
475
475
  pygeai/vendor/a2a/utils/message.py,sha256=gc_EKO69CJ4HkR76IFgsy-kENJz1dn7CfSgWJWvt-gs,2197
476
476
  pygeai/vendor/a2a/utils/task.py,sha256=BYRA_L1HpoUGJAVlyHML0lCM9Awhf2Ovjj7oPFXKbh0,1647
477
477
  pygeai/vendor/a2a/utils/telemetry.py,sha256=VvSp1Ztqaobkmq9-3sNhhPEilJS32-JTSfKzegkj6FU,10861
478
- pygeai-0.2.7b42.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
479
- pygeai-0.2.7b42.dist-info/METADATA,sha256=8ib_II6z_LMPUaR07YA4dt6gzeGwtxtfJFxYnHq2kPo,6883
480
- pygeai-0.2.7b42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
481
- pygeai-0.2.7b42.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
482
- pygeai-0.2.7b42.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
483
- pygeai-0.2.7b42.dist-info/RECORD,,
478
+ pygeai-0.2.7b43.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
479
+ pygeai-0.2.7b43.dist-info/METADATA,sha256=3mnn2OxImq9D3jPuwwWkFB-NhjPBAUP0FWUQrHhNdXI,6883
480
+ pygeai-0.2.7b43.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
481
+ pygeai-0.2.7b43.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
482
+ pygeai-0.2.7b43.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
483
+ pygeai-0.2.7b43.dist-info/RECORD,,