generated from coulomb/repo-seed
Extract the first reusable slice (models, schemas, routers, MCP, migrations) from state-hub with INTENT/SCOPE, agent instructions, workplan, and aligned inter_hub capability registry index.
49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class RepoCreate(BaseModel):
|
|
domain_slug: str
|
|
slug: str
|
|
name: str
|
|
local_path: str | None = None
|
|
host_paths: dict = Field(default_factory=dict)
|
|
remote_url: str | None = None
|
|
git_fingerprint: str | None = None
|
|
description: str | None = None
|
|
|
|
|
|
class RepoUpdate(BaseModel):
|
|
name: str | None = None
|
|
local_path: str | None = None
|
|
host_paths: dict | None = None
|
|
remote_url: str | None = None
|
|
git_fingerprint: str | None = None
|
|
description: str | None = None
|
|
status: str | None = None
|
|
|
|
|
|
class RepoPathRegister(BaseModel):
|
|
host: str
|
|
path: str
|
|
|
|
|
|
class RepoRead(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: uuid.UUID
|
|
domain_id: uuid.UUID
|
|
domain_slug: str
|
|
slug: str
|
|
name: str
|
|
local_path: str | None = None
|
|
host_paths: dict = Field(default_factory=dict)
|
|
remote_url: str | None = None
|
|
git_fingerprint: str | None = None
|
|
description: str | None = None
|
|
status: str
|
|
created_at: datetime
|
|
updated_at: datetime
|