qbraid-cli 0.16.5__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.
- {qbraid_cli-0.16.5/qbraid_cli.egg-info → qbraid_cli-0.16.7}/PKG-INFO +4 -4
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/pyproject.toml +4 -4
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/agents/app.py +109 -60
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7/qbraid_cli.egg-info}/PKG-INFO +4 -4
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/requires.txt +3 -3
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/LICENSE +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/README.md +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/_build_info.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/_version.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/account/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/account/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/admin/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/admin/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/admin/headers.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/admin/validation.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/agents/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/agents/permission_response.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/ai/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/ai/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/ai/token.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/comms/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/comms/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/compute/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/compute/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/compute/instances.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/compute/profiles.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/compute/server.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/compute/ssh.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/configure/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/configure/actions.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/configure/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/devices/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/devices/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/devices/validation.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/activate.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/create.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/data_handling.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/groups.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/publish.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/registry.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/envs/share.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/exceptions.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/handlers.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/jobs/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/jobs/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/jobs/groups.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/kernels/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/kernels/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/lab/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/lab/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/main.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/pip/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/pip/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/pip/hooks.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/projects/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/projects/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/py.typed +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/skills/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/skills/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/troubleshoot/__init__.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli/troubleshoot/app.py +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/SOURCES.txt +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/dependency_links.txt +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/entry_points.txt +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/qbraid_cli.egg-info/top_level.txt +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/setup.cfg +0 -0
- {qbraid_cli-0.16.5 → qbraid_cli-0.16.7}/tests/test_cli_e2e.py +0 -0
- {qbraid_cli-0.16.5 → 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.
|
|
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.
|
|
33
|
+
Requires-Dist: qbraid-core>=0.6.16
|
|
34
34
|
Provides-Extra: compute
|
|
35
|
-
Requires-Dist: qbraid-core[compute]>=0.6.
|
|
35
|
+
Requires-Dist: qbraid-core[compute]>=0.6.16; extra == "compute"
|
|
36
36
|
Provides-Extra: envs
|
|
37
|
-
Requires-Dist: qbraid-core[environments]>=0.6.
|
|
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.
|
|
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.
|
|
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.
|
|
47
|
-
envs = ["qbraid-core[environments]>=0.6.
|
|
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]
|
|
@@ -1200,14 +1200,13 @@ def _interactive_attach(console_: Console) -> str:
|
|
|
1200
1200
|
|
|
1201
1201
|
|
|
1202
1202
|
class ApprovalMode(str, Enum):
|
|
1203
|
-
"""
|
|
1204
|
-
|
|
1205
|
-
A launched agent is detached, so a confirmation prompt has nobody to
|
|
1206
|
-
answer it — ``auto`` is the mode for anything you intend to leave running.
|
|
1207
|
-
"""
|
|
1203
|
+
"""Explicit native presets and backwards-compatible ask/auto policies."""
|
|
1208
1204
|
|
|
1209
1205
|
ASK = "ask"
|
|
1210
1206
|
AUTO = "auto"
|
|
1207
|
+
MANUAL = "manual"
|
|
1208
|
+
AUTO_REVIEW = "auto-review"
|
|
1209
|
+
YOLO = "yolo"
|
|
1211
1210
|
|
|
1212
1211
|
|
|
1213
1212
|
class TerminalBackend(str, Enum):
|
|
@@ -1279,6 +1278,27 @@ def _request_id_kwargs(method: Callable[..., Any], request_id: Optional[str]) ->
|
|
|
1279
1278
|
return {"request_id": request_id}
|
|
1280
1279
|
|
|
1281
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
|
+
|
|
1282
1302
|
def _approval_kwargs(method: Callable[..., Any], approval: Optional[str]) -> Dict[str, Any]:
|
|
1283
1303
|
"""Forward ``approval`` only to a qbraid-core new enough to accept it.
|
|
1284
1304
|
|
|
@@ -1466,7 +1486,13 @@ def agents_launch(
|
|
|
1466
1486
|
approval: Optional[ApprovalMode] = typer.Option(
|
|
1467
1487
|
None,
|
|
1468
1488
|
"--approval",
|
|
1469
|
-
help=
|
|
1489
|
+
help=(
|
|
1490
|
+
"manual: the agent asks you. auto-review: the tool's own automatic reviewer "
|
|
1491
|
+
"decides. yolo: no permission checks. ask/auto: legacy modes, unchanged."
|
|
1492
|
+
),
|
|
1493
|
+
),
|
|
1494
|
+
yolo: bool = typer.Option(
|
|
1495
|
+
False, "--yolo", help="Claude: skip permissions. Codex: bypass approvals and its sandbox."
|
|
1470
1496
|
),
|
|
1471
1497
|
):
|
|
1472
1498
|
"""Launch an AI coding agent.
|
|
@@ -1493,6 +1519,20 @@ def agents_launch(
|
|
|
1493
1519
|
tag = tag or result.get("tags")
|
|
1494
1520
|
repo = repo or result.get("repo")
|
|
1495
1521
|
|
|
1522
|
+
if yolo:
|
|
1523
|
+
if tool not in ("claude", "claude-auto", "codex"):
|
|
1524
|
+
raise AgentLauncherError("--yolo is supported only for Claude and Codex.")
|
|
1525
|
+
# Only an explicit --approval yolo agrees with --yolo. "auto" used to
|
|
1526
|
+
# be accepted and silently upgraded, which for Codex drops the
|
|
1527
|
+
# workspace sandbox the user may have meant to keep.
|
|
1528
|
+
if approval not in (None, ApprovalMode.YOLO) or (
|
|
1529
|
+
execution_mode and execution_mode != ExecutionMode.CONTAINER
|
|
1530
|
+
):
|
|
1531
|
+
raise AgentLauncherError("--yolo conflicts with the selected approval or execution mode.")
|
|
1532
|
+
approval = ApprovalMode.YOLO
|
|
1533
|
+
if tool == "codex":
|
|
1534
|
+
execution_mode = ExecutionMode.CONTAINER
|
|
1535
|
+
|
|
1496
1536
|
if request_id is not None:
|
|
1497
1537
|
import uuid
|
|
1498
1538
|
|
|
@@ -1664,6 +1704,9 @@ def agents_resume(
|
|
|
1664
1704
|
execution_mode: Optional[ExecutionMode] = typer.Option(
|
|
1665
1705
|
None, "--execution-mode", help="Override the recorded Codex execution mode for this resume."
|
|
1666
1706
|
),
|
|
1707
|
+
approval: Optional[ApprovalMode] = typer.Option(
|
|
1708
|
+
None, "--approval", help="Override recorded permissions for this resume. Omit to preserve them."
|
|
1709
|
+
),
|
|
1667
1710
|
compute: Optional[str] = typer.Option(None, "--compute", "-c", help="SSH alias for remote compute"),
|
|
1668
1711
|
):
|
|
1669
1712
|
"""Resume a previous agent session.
|
|
@@ -1692,6 +1735,8 @@ def agents_resume(
|
|
|
1692
1735
|
flags += f" --name {shlex.quote(name)}"
|
|
1693
1736
|
if execution_mode:
|
|
1694
1737
|
flags += f" --execution-mode {shlex.quote(execution_mode.value)}"
|
|
1738
|
+
if approval:
|
|
1739
|
+
flags += f" --approval {shlex.quote(approval.value)}"
|
|
1695
1740
|
# markup=False -- see agents_status.
|
|
1696
1741
|
console.print(
|
|
1697
1742
|
_ssh_cmd(compute, f"qbraid agents resume {shlex.quote(session_id)}{flags}"),
|
|
@@ -1710,6 +1755,7 @@ def agents_resume(
|
|
|
1710
1755
|
session = launcher.resume(
|
|
1711
1756
|
session_id=session_id,
|
|
1712
1757
|
name=name,
|
|
1758
|
+
**(_approval_kwargs(launcher.resume, approval.value) if approval else {}),
|
|
1713
1759
|
**_execution_kwargs(launcher.resume, execution_mode.value if execution_mode else None),
|
|
1714
1760
|
)
|
|
1715
1761
|
except AgentLauncherError as e:
|
|
@@ -1756,14 +1802,13 @@ def agents_resume(
|
|
|
1756
1802
|
instructions=None,
|
|
1757
1803
|
# A fork of a detached agent must not quietly
|
|
1758
1804
|
# become one that waits for a human.
|
|
1759
|
-
**_approval_kwargs(
|
|
1805
|
+
**_approval_kwargs(
|
|
1806
|
+
launcher.launch,
|
|
1807
|
+
approval.value if approval else getattr(original, "approval", None),
|
|
1808
|
+
),
|
|
1760
1809
|
**_execution_kwargs(
|
|
1761
1810
|
launcher.launch,
|
|
1762
|
-
(
|
|
1763
|
-
execution_mode.value
|
|
1764
|
-
if execution_mode
|
|
1765
|
-
else getattr(original, "execution_mode", None)
|
|
1766
|
-
),
|
|
1811
|
+
_fork_execution(original, approval, execution_mode),
|
|
1767
1812
|
),
|
|
1768
1813
|
)
|
|
1769
1814
|
else:
|
|
@@ -1778,57 +1823,61 @@ def agents_resume(
|
|
|
1778
1823
|
|
|
1779
1824
|
elif "Multiple sessions match" not in err_msg:
|
|
1780
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)
|
|
1781
1846
|
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
s.session_id
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
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()
|
|
1798
1874
|
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
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),
|
|
1803
1880
|
)
|
|
1804
|
-
raise typer.Exit(code=1)
|
|
1805
|
-
|
|
1806
|
-
choices = []
|
|
1807
|
-
for s in matches:
|
|
1808
|
-
sid = s.session_id[:8]
|
|
1809
|
-
tool_val = s.tool.value if s.tool else "?"
|
|
1810
|
-
status_val = s.status.value if s.status else "?"
|
|
1811
|
-
cwd_display = s.cwd or ""
|
|
1812
|
-
if len(cwd_display) > 30:
|
|
1813
|
-
cwd_display = "..." + cwd_display[-27:]
|
|
1814
|
-
age_str = _time_ago(s.last_activity or s.started_at)
|
|
1815
|
-
label = f"{sid} {tool_val:<8} {status_val:<8} {cwd_display:<30} {age_str}"
|
|
1816
|
-
choices.append(questionary.Choice(title=label, value=s.session_id))
|
|
1817
|
-
|
|
1818
|
-
console.print(f"[yellow]Multiple sessions match '{session_id}':[/yellow]")
|
|
1819
|
-
selected = questionary.select(
|
|
1820
|
-
"Select a session to resume:",
|
|
1821
|
-
choices=choices,
|
|
1822
|
-
instruction="(use arrow keys)",
|
|
1823
|
-
).ask()
|
|
1824
|
-
if selected is None:
|
|
1825
|
-
raise typer.Exit()
|
|
1826
|
-
|
|
1827
|
-
session = launcher.resume(
|
|
1828
|
-
session_id=selected,
|
|
1829
|
-
name=name,
|
|
1830
|
-
**_execution_kwargs(launcher.resume, execution_mode.value if execution_mode else None),
|
|
1831
|
-
)
|
|
1832
1881
|
|
|
1833
1882
|
status_val = session.status.value if session.status else "idle"
|
|
1834
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.
|
|
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.
|
|
33
|
+
Requires-Dist: qbraid-core>=0.6.16
|
|
34
34
|
Provides-Extra: compute
|
|
35
|
-
Requires-Dist: qbraid-core[compute]>=0.6.
|
|
35
|
+
Requires-Dist: qbraid-core[compute]>=0.6.16; extra == "compute"
|
|
36
36
|
Provides-Extra: envs
|
|
37
|
-
Requires-Dist: qbraid-core[environments]>=0.6.
|
|
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.
|
|
5
|
+
qbraid-core>=0.6.16
|
|
6
6
|
|
|
7
7
|
[compute]
|
|
8
|
-
qbraid-core[compute]>=0.6.
|
|
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.
|
|
18
|
+
qbraid-core[environments]>=0.6.16
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|