Add activity-core scope context API
This commit is contained in:
parent
8ea0b18ac3
commit
1990f75b73
6 changed files with 542 additions and 113 deletions
|
|
@ -862,6 +862,51 @@ class RepositoryAbilityMapResponse(BaseModel):
|
|||
}
|
||||
|
||||
|
||||
class RepositoryScopeContextResponse(BaseModel):
|
||||
repo_slug: str = Field(
|
||||
description="Slug requested by the caller after normal slugification."
|
||||
)
|
||||
capabilities: list[str] = Field(
|
||||
description="Approved capability names from the repository ability map."
|
||||
)
|
||||
tags: list[str] = Field(
|
||||
description=(
|
||||
"Sorted union of approved ability and capability primary classes "
|
||||
"plus their attributes."
|
||||
)
|
||||
)
|
||||
scope_md_exists: bool = Field(
|
||||
description=(
|
||||
"True when repo-scoping can inspect a local or cached checkout and "
|
||||
"root SCOPE.md exists."
|
||||
)
|
||||
)
|
||||
scope_summary: str | None = Field(
|
||||
description=(
|
||||
"First non-empty paragraph of root SCOPE.md when available, "
|
||||
"otherwise registry metadata."
|
||||
)
|
||||
)
|
||||
|
||||
model_config = {
|
||||
"extra": "forbid",
|
||||
"json_schema_extra": {
|
||||
"examples": [
|
||||
{
|
||||
"repo_slug": "repo-scoping",
|
||||
"capabilities": ["Generate SCOPE.md"],
|
||||
"tags": ["api", "generation", "scope"],
|
||||
"scope_md_exists": True,
|
||||
"scope_summary": (
|
||||
"Repository Scoping maps repositories into reviewable "
|
||||
"scope graphs."
|
||||
),
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class IdResponse(BaseModel):
|
||||
id: int
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue