capability_id: repo.view
version: "1.0.0"
description: Fetch repository metadata.
input_schema:
  type: object
  required: [owner, name]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
  additionalProperties: false
output_schema:
  type: object
  required: [id, name, nameWithOwner, isPrivate, url, defaultBranch]
  properties:
    id: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    nameWithOwner: { type: string, minLength: 1 }
    isPrivate: { type: boolean }
    stargazerCount: { type: integer, minimum: 0 }
    forkCount: { type: integer, minimum: 0 }
    url: { type: string, minLength: 1 }
    defaultBranch: { type: [string, "null"] }
  additionalProperties: false
routing:
  preferred: graphql
  fallbacks: [cli]
graphql:
  operationName: RepoView
  operationType: query
  documentPath: src/gql/operations/repo-view.graphql
cli:
  command: repo view
  jsonFields: [id, name, nameWithOwner, isPrivate, stargazerCount, forkCount, url, defaultBranchRef]
