Skip to content

repository.scope_classify

Whether a repository-relative path is in or out of the scope, the reason when it is out, and the pattern or limit that decided; an existing file is judged by name, then size, then content.

Whether a repository-relative path is in or out of the scope, the reason when it is out, and the pattern or limit that decided; an existing file is judged by name, then size, then content.

Exposure

Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.

surfaceas
MCPtool majordomus_scope_classify
HTTPGET /api/v1/scope/classify operationId repository.scope_classify
command line

Schemas

The canonical input and output, from the Rust types; the MCP tool schema and the OpenAPI parameters and responses are derived from these.

input · ClassifyInput

Which path to judge.

propertytyperequireddescription
path string yes Repository-relative, forward slashes; `./` is stripped. An absolute path or a `..` segment is an invalid input.
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"
}

output · Classification

One path, judged.

propertytyperequireddescription
bytes integer | null no The size, when the path is an existing file.
directory boolean yes Whether the path is a directory; a directory is in when something beneath it can be.
exists boolean yes Whether the path exists in the work tree; a path that does not is judged by name.
path string yes The path, repository-relative, as judged.
reason one of 2 no Why it is out; absent when it is in.
rule string | null no The pattern or limit that decided: the `in` pathspec, the `out` pattern, `binary`, `max_bytes` or `fixtures.max_bytes`; absent for `undeclared`.
verdict reference yes In or out.
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"
}

Policies

benchmark
required — a target on every transport the exposure declares; the cases are the input type's
cache
disabled — every call runs the handler

Benchmark targets

Derived from the registry for this repository: one requirement per transport, and the cases the input type provides. The whole matrix is on the benchmarks page.

The moments this answers