conduct-cli 0.4.46__tar.gz → 0.4.47__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.
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/PKG-INFO +1 -1
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/pyproject.toml +1 -1
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli/main.py +17 -8
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/README.md +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/setup.cfg +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/setup.py +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli/guard.py +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli/guardmcp.py +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli/mcp_server.py +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/src/conduct_cli.egg-info/top_level.txt +0 -0
- {conduct_cli-0.4.46 → conduct_cli-0.4.47}/tests/test_switch.py +0 -0
|
@@ -1891,15 +1891,24 @@ def _render_tui(rows: list[dict]) -> None:
|
|
|
1891
1891
|
"paused": "yellow", "pending": "cyan", "cancelled": "dim"}.get(status, "white")
|
|
1892
1892
|
sicon = {"running": "●", "succeeded": "✓", "failed": "✗",
|
|
1893
1893
|
"paused": "⏸", "pending": "○", "cancelled": "—"}.get(status, "?")
|
|
1894
|
-
# Duration
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1894
|
+
# Duration — timestamps may be ISO strings or unix floats
|
|
1895
|
+
import datetime as _dt
|
|
1896
|
+
def _to_ts(val):
|
|
1897
|
+
if not val:
|
|
1898
|
+
return None
|
|
1899
|
+
if isinstance(val, (int, float)):
|
|
1900
|
+
return float(val)
|
|
1901
|
+
try:
|
|
1902
|
+
return _dt.datetime.fromisoformat(str(val).replace("Z", "+00:00")).timestamp()
|
|
1903
|
+
except Exception:
|
|
1904
|
+
return None
|
|
1905
|
+
created_ts = _to_ts(r.get("created_at") or r.get("started_at"))
|
|
1906
|
+
ended_ts = _to_ts(r.get("completed_at") or r.get("finished_at"))
|
|
1907
|
+
if created_ts and ended_ts:
|
|
1908
|
+
secs = int(ended_ts - created_ts)
|
|
1899
1909
|
dur = f"{secs//60}:{secs%60:02d}"
|
|
1900
|
-
elif
|
|
1901
|
-
|
|
1902
|
-
secs = int(time.time() - (created if created > 1e10 else created))
|
|
1910
|
+
elif created_ts and status == "running":
|
|
1911
|
+
secs = int(time.time() - created_ts)
|
|
1903
1912
|
dur = f"{secs//60}:{secs%60:02d}"
|
|
1904
1913
|
else:
|
|
1905
1914
|
dur = "—"
|
|
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
|