qbraid-cli 0.16.12__tar.gz → 0.16.13__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.
Files changed (74) hide show
  1. {qbraid_cli-0.16.12/qbraid_cli.egg-info → qbraid_cli-0.16.13}/PKG-INFO +4 -4
  2. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/pyproject.toml +4 -4
  3. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/agents/app.py +31 -4
  4. qbraid_cli-0.16.13/qbraid_cli/agents/provider_children.py +87 -0
  5. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13/qbraid_cli.egg-info}/PKG-INFO +4 -4
  6. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli.egg-info/SOURCES.txt +1 -0
  7. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli.egg-info/requires.txt +3 -3
  8. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/LICENSE +0 -0
  9. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/README.md +0 -0
  10. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/__init__.py +0 -0
  11. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/_build_info.py +0 -0
  12. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/_version.py +0 -0
  13. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/account/__init__.py +0 -0
  14. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/account/app.py +0 -0
  15. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/admin/__init__.py +0 -0
  16. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/admin/app.py +0 -0
  17. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/admin/headers.py +0 -0
  18. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/admin/validation.py +0 -0
  19. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/agents/__init__.py +0 -0
  20. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/agents/permission_response.py +0 -0
  21. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/agents/queue.py +0 -0
  22. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/agents/work.py +0 -0
  23. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/ai/__init__.py +0 -0
  24. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/ai/app.py +0 -0
  25. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/ai/token.py +0 -0
  26. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/comms/__init__.py +0 -0
  27. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/comms/app.py +0 -0
  28. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/compute/__init__.py +0 -0
  29. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/compute/app.py +0 -0
  30. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/compute/instances.py +0 -0
  31. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/compute/profiles.py +0 -0
  32. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/compute/server.py +0 -0
  33. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/compute/ssh.py +0 -0
  34. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/configure/__init__.py +0 -0
  35. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/configure/actions.py +0 -0
  36. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/configure/app.py +0 -0
  37. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/devices/__init__.py +0 -0
  38. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/devices/app.py +0 -0
  39. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/devices/validation.py +0 -0
  40. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/__init__.py +0 -0
  41. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/activate.py +0 -0
  42. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/app.py +0 -0
  43. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/create.py +0 -0
  44. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/data_handling.py +0 -0
  45. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/groups.py +0 -0
  46. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/publish.py +0 -0
  47. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/registry.py +0 -0
  48. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/envs/share.py +0 -0
  49. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/exceptions.py +0 -0
  50. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/handlers.py +0 -0
  51. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/jobs/__init__.py +0 -0
  52. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/jobs/app.py +0 -0
  53. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/jobs/groups.py +0 -0
  54. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/kernels/__init__.py +0 -0
  55. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/kernels/app.py +0 -0
  56. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/lab/__init__.py +0 -0
  57. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/lab/app.py +0 -0
  58. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/main.py +0 -0
  59. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/pip/__init__.py +0 -0
  60. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/pip/app.py +0 -0
  61. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/pip/hooks.py +0 -0
  62. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/projects/__init__.py +0 -0
  63. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/projects/app.py +0 -0
  64. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/py.typed +0 -0
  65. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/skills/__init__.py +0 -0
  66. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/skills/app.py +0 -0
  67. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/troubleshoot/__init__.py +0 -0
  68. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli/troubleshoot/app.py +0 -0
  69. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli.egg-info/dependency_links.txt +0 -0
  70. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli.egg-info/entry_points.txt +0 -0
  71. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/qbraid_cli.egg-info/top_level.txt +0 -0
  72. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/setup.cfg +0 -0
  73. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/tests/test_cli_e2e.py +0 -0
  74. {qbraid_cli-0.16.12 → qbraid_cli-0.16.13}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qbraid-cli
3
- Version: 0.16.12
3
+ Version: 0.16.13
4
4
  Summary: Command Line Interface for interacting with all parts of the qBraid platform.
5
5
  Author-email: qBraid Development Team <contact@qbraid.com>
6
6
  License-Expression: LicenseRef-Proprietary
@@ -30,11 +30,11 @@ Requires-Dist: typer>=0.12.1
30
30
  Requires-Dist: rich>=10.11.0
