agentex-sdk 0.4.1__py3-none-any.whl → 0.4.3__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.
agentex/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "agentex"
4
- __version__ = "0.4.1" # x-release-please-version
4
+ __version__ = "0.4.3" # x-release-please-version
@@ -248,14 +248,14 @@ def deploy(
248
248
  cluster: str = typer.Option(
249
249
  ..., help="Target cluster name (must match kubectl context)"
250
250
  ),
251
- environment: str = typer.Option(
252
- ..., help="Environment name (dev, prod, etc.) - must be defined in environments.yaml"
253
- ),
254
251
  manifest: str = typer.Option("manifest.yaml", help="Path to the manifest file"),
255
252
  namespace: str | None = typer.Option(
256
253
  None,
257
254
  help="Override Kubernetes namespace (defaults to namespace from environments.yaml)",
258
255
  ),
256
+ environment: str | None = typer.Option(
257
+ None, help="Environment name (dev, prod, etc.) - must be defined in environments.yaml. If not provided, the namespace must be set explicitly."
258
+ ),
259
259
  tag: str | None = typer.Option(None, help="Override the image tag for deployment"),
260
260
  repository: str | None = typer.Option(
261
261
  None, help="Override the repository for deployment"
@@ -279,12 +279,16 @@ def deploy(
279
279
 
280
280
  # Validate manifest and environments configuration
281
281
  try:
282
- _, environments_config = validate_manifest_and_environments(
283
- str(manifest_path),
284
- required_environment=environment
285
- )
286
- agent_env_config = environments_config.get_config_for_env(environment)
287
- console.print(f"[green]✓[/green] Environment config validated: {environment}")
282
+ if environment:
283
+ _, environments_config = validate_manifest_and_environments(
284
+ str(manifest_path),
285
+ required_environment=environment
286
+ )
287
+ agent_env_config = environments_config.get_config_for_env(environment)
288
+ console.print(f"[green]✓[/green] Environment config validated: {environment}")
289
+ else:
290
+ agent_env_config = None
291
+ console.print(f"[yellow]⚠[/yellow] No environment provided, skipping environment-specific config")
288
292
 
289
293
  except EnvironmentsValidationError as e:
290
294
  error_msg = generate_helpful_error_message(e, "Environment validation failed")
@@ -298,13 +302,15 @@ def deploy(
298
302
  manifest_obj = AgentManifest.from_yaml(str(manifest_path))
299
303
 
300
304
  # Use namespace from environment config if not overridden
301
- if not namespace:
305
+ if not namespace and agent_env_config:
302
306
  namespace_from_config = agent_env_config.kubernetes.namespace if agent_env_config.kubernetes else None
303
307
  if namespace_from_config:
304
308
  console.print(f"[blue]ℹ[/blue] Using namespace from environments.yaml: {namespace_from_config}")
305
309
  namespace = namespace_from_config
306
310
  else:
307
311
  raise DeploymentError(f"No namespace found in environments.yaml for environment: {environment}, and not passed in as --namespace")
312
+ elif not namespace:
313
+ raise DeploymentError("No namespace provided, and not passed in as --namespace and no environment provided to read from an environments.yaml file")
308
314
 
309
315
  # Confirm deployment (only in interactive mode)
310
316
  console.print("\n[bold]Deployment Summary:[/bold]")
@@ -656,7 +656,8 @@ class OpenAIService:
656
656
  reasoning_content = ReasoningContent(
657
657
  author="agent",
658
658
  summary=[summary.text for summary in reasoning_item.summary],
659
- content=[content.text for content in reasoning_item.content] if hasattr(reasoning_item, "content") else None,
659
+ content=[content.text for content in reasoning_item.content] if hasattr(reasoning_item, "content") and reasoning_item.content else None,
660
+ type="reasoning",
660
661
  )
661
662
 
662
663
  # Create reasoning content using streaming context (immediate completion)
@@ -160,8 +160,6 @@ def validate_environments_yaml_file(file_path: str) -> AgentEnvironmentsConfig:
160
160
  except FileNotFoundError:
161
161
  raise EnvironmentsValidationError(
162
162
  f"environments.yaml not found: {file_path}\n\n"
163
- "💡 To create one:\n"
164
- " agentex agents init-environments\n\n"
165
163
  "📋 Why required:\n"
166
164
  " Environment-specific settings (auth, namespace, resources)\n"
167
165
  " must be separated from global manifest for proper isolation.",
@@ -230,9 +228,8 @@ def generate_helpful_error_message(error: Exception, context: str = "") -> str:
230
228
  if "environments.yaml" in base_msg:
231
229
  base_msg += (
232
230
  "\n\n🔧 Troubleshooting:\n"
233
- "1. Create environments.yaml: agentex agents init-environments\n"
234
- "2. Check file location: should be next to manifest.yaml\n"
235
- "3. Verify file permissions"
231
+ "1. Check file location: should be next to manifest.yaml\n"
232
+ "2. Verify file permissions"
236
233
  )
237
234
  elif "user_id" in base_msg.lower():
238
235
  base_msg += (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: agentex-sdk
3
- Version: 0.4.1
3
+ Version: 0.4.3
4
4
  Summary: The official Python library for the agentex API
5
5
  Project-URL: Homepage, https://github.com/scaleapi/agentex-python
6
6
  Project-URL: Repository, https://github.com/scaleapi/agentex-python
@@ -11,7 +11,7 @@ agentex/_resource.py,sha256=S1t7wmR5WUvoDIhZjo_x-E7uoTJBynJ3d8tPJMQYdjw,1106
11
11
  agentex/_response.py,sha256=Tb9zazsnemO2rTxWtBjAD5WBqlhli5ZaXGbiKgdu5DE,28794
12
12
  agentex/_streaming.py,sha256=FNGJExRCF-vTRUZHFKUfoAWFhDGOB3XbioVCF37Jr7E,10104
13
13
  agentex/_types.py,sha256=KyKYySGIfHPod2hho1fPxssk5NuVn8C4MeMTtA-lg80,6198
14
- agentex/_version.py,sha256=IXKhZpnb-rsNaq6UBtgpKG0zcVgpgakK38iEB5xTNp8,159
14
+ agentex/_version.py,sha256=Vyv8szOInHUwtaY4YdlBsdvw4o4W9oum_80z8688Fzg,159
15
15
  agentex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  agentex/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  agentex/_utils/_logs.py,sha256=LUjFPc3fweSChBUmjhQD8uYmwQAmFMNDuVFKfjYBQfM,777
@@ -49,7 +49,7 @@ agentex/lib/adk/utils/_modules/client.py,sha256=zMBYsPr2zXpSynF2W_5SKOpALtXvS0cT
49
49
  agentex/lib/adk/utils/_modules/templating.py,sha256=wgjkE4uC1gsArK-exyxOOZwp5Yu7ePqviZuyTDlP9m0,3595
50
50
  agentex/lib/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  agentex/lib/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
- agentex/lib/cli/commands/agents.py,sha256=LkfRxKKKIlGxWHGJ5CgUtlBUytpqpb_M5QnYF6xwQ00,13499
52
+ agentex/lib/cli/commands/agents.py,sha256=fmsZ9Cd2B-BcqUE0lLPeGI1mH8Tssq5lLgOuMT93pt4,14003
53
53
  agentex/lib/cli/commands/init.py,sha256=NSWk1zIZXn8dTn1_yyAstt9znqTyNLX8LwIv_LVg1kM,8199
54
54
  agentex/lib/cli/commands/main.py,sha256=aDn9xJIIQQD33v3caET_NX-8eBxoWC3QfZGMUgjeGN8,1093
55
55
  agentex/lib/cli/commands/secrets.py,sha256=cVtsqyGGieBVM4dKkbJROmzR_NJRODFngcEbi1Nc92A,5604
@@ -131,7 +131,7 @@ agentex/lib/core/services/adk/acp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
131
131
  agentex/lib/core/services/adk/acp/acp.py,sha256=Ei6r5CcM1RA7DqfTRpAWCmP7Buw97b3ajQuE4DsdSaQ,7559
132
132
  agentex/lib/core/services/adk/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
133
  agentex/lib/core/services/adk/providers/litellm.py,sha256=7RIVqQ5XaCP2cEL1pr4nl5jfG_0FDMvDTZVKu1iaN3M,9864
134
- agentex/lib/core/services/adk/providers/openai.py,sha256=G_svDKPZj7wgceHIyT_pSOwprhLpuhO7wtt_eYBOMLc,33215
134
+ agentex/lib/core/services/adk/providers/openai.py,sha256=dLQjkm9SquBfQaDh3det2whlYAxqaIpY-FaAAqTBJTU,33296
135
135
  agentex/lib/core/services/adk/providers/sgp.py,sha256=9gm-sPNQ_OSTaBzL0onerKhokPk_ZHndaKNO-z16wyQ,3676
136
136
  agentex/lib/core/services/adk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
137
  agentex/lib/core/services/adk/utils/templating.py,sha256=eaXSFq31Y9p5pRD6J6SL4QdTFtxy81dilbF2XXc2JYQ,1889
@@ -178,7 +178,7 @@ agentex/lib/sdk/config/deployment_config.py,sha256=lbOx2g0Q2gbo9CqWFejzmiYqh3GLn
178
178
  agentex/lib/sdk/config/environment_config.py,sha256=mZLy0MntogcTxyfSAhuWv4lJW3U1w3vSxm8opHW4Dqg,6462
179
179
  agentex/lib/sdk/config/local_development_config.py,sha256=b1AZsOVo1RoHKbk8Nm5nC8jcjJSOxKkKBv9gLhFLX8s,1697
180
180
  agentex/lib/sdk/config/project_config.py,sha256=CGH_r9KbnSFMj2CnBkZnfg41L2o0TeVNz6MwBDKPT_U,3642
181
- agentex/lib/sdk/config/validation.py,sha256=jbKRLoGDgxZbPcpwxuT-vrMdQUtwIcv-5qooS-FJ0sA,9161
181
+ agentex/lib/sdk/config/validation.py,sha256=QGAlAzlVJiWRlIksqxNS-JSwkk8Z4gXMSFUJc4qPrIQ,8989
182
182
  agentex/lib/sdk/fastacp/__init__.py,sha256=UvAdexdnfb4z0F4a2sfXROFyh9EjH89kf3AxHPybzCM,75
183
183
  agentex/lib/sdk/fastacp/fastacp.py,sha256=K4D7a9EiJfCgWp2hrE_TbpZBaF4Uc46MfndZK3F9mA0,3061
184
184
  agentex/lib/sdk/fastacp/base/base_acp_server.py,sha256=fkEVg5M4Ni2uPt_oiCP7_jfTmRvcC0o2VTg0Oka7mXA,14590
@@ -300,8 +300,8 @@ agentex/types/messages/batch_update_params.py,sha256=Ug5CThbD49a8j4qucg04OdmVrp_
300
300
  agentex/types/messages/batch_update_response.py,sha256=TbSBe6SuPzjXXWSj-nRjT1JHGBooTshHQQDa1AixQA8,278
301
301
  agentex/types/shared/__init__.py,sha256=IKs-Qn5Yja0kFh1G1kDqYZo43qrOu1hSoxlPdN-85dI,149
302
302
  agentex/types/shared/delete_response.py,sha256=8qH3zvQXaOHYQSHyXi7UQxdR4miTzR7V9K4zXVsiUyk,215
303
- agentex_sdk-0.4.1.dist-info/METADATA,sha256=yzW71B6CMxGPEeqHH1pxR6sBxgpCF2XstFvbjmhZQqc,15059
304
- agentex_sdk-0.4.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
305
- agentex_sdk-0.4.1.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
306
- agentex_sdk-0.4.1.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
307
- agentex_sdk-0.4.1.dist-info/RECORD,,
303
+ agentex_sdk-0.4.3.dist-info/METADATA,sha256=HAJxVOgtc7m8tJMGNvrxGdkueNuKYF1j6w64UoUiGsM,15059
304
+ agentex_sdk-0.4.3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
305
+ agentex_sdk-0.4.3.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
306
+ agentex_sdk-0.4.3.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
307
+ agentex_sdk-0.4.3.dist-info/RECORD,,