Files
Strata/strata_cli/__init__.py
T
Niko1221 e39a52e33f Version 0.2.15 / Control 0.1.61: app and Terminal 0.2.15, Control 0.1.61; every engine package stays 0.1.60 (the v0.2.14 files, carried by absolute url)
The 0.2.14 bump list (38f63bc59): CMakeLists.txt project VERSION 0.1.61 (Control); strata_cli PRODUCT_VERSION 0.2.15; apps/desktop package.json,
Cargo.toml and the strata-desktop entry of Cargo.lock; apps/host package.json and package-lock.json; the bug-report placeholder; the About
comment; qa1-storage and test_tui2_023_versions; docs/data/release.json (tag v0.2.15, 0.2.15 / 0.2.15 / 0.1.61 / 0.1.60, the 0.2.15
installer and Control 0.1.61 names) and the pages tools/release_manifest.py --write and tools/capability_table.py --write keep.
metal/CMakeLists.txt (0.1.60-metal) and packaging/build_hip_linux.sh (PKGVER 0.1.60) stay: they name engine builds, and no engine is built.

- release.json "engines_from": "v0.2.14": the release whose engine packages this one carries. With it, release_manifest --check lets Control be
  ahead of the engines (before, only an engine version plus one hotfix part passed), as long as the engine packages at engine_version are in
  the asset list. tools/test_release_manifest.py covers it.
- The version line of docs/CAPABILITIES.md says "Control 0.1.61, engines 0.1.60" when the two differ, not "Control and engines 0.1.60"
  (tools/test_capability_table.py); docs/AI_REFERENCE.md and packaging/README.md state Control and engines separately (release_manifest LINES).
2026-11-16 02:23:03 +01:00

30 lines
1.1 KiB
Python

"""Terminal clients for the shared Strata server."""
import re
from pathlib import Path
SCHEMA_VERSION = 1
#: The version people are told: the Strata app's own (apps/desktop/src-tauri/Cargo.toml `version`; tests/terminal/test_tuiqa_version.py keeps the
#: two equal, except for a Terminal-only release such as 0.2.3.1 or 0.2.4, whose app stays 0.2.3). `version()` below is the files' build number, which the engine-compatibility checks compare, so it stays numeric.
PRODUCT_VERSION = "0.2.15"
def version() -> str:
"""The terminal's version: the VERSION file of an archive, else the source tree's CMake project version."""
root = Path(__file__).resolve().parents[1]
try:
text = (root / "VERSION").read_text(encoding="utf-8").strip()
if text:
return text
except OSError:
pass
try:
m = re.search(r"^\s*project\([^)]*?VERSION\s+([0-9]+(?:\.[0-9]+)+)",
(root / "CMakeLists.txt").read_text(encoding="utf-8", errors="replace"), re.MULTILINE)
if m:
return m.group(1)
except OSError:
pass
return "unknown"