Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

update: the last check's result is shown as a one-line notice by components engine (no network)

Niko12211aa306d7eacc
diff --git a/strata_cli/cli.py b/strata_cli/cli.py
index 9dddcee52..99264220c 100644
--- a/strata_cli/cli.py
+++ b/strata_cli/cli.py
@@ -1681,6 +1681,9 @@ def _components_engine(a: argparse.Namespace) -> int:
print(f"engine {report['engine']['exe']} (version {report['engine']['version']})")
else:
print(report["notice"], file=sys.stderr)
+ notice = engine_component.cached_notice(root)
+ if notice:
+ print(notice)
print("nothing was downloaded or changed")
return code
diff --git a/strata_control/engine_component.py b/strata_control/engine_component.py
index 3eff4ae0e..2f60252e5 100644
--- a/strata_control/engine_component.py
+++ b/strata_control/engine_component.py
@@ -164,6 +164,17 @@ def engine_dir(root: Path | None = None) -> Path:
return (root or components_dir()) / "engine"
+def cached_notice(root: Path | None = None) -> str | None:
+ """"update available (x.y.z): run `strata update`" from the last explicit check, or None. Reads one small local file; it never
+ touches the network, so showing it at a start does not break the rule that only an update step downloads."""
+ try:
+ last = (json.loads(((root or components_dir()) / UPDATE_STATE).read_text(encoding="utf-8-sig")).get("last_check") or {})
+ except (OSError, ValueError, AttributeError):
+ return None
+ parts = [f"engine {last['engine']}" for _ in [0] if last.get("engine")] + [f"app {last['app']}" for _ in [0] if last.get("app")]
+ return f"update available ({', '.join(parts)}): run `strata update`" if parts else None
+
+
def pinned_folder(root: Path | None = None) -> str | None:
"""The package folder a manual rollback pinned, or None. Read-only; a missing or damaged state file means no pin."""
try:
diff --git a/strata_control/updater.py b/strata_control/updater.py
index bfba51656..bd43f1932 100644
--- a/strata_control/updater.py
+++ b/strata_control/updater.py
@@ -430,6 +430,10 @@ def check(ctx: Context) -> dict:
"generated_at": feed.generated_at, "trusted_by": "test key file" if signing.extra_keys_in_effect(ctx.environ) else "built-in keys"},
"engine": decide_engine(feed, ctx, state), "control": decide_control(feed, ctx, state),
"app": decide_app(feed, ctx), "serving": _serving_or_empty(ctx), "hardware": ctx.hardware}
+ state.data["last_check"] = {
+ "at": (ctx.now or dt.datetime.now(dt.timezone.utc)).isoformat(),
+ "engine": report["engine"]["offered"]["version"] if report["engine"]["status"] in ("available", "install") and report["engine"]["offered"] else None,
+ "app": report["app"]["offered"] if report["app"]["status"] == "available" else None}
state.save()
return report
@@ -925,6 +929,8 @@ def run_update(ctx: Context, *, engine: bool = True, control: bool = True, app:
except UpdateError as exc:
results.append({"component": name, "status": "failed", "changed": False, "error": str(exc), "exit_code": exc.exit_code})
failure = failure or exc
+ if any(r.get("component") == "engine" and r.get("status") == "updated" for r in results):
+ state.data.get("last_check", {}).pop("engine", None)
state.save()
return {"feed": {"source": ctx.source, "sequence": feed.sequence, "channel": feed.channel, "key_id": feed.key_id},
"results": results, "exit_code": failure.exit_code if failure else 0}
diff --git a/tests/terminal/test_updater.py b/tests/terminal/test_updater.py
index fcf68003e..22ebef54f 100644
--- a/tests/terminal/test_updater.py
+++ b/tests/terminal/test_updater.py
@@ -518,6 +518,9 @@ class Cli(UpdaterCase):
code, text, _ = self.cli("update", "--check", *self.common())
self.assertEqual(code, 0)
self.assertIn("update available: 0.1.45 -> 0.1.46", text)
+ self.assertEqual(ec.cached_notice(self.components), "update available (engine 0.1.46): run `strata update`")
+ code, listing, _ = self.cli("components", "engine", "--components-dir", str(self.components))
+ self.assertIn("update available (engine 0.1.46): run `strata update`", listing)
code, text, _ = self.cli("update", "--check", "--json", *self.common())
self.assertEqual((code, json.loads(text)["engine"]["status"]), (0, "available"))
code, text, _ = self.cli("update", *self.common())
@@ -526,6 +529,7 @@ class Cli(UpdaterCase):
self.assertIn("Saved tuning presets: marked for the short re-check (nothing was deleted).", text)
self.assertIn("strata components rollback", text)
self.assertEqual(self.resolved(), "0.1.46")
+ self.assertIsNone(ec.cached_notice(self.components))
code, text, _ = self.cli("update", *self.common())
self.assertEqual(code, 0)
self.assertIn("up to date", text)