supervaizer 0.10.9__py3-none-any.whl → 0.10.10__py3-none-any.whl

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.
@@ -5,6 +5,6 @@
5
5
  # https://mozilla.org/MPL/2.0/.
6
6
 
7
7
 
8
- VERSION = "0.10.9"
8
+ VERSION = "0.10.10"
9
9
  API_VERSION = "v1"
10
10
  TELEMETRY_VERSION = "v1"
Binary file
supervaizer/server.py CHANGED
@@ -20,7 +20,7 @@ from cryptography.hazmat.primitives.asymmetric import rsa
20
20
  from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey
21
21
  from fastapi import FastAPI, HTTPException, Request, Security, status
22
22
  from fastapi.exceptions import RequestValidationError
23
- from fastapi.responses import HTMLResponse, JSONResponse
23
+ from fastapi.responses import FileResponse, HTMLResponse, JSONResponse
24
24
  from fastapi.security import APIKeyHeader
25
25
  from fastapi.templating import Jinja2Templates
26
26
  from pydantic import BaseModel, field_validator, Field
@@ -377,6 +377,13 @@ class Server(ServerAbstract):
377
377
  # Save server info to storage for admin interface
378
378
  save_server_info_to_storage(self)
379
379
 
380
+ # Favicon (served at root so /docs, /redoc, etc. pick it up)
381
+ _favicon_path = Path(__file__).parent / "admin" / "static" / "favicon.ico"
382
+
383
+ @self.app.get("/favicon.ico", include_in_schema=False)
384
+ async def favicon() -> FileResponse:
385
+ return FileResponse(_favicon_path, media_type="image/x-icon")
386
+
380
387
  # Home page (template in admin/templates)
381
388
  _home_templates = Jinja2Templates(
382
389
  directory=str(Path(__file__).parent / "admin" / "templates")
@@ -487,7 +494,9 @@ class Server(ServerAbstract):
487
494
  "agents": [agent.registration_info for agent in self.agents],
488
495
  }
489
496
 
490
- def launch(self, log_level: Optional[str] = "INFO") -> None:
497
+ def launch(
498
+ self, log_level: Optional[str] = "INFO", start_uvicorn: bool = False
499
+ ) -> None:
491
500
  if log_level:
492
501
  log.remove()
