proxima-cli 1.1.0__tar.gz → 1.2.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.
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/PKG-INFO +1 -1
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/pyproject.toml +1 -1
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/catalog.py +95 -14
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/.github/workflows/publish.yml +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/.gitignore +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/LICENSE +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/README.md +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/__init__.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/api.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/auth.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/cli.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/__init__.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/agent.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/governance.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/knowledge.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/model.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/ontology.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/platform.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/routine.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/secret.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/team.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/toolbox.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/commands/workflow.py +0 -0
- {proxima_cli-1.1.0 → proxima_cli-1.2.0}/src/prox/config.py +0 -0
|
@@ -246,50 +246,131 @@ def check_license():
|
|
|
246
246
|
def deploy_from_catalog(
|
|
247
247
|
agent_id: str = typer.Argument(help="Agent ID to deploy from catalog"),
|
|
248
248
|
version: str = typer.Option("latest", "--version", "-v", help="Version to deploy"),
|
|
249
|
-
domain: str = typer.Option("", "--domain", "-d", help="
|
|
249
|
+
domain: str = typer.Option("", "--domain", "-d", help="Domain assignment (skips prompt)"),
|
|
250
|
+
model: str = typer.Option("", "--model", "-m", help="LLM model (skips prompt)"),
|
|
251
|
+
yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation prompt"),
|
|
250
252
|
):
|
|
251
|
-
"""Deploy an agent from catalog to the platform
|
|
253
|
+
"""Deploy an agent from catalog to the platform.
|
|
252
254
|
|
|
253
|
-
|
|
254
|
-
registration, and configuration.
|
|
255
|
+
Interactive provisioning — prompts for domain, model, and data sources.
|
|
256
|
+
The platform handles container creation, registration, and configuration.
|
|
255
257
|
"""
|
|
256
|
-
from ..api import gateway_post, gateway_get, APIError
|
|
258
|
+
from ..api import gateway_post, gateway_get, catalog_get, APIError
|
|
257
259
|
import time as _time
|
|
258
260
|
|
|
259
|
-
|
|
261
|
+
# Fetch agent metadata from catalog
|
|
262
|
+
try:
|
|
263
|
+
agent_meta = catalog_get(f"/catalog/agents/{agent_id}")
|
|
264
|
+
except APIError as e:
|
|
265
|
+
console.print(f"[red]Error:[/red] {e.detail}")
|
|
266
|
+
raise typer.Exit(1)
|
|
267
|
+
|
|
268
|
+
agent_name = agent_meta.get("name", agent_id)
|
|
269
|
+
agent_codename = agent_meta.get("codename", "")
|
|
270
|
+
suggested_domain = agent_meta.get("domain", "general")
|
|
271
|
+
resolved_version = version if version != "latest" else agent_meta.get("latest_version", "latest")
|
|
272
|
+
|
|
273
|
+
console.print(f"\n[bold]{agent_name}[/bold] ({agent_codename}) v{resolved_version}")
|
|
274
|
+
console.print(f"[dim]{agent_meta.get('description', agent_meta.get('tagline', ''))}[/dim]\n")
|
|
275
|
+
|
|
276
|
+
# --- Domain selection ---
|
|
277
|
+
if not domain:
|
|
278
|
+
# Fetch existing domains from platform
|
|
279
|
+
existing_domains = []
|
|
280
|
+
try:
|
|
281
|
+
domains_res = gateway_get("/build/domains")
|
|
282
|
+
existing_domains = [d.get("id", d.get("name", "")) for d in domains_res.get("domains", [])]
|
|
283
|
+
except APIError:
|
|
284
|
+
pass
|
|
285
|
+
|
|
286
|
+
if existing_domains:
|
|
287
|
+
console.print(f" Existing domains: {', '.join(existing_domains)}")
|
|
288
|
+
|
|
289
|
+
domain = typer.prompt(
|
|
290
|
+
f" Domain",
|
|
291
|
+
default=suggested_domain,
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
# --- Model selection ---
|
|
295
|
+
if not model:
|
|
296
|
+
# Fetch available models from platform
|
|
297
|
+
available_models = []
|
|
298
|
+
try:
|
|
299
|
+
models_res = gateway_get("/build/models")
|
|
300
|
+
available_models = [m.get("id", "") for m in models_res.get("models", [])]
|
|
301
|
+
except APIError:
|
|
302
|
+
pass
|
|
303
|
+
|
|
304
|
+
if available_models:
|
|
305
|
+
console.print(f" Available models: {', '.join(available_models)}")
|
|
306
|
+
|
|
307
|
+
model = typer.prompt(
|
|
308
|
+
f" Model",
|
|
309
|
+
default=agent_meta.get("model_requirement", "gpt-4.1-mini"),
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
# --- Data source mode ---
|
|
313
|
+
data_source_mode = typer.prompt(
|
|
314
|
+
f" Data sources",
|
|
315
|
+
default="synthetic",
|
|
316
|
+
type=typer.Choice(["synthetic", "configure-later"], case_sensitive=False),
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
# --- Confirmation ---
|
|
320
|
+
console.print(f"\n [bold]Deployment summary:[/bold]")
|
|
321
|
+
console.print(f" Agent: {agent_name} ({agent_id})")
|
|
322
|
+
console.print(f" Version: {resolved_version}")
|
|
323
|
+
console.print(f" Domain: {domain}")
|
|
324
|
+
console.print(f" Model: {model}")
|
|
325
|
+
console.print(f" Data: {data_source_mode}")
|
|
326
|
+
console.print()
|
|
327
|
+
|
|
328
|
+
if not yes:
|
|
329
|
+
if not typer.confirm(" Proceed with deployment?", default=True):
|
|
330
|
+
console.print(" [dim]Cancelled.[/dim]")
|
|
331
|
+
raise typer.Exit(0)
|
|
332
|
+
|
|
333
|
+
# --- Trigger deployment ---
|
|
334
|
+
console.print(f"\n [bold]Deploying...[/bold]\n")
|
|
260
335
|
|
|
261
336
|
try:
|
|
262
337
|
result = gateway_post(f"/catalog/deploy/{agent_id}", {
|
|
263
338
|
"version": version,
|
|
264
339
|
"domain": domain,
|
|
340
|
+
"model": model,
|
|
341
|
+
"data_source_mode": data_source_mode,
|
|
265
342
|
})
|
|
266
343
|
deployment_id = result.get("deployment_id")
|
|
344
|
+
resolved_version = result.get("version", resolved_version)
|
|
267
345
|
console.print(f" [green]✓[/green] Deployment triggered: {deployment_id}")
|
|
268
346
|
console.print(f" Polling status...\n")
|
|
269
347
|
|
|
270
348
|
# Poll until complete or failed
|
|
271
|
-
|
|
349
|
+
last_message = ""
|
|
350
|
+
for _ in range(150): # 5 minutes max
|
|
272
351
|
_time.sleep(2)
|
|
273
352
|
try:
|
|
274
353
|
status = gateway_get(f"/catalog/deploy/{agent_id}/status")
|
|
275
|
-
step = status.get("step", 0)
|
|
276
|
-
total = status.get("total_steps", 14)
|
|
277
354
|
state = status.get("status", "unknown")
|
|
278
355
|
message = status.get("message", "")
|
|
279
356
|
|
|
280
|
-
|
|
357
|
+
if message != last_message:
|
|
358
|
+
console.print(f" {state}: {message}")
|
|
359
|
+
last_message = message
|
|
281
360
|
|
|
282
361
|
if state in ("deployed", "upgraded"):
|
|
283
|
-
console.print(f"\n
|
|
284
|
-
console.print(f"
|
|
362
|
+
console.print(f"\n [green]✓[/green] {message}")
|
|
363
|
+
console.print(f"\n Next steps:")
|
|
364
|
+
console.print(f" • View in dashboard: /build/agents/{agent_id}")
|
|
365
|
+
console.print(f" • Publish: prox agent publish {agent_id}")
|
|
285
366
|
return
|
|
286
367
|
elif state == "failed":
|
|
287
|
-
console.print(f"\n
|
|
368
|
+
console.print(f"\n [red]✗[/red] Deployment failed: {message}")
|
|
288
369
|
raise typer.Exit(1)
|
|
289
370
|
except APIError:
|
|
290
371
|
pass
|
|
291
372
|
|
|
292
|
-
console.print(f"\n
|
|
373
|
+
console.print(f"\n [yellow]⚠[/yellow] Deployment timed out. Check: prox catalog status {agent_id}")
|
|
293
374
|
|
|
294
375
|
except APIError as e:
|
|
295
376
|
console.print(f" [red]✗[/red] {e.detail}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|