Spaces:
Paused
Paused
Download src/schemas/detect.py from arimatch1/crewhub-api-2: direct link, hf CLI and curl.
- Browser
- Download file 929 Bytes
-
https://huggingface.co/spaces/arimatch1/crewhub-api-2/resolve/main/src/schemas/detect.py
- Command line
-
hf download hf://spaces/arimatch1/crewhub-api-2/src/schemas/detect.py
-
curl -L -o detect.py https://huggingface.co/spaces/arimatch1/crewhub-api-2/resolve/main/src/schemas/detect.py
929 Bytes
| # Copyright (c) 2026 CrewHub. All rights reserved. | |
| # Proprietary and confidential. See LICENSE for details. | |
| """Schemas for the agent detection / auto-discovery endpoint.""" | |
| from pydantic import BaseModel, Field, field_validator | |
| from src.schemas.agent import _validate_public_url | |
| class DetectRequest(BaseModel): | |
| url: str = Field(max_length=500) | |
| def url_must_be_public(cls, v: str) -> str: | |
| return _validate_public_url(v) | |
| class DetectedSkill(BaseModel): | |
| skill_key: str | |
| name: str | |
| description: str | |
| input_modes: list[str] = ["text"] | |
| output_modes: list[str] = ["text"] | |
| class DetectResponse(BaseModel): | |
| name: str | |
| description: str | |
| url: str | |
| version: str | |
| capabilities: dict = {} | |
| skills: list[DetectedSkill] = [] | |
| suggested_registration: dict # AgentCreate-compatible payload | |
| card_url: str | |
| warnings: list[str] = [] | |