31
31
  Requires-Dist: click<=8.5.0
32
32
  Requires-Dist: questionary>=2.0.0
33
- Requires-Dist: qbraid-core>=0.6.30
33
+ Requires-Dist: qbraid-core>=0.6.32
34
34
  Provides-Extra: compute
35
- Requires-Dist: qbraid-core[compute]>=0.6.30; extra == "compute"
35
+ Requires-Dist: qbraid-core[compute]>=0.6.32; extra == "compute"
36
36
  Provides-Extra: envs
37
- Requires-Dist: qbraid-core[environments]>=0.6.30; extra == "envs"
37
+ Requires-Dist: qbraid-core[environments]>=0.6.32; extra == "envs"
38
38
  Provides-Extra: dev
39
39
  Requires-Dist: isort; extra == "dev"
40
40
  Requires-Dist: black; extra == "dev"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qbraid-cli"
7
- version = "0.16.12"
7
+ version = "0.16.13"
8
8
  description = "Command Line Interface for interacting with all parts of the qBraid platform."
9
9
  readme = "README.md"
10
10
  authors = [{ name = "qBraid Development Team", email = "contact@qbraid.com" }]
@@ -32,7 +32,7 @@ dependencies = [
32
32
  "rich>=10.11.0",
33
33
  "click<=8.5.0",
34
34
  "questionary>=2.0.0",
35
- "qbraid-core>=0.6.30",
35
+ "qbraid-core>=0.6.32",
36
36
  ]
37
37
  requires-python = ">= 3.10"
38
38
 
@@ -43,8 +43,8 @@ Documentation = "https://docs.qbraid.com/v2/cli/api-reference/qbraid"
43
43
  Discord = "https://discord.gg/KugF6Cnncm"
44
44
 
45
45
  [project.optional-dependencies]
46
- compute = ["qbraid-core[compute]>=0.6.30"]
47
- envs = ["qbraid-core[environments]>=0.6.30"]
46
+ compute = ["qbraid-core[compute]>=0.6.32"]
47
+ envs = ["qbraid-core[environments]>=0.6.32"]
48
48
  dev = ["isort", "black", "pytest", "pytest-cov", "pytest-asyncio"]
49
49
 
50
50
  [project.scripts]
