Přeskočit na obsah

Tato stránka byla automaticky přeložena z angličtiny, jediného jazyka, ve kterém se tento web píše. Číst originál.

repository.scope_classify

Zda je cesta relativní k repozitáři uvnitř, nebo vně rozsahu, důvod, když je vně, a vzor či limit, který rozhodl; existující soubor se posuzuje podle názvu, pak velikosti, pak obsahu.

Zda je cesta relativní k repozitáři uvnitř, nebo vně rozsahu, důvod, když je vně, a vzor či limit, který rozhodl; existující soubor se posuzuje podle názvu, pak velikosti, pak obsahu.

Zpřístupnění

Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.

povrchjako
MCPnástroj majordomus_scope_classify
HTTPGET /api/v1/scope/classify operationId repository.scope_classify
příkazová řádka—

Schémata

Kanonický vstup a výstup z typů Rustu; schéma nástroje MCP a parametry a odpovědi OpenAPI se odvozují z nich.

vstup · ClassifyInput

Kterou cestu posuzovat.
vlastnosttyppovinnépopis
path string ano Relativní k repozitáři, lomítka dopředu; ./ se odstraní. Absolutní cesta nebo segment .. je neplatný vstup.
JSON Schema
{
  "additionalProperties": false,
  "description": "Which path to judge.",
  "properties": {
    "path": {
      "description": "Repository-relative, forward slashes; `./` is stripped. An absolute path or a\n`..` segment is an invalid input.",
      "type": "string"
    }
  },
  "required": [
    "path"
  ],
  "title": "ClassifyInput",
  "type": "object"
}

výstup · Classification

Jedna cesta, posouzená.
vlastnosttyppovinnépopis
bajty integer | null ne Velikost, když je cesta existující soubor.
adresář boolean ano Zda je cesta adresář; adresář je zahrnut, pokud může být zahrnuto něco pod ním.
existuje boolean ano Zda cesta existuje v pracovním stromě; cesta, která neexistuje, se posuzuje podle názvu.
path string ano Cesta, relativní k repozitáři, tak jak byla posouzena.
důvod jedno ze 2 ne Proč je venku; chybí, když je uvnitř.
pravidlo string | null ne Vzor nebo limit, který rozhodl: pathspec in, vzor out, binary, max_bytes nebo fixtures.max_bytes; chybí u undeclared.
verdikt reference ano Ano, nebo ne.
JSON Schema
{
  "$defs": {
    "Reason": {
      "description": "Why a path is out. The order is the order the rules decide in.",
      "oneOf": [
        {
          "const": "path",
          "description": "Named under `out.paths`.",
          "type": "string"
        },
        {
          "const": "secret",
          "description": "A secret.",
          "type": "string"
        },
        {
          "const": "generated",
          "description": "A generated asset.",
          "type": "string"
        },
        {
          "const": "archive",
          "description": "An archive.",
          "type": "string"
        },
        {
          "const": "image",
          "description": "An image.",
          "type": "string"
        },
        {
          "const": "video",
          "description": "Video.",
          "type": "string"
        },
        {
          "const": "pdf",
          "description": "A PDF document.",
          "type": "string"
        },
        {
          "const": "database_dump",
          "description": "A database dump.",
          "type": "string"
        },
        {
          "const": "undeclared",
          "description": "Matches no `in` pathspec.",
          "type": "string"
        },
        {
          "const": "fixture_over_limit",
          "description": "A fixture over `out.fixtures.max_bytes`.",
          "type": "string"
        },
        {
          "const": "over_limit",
          "description": "Over `out.max_bytes`.",
          "type": "string"
        },
        {
          "const": "binary",
          "description": "Content with a NUL byte in its first `SNIFF_BYTES`: not text.",
          "type": "string"
        }
      ]
    },
    "Verdict": {
      "description": "In or out.",
      "oneOf": [
        {
          "const": "in",
          "description": "Read.",
          "type": "string"
        },
        {
          "const": "out",
          "description": "Never read; the reason says why.",
          "type": "string"
        }
      ]
    }
  },
  "description": "One path, judged.",
  "properties": {
    "bytes": {
      "description": "The size, when the path is an existing file.",
      "format": "uint64",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "directory": {
      "description": "Whether the path is a directory; a directory is in when something beneath it can be.",
      "type": "boolean"
    },
    "exists": {
      "description": "Whether the path exists in the work tree; a path that does not is judged by name.",
      "type": "boolean"
    },
    "path": {
      "description": "The path, repository-relative, as judged.",
      "type": "string"
    },
    "reason": {
      "anyOf": [
        {
          "$ref": "#/$defs/Reason"
        },
        {
          "type": "null"
        }
      ],
      "description": "Why it is out; absent when it is in."
    },
    "rule": {
      "description": "The pattern or limit that decided: the `in` pathspec, the `out` pattern, `binary`,\n`max_bytes` or `fixtures.max_bytes`; absent for `undeclared`.",
      "type": [
        "string",
        "null"
      ]
    },
    "verdict": {
      "$ref": "#/$defs/Verdict",
      "description": "In or out."
    }
  },
  "required": [
    "path",
    "verdict",
    "exists",
    "directory"
  ],
  "title": "Classification",
  "type": "object"
}

Politiky

benchmark
povinné — cíl na každém transportu, který expozice deklaruje; případy jsou ty ze vstupního typu
cache
vypnuto — každé volání spustí handler

Cíle benchmarku

Odvozeno z registru pro tento repozitář: jeden požadavek na transport a případy, které poskytuje typ vstupu. Celá matice je na stránce měření výkonu.

Okamžiky, na které to odpovídá

Prohledává názvy a popisy všech stránek, které tento web publikuje.