qbraid-cli 0.16.6__tar.gz → 0.16.7__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 (71) hide show
  1. {qbraid_cli-0.16.6/qbraid_cli.egg-info → qbraid_cli-0.16.7}/PKG-INFO +4 -4
  2. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/pyproject.toml +4 -4
  3. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/agents/app.py +74 -54
  4. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7/qbraid_cli.egg-info}/PKG-INFO +4 -4
  5. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/requires.txt +3 -3
  6. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/LICENSE +0 -0
  7. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/README.md +0 -0
  8. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/__init__.py +0 -0
  9. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/_build_info.py +0 -0
  10. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/_version.py +0 -0
  11. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/account/__init__.py +0 -0
  12. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/account/app.py +0 -0
  13. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/admin/__init__.py +0 -0
  14. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/admin/app.py +0 -0
  15. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/admin/headers.py +0 -0
  16. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/admin/validation.py +0 -0
  17. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/agents/__init__.py +0 -0
  18. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/agents/permission_response.py +0 -0
  19. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/ai/__init__.py +0 -0
  20. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/ai/app.py +0 -0
  21. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/ai/token.py +0 -0
  22. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/comms/__init__.py +0 -0
  23. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/comms/app.py +0 -0
  24. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/compute/__init__.py +0 -0
  25. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/compute/app.py +0 -0
  26. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/compute/instances.py +0 -0
  27. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/compute/profiles.py +0 -0
  28. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/compute/server.py +0 -0
  29. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/compute/ssh.py +0 -0
  30. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/configure/__init__.py +0 -0
  31. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/configure/actions.py +0 -0
  32. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/configure/app.py +0 -0
  33. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/devices/__init__.py +0 -0
  34. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/devices/app.py +0 -0
  35. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/devices/validation.py +0 -0
  36. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/__init__.py +0 -0
  37. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/activate.py +0 -0
  38. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/app.py +0 -0
  39. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/create.py +0 -0
  40. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/data_handling.py +0 -0
  41. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/groups.py +0 -0
  42. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/publish.py +0 -0
  43. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/registry.py +0 -0
  44. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/envs/share.py +0 -0
  45. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/exceptions.py +0 -0
  46. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/handlers.py +0 -0
  47. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/jobs/__init__.py +0 -0
  48. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/jobs/app.py +0 -0
  49. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/jobs/groups.py +0 -0
  50. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/kernels/__init__.py +0 -0
  51. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/kernels/app.py +0 -0
  52. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/lab/__init__.py +0 -0
  53. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/lab/app.py +0 -0
  54. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/main.py +0 -0
  55. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/pip/__init__.py +0 -0
  56. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/pip/app.py +0 -0
  57. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/pip/hooks.py +0 -0
  58. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/projects/__init__.py +0 -0
  59. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/projects/app.py +0 -0
  60. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/py.typed +0 -0
  61. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/skills/__init__.py +0 -0
  62. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/skills/app.py +0 -0
  63. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/troubleshoot/__init__.py +0 -0
  64. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli/troubleshoot/app.py +0 -0
  65. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/SOURCES.txt +0 -0
  66. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/dependency_links.txt +0 -0
  67. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/entry_points.txt +0 -0
  68. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/top_level.txt +0 -0
  69. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/setup.cfg +0 -0
  70. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/tests/test_cli_e2e.py +0 -0
  71. {qbraid_cli-0.16.6 → qbraid_cli-0.16.7}/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.6
3
+ Version: 0.16.7
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.15
33
+ Requires-Dist: qbraid-core>=0.6.16
34
34
  Provides-Extra: compute
35
- Requires-Dist: qbraid-core[compute]>=0.6.15; extra == "compute"
35
+ Requires-Dist: qbraid-core[compute]>=0.6.16; extra == "compute"
36
36
  Provides-Extra: envs
37
- Requires-Dist: qbraid-core[environments]>=0.6.15; extra == "envs"
37
+ Requires-Dist: qbraid-core[environments]>=0.6.16; 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.6"
7
+ version = "0.16.7"
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.15",
35
+ "qbraid-core>=0.6.16",
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.15"]
47
- envs = ["qbraid-core[environments]>=0.6.15"]
46
+ compute = ["qbraid-core[compute]>=0.6.16"]
47
+ envs = ["qbraid-core[environments]>=0.6.16"]
48
48
  dev = ["isort", "black", "pytest", "pytest-cov", "pytest-asyncio"]
