IMJONEZZ commited on
Commit
d49d2f3
·
1 Parent(s): f12838c

space: /api/status — expose Warden load state for ops

Browse files
Files changed (1) hide show
  1. space/app.py +11 -0
space/app.py CHANGED
@@ -143,6 +143,17 @@ WHISPERS = [
143
  app = Server()
144
 
145
 
 
 
 
 
 
 
 
 
 
 
 
146
  @app.get("/api/whisper")
147
  def whisper() -> dict:
148
  """A single scripted Warden line. The landing page polls this so the
 
143
  app = Server()
144
 
145
 
146
+ @app.get("/api/status")
147
+ def status() -> dict:
148
+ """Operational truth, no secrets: is the on-Space Warden actually loaded?"""
149
+ return {
150
+ "warden_ready": WARDEN_READY,
151
+ "warden_error": WARDEN_ERR,
152
+ "model": MODEL_ID,
153
+ "zerogpu": spaces is not None,
154
+ }
155
+
156
+
157
  @app.get("/api/whisper")
158
  def whisper() -> dict:
159
  """A single scripted Warden line. The landing page polls this so the