feat(assets): add --disable-assets flag to turn the assets system off

With --enable-assets removed and the assets system always on, there is no
supported way to run without it. Add an explicit opt-out for the rollout
bake period: cloud multi-tenant sidecars need a guaranteed off-switch, and
QA needs a clean-fallback configuration.

When --disable-assets is passed:
- asset API routes are registered but disabled, returning a structured 503
- database initialization is skipped entirely (no sqlite file is created;
  the database currently has no non-asset users)
- the background seeder is disabled, covering startup, /object_info and
  post-execution enrich scans, and output registration
- workflow output enrichment and /upload/image asset registration are
  skipped
- the assets feature flag reports false, and supports_model_type_tags
  follows it since model_type tags are an assets-API capability

The hidden --enable-assets no-op remains accepted for launcher
compatibility; --disable-assets takes precedence since the former gates
nothing.
This commit is contained in:
Simon Pinfold
2026-07-28 05:44:53 +12:00
parent c78d436b4e
commit d1014a5f92
9 changed files with 197 additions and 25 deletions

View File

@@ -172,4 +172,8 @@ def get_server_features() -> dict[str, Any]:
features["assets"] = assets_enabled()
except Exception:
features["assets"] = False
if not features["assets"]:
# model_type tags are an assets-API capability; don't advertise them
# when the assets backend is disabled or unavailable.
features["supports_model_type_tags"] = False
return features