49
49
 
50
50
  [project.scripts]
@@ -1278,6 +1278,27 @@ def _request_id_kwargs(method: Callable[..., Any], request_id: Optional[str]) ->
1278
1278
  return {"request_id": request_id}
1279
1279
 
1280
1280
 
1281
+ def _fork_execution(original: Any, approval: Optional[Any], execution_mode: Optional[Any]):
1282
+ """Execution mode for a fork of ``original``.
1283
+
1284
+ An explicit --execution-mode wins. Otherwise the original's mode is reused
1285
+ -- unless it was YOLO's forced container and the fork asks for a safer
1286
+ approval, or the fork asks for auto-review, which Core pins to the
1287
+ workspace sandbox. Inheriting there carried danger-full-access into a
1288
+ session labelled manual or auto-review (core#378 review F2).
1289
+ """
1290
+ if execution_mode:
1291
+ return execution_mode.value
1292
+ requested = approval.value if approval else None
1293
+ recorded = getattr(original, "approval", None)
1294
+ effective = requested or recorded
1295
+ if effective in ("auto-review", "yolo") or (recorded == "yolo" and requested not in (None, "yolo")):
1296
+ # auto-review is pinned to workspace and yolo to container by core;
1297
+ # passing the original's mode would make core refuse the fork.
1298
+ return None
1299
+ return getattr(original, "execution_mode", None)
1300
+
1301
+
1281
1302
  def _approval_kwargs(method: Callable[..., Any], approval: Optional[str]) -> Dict[str, Any]:
1282
1303
  """Forward ``approval`` only to a qbraid-core new enough to accept it.
1283
1304
 
@@ -1787,11 +1808,7 @@ def agents_resume(
1787
1808
  ),
1788
1809
  **_execution_kwargs(
1789
1810
  launcher.launch,
1790
- (
1791
- execution_mode.value
1792
- if execution_mode
1793
- else getattr(original, "execution_mode", None)
1794
- ),
1811
+ _fork_execution(original, approval, execution_mode),
1795
1812
  ),
1796
1813
  )
1797
1814
  else:
@@ -1806,58 +1823,61 @@ def agents_resume(
1806
1823
 
1807
1824
  elif "Multiple sessions match" not in err_msg:
1808
1825
  raise
1826
+ else:
1827
+ # Only an ambiguous prefix reaches the picker. A completed fork
1828
+ # used to fall through to it, find no matches and exit 1 after
1829
+ # the fork had already launched.
1830
+ # Show filtered picker with only matching sessions
1831
+ import questionary
1832
+
1833
+ registry = _get_registry()
1834
+ all_sessions = registry.search_sessions(include_stopped=True)
1835
+ matches = [
1836
+ s
1837
+ for s in all_sessions
1838
+ if (
1839
+ s.session_id == session_id
1840
+ or s.session_id.startswith(session_id)
1841
+ or (s.tmux_window and s.tmux_window == session_id)
1842
+ or (s.terminal_name and s.terminal_name == session_id)
1843
+ )
1844
+ ]
1845
+ matches.sort(key=lambda s: s.last_activity or s.started_at or 0, reverse=True)
1809
1846
 
1810
- # Show filtered picker with only matching sessions
1811
- import questionary
1812
-
1813
- registry = _get_registry()
1814
- all_sessions = registry.search_sessions(include_stopped=True)
1815
- matches = [
1816
- s
1817
- for s in all_sessions
1818
- if (
1819
- s.session_id == session_id
1820
- or s.session_id.startswith(session_id)
1821
- or (s.tmux_window and s.tmux_window == session_id)
1822
- or (s.terminal_name and s.terminal_name == session_id)
1823
- )
1824
- ]
1825
- matches.sort(key=lambda s: s.last_activity or s.started_at or 0, reverse=True)
1847
+ if not matches:
1848
+ console.print(
1849
+ "[yellow]No visible sessions match this prefix. "
1850
+ "Use a full session ID to resume a retained record.[/yellow]"
1851
+ )
1852
+ raise typer.Exit(code=1)
1853
+
1854
+ choices = []
1855
+ for s in matches:
1856
+ sid = s.session_id[:8]
1857
+ tool_val = s.tool.value if s.tool else "?"
1858
+ status_val = s.status.value if s.status else "?"
1859
+ cwd_display = s.cwd or ""
1860
+ if len(cwd_display) > 30:
1861
+ cwd_display = "..." + cwd_display[-27:]
1862
+ age_str = _time_ago(s.last_activity or s.started_at)
1863
+ label = f"{sid} {tool_val:<8} {status_val:<8} {cwd_display:<30} {age_str}"
1864
+ choices.append(questionary.Choice(title=label, value=s.session_id))
1865
+
1866
+ console.print(f"[yellow]Multiple sessions match '{session_id}':[/yellow]")
1867
+ selected = questionary.select(
1868
+ "Select a session to resume:",
1869
+ choices=choices,
1870
+ instruction="(use arrow keys)",
1871
+ ).ask()
1872
+ if selected is None:
1873
+ raise typer.Exit()
1826
1874
 
1827
- if not matches:
1828
- console.print(
1829
- "[yellow]No visible sessions match this prefix. "
1830
- "Use a full session ID to resume a retained record.[/yellow]"
1875
+ session = launcher.resume(
1876
+ session_id=selected,
1877
+ name=name,
1878
+ **(_approval_kwargs(launcher.resume, approval.value) if approval else {}),
1879
+ **_execution_kwargs(launcher.resume, execution_mode.value if execution_mode else None),
1831
1880
  )
1832
- raise typer.Exit(code=1)
1833
-
1834
- choices = []
1835
- for s in matches:
1836
- sid = s.session_id[:8]
1837
- tool_val = s.tool.value if s.tool else "?"
1838
- status_val = s.status.value if s.status else "?"
1839
- cwd_display = s.cwd or ""
1840
- if len(cwd_display) > 30:
1841
- cwd_display = "..." + cwd_display[-27:]
1842
- age_str = _time_ago(s.last_activity or s.started_at)
1843
- label = f"{sid} {tool_val:<8} {status_val:<8} {cwd_display:<30} {age_str}"
1844
- choices.append(questionary.Choice(title=label, value=s.session_id))
1845
-
1846
- console.print(f"[yellow]Multiple sessions match '{session_id}':[/yellow]")
1847
- selected = questionary.select(
1848
- "Select a session to resume:",
1849
- choices=choices,
1850
- instruction="(use arrow keys)",
1851
- ).ask()
1852
- if selected is None:
1853
- raise typer.Exit()
1854
-
1855
- session = launcher.resume(
1856
- session_id=selected,
1857
- name=name,
1858
- **(_approval_kwargs(launcher.resume, approval.value) if approval else {}),
1859
- **_execution_kwargs(launcher.resume, execution_mode.value if execution_mode else None),
1860
- )
1861
1881
 
1862
1882
  status_val = session.status.value if session.status else "idle"
1863
1883
  style = _status_style(status_val)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qbraid-cli
3
- Version: 0.16.6
3
+ Version: 0.16.7
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.15
33
+ Requires-Dist: qbraid-core>=0.6.16
34
34
  Provides-Extra: compute
35
- Requires-Dist: qbraid-core[compute]>=0.6.15; extra == "compute"
35
+ Requires-Dist: qbraid-core[compute]>=0.6.16; extra == "compute"
36
36
  Provides-Extra: envs
37
- Requires-Dist: qbraid-core[environments]>=0.6.15; extra == "envs"
37
+ Requires-Dist: qbraid-core[environments]>=0.6.16; extra == "envs"
38
38
  Provides-Extra: dev
39
39
  Requires-Dist: isort; extra == "dev"
40
40
  Requires-Dist: black; extra == "dev"
@@ -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.15
5
+ qbraid-core>=0.6.16
6
6
 
7
7
  [compute]
8
- qbraid-core[compute]>=0.6.15
8
+ qbraid-core[compute]>=0.6.16
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.15
18
+ qbraid-core[environments]>=0.6.16
File without changes
File without changes
File without changes