493
502
  log.add(
@@ -546,15 +555,16 @@ class Server(ServerAbstract):
546
555
  if updated_agent:
547
556
  log.info(f"[Server launch] Updated agent {updated_agent.name}")
548
557
 
549
- import uvicorn
558
+ if start_uvicorn:
559
+ import uvicorn
550
560
 
551
- uvicorn.run(
552
- self.app,
553
- host=self.host,
554
- port=self.port,
555
- reload=self.reload,
556
- log_level=log_level,
557
- )
561
+ uvicorn.run(
562
+ self.app,
563
+ host=self.host,
564
+ port=self.port,
565
+ reload=self.reload,
566
+ log_level=log_level,
567
+ )
558
568
 
559
569
  def instructions(self) -> None:
560
570
  server_url = f"http://{self.host}:{self.port}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: supervaizer
3
- Version: 0.10.9
3
+ Version: 0.10.10
4
4
  Summary: Controller system for Supervaize
5
5
  Project-URL: Homepage, https://supervaize.com
6
6
  Project-URL: Repository, https://github.com/supervaize/supervaizer
@@ -1,5 +1,5 @@
1
1
  supervaizer/__init__.py,sha256=eBbGjduMBH-FDjcGlSqeR4Kf4uo60Cf1DrRur8VGkJo,2341
2
- supervaizer/__version__.py,sha256=LtDXeoaiX6Sv5-o1zm5x4AX1tKa1Zt9vXyke7riyv84,348
2
+ supervaizer/__version__.py,sha256=Z8yHz_dQqpmRG8bWI6v6sN67UspmD_fTN2p8AEeracI,349
3
3
  supervaizer/account.py,sha256=bxANsh-97dRGGpzstT1XKGThPHqRqvJC022Hfrb2RyM,11102
4
4
  supervaizer/account_service.py,sha256=z4lw8qp8XvCrU6Ndf4VHRnQwY_071410ts5_7E8YDAs,3046
5
5
  supervaizer/agent.py,sha256=Clenvdr_v-lV7_v6YCcevp8dj5JUNvpTWrBZBYM82lg,36509
@@ -13,11 +13,12 @@ supervaizer/job_service.py,sha256=22Qe7Z5_u3R28tcNH_21YMIYciWFtJaM7I-MXtIhBMU,46
13
13
  supervaizer/lifecycle.py,sha256=5CunJN7MsM5blyNiFMJMLFDUBmTmmAsPE24QC-gSbYA,13958
14
14
  supervaizer/parameter.py,sha256=sYDuGof_w6mlix0oxjB6odV0sO0QSBL1KwFZa3Y2cOA,8157
15
15
  supervaizer/routes.py,sha256=o3u7pGGLE0MQzWtQNdd5xk1M0G9Y_BR_JiLVmCFtdC4,34319
16
- supervaizer/server.py,sha256=O6zoGk01-owb7kh9lI6mTlIfkPeqwY-rbYUzfOj2v34,21902
16
+ supervaizer/server.py,sha256=d1yY30g9mA-tT7NKq1-tZUxqE9FO0dYplGKkvGUZyW4,22353
17
17
  supervaizer/server_utils.py,sha256=FMglpADQBJynkR2v-pfwANu6obsaPvR9j0BQc5Otpac,1590
18
18
  supervaizer/storage.py,sha256=WLX8ggwt1AGF07DrfD1K6PyP2-N45c_Ep4CL0iPLVbI,15332
19
19
  supervaizer/telemetry.py,sha256=XSYw8ZwoY8W6C7mhwHU67t7trJzWd7CBkkSNdsDT_HA,2596
20
20
  supervaizer/admin/routes.py,sha256=r9hucWtNiTGQHgv9DsRkVpwnLbyLFaqrbse1orl-oTA,45627
21
+ supervaizer/admin/static/favicon.ico,sha256=wFyXw96AplZoEcW45dJBeC1pHTcPSH07HGWbtrc49mI,5558
21
22
  supervaizer/admin/static/js/job-start-form.js,sha256=s--AGVYzgc9mE20POYeM0BNm0Wy41aBZVv99tc0cSPU,11938
22
23
  supervaizer/admin/templates/agent_detail.html,sha256=DFOGfjuQNC39FOLYUW_jD0A01WpBY1umatGCslyJ0_c,7581
23
24
  supervaizer/admin/templates/agents.html,sha256=orB_z1iMFE2MKhFm9XejwZjmzMC1PVT69oB-F9YZPHQ,12678
@@ -70,8 +71,8 @@ supervaizer/protocol/a2a/routes.py,sha256=rkQTNBD1NTYimKCb8iOk4bVf9ldDP1LqHfOsyh
70
71
  supervaizer/utils/__init__.py,sha256=fd0NFwN_cen3QPms2SOnuz4jcetay3f_31dit2As7EA,458
71
72
  supervaizer/utils/version_check.py,sha256=-tsOURpHVh0LNTbpQsyJDJENKszC-NzXDSO_EToEQPE,1893
72
73
  supervaizer/py.typed,sha256=bHhvLx7c6MqrzXVPbdK3qAOcSxzp4wDtTx4QifMC2EY,74
73
- supervaizer-0.10.9.dist-info/METADATA,sha256=c3n7f3HrIez3_PQ7BXE6gpgmaxmc2DgIB9N18lAlVS0,12647
74
- supervaizer-0.10.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
75
- supervaizer-0.10.9.dist-info/entry_points.txt,sha256=vL_IBR_AeEI2u2-6YL4PY9k2Mar4-gprG8-UxERWjmg,52
76
- supervaizer-0.10.9.dist-info/licenses/LICENSE.md,sha256=dmdnt1vfpxNPr8Lt0BnxKE5uzUwK3CWTthTUStgOXjY,15327
77
- supervaizer-0.10.9.dist-info/RECORD,,
74
+ supervaizer-0.10.10.dist-info/METADATA,sha256=oNI_GkiR12gjGpSJEqp3Z6dVxLQ1QzXgErPYg43qYlg,12648
75
+ supervaizer-0.10.10.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
76
+ supervaizer-0.10.10.dist-info/entry_points.txt,sha256=vL_IBR_AeEI2u2-6YL4PY9k2Mar4-gprG8-UxERWjmg,52
77
+ supervaizer-0.10.10.dist-info/licenses/LICENSE.md,sha256=dmdnt1vfpxNPr8Lt0BnxKE5uzUwK3CWTthTUStgOXjY,15327
78
+ supervaizer-0.10.10.dist-info/RECORD,,