@@ -1241,6 +1241,9 @@ def agents_update(
1241
1241
  console.print("[dim]Use 'qbraid agents list' to see active sessions.[/dim]")
1242
1242
  raise typer.Exit(code=1)
1243
1243
  except Exception as e:
1244
+ if _is_registry_error(e):
1245
+ console.print(f"[red]Cannot update session: {_plain(e)}[/red]", highlight=False)
1246
+ raise typer.Exit(code=1) from e
1244
1247
  handle_error(message=str(e))
1245
1248
  raise typer.Exit(code=1)
1246
1249
 
@@ -1334,6 +1337,12 @@ def agents_kill(
1334
1337
  matches = [s for s in matches if s.session_id == selected]
1335
1338
 
1336
1339
  session = matches[0]
1340
+ if getattr(session, "runtime_kind", None) == "provider_child":
1341
+ console.print(
1342
+ "[red]Not stopped:[/red] native provider children are read-only. "
1343
+ "Manage this child from its parent agent."
1344
+ )
1345
+ raise typer.Exit(code=1)
1337
1346
  pid = session.pid
1338
1347
 
1339
1348
  # Shown as interrupted (another Lab's row this Lab cannot verify):
@@ -2848,7 +2857,8 @@ def agents_watch(
2848
2857
  import subprocess as _sp
2849
2858
 
2850
2859
  remote_flags = f"qbraid agents watch {shlex.quote(session_id)} --stream --lines {lines}"
2851
- console.print(f"[dim]Watching {session_id} on {compute}... (Ctrl+C to stop)[/dim]")
2860
+ if not stream:
2861
+ console.print(f"[dim]Watching {session_id} on {compute}... (Ctrl+C to stop)[/dim]")
2852
2862
 
2853
2863
  proc = _sp.Popen( # pylint: disable=consider-using-with
2854
2864
  ["ssh", "-o", "ConnectTimeout=10", compute, remote_flags],
@@ -2871,6 +2881,11 @@ def agents_watch(
2871
2881
  try:
2872
2882
 
2873
2883
  event = json.loads(line)
2884
+ if event.get("runtime_kind") == "provider_child":
2885
+ from .provider_children import render_child_event
2886
+
2887
+ render_child_event(console, event)
2888
+ continue
2874
2889
  entry_type = event.get("type", "unknown")
2875
2890
  content = event.get("content", "")
2876
2891
  ts = event.get("timestamp")
@@ -2895,12 +2910,18 @@ def agents_watch(
2895
2910
  console.print(line_text, highlight=False)
2896
2911
  except Exception:
2897
2912
  console.print(line, highlight=False)
2913
+ remote_status = proc.wait()
2914
+ if remote_status:
2915
+ raise typer.Exit(code=remote_status if remote_status > 0 else 1)
2898
2916
  except KeyboardInterrupt:
2899
- proc.terminate()
2900
- console.print("\n[dim]Stopped watching.[/dim]")
2901
- finally:
2902
2917
  proc.terminate()
2903
2918
  proc.wait()
2919
+ if not stream:
2920
+ console.print("\n[dim]Stopped watching.[/dim]")
2921
+ finally:
2922
+ if proc.poll() is None:
2923
+ proc.terminate()
2924
+ proc.wait()
2904
2925
  return
2905
2926
 
2906
2927
  from qbraid_core.services.agents import get_parser_for_tool, watch_transcript
@@ -2913,6 +2934,12 @@ def agents_watch(
2913
2934
  console.print("[dim]Use 'qbraid agents list' to see active sessions.[/dim]")
2914
2935
  raise typer.Exit(code=1)
2915
2936
 
2937
+ if getattr(session, "runtime_kind", None) == "provider_child":
2938
+ from .provider_children import watch_child
2939
+
2940
+ watch_child(registry, session.session_id, lines=lines, stream=stream, console=console)
2941
+ return
2942
+
2916
2943
  tool_value = session.tool.value if session.tool else None
2917
2944
 
2918
2945
  # OpenCode uses SQLite DB instead of transcript files
@@ -0,0 +1,87 @@
1
+ # Copyright (c) 2026, qBraid Development Team
2
+ # All rights reserved.
3
+
4
+ """Read-only CLI observation of provider-native children through Core."""
5
+
6
+ import re
7
+ import time
8
+ import unicodedata
9
+
10
+ from rich.text import Text
11
+
12
+ _CONTROL = re.compile(r"[\x00-\x1f\x7f-\x9f\ud800-\udfff]")
13
+
14
+
15
+ def render_child_event(console, event):
16
+ """Render provider text and actual message endpoints literally and inertly."""
17
+ label = str(event.get("type") or "unknown")
18
+ if event.get("source_agent"):
19
+ label += f" from {event['source_agent']}"
20
+ if event.get("target_agent"):
21
+ label += f" to {event['target_agent']}"
22
+ if event.get("tool_name"):
23
+ label += f" ({event['tool_name']})"
24
+ text = _CONTROL.sub(" ", f"{label}: {event.get('content') or ''}")
25
+ # Match Jobs' single-line policy without importing another command module.
26
+ text = "".join(
27
+ "\ufffd" if unicodedata.category(character) in {"Cf", "Zl", "Zp"} else character for character in text
28
+ )
29
+ console.print(Text(text), highlight=False)
30
+
31
+
32
+ def watch_child(registry, session_id, *, lines, stream, console):
33
+ """Poll only Core's bounded, lineage-validated child reader, without permissions."""
34
+ import json
35
+
36
+ try:
37
+ from qbraid_core.services.agents.provider_children import read_child_entries
38
+ except ImportError as error:
39
+ raise ValueError("Update qbraid-core to watch native provider children safely.") from error
40
+
41
+ from qbraid_core.services.agents.exceptions import AgentSessionNotFoundError
42
+
43
+ if not stream:
44
+ console.print("Watching read-only native child activity... (Ctrl+C to stop)")
45
+ seen = set()
46
+ initial = True
47
+ try:
48
+ while True:
49
+ try:
50
+ session = registry.get_session(session_id)
51
+ except AgentSessionNotFoundError as error:
52
+ raise ValueError("Native child is no longer registered.") from error
53
+ if getattr(session, "runtime_kind", None) != "provider_child":
54
+ raise ValueError("Session is no longer a native provider child.")
55
+ entries = read_child_entries(session, registry, limit=200)
56
+ current = {entry.id for entry in entries}
57
+ selected = entries[-min(max(lines, 0), 200) :] if initial and lines > 0 else []
58
+ if not initial:
59
+ selected = [entry for entry in entries if entry.id not in seen]
60
+ for entry in selected:
61
+ event = {
62
+ "runtime_kind": "provider_child",
63
+ "id": entry.id,
64
+ "type": entry.type,
65
+ "timestamp": entry.timestamp,
66
+ "content": entry.content or "",
67
+ "tool_name": entry.tool_name,
68
+ "source_agent": entry.source_agent,
69
+ "target_agent": entry.target_agent,
70
+ "model": entry.model,
71
+ "cost_usd": entry.cost_usd,
72
+ "token_count": entry.token_count,
73
+ }
74
+ if stream:
75
+ print(
76
+ json.dumps({key: value for key, value in event.items() if value is not None}),
77
+ flush=True,
78
+ )
79
+ else:
80
+ render_child_event(console, event)
81
+ if current:
82
+ seen = current
83
+ initial = False
84
+ time.sleep(0.5)
85
+ except KeyboardInterrupt:
86
+ if not stream:
87
+ console.print("\nStopped watching.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qbraid-cli
3
- Version: 0.16.12
3
+ Version: 0.16.13
4
4
  Summary: Command Line Interface for interacting with all parts of the qBraid platform.
5
5
  Author-email: qBraid Development Team <contact@qbraid.com>
6
6
  License-Expression: LicenseRef-Proprietary
@@ -30,11 +30,11 @@ Requires-Dist: typer>=0.12.1
30
30
  Requires-Dist: rich>=10.11.0
31
31
  Requires-Dist: click<=8.5.0
32
32
  Requires-Dist: questionary>=2.0.0
33
- Requires-Dist: qbraid-core>=0.6.30
33
+ Requires-Dist: qbraid-core>=0.6.32
34
34
  Provides-Extra: compute
35
- Requires-Dist: qbraid-core[compute]>=0.6.30; extra == "compute"
35
+ Requires-Dist: qbraid-core[compute]>=0.6.32; extra == "compute"
36
36
  Provides-Extra: envs
37
- Requires-Dist: qbraid-core[environments]>=0.6.30; extra == "envs"
37
+ Requires-Dist: qbraid-core[environments]>=0.6.32; extra == "envs"
38
38
  Provides-Extra: dev
39
39
  Requires-Dist: isort; extra == "dev"
40
40
  Requires-Dist: black; extra == "dev"
@@ -23,6 +23,7 @@ qbraid_cli/admin/validation.py
23
23
  qbraid_cli/agents/__init__.py
24
24
  qbraid_cli/agents/app.py
25
25
  qbraid_cli/agents/permission_response.py
26
+ qbraid_cli/agents/provider_children.py
26
27
  qbraid_cli/agents/queue.py
27
28
  qbraid_cli/agents/work.py
28
29
  qbraid_cli/ai/__init__.py
@@ -2,10 +2,10 @@ typer>=0.12.1
2
2
  rich>=10.11.0
3
3
  click<=8.5.0
4
4
  questionary>=2.0.0
5
- qbraid-core>=0.6.30
5
+ qbraid-core>=0.6.32
6
6
 
7
7
  [compute]
8
- qbraid-core[compute]>=0.6.30
8
+ qbraid-core[compute]>=0.6.32
9
9
 
10
10
  [dev]
11
11
  isort
@@ -15,4 +15,4 @@ pytest-cov
15
15
  pytest-asyncio
16
16
 
17
17
  [envs]
18
- qbraid-core[environments]>=0.6.30
18
+ qbraid-core[environments]>=0.6.32
File without changes
File without changes
File without changes