{
  "description": "Tools served by the Rift MCP server, with the JSON Schemas derived from the Rust wire models.",
  "tools": [
    {
      "description": "Finds declarations and their source by exact symbol name. Each hit\ncarries the declaration and its source excerpt unless `include` omits\n`source`. `include: [\"history\"]` adds each hit's version-control timeline,\nwalked from the served revision. `rev` serves the lookup from a\nversion-control revision instead of the current tree. Use `search` when\nthe name is not exactly known.",
      "input_schema": {
        "$defs": {
          "GetSymbolInclude": {
            "description": "One optional `get_symbol` hit field the caller may opt into through `include`.",
            "oneOf": [
              {
                "const": "source",
                "description": "The hit's node identity and declaration source excerpt.",
                "type": "string"
              },
              {
                "const": "history",
                "description": "The hit's version-control timeline.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "RevisionId": {
            "description": "Identity of one revision in the workspace's version-control history, spelled the way the\nversion-control system spells it. Rift carries it opaquely and never orders two revisions\nby comparing their identifiers.",
            "examples": [
              "main"
            ],
            "pattern": "^[A-Za-z0-9._/-]{1,128}$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "include": [
              "source",
              "history"
            ],
            "language": "rust",
            "limit": 5,
            "name": "ReadService",
            "page_index": 0
          },
          {
            "limit": 10,
            "name": "Deserialize",
            "page_index": 1
          }
        ],
        "properties": {
          "include": {
            "default": [
              "source"
            ],
            "description": "Optional hit fields to attach: `source`, `history`. Omitted defaults to\n`[\"source\"]`; an explicit empty list carries neither.",
            "items": {
              "$ref": "#/$defs/GetSymbolInclude"
            },
            "type": "array"
          },
          "language": {
            "anyOf": [
              {
                "$ref": "#/$defs/Language"
              },
              {
                "type": "null"
              }
            ],
            "description": "Narrows the answer to one language. Omitted searches every served language."
          },
          "limit": {
            "default": 5,
            "description": "Most hits to return in one page, capped by `max_page_items`.",
            "format": "uint64",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "name": {
            "description": "The declaration name to look up - a name, not a full `SymbolId` or free-text\nquery; `search` takes free text. An exact symbol name ranks first, then prefix\nmatches, then qualified-name substrings.",
            "maxLength": 4096,
            "minLength": 1,
            "type": "string"
          },
          "page_index": {
            "default": 0,
            "description": "Zero-based page of the result set to serve, sized by `limit`. A `page_index` past\nthe last page returns an empty page whose `pagination` carries the requested\n`page_index` and the true `total_pages`.",
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "rev": {
            "anyOf": [
              {
                "$ref": "#/$defs/RevisionId"
              },
              {
                "type": "null"
              }
            ],
            "description": "The version-control revision to read - a branch, tag, or commit id as the\nworkspace's version control spells it. Omitted reads the current tree. The server\nrefuses a revision read when the workspace has no version-control repository."
          }
        },
        "required": [
          "name"
        ],
        "rift:since": "v0.0.4",
        "type": "object"
      },
      "name": "get_symbol",
      "output_schema": {
        "$defs": {
          "Digest": {
            "description": "The first eight lowercase hex characters of a SHA-256, the same witness convention `NodeId`\nuses. The full digest is computed and compared internally; only this short form ever\nreaches the wire.",
            "examples": [
              "3f9a1c2e"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "Documentation": {
            "additionalProperties": false,
            "description": "One block of documentation attached to a declaration, in the markup it was written in.",
            "properties": {
              "format": {
                "$ref": "#/$defs/DocumentationFormat",
                "description": "Markup the comment text uses."
              },
              "text": {
                "description": "The body of the comment, with the comment syntax stripped.",
                "type": "string"
              }
            },
            "required": [
              "format",
              "text"
            ],
            "type": "object"
          },
          "DocumentationFormat": {
            "description": "Which markup the text is written in, since whoever displays a doc comment is the one that\nrenders it.",
            "oneOf": [
              {
                "const": "plain",
                "description": "Plain text with no markup to render.",
                "type": "string"
              },
              {
                "const": "markdown",
                "description": "Markdown as authored in the source.",
                "type": "string"
              }
            ]
          },
          "Duration": {
            "description": "A duration: an integer magnitude with a required unit suffix `ms`, `s`, `m`, `h`, or `d`.",
            "pattern": "^(?:0|[1-9][0-9]*)(?:ms|s|m|h|d)$",
            "type": "string"
          },
          "ExactKind": {
            "description": "A provider-local kind preserving the construct name used by that language implementation.",
            "pattern": "^[A-Za-z][A-Za-z0-9._-]*$",
            "type": "string"
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GetSymbolHit": {
            "additionalProperties": false,
            "allOf": [
              {
                "oneOf": [
                  {
                    "required": [
                      "path"
                    ]
                  },
                  {
                    "required": [
                      "unit"
                    ]
                  }
                ]
              }
            ],
            "description": "One declaration a `get_symbol` lookup found.",
            "properties": {
              "history": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolHistory"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The symbol's timeline, present when `include` names `history`."
              },
              "line": {
                "description": "The 1-based source line where the declaration begins.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              },
              "node": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/NodeId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The declaration node's identity, the full edit address `replace_node` accepts.\nAbsent unless `include` names `source`, or when source is unavailable or outside\nthe project."
              },
              "path": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ProjectPath"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Project-relative path, present for a declaration that belongs to the project.\nExactly one of `path` and `unit` is present."
              },
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "Byte range of the declaration within `path` or `unit`."
              },
              "source": {
                "description": "The declaration source, present when `include` names `source` and the provider\ncan read it. Absent for a source-less declaration.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "symbol": {
                "$ref": "#/$defs/Symbol",
                "description": "The declaration that matched."
              },
              "unit": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceUnitId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source-catalog unit, present for a declaration that belongs to a dependency or the\nstandard library. Exactly one of `path` and `unit` is present."
              }
            },
            "required": [
              "symbol",
              "range",
              "line"
            ],
            "type": "object"
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "PackageIdentity": {
            "additionalProperties": false,
            "description": "One package as its package manager identifies it.",
            "properties": {
              "manager": {
                "description": "Package manager or ecosystem name.",
                "maxLength": 128,
                "type": "string"
              },
              "name": {
                "description": "Package name in that ecosystem.",
                "maxLength": 4096,
                "type": "string"
              },
              "version": {
                "description": "Resolved package version.",
                "maxLength": 4096,
                "type": "string"
              }
            },
            "required": [
              "manager",
              "name",
              "version"
            ],
            "type": "object"
          },
          "Pagination": {
            "additionalProperties": false,
            "description": "Where one page sits in the full result set the request's `limit` divides.",
            "properties": {
              "page_index": {
                "description": "The zero-based page this answer serves.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "total_pages": {
                "description": "The page count of the full result set under the request's `limit`, computed within\nthe server's result bound. Zero when the result set is empty.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "page_index",
              "total_pages"
            ],
            "type": "object"
          },
          "Parameter": {
            "additionalProperties": false,
            "description": "One parameter of a `Signature`: what it is called, the types bound to it, and how a call\nmay pass it. A receiver is one of these too, held in its own field because it has no\nposition in the parameter list.",
            "properties": {
              "default": {
                "description": "The default value as written in the source. Absent where there is none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Parameter facts the model has no field for, namespaced by the provider that emitted\nthem. Absent when empty."
              },
              "name": {
                "description": "What the parameter is called. Absent where the language allows an unnamed one, as\na positional parameter in a function type.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "node": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/NodeId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where this parameter is written in the source."
              },
              "optional": {
                "description": "Whether a call may leave it out.",
                "type": "boolean"
              },
              "types": {
                "default": [],
                "description": "What it accepts, absent when empty. An array because a declared type and an\ninferred one are separate bindings.",
                "items": {
                  "$ref": "#/$defs/TypeBinding"
                },
                "type": "array"
              },
              "variadic": {
                "description": "Whether it absorbs the arguments that follow - `*args`, `...rest`.",
                "type": "boolean"
              }
            },
            "required": [
              "optional",
              "variadic"
            ],
            "type": "object"
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "ReadWarning": {
            "description": "One warning attached to a read result. The answer stands; the warning carries evidence\nof a condition the caller weighs before relying on it.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "The answer was computed from an index that lags the tree the read captured. Facts\nderived from the index may miss the newest writes; the digests state which two\ntrees disagree.",
                "properties": {
                  "captured_tree_revision": {
                    "$ref": "#/$defs/Digest",
                    "description": "Tree revision the read captured."
                  },
                  "code": {
                    "const": "stale_index",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "index_tree_revision": {
                    "$ref": "#/$defs/Digest",
                    "description": "Tree revision the published index covers."
                  }
                },
                "required": [
                  "code",
                  "index_tree_revision",
                  "captured_tree_revision",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The semantic ranking is still being built, so the answer was ranked lexically alone.\n`prepared` and `total` state how many declarations already carry a vector, and\n`ready_in` is derived from workspace size and embedding progress.",
                "properties": {
                  "code": {
                    "const": "semantic_index_preparing",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "prepared": {
                    "description": "Declarations that already carry a vector.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "ready_in": {
                    "$ref": "#/$defs/Duration",
                    "description": "Estimated wait before the semantic ranking joins an answer, not a measurement\nof this machine. A caller may report it and must not schedule against it."
                  },
                  "total": {
                    "description": "Declarations the published set holds.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "code",
                  "prepared",
                  "total",
                  "ready_in",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The semantic ranking will not answer for the life of this server, so every answer\nis ranked lexically alone. No retry is coming: fix the `[search.semantic]`\nconfiguration and start the server again.",
                "properties": {
                  "code": {
                    "const": "semantic_ranking_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The full-text tier is not answering, so the answer came from identifier matching\nalone: a query phrased as prose finds nothing. The tier failed to load or holds no\nindexed tree, and will not answer without operator action.",
                "properties": {
                  "code": {
                    "const": "lexical_ranking_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A claimed file's bytes are not valid UTF-8, so the index omits it: it answers no\nsearch or lookup, and addressing it directly still refuses `content_unavailable`.\nEvery other file in the workspace stays available.",
                "properties": {
                  "code": {
                    "const": "source_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file whose bytes could not be read."
                  }
                },
                "required": [
                  "code",
                  "unit",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Contributions selected for one symbol's presentation disagree on at least one\nfield. The answer carries what normalization selected.",
                "properties": {
                  "code": {
                    "const": "symbol_disagreement",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "providers": {
                    "description": "Providers whose Contribution carries a differing value for at least one\npresentation field, sorted and deduplicated.",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol whose presentation facts disagree."
                  }
                },
                "required": [
                  "code",
                  "symbol",
                  "providers",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A traversal walk stopped at its node bound before exhausting the reachable graph,\nso hits reachable beyond the bound are missing from this answer. Narrow the walk -\na tighter `facets` list, a smaller `depth`, or a less-connected seed - to fit it\nunder the bound.",
                "properties": {
                  "code": {
                    "const": "traversal_truncated",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "visited": {
                    "description": "Symbols the walk visited before it stopped, equal to the bound it hit.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "code",
                  "visited",
                  "detail"
                ],
                "type": "object"
              }
            ]
          },
          "RevisionId": {
            "description": "Identity of one revision in the workspace's version-control history, spelled the way the\nversion-control system spells it. Rift carries it opaquely and never orders two revisions\nby comparing their identifiers.",
            "examples": [
              "main"
            ],
            "pattern": "^[A-Za-z0-9._/-]{1,128}$",
            "type": "string"
          },
          "Signature": {
            "additionalProperties": false,
            "description": "One callable form of a symbol: the text it renders as, the symbols that text points at,\nand its structure. Overloads are separate entries.",
            "properties": {
              "display": {
                "description": "The signature as a reader sees it, in the language's own syntax.",
                "type": "string"
              },
              "effects": {
                "default": [],
                "description": "Effect keywords the declaration carries, in the language's own words: `async`,\n`unsafe`, `pure`. The spelling is preserved and never mapped onto a portable\nmeaning; absent when empty.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Signature facts the model has no field for, namespaced by the provider that emitted\nthem. Absent when empty."
              },
              "language": {
                "$ref": "#/$defs/Language",
                "description": "The language whose syntax `display` is written in."
              },
              "links": {
                "default": [],
                "description": "Symbols named inside `display`, each with the byte range of `display` that names it,\nso a renderer can turn the rendered text into links. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/SignatureLink"
                },
                "type": "array"
              },
              "parameters": {
                "default": [],
                "description": "Declared parameters, in source order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Parameter"
                },
                "type": "array"
              },
              "receiver": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Parameter"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The implicit first parameter - `self`, `this`. Absent for a free function, and for\nlanguages that have no such thing."
              },
              "returns": {
                "default": [],
                "description": "What the call yields, absent when empty. An array because a language may return\nseveral values, and because a declared and an inferred return are separate\nbindings.",
                "items": {
                  "$ref": "#/$defs/TypeBinding"
                },
                "type": "array"
              },
              "throws": {
                "default": [],
                "description": "Types this form declares it can raise. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/TypeExpression"
                },
                "type": "array"
              },
              "type_parameters": {
                "default": [],
                "description": "The generic parameters this form declares, each as the symbol that declares it.\nAbsent when empty.",
                "items": {
                  "$ref": "#/$defs/SymbolId"
                },
                "type": "array"
              }
            },
            "required": [
              "display",
              "language"
            ],
            "type": "object"
          },
          "SignatureLink": {
            "additionalProperties": false,
            "description": "One symbol named inside a rendered signature, with the byte range of that rendering which\nnames it.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "Offsets into the rendered string in `Signature.display`."
              },
              "symbol": {
                "$ref": "#/$defs/SymbolId",
                "description": "The symbol that stretch of text names."
              }
            },
            "required": [
              "range",
              "symbol"
            ],
            "type": "object"
          },
          "SourceKind": {
            "description": "How source or a declaration came to exist.",
            "oneOf": [
              {
                "const": "authored",
                "description": "A person wrote it.",
                "type": "string"
              },
              {
                "const": "generated",
                "description": "A tool produced it from other source.",
                "type": "string"
              },
              {
                "const": "synthetic",
                "description": "The provider minted it without any source text.",
                "type": "string"
              }
            ]
          },
          "SourceLocationKind": {
            "description": "Which of the four places a declaration's source belongs, on `SymbolOrigin`. Package\nownership is the separate `package` field: a `project` declaration can carry one too,\nand `dependency` always does.",
            "oneOf": [
              {
                "const": "project",
                "description": "Owned by the current workspace.",
                "type": "string"
              },
              {
                "const": "dependency",
                "description": "Owned by one resolved dependency.",
                "type": "string"
              },
              {
                "const": "stdlib",
                "description": "Installed with the language toolchain.",
                "type": "string"
              },
              {
                "const": "external",
                "description": "Outside the project, dependency graph, and standard library.",
                "type": "string"
              }
            ]
          },
          "SourceUnitId": {
            "description": "Stable identity of one source unit in the source catalog: a resolver identity, then that\nresolver's canonical unit key in canonical percent-encoding - for the project resolver, the\nproject-relative path, as `rift://source/project/src/lib.rs`. An identity derives from its\nresolver's canonical human-readable key; digests appear on the wire only as short witnesses\nwhere byte-identity is required.",
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://source/[a-z][a-z0-9_.-]{0,127}/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,8192}$",
            "type": "string"
          },
          "Symbol": {
            "additionalProperties": false,
            "description": "Readable Symbol assembled from normalized Contributions. Source structure lives in Node\nand is connected through Relationship.",
            "properties": {
              "container": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The symbol this one belongs to - the class that owns a method, the module that owns\na function. Ownership is not lexical: a Go method sits beside its type and a Rust\nmethod inside an `impl` block, both naming the type here; absent at the top level."
              },
              "document_local": {
                "default": false,
                "description": "Whether language semantics confine this symbol to the document that declares it. The\nprovider classifies locality from its language model; absent when `false`.",
                "type": "boolean"
              },
              "documentation": {
                "default": [],
                "description": "Doc comments attached to the declaration, with the markup format they were written\nin. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Documentation"
                },
                "type": "array"
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Language-specific facts with no portable equivalent, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "facets": {
                "default": [],
                "description": "Portable classification for cross-language queries, absent when empty. The local\nkinds `trait` and `interface` can both carry the `type` facet.",
                "items": {
                  "$ref": "#/$defs/SymbolFacet"
                },
                "type": "array"
              },
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Unique identifier of this Symbol across the whole workspace. Absent for an\nunestablished symbol: no accepted evidence, or more than one, established its\nidentity."
              },
              "kind": {
                "$ref": "#/$defs/ExactKind",
                "description": "What this symbol is in the provider's vocabulary, such as `trait`, `function`, or\n`table`."
              },
              "language": {
                "$ref": "#/$defs/Language",
                "description": "The language this symbol belongs to."
              },
              "modifiers": {
                "default": [],
                "description": "Language keywords qualifying the declaration: `export`, `async`, `const`. Absent\nwhen empty.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "name": {
                "description": "The human-readable name, as written in the source: `parseConfig`. Rendered\nsignatures live in `signatures`.",
                "maxLength": 4096,
                "type": "string"
              },
              "origin": {
                "$ref": "#/$defs/SymbolOrigin",
                "default": {
                  "location": "project",
                  "source_kind": "authored"
                },
                "description": "Where the declaration belongs and how it was produced. Absent when it says a\nproject declaration, authored, with no package - the common case."
              },
              "signatures": {
                "default": [],
                "description": "One entry per callable form, absent when empty. Where the language dispatches\noverloads separately they are separate symbols joined by the `overloads` edge;\nseveral entries here are alternative forms of one dispatch target, as\n`typing.overload` writes them.",
                "items": {
                  "$ref": "#/$defs/Signature"
                },
                "type": "array"
              },
              "types": {
                "default": [],
                "description": "The types this symbol carries, each tagged with the role it plays: a return type, a\nfield type, a bound. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/TypeBinding"
                },
                "type": "array"
              },
              "visibility": {
                "description": "How widely the symbol is visible, in the language's own terms - `public`, `private`,\n`pub(crate)`. Absent where the language has no such concept.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "language",
              "name",
              "kind"
            ],
            "type": "object"
          },
          "SymbolFacet": {
            "description": "One portable category a symbol falls into. Kinds are language-specific; facets are\nshared, so a filter written once applies to every served language.",
            "oneOf": [
              {
                "const": "namespace",
                "description": "A named scope that groups declarations.",
                "type": "string"
              },
              {
                "const": "module",
                "description": "A compilation or import unit.",
                "type": "string"
              },
              {
                "const": "type",
                "description": "Names a type.",
                "type": "string"
              },
              {
                "const": "value",
                "description": "Holds a runtime value.",
                "type": "string"
              },
              {
                "const": "callable",
                "description": "Can be invoked.",
                "type": "string"
              },
              {
                "const": "member",
                "description": "Belongs to a containing type.",
                "type": "string"
              },
              {
                "const": "member_container",
                "description": "Owns members of its own.",
                "type": "string"
              },
              {
                "const": "parameter",
                "description": "A declared input of a callable.",
                "type": "string"
              },
              {
                "const": "type_parameter",
                "description": "A generic parameter a declaration abstracts over.",
                "type": "string"
              },
              {
                "const": "constructible",
                "description": "Instances of it can be created.",
                "type": "string"
              },
              {
                "const": "extensible",
                "description": "Other types can inherit from it.",
                "type": "string"
              },
              {
                "const": "implementable",
                "description": "Other types can fulfil it.",
                "type": "string"
              },
              {
                "const": "macro",
                "description": "Expands at compile time.",
                "type": "string"
              },
              {
                "const": "test",
                "description": "Exercises other code as a test.",
                "type": "string"
              },
              {
                "const": "annotation",
                "description": "Decorates other declarations.",
                "type": "string"
              },
              {
                "const": "extension",
                "description": "Adds members to a type declared elsewhere.",
                "type": "string"
              },
              {
                "const": "variant",
                "description": "One case of an enumeration.",
                "type": "string"
              },
              {
                "const": "enumeration",
                "description": "A closed set of variants.",
                "type": "string"
              },
              {
                "const": "alias",
                "description": "Another name for an existing symbol.",
                "type": "string"
              },
              {
                "const": "property",
                "description": "A member accessed like a field but backed by code.",
                "type": "string"
              },
              {
                "const": "abstract",
                "description": "Declared without a complete implementation.",
                "type": "string"
              },
              {
                "const": "constructor",
                "description": "Creates instances of its container.",
                "type": "string"
              },
              {
                "const": "static",
                "description": "Belongs to the type rather than an instance.",
                "type": "string"
              },
              {
                "const": "mutable",
                "description": "Its value can change after initialization.",
                "type": "string"
              },
              {
                "const": "public",
                "description": "Visible outside its declaring scope.",
                "type": "string"
              },
              {
                "const": "deprecated",
                "description": "Marked as discouraged for new use.",
                "type": "string"
              },
              {
                "const": "entrypoint",
                "description": "Where execution starts.",
                "type": "string"
              },
              {
                "const": "operator",
                "description": "Invoked through operator syntax.",
                "type": "string"
              },
              {
                "const": "async",
                "description": "Runs asynchronously.",
                "type": "string"
              },
              {
                "const": "generator",
                "description": "Yields a sequence of values over time.",
                "type": "string"
              }
            ]
          },
          "SymbolHistory": {
            "additionalProperties": false,
            "description": "One symbol's timeline across the workspace's version-control history, newest revision\nfirst. The walk follows first parents from the served revision along the declaration's\ncurrent path only, bounded by the configured history depth.",
            "properties": {
              "symbol": {
                "$ref": "#/$defs/SymbolId",
                "description": "The symbol the timeline is for."
              },
              "versions": {
                "description": "Revisions that touched the symbol, newest first.",
                "items": {
                  "$ref": "#/$defs/SymbolVersion"
                },
                "type": "array"
              }
            },
            "required": [
              "symbol",
              "versions"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "SymbolOrigin": {
            "additionalProperties": false,
            "description": "Where a symbol belongs and how its declaration came to exist. Source location and\ngeneration are separate: generated code can belong to the project or to a dependency.\nAbsent from `Symbol` entirely when it says a project declaration, authored, with no\npackage.",
            "properties": {
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceLocationKind"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Which of the four places the declaration belongs. Absent exactly when\n`source_kind` is `synthetic`."
              },
              "package": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/PackageIdentity"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The package that owns the declaration: present for `dependency`, and optionally\nfor `project`. Absent for `stdlib`, `external`, and a synthetic declaration."
              },
              "source_kind": {
                "$ref": "#/$defs/SourceKind",
                "description": "Whether the declaration is authored, generated, or synthetic."
              }
            },
            "required": [
              "source_kind"
            ],
            "type": "object"
          },
          "SymbolVersion": {
            "additionalProperties": false,
            "description": "One revision that touched a symbol. The history provider parses the declaration at each\nfirst-parent revision that changed its file and classifies adjacent states; a revision\nwhose source cannot be parsed contributes no version.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/SymbolVersionKind",
                "description": "How the revision changed the symbol."
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "Where the declaration lived at that revision."
              },
              "revision": {
                "$ref": "#/$defs/RevisionId",
                "description": "The revision that touched the symbol."
              },
              "summary": {
                "description": "The revision's own first summary line, where the version control records one.",
                "maxLength": 4096,
                "type": [
                  "string",
                  "null"
                ]
              },
              "timestamp": {
                "description": "When the revision was recorded, as RFC 3339 date-time.",
                "maxLength": 64,
                "type": "string"
              }
            },
            "required": [
              "revision",
              "path",
              "kind",
              "timestamp"
            ],
            "type": "object"
          },
          "SymbolVersionKind": {
            "description": "What the revision did to the symbol.",
            "oneOf": [
              {
                "const": "introduced",
                "description": "The revision brought the symbol into existence.",
                "type": "string"
              },
              {
                "const": "body_changed",
                "description": "The revision changed the implementation without touching the signature.",
                "type": "string"
              },
              {
                "const": "signature_changed",
                "description": "The revision changed the declared interface.",
                "type": "string"
              },
              {
                "const": "moved",
                "description": "The revision relocated the declaration to another path.",
                "type": "string"
              },
              {
                "const": "removed",
                "description": "The revision deleted the declaration.",
                "type": "string"
              },
              {
                "const": "decorators_changed",
                "description": "The revision changed the annotations on the declaration.",
                "type": "string"
              }
            ]
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          },
          "TypeBinding": {
            "additionalProperties": false,
            "description": "One type a symbol carries, together with the role it plays for that symbol.",
            "properties": {
              "origin": {
                "$ref": "#/$defs/TypeBindingOrigin",
                "description": "Where the type fact came from."
              },
              "role": {
                "$ref": "#/$defs/TypeBindingRole",
                "description": "The role this type plays for the symbol."
              },
              "type": {
                "$ref": "#/$defs/TypeExpression",
                "description": "The type itself."
              }
            },
            "required": [
              "role",
              "origin",
              "type"
            ],
            "type": "object"
          },
          "TypeBindingOrigin": {
            "description": "Where the type fact came from. A declared type and an inferred one can both be present\nand disagree, which is the interesting case.",
            "oneOf": [
              {
                "const": "declared",
                "description": "Written in the source by the author.",
                "type": "string"
              },
              {
                "const": "inferred",
                "description": "Worked out by the provider from usage.",
                "type": "string"
              },
              {
                "const": "expected",
                "description": "Required by the surrounding context.",
                "type": "string"
              }
            ]
          },
          "TypeBindingRole": {
            "description": "What this type is to the symbol that carries it.",
            "oneOf": [
              {
                "const": "receiver",
                "description": "The type of the implicit first parameter.",
                "type": "string"
              },
              {
                "const": "parameter",
                "description": "The type a parameter accepts.",
                "type": "string"
              },
              {
                "const": "return",
                "description": "The type a call yields.",
                "type": "string"
              },
              {
                "const": "field",
                "description": "The type a field holds.",
                "type": "string"
              },
              {
                "const": "bound",
                "description": "A constraint on a type parameter.",
                "type": "string"
              },
              {
                "const": "element",
                "description": "The type of a collection's entries.",
                "type": "string"
              },
              {
                "const": "key",
                "description": "The type a map is indexed by.",
                "type": "string"
              },
              {
                "const": "error",
                "description": "The type of the failure a fallible result carries.",
                "type": "string"
              },
              {
                "const": "underlying",
                "description": "The type an alias or wrapper stands for.",
                "type": "string"
              },
              {
                "const": "yielded",
                "description": "The type a generator produces per step.",
                "type": "string"
              },
              {
                "const": "awaited",
                "description": "The type awaiting the value resolves to.",
                "type": "string"
              },
              {
                "const": "discriminant",
                "description": "The type that tags which variant a value holds.",
                "type": "string"
              }
            ]
          },
          "TypeExpression": {
            "additionalProperties": false,
            "description": "How a type is written in the source, plus the symbol that declares it when one does. A\ntype with a declaration resolves to that symbol; a structural type - `string | null`,\n`{ a: string }` - has the spelling and nothing to resolve to.",
            "properties": {
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Type facts the model has no field for, namespaced by the provider that emitted them.\nAbsent when empty."
              },
              "language": {
                "$ref": "#/$defs/Language",
                "description": "The language the spelling is in, and so which provider produced it."
              },
              "resolved": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The symbol that declares this type, where one does. Absent for a structural type,\nwhich has a spelling and nothing to open."
              },
              "source": {
                "description": "The type as it is written: `Optional[Config]`, `&mut [u8]`, `string | null`.",
                "type": "string"
              }
            },
            "required": [
              "language",
              "source"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "hits": [
              {
                "history": {
                  "symbol": "rift://symbol/rust/src/config.rs/load_config",
                  "versions": [
                    {
                      "kind": "signature_changed",
                      "path": "src/config.rs",
                      "revision": "1f2080e49da12fee4431e6872630509355cd62d1",
                      "summary": "Return ConfigError from load_config",
                      "timestamp": "2026-08-21T14:03:22+00:00"
                    },
                    {
                      "kind": "introduced",
                      "path": "src/config.rs",
                      "revision": "8259026556ceae156a29adb53178c842ca32c4a2",
                      "summary": "Add workspace configuration loading",
                      "timestamp": "2026-08-17T09:41:05+00:00"
                    }
                  ]
                },
                "line": 10,
                "node": "rift://node/rust/src/config.rs@218-355#67ecfb36",
                "path": "src/config.rs",
                "range": {
                  "end": 355,
                  "start": 162
                },
                "source": "/// Loads the workspace configuration from `rift.toml`.\npub fn load_config(path: &Path) -> Result<Config, ConfigError> {\n    let text = std::fs::read_to_string(path)?;\n    parse_config(&text)\n}",
                "symbol": {
                  "documentation": [
                    {
                      "format": "markdown",
                      "text": "Loads the workspace configuration from `rift.toml`."
                    }
                  ],
                  "facets": [
                    "value",
                    "callable",
                    "public"
                  ],
                  "id": "rift://symbol/rust/src/config.rs/load_config",
                  "kind": "function",
                  "language": "rust",
                  "name": "load_config",
                  "signatures": [
                    {
                      "display": "pub fn load_config(path: &Path) -> Result<Config, ConfigError>",
                      "language": "rust",
                      "links": [
                        {
                          "range": {
                            "end": 48,
                            "start": 42
                          },
                          "symbol": "rift://symbol/rust/src/config.rs/Config"
                        }
                      ],
                      "parameters": [
                        {
                          "name": "path",
                          "optional": false,
                          "types": [
                            {
                              "origin": "declared",
                              "role": "parameter",
                              "type": {
                                "language": "rust",
                                "source": "&Path"
                              }
                            }
                          ],
                          "variadic": false
                        }
                      ],
                      "returns": [
                        {
                          "origin": "declared",
                          "role": "return",
                          "type": {
                            "language": "rust",
                            "source": "Result<Config, ConfigError>"
                          }
                        }
                      ]
                    }
                  ],
                  "types": [
                    {
                      "origin": "declared",
                      "role": "return",
                      "type": {
                        "language": "rust",
                        "source": "Result<Config, ConfigError>"
                      }
                    }
                  ],
                  "visibility": "pub"
                }
              }
            ],
            "pagination": {
              "page_index": 0,
              "total_pages": 1
            }
          }
        ],
        "properties": {
          "hits": {
            "description": "The declarations on this page, best match first.",
            "items": {
              "$ref": "#/$defs/GetSymbolHit"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/$defs/Pagination",
            "description": "Where this page sits in the full result set under the request's `limit`."
          },
          "warnings": {
            "default": [],
            "description": "Warnings attached to this result. Absent when there is nothing to warn about.",
            "items": {
              "$ref": "#/$defs/ReadWarning"
            },
            "type": "array"
          }
        },
        "required": [
          "hits",
          "pagination"
        ],
        "type": "object"
      }
    },
    {
      "description": "Inserts new content beside a syntax node addressed through a witnessed address\nfrom `nodes`. The server recomputes the witness before writing and refuses when\nthe bytes drifted, the same check `replace_node` runs. Unlike `insert_symbol`,\nwhich separates a new declaration from its anchor with a blank line and preserves\nthe anchor's indentation, `body` lands verbatim at the node's own boundary with no\nseparator of its own: a node is not a declaration, so the caller supplies whatever\nspacing and indentation the inserted bytes need.",
      "input_schema": {
        "$defs": {
          "BodySource": {
            "anyOf": [
              {
                "description": "The content itself.",
                "type": "string"
              },
              {
                "additionalProperties": false,
                "description": "A file the server reads for the content.",
                "properties": {
                  "file": {
                    "description": "Absolute path to the file the server reads. Distinct from a destination\npath such as `insert_symbol`'s own `file`, which names where content\nlands, not where it comes from. The server reads this path itself, so a\ncaller not co-located with the server cannot use this form.",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            ],
            "description": "Where a write tool's body bytes come from: written inline in the request, or read\nfrom a file. `patch`, and every write tool's `body`, accepts either form; the object\nform is refused when it carries an unknown or additional field.\n\nBoth forms are bounded by the field that embeds this type; the schema states the\nbound as the inline string's `maxLength`, and the server enforces the same bound\nagainst the resolved content of either form."
          },
          "InsertPosition": {
            "description": "Which side of the anchor or file target receives the new content.",
            "oneOf": [
              {
                "const": "before",
                "description": "Wire value `before`.",
                "type": "string"
              },
              {
                "const": "after",
                "description": "Wire value `after`.",
                "type": "string"
              }
            ]
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "anchor": "rift://node/rust/src/config.rs@334-353#4df4426e",
            "body": "\nparse_config(text.trim());",
            "position": "after"
          }
        ],
        "properties": {
          "anchor": {
            "$ref": "#/$defs/NodeId",
            "description": "The node identity returned by `nodes`, witness included."
          },
          "body": {
            "$ref": "#/$defs/BodySource",
            "description": "The new content, spliced in verbatim with no added separator. Inline or read from a\nfile.",
            "maxLength": 1048576
          },
          "position": {
            "$ref": "#/$defs/InsertPosition",
            "description": "Which side of the node receives the new content."
          }
        },
        "required": [
          "anchor",
          "position",
          "body"
        ],
        "rift:since": "v0.0.20",
        "type": "object"
      },
      "name": "insert_node",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Inserts a new declaration beside an anchor symbol, or content at a file\ntarget. Anchored insertions land beside the anchor's whole declaration,\nits attached outer attributes and doc comments included. A file target\nlands the body verbatim at the file's start or end, creating it first\nwhen `create_missing` is set and it is missing. A refusal names the\nfailed precondition and leaves the workspace untouched. A body\ninserted `before` its anchor is spliced in at the anchor's start byte\nand its first line inherits the anchor's column; a body inserted\n`after` its anchor, or at a file target either side, always starts a\nfresh line at column zero.",
      "input_schema": {
        "$defs": {
          "BodySource": {
            "anyOf": [
              {
                "description": "The content itself.",
                "type": "string"
              },
              {
                "additionalProperties": false,
                "description": "A file the server reads for the content.",
                "properties": {
                  "file": {
                    "description": "Absolute path to the file the server reads. Distinct from a destination\npath such as `insert_symbol`'s own `file`, which names where content\nlands, not where it comes from. The server reads this path itself, so a\ncaller not co-located with the server cannot use this form.",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            ],
            "description": "Where a write tool's body bytes come from: written inline in the request, or read\nfrom a file. `patch`, and every write tool's `body`, accepts either form; the object\nform is refused when it carries an unknown or additional field.\n\nBoth forms are bounded by the field that embeds this type; the schema states the\nbound as the inline string's `maxLength`, and the server enforces the same bound\nagainst the resolved content of either form."
          },
          "InsertPosition": {
            "description": "Which side of the anchor or file target receives the new content.",
            "oneOf": [
              {
                "const": "before",
                "description": "Wire value `before`.",
                "type": "string"
              },
              {
                "const": "after",
                "description": "Wire value `after`.",
                "type": "string"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "allOf": [
          {
            "oneOf": [
              {
                "required": [
                  "anchor"
                ]
              },
              {
                "required": [
                  "file"
                ]
              }
            ]
          },
          {
            "not": {
              "properties": {
                "create_missing": {
                  "const": true
                }
              },
              "required": [
                "anchor",
                "create_missing"
              ]
            }
          }
        ],
        "examples": [
          {
            "anchor": "rift://symbol/rust/src/config.rs/load_config",
            "body": "/// Renders the default configuration for a fresh workspace.\npub fn default_config() -> Config {\n    Config { root: std::path::PathBuf::from(\".\") }\n}",
            "create_missing": false,
            "position": "after"
          }
        ],
        "properties": {
          "anchor": {
            "anyOf": [
              {
                "$ref": "#/$defs/SymbolId"
              },
              {
                "type": "null"
              }
            ],
            "description": "The existing declaration identity returned by `get_symbol`."
          },
          "body": {
            "$ref": "#/$defs/BodySource",
            "description": "The new content: a declaration beside `anchor`, or a file target's whole body.\nInline or read from a file.",
            "maxLength": 1048576
          },
          "create_missing": {
            "default": false,
            "description": "Creates a missing `file` target instead of refusing. Invalid together with\n`anchor`.",
            "type": "boolean"
          },
          "file": {
            "anyOf": [
              {
                "$ref": "#/$defs/ProjectPath"
              },
              {
                "type": "null"
              }
            ],
            "description": "The destination file the content lands in, created first when `create_missing`\nis set and it does not exist. Distinct from `body`'s own `file` form, which\nnames a source the server reads the content from, not a destination."
          },
          "position": {
            "$ref": "#/$defs/InsertPosition",
            "description": "Which side of the anchor or file target receives the new content."
          }
        },
        "required": [
          "position",
          "body"
        ],
        "rift:since": "v0.0.6",
        "type": "object"
      },
      "name": "insert_symbol",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Moves one visible file to a new project path. When the configured\nlanguage engine advertises will-rename requests for the file, its\nreference updates land in the same atomic change; without an engine\nor the capability the move still lands and the result carries a\nwarning that references were not updated. A refusal names the\nfailed precondition and leaves the workspace untouched.",
      "input_schema": {
        "$defs": {
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "from": "src/config.rs",
            "to": "src/settings.rs"
          }
        ],
        "properties": {
          "from": {
            "$ref": "#/$defs/ProjectPath",
            "description": "The file to move, as a project-relative path."
          },
          "to": {
            "$ref": "#/$defs/ProjectPath",
            "description": "The destination path. It must not exist yet; missing parent directories are\ncreated when the move lands."
          }
        },
        "required": [
          "from",
          "to"
        ],
        "rift:since": "v0.0.14",
        "type": "object"
      },
      "name": "move_file",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Lists the syntax nodes covering one UTF-8 byte position in one file,\noutermost first. Each identity carries a witness, so an address taken\nfrom this listing refuses cleanly once the file's bytes drift. `rev`\nlists the nodes as of a version-control revision instead of the\ncurrent tree. A visible path no syntax provider parses refuses\n`capability_unavailable`, naming the extension.",
      "input_schema": {
        "$defs": {
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RevisionId": {
            "description": "Identity of one revision in the workspace's version-control history, spelled the way the\nversion-control system spells it. Rift carries it opaquely and never orders two revisions\nby comparing their identifiers.",
            "examples": [
              "main"
            ],
            "pattern": "^[A-Za-z0-9._/-]{1,128}$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "path": "src/config.rs",
            "position": 338
          }
        ],
        "properties": {
          "path": {
            "$ref": "#/$defs/ProjectPath",
            "description": "Project-relative file to inspect."
          },
          "position": {
            "description": "UTF-8 byte offset the listed nodes must cover - one position, not a range; the nodes\nthemselves carry the spans. A position inside a multi-byte character is valid and\nanswers with its enclosing nodes; a position at or past the file's byte length\nrefuses.",
            "format": "uint64",
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "rev": {
            "anyOf": [
              {
                "$ref": "#/$defs/RevisionId"
              },
              {
                "type": "null"
              }
            ],
            "description": "The version-control revision to read - a branch, tag, or commit id as the\nworkspace's version control spells it. Omitted reads the current tree. The server\nrefuses a revision read when the workspace has no version-control repository."
          }
        },
        "required": [
          "path",
          "position"
        ],
        "rift:since": "v0.0.4",
        "type": "object"
      },
      "name": "nodes",
      "output_schema": {
        "$defs": {
          "Digest": {
            "description": "The first eight lowercase hex characters of a SHA-256, the same witness convention `NodeId`\nuses. The full digest is computed and compared internally; only this short form ever\nreaches the wire.",
            "examples": [
              "3f9a1c2e"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "Duration": {
            "description": "A duration: an integer magnitude with a required unit suffix `ms`, `s`, `m`, `h`, or `d`.",
            "pattern": "^(?:0|[1-9][0-9]*)(?:ms|s|m|h|d)$",
            "type": "string"
          },
          "ExactKind": {
            "description": "A provider-local kind preserving the construct name used by that language implementation.",
            "pattern": "^[A-Za-z][A-Za-z0-9._-]*$",
            "type": "string"
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "Node": {
            "additionalProperties": false,
            "description": "One node of a file's concrete syntax tree. It identifies a source range and\nprovider-local syntax kind. `symbol` connects the node to semantic identity when the\nlanguage supplies one.",
            "properties": {
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Syntax facts the model has no field for, namespaced by the provider that emitted\nthem. Absent when empty."
              },
              "facets": {
                "default": [],
                "description": "Portable structural classification, so a query can ask for bodies or imports without\nknowing the grammar that produced them. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/NodeFacet"
                },
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/NodeId",
                "description": "Unique identifier of this source region, and the URI that resolves it."
              },
              "kind": {
                "$ref": "#/$defs/ExactKind",
                "description": "What the node is in the provider's vocabulary, such as `fn_item`, `mapping.key`, or\n`selector.class`."
              },
              "language": {
                "$ref": "#/$defs/Language",
                "description": "The grammar that produced this node. It belongs to the identity because two\nproviders can produce different trees over the same file bytes."
              },
              "parent": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/NodeId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The region this one is nested inside. Absent at the top level of a unit."
              },
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes it spans, as offsets into the file."
              },
              "regions": {
                "default": [],
                "description": "The node's named parts, so an operation can rewrite a function body without touching\nthe documentation above it. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/NodeRegion"
                },
                "type": "array"
              },
              "symbol": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The symbol written at this node. Absent where a node writes no symbol -\npunctuation, a keyword, a comment."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "The file the node is written in."
              }
            },
            "required": [
              "id",
              "unit",
              "language",
              "kind",
              "range"
            ],
            "type": "object"
          },
          "NodeFacet": {
            "description": "Portable structural facets, so a filter can ask for bodies or imports without knowing the\ngrammar that produced them.",
            "oneOf": [
              {
                "const": "declaration",
                "description": "Introduces a name.",
                "type": "string"
              },
              {
                "const": "definition",
                "description": "Supplies the implementation behind a declared name.",
                "type": "string"
              },
              {
                "const": "body",
                "description": "The implementation part of a declaration.",
                "type": "string"
              },
              {
                "const": "block",
                "description": "A delimited group of statements.",
                "type": "string"
              },
              {
                "const": "statement",
                "description": "One executable step.",
                "type": "string"
              },
              {
                "const": "expression",
                "description": "Computes a value.",
                "type": "string"
              },
              {
                "const": "type_expression",
                "description": "Spells a type.",
                "type": "string"
              },
              {
                "const": "import",
                "description": "Brings an external name into scope.",
                "type": "string"
              },
              {
                "const": "export",
                "description": "Exposes a name outside its unit.",
                "type": "string"
              },
              {
                "const": "parameter",
                "description": "A declared input of a callable.",
                "type": "string"
              },
              {
                "const": "argument",
                "description": "A value passed at a call site.",
                "type": "string"
              },
              {
                "const": "annotation",
                "description": "A decorator or attribute qualifying a construct.",
                "type": "string"
              },
              {
                "const": "comment",
                "description": "Commentary the language ignores.",
                "type": "string"
              },
              {
                "const": "identifier",
                "description": "A name as written in the source.",
                "type": "string"
              },
              {
                "const": "literal",
                "description": "A value written out directly.",
                "type": "string"
              },
              {
                "const": "pattern",
                "description": "A destructuring or match pattern.",
                "type": "string"
              },
              {
                "const": "generated",
                "description": "Produced by a tool rather than authored.",
                "type": "string"
              },
              {
                "const": "test",
                "description": "Belongs to test code.",
                "type": "string"
              }
            ]
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "NodeRegion": {
            "additionalProperties": false,
            "description": "One named part of a node, and the bytes it spans.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "Offsets into the file, on the same scale as `Node.range`."
              },
              "role": {
                "$ref": "#/$defs/RegionRole",
                "description": "Which part of the node this is."
              }
            },
            "required": [
              "role",
              "range"
            ],
            "type": "object"
          },
          "ReadWarning": {
            "description": "One warning attached to a read result. The answer stands; the warning carries evidence\nof a condition the caller weighs before relying on it.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "The answer was computed from an index that lags the tree the read captured. Facts\nderived from the index may miss the newest writes; the digests state which two\ntrees disagree.",
                "properties": {
                  "captured_tree_revision": {
                    "$ref": "#/$defs/Digest",
                    "description": "Tree revision the read captured."
                  },
                  "code": {
                    "const": "stale_index",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "index_tree_revision": {
                    "$ref": "#/$defs/Digest",
                    "description": "Tree revision the published index covers."
                  }
                },
                "required": [
                  "code",
                  "index_tree_revision",
                  "captured_tree_revision",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The semantic ranking is still being built, so the answer was ranked lexically alone.\n`prepared` and `total` state how many declarations already carry a vector, and\n`ready_in` is derived from workspace size and embedding progress.",
                "properties": {
                  "code": {
                    "const": "semantic_index_preparing",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "prepared": {
                    "description": "Declarations that already carry a vector.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "ready_in": {
                    "$ref": "#/$defs/Duration",
                    "description": "Estimated wait before the semantic ranking joins an answer, not a measurement\nof this machine. A caller may report it and must not schedule against it."
                  },
                  "total": {
                    "description": "Declarations the published set holds.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "code",
                  "prepared",
                  "total",
                  "ready_in",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The semantic ranking will not answer for the life of this server, so every answer\nis ranked lexically alone. No retry is coming: fix the `[search.semantic]`\nconfiguration and start the server again.",
                "properties": {
                  "code": {
                    "const": "semantic_ranking_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The full-text tier is not answering, so the answer came from identifier matching\nalone: a query phrased as prose finds nothing. The tier failed to load or holds no\nindexed tree, and will not answer without operator action.",
                "properties": {
                  "code": {
                    "const": "lexical_ranking_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A claimed file's bytes are not valid UTF-8, so the index omits it: it answers no\nsearch or lookup, and addressing it directly still refuses `content_unavailable`.\nEvery other file in the workspace stays available.",
                "properties": {
                  "code": {
                    "const": "source_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file whose bytes could not be read."
                  }
                },
                "required": [
                  "code",
                  "unit",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Contributions selected for one symbol's presentation disagree on at least one\nfield. The answer carries what normalization selected.",
                "properties": {
                  "code": {
                    "const": "symbol_disagreement",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "providers": {
                    "description": "Providers whose Contribution carries a differing value for at least one\npresentation field, sorted and deduplicated.",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol whose presentation facts disagree."
                  }
                },
                "required": [
                  "code",
                  "symbol",
                  "providers",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A traversal walk stopped at its node bound before exhausting the reachable graph,\nso hits reachable beyond the bound are missing from this answer. Narrow the walk -\na tighter `facets` list, a smaller `depth`, or a less-connected seed - to fit it\nunder the bound.",
                "properties": {
                  "code": {
                    "const": "traversal_truncated",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "visited": {
                    "description": "Symbols the walk visited before it stopped, equal to the bound it hit.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "code",
                  "visited",
                  "detail"
                ],
                "type": "object"
              }
            ]
          },
          "RegionRole": {
            "description": "One named part of a node. A language marks these out inside a declaration, so an\noperation can address the body of a function without addressing its documentation.",
            "oneOf": [
              {
                "const": "selection",
                "description": "The stretch that best identifies the node when presented.",
                "type": "string"
              },
              {
                "const": "name",
                "description": "The name being declared.",
                "type": "string"
              },
              {
                "const": "header",
                "description": "The declaration up to where the body starts.",
                "type": "string"
              },
              {
                "const": "body",
                "description": "The implementation, without documentation or header.",
                "type": "string"
              },
              {
                "const": "content",
                "description": "The interior of the node without its delimiters.",
                "type": "string"
              },
              {
                "const": "documentation",
                "description": "The doc comment attached to the declaration.",
                "type": "string"
              },
              {
                "const": "enclosing",
                "description": "The full extent including what surrounds the node proper.",
                "type": "string"
              }
            ]
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "nodes": [
              {
                "id": "rift://node/rust/src/config.rs@0-356#dcbef6dd",
                "kind": "source_file",
                "language": "rust",
                "range": {
                  "end": 356,
                  "start": 0
                },
                "unit": "rift://file/src/config.rs"
              },
              {
                "facets": [
                  "declaration",
                  "definition"
                ],
                "id": "rift://node/rust/src/config.rs@218-355#67ecfb36",
                "kind": "function_item",
                "language": "rust",
                "parent": "rift://node/rust/src/config.rs@0-356#dcbef6dd",
                "range": {
                  "end": 355,
                  "start": 218
                },
                "regions": [
                  {
                    "range": {
                      "end": 236,
                      "start": 225
                    },
                    "role": "name"
                  },
                  {
                    "range": {
                      "end": 355,
                      "start": 281
                    },
                    "role": "body"
                  }
                ],
                "symbol": "rift://symbol/rust/src/config.rs/load_config",
                "unit": "rift://file/src/config.rs"
              },
              {
                "id": "rift://node/rust/src/config.rs@281-355#4e554fa8",
                "kind": "block",
                "language": "rust",
                "parent": "rift://node/rust/src/config.rs@218-355#67ecfb36",
                "range": {
                  "end": 355,
                  "start": 281
                },
                "unit": "rift://file/src/config.rs"
              },
              {
                "facets": [
                  "expression"
                ],
                "id": "rift://node/rust/src/config.rs@334-353#4df4426e",
                "kind": "call_expression",
                "language": "rust",
                "parent": "rift://node/rust/src/config.rs@281-355#4e554fa8",
                "range": {
                  "end": 353,
                  "start": 334
                },
                "unit": "rift://file/src/config.rs"
              },
              {
                "id": "rift://node/rust/src/config.rs@334-346#03f22dac",
                "kind": "identifier",
                "language": "rust",
                "parent": "rift://node/rust/src/config.rs@334-353#4df4426e",
                "range": {
                  "end": 346,
                  "start": 334
                },
                "unit": "rift://file/src/config.rs"
              }
            ],
            "source": [
              "use std::path::Path;\n\nuse crate::error::ConfigError;\n\n/// Workspace configuration read from `rift.toml`.\npub struct Config {\n    pub root: std::path::PathBuf,\n}\n\n/// Loads the workspace configuration from `rift.toml`.\npub fn load_config(path: &Path) -> Result<Config, ConfigError> {\n    let text = std::fs::read_to_string(path)?;\n    parse_config(&text)\n}\n",
              "pub fn load_config(path: &Path) -> Result<Config, ConfigError> {\n    let text = std::fs::read_to_string(path)?;\n    parse_config(&text)\n}",
              "{\n    let text = std::fs::read_to_string(path)?;\n    parse_config(&text)\n}",
              "parse_config(&text)",
              "parse_config"
            ]
          }
        ],
        "properties": {
          "nodes": {
            "description": "Nodes covering the position, outermost first.",
            "items": {
              "$ref": "#/$defs/Node"
            },
            "type": "array"
          },
          "source": {
            "description": "One excerpt per node in `nodes`, in the same order, each spanning that node's own\nrange. Empty when `nodes` is empty.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "warnings": {
            "default": [],
            "description": "Warnings attached to this result. Absent when there is nothing to warn about.",
            "items": {
              "$ref": "#/$defs/ReadWarning"
            },
            "type": "array"
          }
        },
        "required": [
          "nodes",
          "source"
        ],
        "type": "object"
      }
    },
    {
      "description": "Applies unified-diff hunks to workspace files atomically. The target is any\nfile the workspace's `[source]` policy makes visible, parsed or not. Hunk\ncontext guards the change: a header's line numbers are hints and\nits line counts are read from the hunk's own body, as with\n`git apply`. A `/dev/null` header creates or deletes the file. A body\nthat is not a unified diff, such as an `*** Begin Patch` envelope, is\nrefused naming the form to send. The result names each file the change\nwrote with its size and line counts.",
      "input_schema": {
        "$defs": {
          "BodySource": {
            "anyOf": [
              {
                "description": "The content itself.",
                "type": "string"
              },
              {
                "additionalProperties": false,
                "description": "A file the server reads for the content.",
                "properties": {
                  "file": {
                    "description": "Absolute path to the file the server reads. Distinct from a destination\npath such as `insert_symbol`'s own `file`, which names where content\nlands, not where it comes from. The server reads this path itself, so a\ncaller not co-located with the server cannot use this form.",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            ],
            "description": "Where a write tool's body bytes come from: written inline in the request, or read\nfrom a file. `patch`, and every write tool's `body`, accepts either form; the object\nform is refused when it carries an unknown or additional field.\n\nBoth forms are bounded by the field that embeds this type; the schema states the\nbound as the inline string's `maxLength`, and the server enforces the same bound\nagainst the resolved content of either form."
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "patch": "--- a/src/config.rs\n+++ b/src/config.rs\n@@ -11,4 +11,4 @@\n pub fn load_config(path: &Path) -> Result<Config, ConfigError> {\n     let text = std::fs::read_to_string(path)?;\n-    parse_config(&text)\n+    parse_config(text.trim())\n }\n"
          }
        ],
        "properties": {
          "patch": {
            "$ref": "#/$defs/BodySource",
            "description": "A unified diff, inline or read from a file. The addressed file is any workspace\nfile the `[source]` policy makes visible, whether or not a syntax provider\nparses it. Hunk context guards the change: a header's line numbers are hints\nand its line counts are read from the hunk's own body, as with `git apply`.\n`/dev/null` headers create or delete files.",
            "maxLength": 4194304,
            "minLength": 1
          }
        },
        "required": [
          "patch"
        ],
        "rift:since": "v0.0.6",
        "type": "object"
      },
      "name": "patch",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Removes one syntax node through a witnessed address from `nodes`.\nThe server recomputes the witness before writing and refuses when\nthe bytes drifted, so a stale address never removes moved code. When\nthe node names a declaration, the removal is checked against the\nconfigured language engine's references the same way `remove_symbol`\nchecks them; a node naming no declaration applies unchecked, with a\nwarning saying so.",
      "input_schema": {
        "$defs": {
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "force": false,
            "node": "rift://node/rust/src/config.rs@334-353#4df4426e"
          }
        ],
        "properties": {
          "force": {
            "default": false,
            "description": "Applies the removal even when references stand, carrying them as a warning instead\nof refusing.",
            "type": "boolean"
          },
          "node": {
            "$ref": "#/$defs/NodeId",
            "description": "The node identity returned by `nodes`, witness included."
          }
        },
        "required": [
          "node"
        ],
        "rift:since": "v0.0.19",
        "type": "object"
      },
      "name": "remove_node",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Removes one declaration addressed by symbol. The whole declaration,\nits attached outer attributes and doc comments included, is removed\ntogether with the separator that followed it, so no blank-line run\nstands where it stood. When the configured language engine\nadvertises `textDocument/references`, a standing reference refuses\n`unmet_precondition` naming `no_references`, unless `force` applies\nthe removal anyway and carries the references as a warning. Without\nsuch an engine, the removal applies and carries a warning naming why\nit was not checked.",
      "input_schema": {
        "$defs": {
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "force": false,
            "symbol": "rift://symbol/rust/src/config.rs/default_config"
          }
        ],
        "properties": {
          "force": {
            "default": false,
            "description": "Applies the removal even when references stand, carrying them as a warning instead\nof refusing.",
            "type": "boolean"
          },
          "symbol": {
            "$ref": "#/$defs/SymbolId",
            "description": "The declaration identity returned by `get_symbol`."
          }
        },
        "required": [
          "symbol"
        ],
        "rift:since": "v0.0.19",
        "type": "object"
      },
      "name": "remove_symbol",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Renames one declaration addressed by symbol through the configured\nlanguage engine. The engine proposes the edits; the server verifies\neach one against the tree and writes them atomically, then reports\nsurviving occurrences of the old name as warning findings. Refused\nas `unsupported` when no engine serves the declaration's language;\na refusal leaves the workspace untouched.",
      "input_schema": {
        "$defs": {
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "new_name": "read_config",
            "symbol": "rift://symbol/rust/src/config.rs/load_config"
          }
        ],
        "properties": {
          "new_name": {
            "description": "The declaration's new name. The engine judges identifier validity for its\nlanguage; a name the engine refuses returns an `unmet_precondition` refusal\ncarrying the engine's own words.",
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "symbol": {
            "$ref": "#/$defs/SymbolId",
            "description": "The declaration identity returned by `get_symbol`."
          }
        },
        "required": [
          "symbol",
          "new_name"
        ],
        "rift:since": "v0.0.14",
        "type": "object"
      },
      "name": "rename_symbol",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Replaces one syntax node through a witnessed address from `nodes`.\nThe server recomputes the witness before writing and refuses when the\nbytes drifted, so a stale address never splices into moved code.",
      "input_schema": {
        "$defs": {
          "BodySource": {
            "anyOf": [
              {
                "description": "The content itself.",
                "type": "string"
              },
              {
                "additionalProperties": false,
                "description": "A file the server reads for the content.",
                "properties": {
                  "file": {
                    "description": "Absolute path to the file the server reads. Distinct from a destination\npath such as `insert_symbol`'s own `file`, which names where content\nlands, not where it comes from. The server reads this path itself, so a\ncaller not co-located with the server cannot use this form.",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            ],
            "description": "Where a write tool's body bytes come from: written inline in the request, or read\nfrom a file. `patch`, and every write tool's `body`, accepts either form; the object\nform is refused when it carries an unknown or additional field.\n\nBoth forms are bounded by the field that embeds this type; the schema states the\nbound as the inline string's `maxLength`, and the server enforces the same bound\nagainst the resolved content of either form."
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "RegionRole": {
            "description": "One named part of a node. A language marks these out inside a declaration, so an\noperation can address the body of a function without addressing its documentation.",
            "oneOf": [
              {
                "const": "selection",
                "description": "The stretch that best identifies the node when presented.",
                "type": "string"
              },
              {
                "const": "name",
                "description": "The name being declared.",
                "type": "string"
              },
              {
                "const": "header",
                "description": "The declaration up to where the body starts.",
                "type": "string"
              },
              {
                "const": "body",
                "description": "The implementation, without documentation or header.",
                "type": "string"
              },
              {
                "const": "content",
                "description": "The interior of the node without its delimiters.",
                "type": "string"
              },
              {
                "const": "documentation",
                "description": "The doc comment attached to the declaration.",
                "type": "string"
              },
              {
                "const": "enclosing",
                "description": "The full extent including what surrounds the node proper.",
                "type": "string"
              }
            ]
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "body": "parse_config(text.trim())",
            "node": "rift://node/rust/src/config.rs@334-353#4df4426e"
          }
        ],
        "properties": {
          "body": {
            "$ref": "#/$defs/BodySource",
            "description": "The replacement source, inline or read from a file.",
            "maxLength": 1048576
          },
          "node": {
            "$ref": "#/$defs/NodeId",
            "description": "The node identity returned by `nodes`, witness included."
          },
          "region": {
            "anyOf": [
              {
                "$ref": "#/$defs/RegionRole"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which named part of the node to replace. Omitted - the only form this release\nserves - replaces the node whole; a named region fails as\n`capability_unavailable`."
          }
        },
        "required": [
          "node",
          "body"
        ],
        "rift:since": "v0.0.4",
        "type": "object"
      },
      "name": "replace_node",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Replaces one declaration addressed by symbol. The whole declaration\nincludes its attached outer attributes and doc comments. The parser\nderives the span, so the caller supplies no offsets; a refusal\nnames the failed precondition and leaves the workspace untouched.\nThe body is spliced in verbatim at the declaration's own start byte:\nits first line inherits the declaration's column, and every later\nline carries whatever indentation it is written with.",
      "input_schema": {
        "$defs": {
          "BodySource": {
            "anyOf": [
              {
                "description": "The content itself.",
                "type": "string"
              },
              {
                "additionalProperties": false,
                "description": "A file the server reads for the content.",
                "properties": {
                  "file": {
                    "description": "Absolute path to the file the server reads. Distinct from a destination\npath such as `insert_symbol`'s own `file`, which names where content\nlands, not where it comes from. The server reads this path itself, so a\ncaller not co-located with the server cannot use this form.",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            ],
            "description": "Where a write tool's body bytes come from: written inline in the request, or read\nfrom a file. `patch`, and every write tool's `body`, accepts either form; the object\nform is refused when it carries an unknown or additional field.\n\nBoth forms are bounded by the field that embeds this type; the schema states the\nbound as the inline string's `maxLength`, and the server enforces the same bound\nagainst the resolved content of either form."
          },
          "RegionRole": {
            "description": "One named part of a node. A language marks these out inside a declaration, so an\noperation can address the body of a function without addressing its documentation.",
            "oneOf": [
              {
                "const": "selection",
                "description": "The stretch that best identifies the node when presented.",
                "type": "string"
              },
              {
                "const": "name",
                "description": "The name being declared.",
                "type": "string"
              },
              {
                "const": "header",
                "description": "The declaration up to where the body starts.",
                "type": "string"
              },
              {
                "const": "body",
                "description": "The implementation, without documentation or header.",
                "type": "string"
              },
              {
                "const": "content",
                "description": "The interior of the node without its delimiters.",
                "type": "string"
              },
              {
                "const": "documentation",
                "description": "The doc comment attached to the declaration.",
                "type": "string"
              },
              {
                "const": "enclosing",
                "description": "The full extent including what surrounds the node proper.",
                "type": "string"
              }
            ]
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "body": "/// Loads the workspace configuration from `rift.toml`.\npub fn load_config(path: &Path) -> Result<Config, ConfigError> {\n    let text = std::fs::read_to_string(path)\n        .map_err(|error| ConfigError::read(path, error))?;\n    parse_config(&text)\n}",
            "symbol": "rift://symbol/rust/src/config.rs/load_config"
          }
        ],
        "properties": {
          "body": {
            "$ref": "#/$defs/BodySource",
            "description": "The replacement source, inline or read from a file.",
            "maxLength": 1048576
          },
          "region": {
            "anyOf": [
              {
                "$ref": "#/$defs/RegionRole"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which part of the declaration to replace. Omitted - the only form this release\nserves - replaces the whole declaration; a named region fails as\n`capability_unavailable`."
          },
          "symbol": {
            "$ref": "#/$defs/SymbolId",
            "description": "The declaration identity returned by `get_symbol`."
          }
        },
        "required": [
          "symbol",
          "body"
        ],
        "rift:since": "v0.0.6",
        "type": "object"
      },
      "name": "replace_symbol",
      "output_schema": {
        "$defs": {
          "ChangeId": {
            "description": "Identity of one applied change, minted when the change lands: the first eight\nlowercase hex characters of the SHA-256 of the change's content, the same wire form\n`Digest` uses.",
            "examples": [
              "d54ffb22"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "ChangeSummary": {
            "additionalProperties": false,
            "description": "One applied change, with everything Rift learned while resolving it.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Resolution findings in source order, then one finding per hook that\ndid not pass. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "files": {
                "description": "Files this change wrote, sorted bytewise by path.",
                "items": {
                  "$ref": "#/$defs/FileChange"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              "guarantees": {
                "default": [],
                "description": "Properties the workspace's passing validation hooks established about this\nchange, in hook list order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/GuaranteeEvidence"
                },
                "maxItems": 512,
                "type": "array"
              },
              "id": {
                "$ref": "#/$defs/ChangeId",
                "description": "Identity of this applied change."
              }
            },
            "required": [
              "id",
              "files"
            ],
            "type": "object"
          },
          "CoverageReach": {
            "description": "How far the claim reaches.",
            "oneOf": [
              {
                "const": "request",
                "description": "Only what this request touched.",
                "type": "string"
              },
              {
                "const": "project",
                "description": "Every visible file of the workspace.",
                "type": "string"
              },
              {
                "const": "dependencies",
                "description": "The workspace's resolved dependencies.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "The workspace, its dependencies, and the standard library together.",
                "type": "string"
              }
            ]
          },
          "CoverageScope": {
            "description": "What a completeness statement covers - everything the request asked for, one file, or a\nstanding scope the answer holds over.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A standing scope identified by its name.",
                "properties": {
                  "kind": {
                    "const": "reach",
                    "type": "string"
                  },
                  "reach": {
                    "$ref": "#/$defs/CoverageReach",
                    "description": "How far the claim reaches."
                  }
                },
                "required": [
                  "kind",
                  "reach"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A single unit is just a file: the claim holds for that path and says nothing about any other.",
                "properties": {
                  "kind": {
                    "const": "unit",
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file the claim is about."
                  }
                },
                "required": [
                  "kind",
                  "unit"
                ],
                "type": "object"
              }
            ]
          },
          "Diagnostic": {
            "additionalProperties": false,
            "description": "One finding a provider produced from source. Its code and message retain the provider's\nvocabulary.",
            "properties": {
              "code": {
                "description": "The provider's own identifier for this finding - `TS2345`, `E0308`. Absent where\nthe provider issues none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuation": {
                "$ref": "#/$defs/DiagnosticContinuation",
                "description": "Whether the finding is a mid-file artefact."
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Diagnostic fields the model has no place for, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "language": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Language"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The language whose provider produced this. Absent for a finding Rift itself\nraised."
              },
              "message": {
                "description": "What the provider said, in its own words.",
                "maxLength": 4096,
                "type": "string"
              },
              "related": {
                "default": [],
                "description": "Other places the provider pointed at while explaining this one. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticRelated"
                },
                "type": "array"
              },
              "reliability": {
                "$ref": "#/$defs/DiagnosticReliability",
                "description": "How reliable the surrounding facts are."
              },
              "severity": {
                "$ref": "#/$defs/Severity",
                "description": "How much it matters."
              },
              "span": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceSpan"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where it applies. Absent for a finding about the file as a whole, or about the\nbuild."
              },
              "tags": {
                "default": [],
                "description": "Presentation tags for the finding. A consumer can render them as strikethrough or\ngrey text; absent when empty.",
                "items": {
                  "$ref": "#/$defs/DiagnosticTag"
                },
                "type": "array"
              }
            },
            "required": [
              "severity",
              "message",
              "reliability",
              "continuation"
            ],
            "type": "object"
          },
          "DiagnosticContinuation": {
            "description": "Whether the finding is an artefact of source that stops mid-way, which is the normal\nstate of a file the caller is halfway through writing.",
            "oneOf": [
              {
                "const": "repairable",
                "description": "The producer recovered and later facts remain reliable.",
                "type": "string"
              },
              {
                "const": "unrepairable",
                "description": "The producer could not recover, so later facts are suspect.",
                "type": "string"
              },
              {
                "const": "unknown",
                "description": "The producer does not say whether it recovered.",
                "type": "string"
              }
            ]
          },
          "DiagnosticRelated": {
            "additionalProperties": false,
            "description": "A second place the provider points at - the earlier declaration a redefinition conflicts\nwith, the bound that failed. It carries a message and a location, and never a severity of\nits own, because it is part of one finding.",
            "properties": {
              "message": {
                "description": "What to notice there - \"first defined here\", \"required by this bound\".",
                "maxLength": 4096,
                "type": "string"
              },
              "span": {
                "$ref": "#/$defs/SourceSpan",
                "description": "Where to look."
              }
            },
            "required": [
              "message",
              "span"
            ],
            "type": "object"
          },
          "DiagnosticReliability": {
            "description": "Whether the facts around this finding came off a clean parse.",
            "oneOf": [
              {
                "const": "reliable",
                "description": "The surrounding facts came off a clean parse.",
                "type": "string"
              },
              {
                "const": "recovered",
                "description": "The parser recovered nearby, so surrounding facts may be off.",
                "type": "string"
              }
            ]
          },
          "DiagnosticTag": {
            "description": "Presentation tags for the finding. A consumer can render them as strikethrough or grey\ntext.",
            "oneOf": [
              {
                "const": "deprecated",
                "description": "The code the finding points at is deprecated.",
                "type": "string"
              },
              {
                "const": "unnecessary",
                "description": "The code the finding points at is unused or has no effect.",
                "type": "string"
              }
            ]
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileChange": {
            "additionalProperties": false,
            "description": "One file a change wrote, and what the write did to it.",
            "properties": {
              "kind": {
                "$ref": "#/$defs/FileChangeKind",
                "description": "Whether the change created, modified, or deleted the file."
              },
              "line_count": {
                "description": "Lines the file holds after the change, counting a final unterminated line;\nzero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_added": {
                "description": "Lines the change added. A line whose content changed counts here and in\n`lines_removed`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "lines_removed": {
                "description": "Lines the change removed.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "$ref": "#/$defs/ProjectPath",
                "description": "The file, project-relative."
              },
              "size_bytes": {
                "description": "The file's size in bytes after the change; zero for a deleted file.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "kind",
              "size_bytes",
              "line_count",
              "lines_added",
              "lines_removed"
            ],
            "type": "object"
          },
          "FileChangeKind": {
            "description": "What a change did to one file.",
            "oneOf": [
              {
                "const": "created",
                "description": "The file did not exist before the change.",
                "type": "string"
              },
              {
                "const": "modified",
                "description": "The file existed and its bytes changed.",
                "type": "string"
              },
              {
                "const": "deleted",
                "description": "The file existed and the change removed it.",
                "type": "string"
              }
            ]
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GuaranteeEvidence": {
            "additionalProperties": false,
            "description": "A property a passing hook established about one applied change. The\nserver mints one entry per configured guarantee of each hook that\npassed, so a green run carries what it actually proved rather than an\nunexplained tick.",
            "properties": {
              "detail": {
                "description": "The exact property checked and the limits on reading a pass, from\nthe hook's configuration.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "hook": {
                "description": "The configured hook whose passing run established the property.",
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/GuaranteeKind",
                "description": "Which property is established."
              },
              "scope": {
                "$ref": "#/$defs/CoverageScope",
                "description": "What the check covered."
              }
            },
            "required": [
              "kind",
              "scope",
              "hook",
              "detail"
            ],
            "type": "object"
          },
          "GuaranteeKind": {
            "description": "A property a verifier can establish about an applied change.",
            "oneOf": [
              {
                "const": "syntax_validated",
                "description": "The changed source parses.",
                "type": "string"
              },
              {
                "const": "bindings_preserved",
                "description": "Names still resolve to what they resolved to before the change.",
                "type": "string"
              },
              {
                "const": "references_updated",
                "description": "References to the changed declarations were updated with them.",
                "type": "string"
              },
              {
                "const": "behavior_checked",
                "description": "The change's behavior was exercised, such as by a test suite.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "OperationPrecondition": {
            "additionalProperties": false,
            "description": "One executable condition checked while resolving an operation.",
            "properties": {
              "addresses": {
                "description": "Existing semantic or source subjects involved in the condition.",
                "items": {
                  "$ref": "#/$defs/PreconditionAddress"
                },
                "maxItems": 16,
                "type": "array"
              },
              "expected": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Required value for this check."
              },
              "kind": {
                "$ref": "#/$defs/OperationPreconditionKind",
                "description": "The condition that was checked."
              },
              "observed": {
                "$ref": "#/$defs/PreconditionValue",
                "description": "Value found while checking the condition."
              },
              "paths": {
                "description": "Project paths involved in the condition, including destinations that do not yet\nexist.",
                "items": {
                  "$ref": "#/$defs/ProjectPath"
                },
                "maxItems": 64,
                "type": "array"
              },
              "status": {
                "$ref": "#/$defs/OperationPreconditionStatus",
                "description": "Whether the condition held."
              }
            },
            "required": [
              "kind",
              "status",
              "addresses",
              "paths",
              "expected",
              "observed"
            ],
            "type": "object"
          },
          "OperationPreconditionKind": {
            "description": "Condition being checked.",
            "oneOf": [
              {
                "const": "target_exists",
                "description": "Whether the addressed file or declaration exists.",
                "type": "string"
              },
              {
                "const": "source_unchanged",
                "description": "Whether the addressed bytes still match the witness or patch context supplied.",
                "type": "string"
              },
              {
                "const": "no_references",
                "description": "Whether the addressed declaration has no standing references.",
                "type": "string"
              },
              {
                "const": "body_readable",
                "description": "Wire value `body_readable`. The failed entry names the [`BodySource`] `file`\nform: absent, not a plain file, unreadable, or holding bytes that are not\nvalid UTF-8 text.",
                "type": "string"
              },
              {
                "const": "engine_proposed_edits",
                "description": "Wire value `engine_proposed_edits`. The failed entry names an operation whose\nconfigured engine declined it or proposed no edit for the addressed subject.",
                "type": "string"
              },
              {
                "const": "target_is_file",
                "description": "Wire value `target_is_file`. The failed entry names a path a write requires to\nbe a file, that a directory occupies on disk.",
                "type": "string"
              }
            ]
          },
          "OperationPreconditionStatus": {
            "description": "Result of this check.",
            "oneOf": [
              {
                "const": "satisfied",
                "description": "Wire value `satisfied`.",
                "type": "string"
              },
              {
                "const": "failed",
                "description": "Wire value `failed`.",
                "type": "string"
              }
            ]
          },
          "PreconditionAddress": {
            "description": "Existing semantic or source subject a precondition addresses.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A declaration, addressed by its symbol.",
                "properties": {
                  "kind": {
                    "const": "symbol",
                    "type": "string"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol addressed."
                  }
                },
                "required": [
                  "kind",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A syntax node, addressed by its witnessed identity.",
                "properties": {
                  "kind": {
                    "const": "node",
                    "type": "string"
                  },
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The node addressed."
                  }
                },
                "required": [
                  "kind",
                  "node"
                ],
                "type": "object"
              }
            ]
          },
          "PreconditionValue": {
            "description": "A typed value compared by an operation precondition.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Boolean property such as target existence or writability.",
                "properties": {
                  "kind": {
                    "const": "boolean",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Non-negative count such as remaining usages.",
                "properties": {
                  "kind": {
                    "const": "count",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Language or policy value whose spelling is itself significant.",
                "properties": {
                  "kind": {
                    "const": "text",
                    "type": "string"
                  },
                  "value": {
                    "description": "The value.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "value"
                ],
                "type": "object"
              }
            ]
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "RefusalReason": {
            "description": "Why resolution produced no edits at all. `ErrorData` carries transport and\ninfrastructure failures.",
            "oneOf": [
              {
                "const": "unsupported",
                "description": "Nothing serves this operation for the language it reaches.",
                "type": "string"
              },
              {
                "const": "unmet_precondition",
                "description": "A condition checked before resolution failed. The failed entry is in\n`preconditions`.",
                "type": "string"
              }
            ]
          },
          "Severity": {
            "description": "How much a `Diagnostic` matters, in the provider's own judgement. Providers map their\ntoolchain's own levels onto these four, so a caller can drop everything below `warning`\nwithout knowing which language produced it.",
            "oneOf": [
              {
                "const": "error",
                "description": "The provider judges the code wrong.",
                "type": "string"
              },
              {
                "const": "warning",
                "description": "Suspect but not necessarily wrong.",
                "type": "string"
              },
              {
                "const": "info",
                "description": "Informational, with nothing to fix.",
                "type": "string"
              },
              {
                "const": "hint",
                "description": "A gentle suggestion a consumer may hide.",
                "type": "string"
              }
            ]
          },
          "SourceSpan": {
            "additionalProperties": false,
            "description": "A byte range of one file.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "The bytes, as offsets into that file."
              },
              "unit": {
                "$ref": "#/$defs/FileId",
                "description": "Which file the offsets are into."
              }
            },
            "required": [
              "unit",
              "range"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "examples": [
          {
            "status": "applied",
            "summary": {
              "diagnostics": [
                {
                  "code": "rift.hook.failed",
                  "continuation": "unknown",
                  "message": "hook format did not pass: exited 1; stderr (32 of 32 bytes): Diff in src/config.rs at line 12",
                  "reliability": "reliable",
                  "severity": "error"
                }
              ],
              "files": [
                {
                  "kind": "modified",
                  "line_count": 42,
                  "lines_added": 6,
                  "lines_removed": 4,
                  "path": "src/config.rs",
                  "size_bytes": 1148
                }
              ],
              "guarantees": [
                {
                  "detail": "cargo test passes on the changed tree",
                  "hook": "tests",
                  "kind": "behavior_checked",
                  "scope": {
                    "kind": "reach",
                    "reach": "project"
                  }
                }
              ],
              "id": "d54ffb22"
            }
          },
          {
            "preconditions": [
              {
                "addresses": [
                  {
                    "kind": "node",
                    "node": "rift://node/rust/src/config.rs@334-353#dd8aec0a"
                  }
                ],
                "expected": {
                  "kind": "boolean",
                  "value": true
                },
                "kind": "source_unchanged",
                "observed": {
                  "kind": "boolean",
                  "value": false
                },
                "paths": [
                  "src/config.rs"
                ],
                "status": "failed"
              }
            ],
            "reason": "unmet_precondition",
            "status": "refused"
          }
        ],
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "The operation resolved to edits and Rift wrote them into the targeted tree.",
            "properties": {
              "status": {
                "const": "applied",
                "type": "string"
              },
              "summary": {
                "$ref": "#/$defs/ChangeSummary",
                "description": "The applied change and its evidence."
              }
            },
            "required": [
              "status",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Resolution produced no edits, so the targeted tree is untouched.",
            "properties": {
              "diagnostics": {
                "default": [],
                "description": "Evidence that explains the refusal. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Diagnostic"
                },
                "maxItems": 256,
                "type": "array"
              },
              "preconditions": {
                "description": "Conditions checked before refusal, including at least one failed entry for\n`unmet_precondition`.",
                "items": {
                  "$ref": "#/$defs/OperationPrecondition"
                },
                "maxItems": 16,
                "type": "array"
              },
              "reason": {
                "$ref": "#/$defs/RefusalReason",
                "description": "The condition the caller can act on."
              },
              "status": {
                "const": "refused",
                "type": "string"
              }
            },
            "required": [
              "status",
              "reason",
              "preconditions"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "A completed transform pipeline left the targeted tree unchanged.",
            "properties": {
              "status": {
                "const": "unchanged",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          }
        ]
      }
    },
    {
      "description": "Searches indexed declarations and source lines by lexical `query`, merged with\nfull-text matches from included `[search.text]` files and declaration bodies, and by a\nbounded relationship `traversal` from one seed symbol. `rev` searches a\nversion-control revision instead of the current tree, and never combines with\n`traversal`. Use `get_symbol` when the declaration name is known.\nFor a current-tree search, the published workspace is resolved exactly once and\nthreaded through both the search index's revision check and the executed\n`ReadService::search` call: a concurrent rebuild between two separate resolutions\ncould otherwise validate ranked units against one snapshot and merge them into\nresults computed from another.",
      "input_schema": {
        "$defs": {
          "PathPattern": {
            "description": "Project-relative glob using *, ?, **, and character classes. Forward-slash separated on\nevery platform, whatever separator the host OS uses natively.",
            "examples": [
              "src/**"
            ],
            "pattern": "^(?!/)(?!\\.\\.?(/|$))(?!.*(/\\.\\.?)(/|$))[^\\\\\\u0000-\\u001F\\u007F]+$",
            "type": "string"
          },
          "PathSelector": {
            "additionalProperties": false,
            "description": "Which files a query runs over, as three lists of globs matched against the project-relative\npath. The same glob engine backs the workspace's `[source]` policy. `include: [\"src/**\"]`\nselects the source tree; `exclude: [\"src/generated/**\"]` then removes generated output.",
            "properties": {
              "exclude": {
                "default": [],
                "description": "Globs that drop a path `include` already matched.",
                "items": {
                  "$ref": "#/$defs/PathPattern"
                },
                "type": "array"
              },
              "force_include": {
                "default": [],
                "description": "Globs reaching files the workspace's `[source]` policy or `.gitignore` excluded from\nthe index. Matches are bounded per request, and the server refuses the search when the\nbound is crossed rather than truncating it silently.",
                "items": {
                  "$ref": "#/$defs/PathPattern"
                },
                "type": "array"
              },
              "include": {
                "default": [],
                "description": "Globs a path has to match to be searched at all. Empty includes every visible file.",
                "items": {
                  "$ref": "#/$defs/PathPattern"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "RelationshipFacet": {
            "description": "One portable category an edge falls into. The local kinds `import` and `use` can share\nthe `imports` facet, which lets one query cross languages.",
            "oneOf": [
              {
                "const": "contains",
                "description": "The source contains the target within its scope.",
                "type": "string"
              },
              {
                "const": "declares",
                "description": "The source declares the target.",
                "type": "string"
              },
              {
                "const": "augments",
                "description": "The source adds to a declaration made elsewhere.",
                "type": "string"
              },
              {
                "const": "references",
                "description": "The source mentions the target.",
                "type": "string"
              },
              {
                "const": "calls",
                "description": "The source invokes the target.",
                "type": "string"
              },
              {
                "const": "constructs",
                "description": "The source creates an instance of the target.",
                "type": "string"
              },
              {
                "const": "reads",
                "description": "The source reads the target's value.",
                "type": "string"
              },
              {
                "const": "writes",
                "description": "The source assigns to the target.",
                "type": "string"
              },
              {
                "const": "imports",
                "description": "The source brings the target into scope.",
                "type": "string"
              },
              {
                "const": "exports",
                "description": "The source exposes the target outside its unit.",
                "type": "string"
              },
              {
                "const": "extends",
                "description": "The source inherits from the target.",
                "type": "string"
              },
              {
                "const": "implements",
                "description": "The source fulfils the target's interface.",
                "type": "string"
              },
              {
                "const": "has_type",
                "description": "The source is typed by the target.",
                "type": "string"
              },
              {
                "const": "overrides",
                "description": "The source replaces the target inherited from a supertype.",
                "type": "string"
              },
              {
                "const": "aliases",
                "description": "The source is another name for the target.",
                "type": "string"
              },
              {
                "const": "generates",
                "description": "The source produces the target as generated code.",
                "type": "string"
              },
              {
                "const": "depends_on",
                "description": "The source requires the target to build or run.",
                "type": "string"
              },
              {
                "const": "annotated_by",
                "description": "The source carries the target as an annotation.",
                "type": "string"
              },
              {
                "const": "throws",
                "description": "The source can raise the target.",
                "type": "string"
              },
              {
                "const": "catches",
                "description": "The source handles the target when raised.",
                "type": "string"
              },
              {
                "const": "bounded_by",
                "description": "The source's type parameter is constrained by the target.",
                "type": "string"
              },
              {
                "const": "instantiates",
                "description": "The source applies concrete arguments to the generic target.",
                "type": "string"
              },
              {
                "const": "specializes",
                "description": "The source is a specialization of the generic target.",
                "type": "string"
              },
              {
                "const": "overloads",
                "description": "The source and target are separately dispatched forms of one name.",
                "type": "string"
              },
              {
                "const": "mixes_in",
                "description": "The source incorporates the target as a mixin.",
                "type": "string"
              },
              {
                "const": "embeds",
                "description": "The source embeds the target within its own definition.",
                "type": "string"
              },
              {
                "const": "tests",
                "description": "The source exercises the target as a test.",
                "type": "string"
              },
              {
                "const": "configures",
                "description": "The source supplies configuration for the target.",
                "type": "string"
              },
              {
                "const": "binds",
                "description": "The source binds a name or value to the target.",
                "type": "string"
              }
            ]
          },
          "ResultOrder": {
            "description": "The total order a paginated answer comes back in. Every order ends in the result's own\nidentity, so two results that tie never swap places between pages.",
            "oneOf": [
              {
                "const": "relevance",
                "description": "Best score first, with identity breaking ties.",
                "type": "string"
              },
              {
                "const": "path",
                "description": "Project path order, with identity breaking ties.",
                "type": "string"
              },
              {
                "const": "identity",
                "description": "The result's own identity alone.",
                "type": "string"
              }
            ]
          },
          "RevisionId": {
            "description": "Identity of one revision in the workspace's version-control history, spelled the way the\nversion-control system spells it. Rift carries it opaquely and never orders two revisions\nby comparing their identifiers.",
            "examples": [
              "main"
            ],
            "pattern": "^[A-Za-z0-9._/-]{1,128}$",
            "type": "string"
          },
          "SearchInclude": {
            "description": "Extra payload to attach to every hit. Every entry costs response bytes per hit, so the\ncaller requests only what it will read.",
            "oneOf": [
              {
                "const": "source",
                "description": "The source text around each hit.",
                "type": "string"
              },
              {
                "const": "score",
                "description": "The ranking value used to order the page.",
                "type": "string"
              }
            ]
          },
          "SearchParamsTarget": {
            "description": "Which entity kinds may be returned.",
            "oneOf": [
              {
                "const": "symbol",
                "description": "Only declarations may match.",
                "type": "string"
              },
              {
                "const": "file",
                "description": "Only tree entries may match.",
                "type": "string"
              },
              {
                "const": "all",
                "description": "Any entity kind may match.",
                "type": "string"
              }
            ]
          },
          "SearchTraversal": {
            "additionalProperties": false,
            "description": "A bounded relationship walk starting at one symbol. From `seed`, the server visits its\nneighbors, then their neighbors, up to `depth` hops, following `direction` and narrowed to\n`facets`; each reached symbol keeps the shortest path the walk found to it.",
            "properties": {
              "depth": {
                "default": 1,
                "description": "Hops the walk may take from `seed`. The server accepts 1 or 2. Omitted, 1.",
                "format": "uint64",
                "maximum": 2,
                "minimum": 1,
                "type": "integer"
              },
              "direction": {
                "$ref": "#/$defs/TraversalDirection",
                "default": "outgoing",
                "description": "Which edges the walk follows from each visited symbol. Omitted, `outgoing`."
              },
              "facets": {
                "description": "Portable relationship facets eligible for the walk. Omitted or empty, every facet is\neligible.",
                "items": {
                  "$ref": "#/$defs/RelationshipFacet"
                },
                "maxItems": 29,
                "type": "array"
              },
              "seed": {
                "$ref": "#/$defs/SymbolId",
                "description": "The declaration the walk starts at. The seed itself is never a hit."
              },
              "to": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "When set, the answer keeps only the hit whose walk reaches this symbol. That hit's\npath is the shortest one the walk found. A `to` the walk cannot reach within `depth`\nanswers empty, not refused."
              }
            },
            "required": [
              "seed"
            ],
            "type": "object"
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "TraversalDirection": {
            "description": "Which edge direction a search traversal walks from each visited symbol.",
            "oneOf": [
              {
                "const": "outgoing",
                "description": "Walks edges leaving each visited symbol.",
                "type": "string"
              },
              {
                "const": "incoming",
                "description": "Walks edges arriving at each visited symbol.",
                "type": "string"
              },
              {
                "const": "both",
                "description": "Walks edges in both directions.",
                "type": "string"
              }
            ]
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "include": [
              "source"
            ],
            "limit": 20,
            "order": "relevance",
            "page_index": 0,
            "paths": {
              "exclude": [],
              "force_include": [],
              "include": [
                "src/**"
              ]
            },
            "query": "load_config",
            "target": "all"
          },
          {
            "limit": 10,
            "order": "path",
            "query": "load_config",
            "target": "symbol"
          },
          {
            "limit": 25,
            "target": "symbol",
            "traversal": {
              "depth": 2,
              "direction": "incoming",
              "facets": [
                "calls",
                "references",
                "imports"
              ],
              "seed": "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            }
          }
        ],
        "properties": {
          "include": {
            "description": "Extra payload to attach to every hit. Every entry costs response bytes per hit, so\nthe caller requests only what it will read.",
            "items": {
              "$ref": "#/$defs/SearchInclude"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "limit": {
            "description": "Most hits to return in one page. `max_page_items` from the workspace resource caps\nit, and fewer may come back.",
            "format": "uint64",
            "maximum": 10000,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "order": {
            "$ref": "#/$defs/ResultOrder",
            "default": "relevance",
            "description": "Which total order the page comes back in. Omitted, relevance."
          },
          "page_index": {
            "default": 0,
            "description": "Zero-based page of the result set to serve, sized by `limit`. A `page_index` past\nthe last page returns an empty page whose `pagination` carries the requested\n`page_index` and the true `total_pages`.",
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "paths": {
            "anyOf": [
              {
                "$ref": "#/$defs/PathSelector"
              },
              {
                "type": "null"
              }
            ],
            "description": "Files eligible for the search, selected by project-relative globs. Omitted selects\nevery visible file."
          },
          "query": {
            "description": "Text to match against file contents, symbol names, and rendered signatures. Matching\nis case-insensitive and identifier-aware - the query and the fields split on case\nand underscore boundaries, so `loadConfig` finds `load_config`. Scoring is\nserver-defined and comparable within one answer.",
            "type": [
              "string",
              "null"
            ]
          },
          "rev": {
            "anyOf": [
              {
                "$ref": "#/$defs/RevisionId"
              },
              {
                "type": "null"
              }
            ],
            "description": "The version-control revision to search - a branch, tag, or commit id as the\nworkspace's version control spells it. Omitted searches the current tree. The server\nrefuses a revision search when the workspace has no version-control repository."
          },
          "target": {
            "$ref": "#/$defs/SearchParamsTarget",
            "default": "all",
            "description": "Which entity kinds may be returned - a kind selector, never the text to search for;\nthat is `query`. Omitted, every kind may match."
          },
          "traversal": {
            "anyOf": [
              {
                "$ref": "#/$defs/SearchTraversal"
              },
              {
                "type": "null"
              }
            ],
            "description": "A bounded relationship walk, standing alone or beside `query`. A symbol the walk\nreaches becomes a hit tagged `relationship`; one also matched lexically keeps its\nlexical score and gains the walk's path. `target: \"file\"` never carries a walked hit,\nsince a traversal only reaches symbols. With no `query`, `relevance` orders hits by\nascending `distance`, then identity. Never combines with `rev`: the relationship\ngraph serves the current tree alone."
          }
        },
        "rift:since": "v0.0.6",
        "type": "object"
      },
      "name": "search",
      "output_schema": {
        "$defs": {
          "Digest": {
            "description": "The first eight lowercase hex characters of a SHA-256, the same witness convention `NodeId`\nuses. The full digest is computed and compared internally; only this short form ever\nreaches the wire.",
            "examples": [
              "3f9a1c2e"
            ],
            "pattern": "^[0-9a-f]{8}$",
            "type": "string"
          },
          "Documentation": {
            "additionalProperties": false,
            "description": "One block of documentation attached to a declaration, in the markup it was written in.",
            "properties": {
              "format": {
                "$ref": "#/$defs/DocumentationFormat",
                "description": "Markup the comment text uses."
              },
              "text": {
                "description": "The body of the comment, with the comment syntax stripped.",
                "type": "string"
              }
            },
            "required": [
              "format",
              "text"
            ],
            "type": "object"
          },
          "DocumentationFormat": {
            "description": "Which markup the text is written in, since whoever displays a doc comment is the one that\nrenders it.",
            "oneOf": [
              {
                "const": "plain",
                "description": "Plain text with no markup to render.",
                "type": "string"
              },
              {
                "const": "markdown",
                "description": "Markdown as authored in the source.",
                "type": "string"
              }
            ]
          },
          "Duration": {
            "description": "A duration: an integer magnitude with a required unit suffix `ms`, `s`, `m`, `h`, or `d`.",
            "pattern": "^(?:0|[1-9][0-9]*)(?:ms|s|m|h|d)$",
            "type": "string"
          },
          "ExactKind": {
            "description": "A provider-local kind preserving the construct name used by that language implementation.",
            "pattern": "^[A-Za-z][A-Za-z0-9._-]*$",
            "type": "string"
          },
          "ExtensionValue": {
            "additionalProperties": false,
            "description": "Versioned extension value. data is validated against the schema advertised for its key\nand version.",
            "properties": {
              "data": {
                "description": "The value itself, shaped by whatever that key and version advertise. Rift carries it\nand never interprets it."
              },
              "version": {
                "description": "Which version of the key's advertised schema shaped `data`. A consumer skips a value\nwhose version it does not implement.",
                "format": "uint64",
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "version",
              "data"
            ],
            "type": "object"
          },
          "Extensions": {
            "additionalProperties": false,
            "description": "Facts a provider carries that the model has no field for, under a reverse-domain key.\nKeys and values use RFC 8785 canonical JSON. Consumers skip entries they do not\nimplement.",
            "patternProperties": {
              "^[a-z0-9]+(?:[.-][a-z0-9]+)+\\.[A-Za-z][A-Za-z0-9_-]*$": {
                "$ref": "#/$defs/ExtensionValue"
              }
            },
            "type": "object"
          },
          "FileId": {
            "description": "Identity of one file in the tree a request targets. The path after `rift://file/` is a\n`ProjectPath` in canonical percent-encoding. The server re-validates the decoded path\nwherever a `FileId` arrives, so the `ProjectPath` exclusions hold for every consumer,\nwhatever schema its implementation generated from.",
            "examples": [
              "rift://file/src/lib.rs"
            ],
            "maxLength": 8192,
            "minLength": 13,
            "pattern": "^rift://file/(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "GraphHop": {
            "additionalProperties": false,
            "description": "One auditable step in a search traversal. `relationship` retains source-node evidence and\nderivation; `direction` records how the walk followed it.",
            "properties": {
              "direction": {
                "$ref": "#/$defs/HopDirection",
                "description": "How the walk followed the directed relationship."
              },
              "relationship": {
                "$ref": "#/$defs/Relationship",
                "description": "The relationship followed for this step."
              }
            },
            "required": [
              "relationship",
              "direction"
            ],
            "type": "object"
          },
          "HopDirection": {
            "description": "How one path step followed its directed relationship.",
            "oneOf": [
              {
                "const": "outgoing",
                "description": "The walk followed the edge from source to target.",
                "type": "string"
              },
              {
                "const": "incoming",
                "description": "The walk followed the edge against its direction, from target to source.",
                "type": "string"
              }
            ]
          },
          "Language": {
            "description": "A language name and its optional dialect, joined by `:`. `sql` and `sql:postgresql` are two languages with two symbol spaces.",
            "examples": [
              "rust"
            ],
            "maxLength": 129,
            "pattern": "^[a-z][a-z0-9._-]*(?::[a-z][a-z0-9._-]*)?$",
            "type": "string"
          },
          "MatchedField": {
            "description": "Which indexed field produced a search hit.",
            "oneOf": [
              {
                "const": "name",
                "description": "The declaration's name matched.",
                "type": "string"
              },
              {
                "const": "signature",
                "description": "A rendered signature matched.",
                "type": "string"
              },
              {
                "const": "documentation",
                "description": "An attached doc comment matched.",
                "type": "string"
              },
              {
                "const": "content",
                "description": "The file's contents matched.",
                "type": "string"
              },
              {
                "const": "ranked",
                "description": "The ranked lane placed the hit; no field match proves the query's literal bytes\nappear. The lane ranks whether or not `[search.semantic]` is enabled, so this member\nnames the lane rather than the tier that may or may not have contributed to it.",
                "type": "string"
              },
              {
                "const": "path",
                "description": "The project-relative path matched.",
                "type": "string"
              },
              {
                "const": "relationship",
                "description": "A relationship traversal reached the hit.",
                "type": "string"
              }
            ]
          },
          "NodeId": {
            "description": "Identity of one syntax-tree node. The byte range locates the node in the tree the request\ntargets; the fragment after `#` is its witness - the first eight lowercase hex characters\nof the SHA-256 of the node's source bytes. Resolution refuses a range that does not land\non an indexed node's own bytes, and otherwise recomputes the witness, refusing with a\nfailed `source_unchanged` precondition when the bytes have drifted - so an address read\nfrom a stale listing, or one naming no real node, cannot splice into the wrong code.",
            "examples": [
              "rift://node/rust/lib.rs@220-268#3f9a1c2e"
            ],
            "maxLength": 8192,
            "minLength": 27,
            "pattern": "^rift://node/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/-]|%[0-9A-F]{2}){1,1000}@\\d+-\\d+#[0-9a-f]{8}$",
            "type": "string"
          },
          "PackageIdentity": {
            "additionalProperties": false,
            "description": "One package as its package manager identifies it.",
            "properties": {
              "manager": {
                "description": "Package manager or ecosystem name.",
                "maxLength": 128,
                "type": "string"
              },
              "name": {
                "description": "Package name in that ecosystem.",
                "maxLength": 4096,
                "type": "string"
              },
              "version": {
                "description": "Resolved package version.",
                "maxLength": 4096,
                "type": "string"
              }
            },
            "required": [
              "manager",
              "name",
              "version"
            ],
            "type": "object"
          },
          "Pagination": {
            "additionalProperties": false,
            "description": "Where one page sits in the full result set the request's `limit` divides.",
            "properties": {
              "page_index": {
                "description": "The zero-based page this answer serves.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "total_pages": {
                "description": "The page count of the full result set under the request's `limit`, computed within\nthe server's result bound. Zero when the result set is empty.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "page_index",
              "total_pages"
            ],
            "type": "object"
          },
          "Parameter": {
            "additionalProperties": false,
            "description": "One parameter of a `Signature`: what it is called, the types bound to it, and how a call\nmay pass it. A receiver is one of these too, held in its own field because it has no\nposition in the parameter list.",
            "properties": {
              "default": {
                "description": "The default value as written in the source. Absent where there is none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Parameter facts the model has no field for, namespaced by the provider that emitted\nthem. Absent when empty."
              },
              "name": {
                "description": "What the parameter is called. Absent where the language allows an unnamed one, as\na positional parameter in a function type.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "node": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/NodeId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Where this parameter is written in the source."
              },
              "optional": {
                "description": "Whether a call may leave it out.",
                "type": "boolean"
              },
              "types": {
                "default": [],
                "description": "What it accepts, absent when empty. An array because a declared type and an\ninferred one are separate bindings.",
                "items": {
                  "$ref": "#/$defs/TypeBinding"
                },
                "type": "array"
              },
              "variadic": {
                "description": "Whether it absorbs the arguments that follow - `*args`, `...rest`.",
                "type": "boolean"
              }
            },
            "required": [
              "optional",
              "variadic"
            ],
            "type": "object"
          },
          "ProjectPath": {
            "description": "One path below the workspace root, using forward slashes and UTF-8 in Unicode NFC - Rift\nnormalizes what it emits and what it accepts, and compares byte-for-byte. The empty path\nnames the root itself. Absolute paths, backslashes, control characters, empty segments,\nand `.` or `..` segments are refused before the filesystem is touched. The limit is 1000\nUTF-8 bytes, not characters. A workspace holding two entries whose NFC forms are equal\nfails the read that touches them with `content_unavailable`.",
            "examples": [
              "src/lib.rs"
            ],
            "maxLength": 1000,
            "pattern": "^(?:$|(?!\\.rift(?:/|$))(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001F\\u007F/]+(?:/[^\\\\\\u0000-\\u001F\\u007F/]+)*)$",
            "type": "string"
          },
          "ReadWarning": {
            "description": "One warning attached to a read result. The answer stands; the warning carries evidence\nof a condition the caller weighs before relying on it.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "The answer was computed from an index that lags the tree the read captured. Facts\nderived from the index may miss the newest writes; the digests state which two\ntrees disagree.",
                "properties": {
                  "captured_tree_revision": {
                    "$ref": "#/$defs/Digest",
                    "description": "Tree revision the read captured."
                  },
                  "code": {
                    "const": "stale_index",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "index_tree_revision": {
                    "$ref": "#/$defs/Digest",
                    "description": "Tree revision the published index covers."
                  }
                },
                "required": [
                  "code",
                  "index_tree_revision",
                  "captured_tree_revision",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The semantic ranking is still being built, so the answer was ranked lexically alone.\n`prepared` and `total` state how many declarations already carry a vector, and\n`ready_in` is derived from workspace size and embedding progress.",
                "properties": {
                  "code": {
                    "const": "semantic_index_preparing",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "prepared": {
                    "description": "Declarations that already carry a vector.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "ready_in": {
                    "$ref": "#/$defs/Duration",
                    "description": "Estimated wait before the semantic ranking joins an answer, not a measurement\nof this machine. A caller may report it and must not schedule against it."
                  },
                  "total": {
                    "description": "Declarations the published set holds.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "code",
                  "prepared",
                  "total",
                  "ready_in",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The semantic ranking will not answer for the life of this server, so every answer\nis ranked lexically alone. No retry is coming: fix the `[search.semantic]`\nconfiguration and start the server again.",
                "properties": {
                  "code": {
                    "const": "semantic_ranking_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "The full-text tier is not answering, so the answer came from identifier matching\nalone: a query phrased as prose finds nothing. The tier failed to load or holds no\nindexed tree, and will not answer without operator action.",
                "properties": {
                  "code": {
                    "const": "lexical_ranking_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A claimed file's bytes are not valid UTF-8, so the index omits it: it answers no\nsearch or lookup, and addressing it directly still refuses `content_unavailable`.\nEvery other file in the workspace stays available.",
                "properties": {
                  "code": {
                    "const": "source_unavailable",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "unit": {
                    "$ref": "#/$defs/FileId",
                    "description": "The file whose bytes could not be read."
                  }
                },
                "required": [
                  "code",
                  "unit",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Contributions selected for one symbol's presentation disagree on at least one\nfield. The answer carries what normalization selected.",
                "properties": {
                  "code": {
                    "const": "symbol_disagreement",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "providers": {
                    "description": "Providers whose Contribution carries a differing value for at least one\npresentation field, sorted and deduplicated.",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "symbol": {
                    "$ref": "#/$defs/SymbolId",
                    "description": "The symbol whose presentation facts disagree."
                  }
                },
                "required": [
                  "code",
                  "symbol",
                  "providers",
                  "detail"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A traversal walk stopped at its node bound before exhausting the reachable graph,\nso hits reachable beyond the bound are missing from this answer. Narrow the walk -\na tighter `facets` list, a smaller `depth`, or a less-connected seed - to fit it\nunder the bound.",
                "properties": {
                  "code": {
                    "const": "traversal_truncated",
                    "type": "string"
                  },
                  "detail": {
                    "description": "Why the warning was raised - prose for a reader; nothing keys on it.",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "visited": {
                    "description": "Symbols the walk visited before it stopped, equal to the bound it hit.",
                    "format": "uint64",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "code",
                  "visited",
                  "detail"
                ],
                "type": "object"
              }
            ]
          },
          "Relationship": {
            "additionalProperties": false,
            "description": "One directed edge between two symbols. Its evidence is the nodes it was read from, and\nits derivation is how much the provider knew when it was read.",
            "properties": {
              "confidence": {
                "description": "How likely a `heuristic` edge is to hold, from 0 to 1. Absent for any other\nderivation.",
                "format": "double",
                "maximum": 1,
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "derivation": {
                "$ref": "#/$defs/RelationshipDerivation",
                "description": "How this edge was established."
              },
              "evidence": {
                "default": [],
                "description": "The nodes this edge was read from. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/NodeId"
                },
                "type": "array"
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Edge facts the model has no field for, namespaced by the provider that emitted them.\nAbsent when empty."
              },
              "facets": {
                "description": "Portable classification, so a query for `imports` finds local kinds such as `import`\nand `use` alike.",
                "items": {
                  "$ref": "#/$defs/RelationshipFacet"
                },
                "minItems": 1,
                "type": "array"
              },
              "from": {
                "$ref": "#/$defs/SymbolId",
                "description": "The symbol the edge starts at."
              },
              "kind": {
                "$ref": "#/$defs/ExactKind",
                "description": "What the edge is in this provider's vocabulary, such as `import`, `use`, or\n`implements`."
              },
              "to": {
                "$ref": "#/$defs/SymbolId",
                "description": "The symbol the edge points at. One Rift cannot read carries the `external` origin;\nthe edge is the same either way."
              }
            },
            "required": [
              "from",
              "kind",
              "facets",
              "to",
              "derivation"
            ],
            "type": "object"
          },
          "RelationshipDerivation": {
            "description": "How this edge was established. Every edge reaches Rift from a provider, and this field\nrecords how much the provider knew: `syntax` and `heuristic` need another check before\nrewriting.",
            "oneOf": [
              {
                "const": "resolution",
                "description": "The provider resolved the edge semantically, so a consumer may act on it directly.",
                "type": "string"
              },
              {
                "const": "syntax",
                "description": "The edge was read from syntax alone, without semantic resolution.",
                "type": "string"
              },
              {
                "const": "heuristic",
                "description": "The edge is a guess, qualified by `confidence`.",
                "type": "string"
              }
            ]
          },
          "RelationshipFacet": {
            "description": "One portable category an edge falls into. The local kinds `import` and `use` can share\nthe `imports` facet, which lets one query cross languages.",
            "oneOf": [
              {
                "const": "contains",
                "description": "The source contains the target within its scope.",
                "type": "string"
              },
              {
                "const": "declares",
                "description": "The source declares the target.",
                "type": "string"
              },
              {
                "const": "augments",
                "description": "The source adds to a declaration made elsewhere.",
                "type": "string"
              },
              {
                "const": "references",
                "description": "The source mentions the target.",
                "type": "string"
              },
              {
                "const": "calls",
                "description": "The source invokes the target.",
                "type": "string"
              },
              {
                "const": "constructs",
                "description": "The source creates an instance of the target.",
                "type": "string"
              },
              {
                "const": "reads",
                "description": "The source reads the target's value.",
                "type": "string"
              },
              {
                "const": "writes",
                "description": "The source assigns to the target.",
                "type": "string"
              },
              {
                "const": "imports",
                "description": "The source brings the target into scope.",
                "type": "string"
              },
              {
                "const": "exports",
                "description": "The source exposes the target outside its unit.",
                "type": "string"
              },
              {
                "const": "extends",
                "description": "The source inherits from the target.",
                "type": "string"
              },
              {
                "const": "implements",
                "description": "The source fulfils the target's interface.",
                "type": "string"
              },
              {
                "const": "has_type",
                "description": "The source is typed by the target.",
                "type": "string"
              },
              {
                "const": "overrides",
                "description": "The source replaces the target inherited from a supertype.",
                "type": "string"
              },
              {
                "const": "aliases",
                "description": "The source is another name for the target.",
                "type": "string"
              },
              {
                "const": "generates",
                "description": "The source produces the target as generated code.",
                "type": "string"
              },
              {
                "const": "depends_on",
                "description": "The source requires the target to build or run.",
                "type": "string"
              },
              {
                "const": "annotated_by",
                "description": "The source carries the target as an annotation.",
                "type": "string"
              },
              {
                "const": "throws",
                "description": "The source can raise the target.",
                "type": "string"
              },
              {
                "const": "catches",
                "description": "The source handles the target when raised.",
                "type": "string"
              },
              {
                "const": "bounded_by",
                "description": "The source's type parameter is constrained by the target.",
                "type": "string"
              },
              {
                "const": "instantiates",
                "description": "The source applies concrete arguments to the generic target.",
                "type": "string"
              },
              {
                "const": "specializes",
                "description": "The source is a specialization of the generic target.",
                "type": "string"
              },
              {
                "const": "overloads",
                "description": "The source and target are separately dispatched forms of one name.",
                "type": "string"
              },
              {
                "const": "mixes_in",
                "description": "The source incorporates the target as a mixin.",
                "type": "string"
              },
              {
                "const": "embeds",
                "description": "The source embeds the target within its own definition.",
                "type": "string"
              },
              {
                "const": "tests",
                "description": "The source exercises the target as a test.",
                "type": "string"
              },
              {
                "const": "configures",
                "description": "The source supplies configuration for the target.",
                "type": "string"
              },
              {
                "const": "binds",
                "description": "The source binds a name or value to the target.",
                "type": "string"
              }
            ]
          },
          "SearchHit": {
            "additionalProperties": false,
            "allOf": [
              {
                "oneOf": [
                  {
                    "required": [
                      "range",
                      "line"
                    ]
                  },
                  {
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "range"
                          ]
                        },
                        {
                          "required": [
                            "line"
                          ]
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "if": {
                  "properties": {
                    "hit": {
                      "properties": {
                        "target": {
                          "enum": [
                            "node",
                            "file"
                          ]
                        }
                      }
                    }
                  }
                },
                "then": {
                  "required": [
                    "range",
                    "line"
                  ]
                }
              }
            ],
            "description": "One search hit. Its file, node, or symbol payload carries the canonical identity.\nDependency and synthetic symbols can have no readable source; node and file hits cannot.",
            "properties": {
              "distance": {
                "description": "Number of edges in `traversal_path`. It is present exactly when `traversal_path` is\npresent and equals its length.",
                "format": "uint64",
                "maximum": 2,
                "minimum": 1,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "hit": {
                "$ref": "#/$defs/SearchHitTarget",
                "description": "What was found. A symbol, a node, or a file - whichever `target` allowed."
              },
              "line": {
                "description": "The 1-based source line where the hit begins, or absent with `range`.",
                "format": "uint64",
                "minimum": 1,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "matched_by": {
                "default": [],
                "description": "Which indexed fields produced the match. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/MatchedField"
                },
                "type": "array"
              },
              "path": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ProjectPath"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Project-relative path of the hit, where the location is a project path. Absent for\na hit whose only location is a dependency or standard-library source unit."
              },
              "range": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/TextRange"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Byte range of the hit within `path`. Absent for a symbol whose source is\nunavailable or synthetic."
              },
              "score": {
                "description": "How well this hit matched, used to order the page and merge duplicate hits.\nPresent on the wire when `include` names `score`; comparable within one answer\nand nowhere else.",
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "source": {
                "description": "The source text around the hit, requested with `include: [\"source\"]`. Covers the\nhit's `range`; a caller that needs the range already has it there.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "traversal_path": {
                "description": "Shortest relationship path to this hit, present when a traversal reached it,\nincluding a hit also matched lexically.",
                "items": {
                  "$ref": "#/$defs/GraphHop"
                },
                "maxItems": 2,
                "minItems": 1,
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "required": [
              "hit"
            ],
            "type": "object"
          },
          "SearchHitTarget": {
            "description": "What a search hit is. Tagged, so the payload correlation survives code generation.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "A symbol hit: the declaration a provider resolved.",
                "properties": {
                  "symbol": {
                    "$ref": "#/$defs/Symbol",
                    "description": "The declaration that matched."
                  },
                  "target": {
                    "const": "symbol",
                    "type": "string"
                  }
                },
                "required": [
                  "target",
                  "symbol"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A node hit: one place in a syntax tree, without its enclosing symbol record.",
                "properties": {
                  "node": {
                    "$ref": "#/$defs/NodeId",
                    "description": "The syntax-tree node's identity, the full edit address `replace_node` accepts."
                  },
                  "target": {
                    "const": "node",
                    "type": "string"
                  }
                },
                "required": [
                  "target",
                  "node"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "A file hit: one entry of the tree, whether or not any provider reads it.",
                "properties": {
                  "languages": {
                    "default": [],
                    "description": "Distinct `Language` values that read this file, sorted by name and dialect.\nAbsent when empty.",
                    "items": {
                      "$ref": "#/$defs/Language"
                    },
                    "type": "array"
                  },
                  "size": {
                    "description": "Size in bytes.",
                    "format": "uint64",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "target": {
                    "const": "file",
                    "type": "string"
                  }
                },
                "required": [
                  "target",
                  "size"
                ],
                "type": "object"
              }
            ]
          },
          "Signature": {
            "additionalProperties": false,
            "description": "One callable form of a symbol: the text it renders as, the symbols that text points at,\nand its structure. Overloads are separate entries.",
            "properties": {
              "display": {
                "description": "The signature as a reader sees it, in the language's own syntax.",
                "type": "string"
              },
              "effects": {
                "default": [],
                "description": "Effect keywords the declaration carries, in the language's own words: `async`,\n`unsafe`, `pure`. The spelling is preserved and never mapped onto a portable\nmeaning; absent when empty.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Signature facts the model has no field for, namespaced by the provider that emitted\nthem. Absent when empty."
              },
              "language": {
                "$ref": "#/$defs/Language",
                "description": "The language whose syntax `display` is written in."
              },
              "links": {
                "default": [],
                "description": "Symbols named inside `display`, each with the byte range of `display` that names it,\nso a renderer can turn the rendered text into links. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/SignatureLink"
                },
                "type": "array"
              },
              "parameters": {
                "default": [],
                "description": "Declared parameters, in source order. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Parameter"
                },
                "type": "array"
              },
              "receiver": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/Parameter"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The implicit first parameter - `self`, `this`. Absent for a free function, and for\nlanguages that have no such thing."
              },
              "returns": {
                "default": [],
                "description": "What the call yields, absent when empty. An array because a language may return\nseveral values, and because a declared and an inferred return are separate\nbindings.",
                "items": {
                  "$ref": "#/$defs/TypeBinding"
                },
                "type": "array"
              },
              "throws": {
                "default": [],
                "description": "Types this form declares it can raise. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/TypeExpression"
                },
                "type": "array"
              },
              "type_parameters": {
                "default": [],
                "description": "The generic parameters this form declares, each as the symbol that declares it.\nAbsent when empty.",
                "items": {
                  "$ref": "#/$defs/SymbolId"
                },
                "type": "array"
              }
            },
            "required": [
              "display",
              "language"
            ],
            "type": "object"
          },
          "SignatureLink": {
            "additionalProperties": false,
            "description": "One symbol named inside a rendered signature, with the byte range of that rendering which\nnames it.",
            "properties": {
              "range": {
                "$ref": "#/$defs/TextRange",
                "description": "Offsets into the rendered string in `Signature.display`."
              },
              "symbol": {
                "$ref": "#/$defs/SymbolId",
                "description": "The symbol that stretch of text names."
              }
            },
            "required": [
              "range",
              "symbol"
            ],
            "type": "object"
          },
          "SourceKind": {
            "description": "How source or a declaration came to exist.",
            "oneOf": [
              {
                "const": "authored",
                "description": "A person wrote it.",
                "type": "string"
              },
              {
                "const": "generated",
                "description": "A tool produced it from other source.",
                "type": "string"
              },
              {
                "const": "synthetic",
                "description": "The provider minted it without any source text.",
                "type": "string"
              }
            ]
          },
          "SourceLocationKind": {
            "description": "Which of the four places a declaration's source belongs, on `SymbolOrigin`. Package\nownership is the separate `package` field: a `project` declaration can carry one too,\nand `dependency` always does.",
            "oneOf": [
              {
                "const": "project",
                "description": "Owned by the current workspace.",
                "type": "string"
              },
              {
                "const": "dependency",
                "description": "Owned by one resolved dependency.",
                "type": "string"
              },
              {
                "const": "stdlib",
                "description": "Installed with the language toolchain.",
                "type": "string"
              },
              {
                "const": "external",
                "description": "Outside the project, dependency graph, and standard library.",
                "type": "string"
              }
            ]
          },
          "Symbol": {
            "additionalProperties": false,
            "description": "Readable Symbol assembled from normalized Contributions. Source structure lives in Node\nand is connected through Relationship.",
            "properties": {
              "container": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The symbol this one belongs to - the class that owns a method, the module that owns\na function. Ownership is not lexical: a Go method sits beside its type and a Rust\nmethod inside an `impl` block, both naming the type here; absent at the top level."
              },
              "document_local": {
                "default": false,
                "description": "Whether language semantics confine this symbol to the document that declares it. The\nprovider classifies locality from its language model; absent when `false`.",
                "type": "boolean"
              },
              "documentation": {
                "default": [],
                "description": "Doc comments attached to the declaration, with the markup format they were written\nin. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/Documentation"
                },
                "type": "array"
              },
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Language-specific facts with no portable equivalent, namespaced by the provider that\nemitted them. Absent when empty."
              },
              "facets": {
                "default": [],
                "description": "Portable classification for cross-language queries, absent when empty. The local\nkinds `trait` and `interface` can both carry the `type` facet.",
                "items": {
                  "$ref": "#/$defs/SymbolFacet"
                },
                "type": "array"
              },
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Unique identifier of this Symbol across the whole workspace. Absent for an\nunestablished symbol: no accepted evidence, or more than one, established its\nidentity."
              },
              "kind": {
                "$ref": "#/$defs/ExactKind",
                "description": "What this symbol is in the provider's vocabulary, such as `trait`, `function`, or\n`table`."
              },
              "language": {
                "$ref": "#/$defs/Language",
                "description": "The language this symbol belongs to."
              },
              "modifiers": {
                "default": [],
                "description": "Language keywords qualifying the declaration: `export`, `async`, `const`. Absent\nwhen empty.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "name": {
                "description": "The human-readable name, as written in the source: `parseConfig`. Rendered\nsignatures live in `signatures`.",
                "maxLength": 4096,
                "type": "string"
              },
              "origin": {
                "$ref": "#/$defs/SymbolOrigin",
                "default": {
                  "location": "project",
                  "source_kind": "authored"
                },
                "description": "Where the declaration belongs and how it was produced. Absent when it says a\nproject declaration, authored, with no package - the common case."
              },
              "signatures": {
                "default": [],
                "description": "One entry per callable form, absent when empty. Where the language dispatches\noverloads separately they are separate symbols joined by the `overloads` edge;\nseveral entries here are alternative forms of one dispatch target, as\n`typing.overload` writes them.",
                "items": {
                  "$ref": "#/$defs/Signature"
                },
                "type": "array"
              },
              "types": {
                "default": [],
                "description": "The types this symbol carries, each tagged with the role it plays: a return type, a\nfield type, a bound. Absent when empty.",
                "items": {
                  "$ref": "#/$defs/TypeBinding"
                },
                "type": "array"
              },
              "visibility": {
                "description": "How widely the symbol is visible, in the language's own terms - `public`, `private`,\n`pub(crate)`. Absent where the language has no such concept.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "language",
              "name",
              "kind"
            ],
            "type": "object"
          },
          "SymbolFacet": {
            "description": "One portable category a symbol falls into. Kinds are language-specific; facets are\nshared, so a filter written once applies to every served language.",
            "oneOf": [
              {
                "const": "namespace",
                "description": "A named scope that groups declarations.",
                "type": "string"
              },
              {
                "const": "module",
                "description": "A compilation or import unit.",
                "type": "string"
              },
              {
                "const": "type",
                "description": "Names a type.",
                "type": "string"
              },
              {
                "const": "value",
                "description": "Holds a runtime value.",
                "type": "string"
              },
              {
                "const": "callable",
                "description": "Can be invoked.",
                "type": "string"
              },
              {
                "const": "member",
                "description": "Belongs to a containing type.",
                "type": "string"
              },
              {
                "const": "member_container",
                "description": "Owns members of its own.",
                "type": "string"
              },
              {
                "const": "parameter",
                "description": "A declared input of a callable.",
                "type": "string"
              },
              {
                "const": "type_parameter",
                "description": "A generic parameter a declaration abstracts over.",
                "type": "string"
              },
              {
                "const": "constructible",
                "description": "Instances of it can be created.",
                "type": "string"
              },
              {
                "const": "extensible",
                "description": "Other types can inherit from it.",
                "type": "string"
              },
              {
                "const": "implementable",
                "description": "Other types can fulfil it.",
                "type": "string"
              },
              {
                "const": "macro",
                "description": "Expands at compile time.",
                "type": "string"
              },
              {
                "const": "test",
                "description": "Exercises other code as a test.",
                "type": "string"
              },
              {
                "const": "annotation",
                "description": "Decorates other declarations.",
                "type": "string"
              },
              {
                "const": "extension",
                "description": "Adds members to a type declared elsewhere.",
                "type": "string"
              },
              {
                "const": "variant",
                "description": "One case of an enumeration.",
                "type": "string"
              },
              {
                "const": "enumeration",
                "description": "A closed set of variants.",
                "type": "string"
              },
              {
                "const": "alias",
                "description": "Another name for an existing symbol.",
                "type": "string"
              },
              {
                "const": "property",
                "description": "A member accessed like a field but backed by code.",
                "type": "string"
              },
              {
                "const": "abstract",
                "description": "Declared without a complete implementation.",
                "type": "string"
              },
              {
                "const": "constructor",
                "description": "Creates instances of its container.",
                "type": "string"
              },
              {
                "const": "static",
                "description": "Belongs to the type rather than an instance.",
                "type": "string"
              },
              {
                "const": "mutable",
                "description": "Its value can change after initialization.",
                "type": "string"
              },
              {
                "const": "public",
                "description": "Visible outside its declaring scope.",
                "type": "string"
              },
              {
                "const": "deprecated",
                "description": "Marked as discouraged for new use.",
                "type": "string"
              },
              {
                "const": "entrypoint",
                "description": "Where execution starts.",
                "type": "string"
              },
              {
                "const": "operator",
                "description": "Invoked through operator syntax.",
                "type": "string"
              },
              {
                "const": "async",
                "description": "Runs asynchronously.",
                "type": "string"
              },
              {
                "const": "generator",
                "description": "Yields a sequence of values over time.",
                "type": "string"
              }
            ]
          },
          "SymbolId": {
            "description": "Identity of one symbol. The name after the language is the provider's stable qualified\nname for the declaration; where the language derives module identity from the file path,\nas TypeScript does, that path is part of the name. A `~N` suffix separates declarations\nthe qualified name alone cannot, such as overloads that dispatch separately. A move can\nchange the identity when the language includes module path in that qualified name.",
            "examples": [
              "rift://symbol/rust/crates/rift-server/src/read.rs/ReadService"
            ],
            "maxLength": 8192,
            "minLength": 17,
            "pattern": "^rift://symbol/[A-Za-z][A-Za-z0-9._-]*(?::[A-Za-z][A-Za-z0-9._-]*)?/(?:[A-Za-z0-9._~!$&'()*+,;=:/@-]|%[0-9A-F]{2}){1,1000}$",
            "type": "string"
          },
          "SymbolOrigin": {
            "additionalProperties": false,
            "description": "Where a symbol belongs and how its declaration came to exist. Source location and\ngeneration are separate: generated code can belong to the project or to a dependency.\nAbsent from `Symbol` entirely when it says a project declaration, authored, with no\npackage.",
            "properties": {
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SourceLocationKind"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Which of the four places the declaration belongs. Absent exactly when\n`source_kind` is `synthetic`."
              },
              "package": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/PackageIdentity"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The package that owns the declaration: present for `dependency`, and optionally\nfor `project`. Absent for `stdlib`, `external`, and a synthetic declaration."
              },
              "source_kind": {
                "$ref": "#/$defs/SourceKind",
                "description": "Whether the declaration is authored, generated, or synthetic."
              }
            },
            "required": [
              "source_kind"
            ],
            "type": "object"
          },
          "TextRange": {
            "additionalProperties": false,
            "description": "Half-open UTF-8 byte offsets over authoritative UTF-8 source. Every provider converts\nfrom whatever its toolchain counts in at its own boundary, so two toolchains' column\nnumbers arrive here on the same scale. No JSON Schema keyword can tie one field to\nanother, so that `end` is never below `start` is asserted by the surface\nvalidation tests instead.",
            "properties": {
              "end": {
                "description": "One past the last byte. Equal to `start` for an empty range, which is how a position\nbetween two bytes is spelled.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "start": {
                "description": "First byte of the range, counted from the start of the file.",
                "format": "uint64",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          },
          "TypeBinding": {
            "additionalProperties": false,
            "description": "One type a symbol carries, together with the role it plays for that symbol.",
            "properties": {
              "origin": {
                "$ref": "#/$defs/TypeBindingOrigin",
                "description": "Where the type fact came from."
              },
              "role": {
                "$ref": "#/$defs/TypeBindingRole",
                "description": "The role this type plays for the symbol."
              },
              "type": {
                "$ref": "#/$defs/TypeExpression",
                "description": "The type itself."
              }
            },
            "required": [
              "role",
              "origin",
              "type"
            ],
            "type": "object"
          },
          "TypeBindingOrigin": {
            "description": "Where the type fact came from. A declared type and an inferred one can both be present\nand disagree, which is the interesting case.",
            "oneOf": [
              {
                "const": "declared",
                "description": "Written in the source by the author.",
                "type": "string"
              },
              {
                "const": "inferred",
                "description": "Worked out by the provider from usage.",
                "type": "string"
              },
              {
                "const": "expected",
                "description": "Required by the surrounding context.",
                "type": "string"
              }
            ]
          },
          "TypeBindingRole": {
            "description": "What this type is to the symbol that carries it.",
            "oneOf": [
              {
                "const": "receiver",
                "description": "The type of the implicit first parameter.",
                "type": "string"
              },
              {
                "const": "parameter",
                "description": "The type a parameter accepts.",
                "type": "string"
              },
              {
                "const": "return",
                "description": "The type a call yields.",
                "type": "string"
              },
              {
                "const": "field",
                "description": "The type a field holds.",
                "type": "string"
              },
              {
                "const": "bound",
                "description": "A constraint on a type parameter.",
                "type": "string"
              },
              {
                "const": "element",
                "description": "The type of a collection's entries.",
                "type": "string"
              },
              {
                "const": "key",
                "description": "The type a map is indexed by.",
                "type": "string"
              },
              {
                "const": "error",
                "description": "The type of the failure a fallible result carries.",
                "type": "string"
              },
              {
                "const": "underlying",
                "description": "The type an alias or wrapper stands for.",
                "type": "string"
              },
              {
                "const": "yielded",
                "description": "The type a generator produces per step.",
                "type": "string"
              },
              {
                "const": "awaited",
                "description": "The type awaiting the value resolves to.",
                "type": "string"
              },
              {
                "const": "discriminant",
                "description": "The type that tags which variant a value holds.",
                "type": "string"
              }
            ]
          },
          "TypeExpression": {
            "additionalProperties": false,
            "description": "How a type is written in the source, plus the symbol that declares it when one does. A\ntype with a declaration resolves to that symbol; a structural type - `string | null`,\n`{ a: string }` - has the spelling and nothing to resolve to.",
            "properties": {
              "extensions": {
                "$ref": "#/$defs/Extensions",
                "default": {},
                "description": "Type facts the model has no field for, namespaced by the provider that emitted them.\nAbsent when empty."
              },
              "language": {
                "$ref": "#/$defs/Language",
                "description": "The language the spelling is in, and so which provider produced it."
              },
              "resolved": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/SymbolId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The symbol that declares this type, where one does. Absent for a structural type,\nwhich has a spelling and nothing to open."
              },
              "source": {
                "description": "The type as it is written: `Optional[Config]`, `&mut [u8]`, `string | null`.",
                "type": "string"
              }
            },
            "required": [
              "language",
              "source"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "examples": [
          {
            "pagination": {
              "page_index": 0,
              "total_pages": 3
            },
            "results": [
              {
                "hit": {
                  "symbol": {
                    "documentation": [
                      {
                        "format": "markdown",
                        "text": "Loads the workspace configuration from `rift.toml`."
                      }
                    ],
                    "facets": [
                      "value",
                      "callable",
                      "public"
                    ],
                    "id": "rift://symbol/rust/src/config.rs/load_config",
                    "kind": "function",
                    "language": "rust",
                    "name": "load_config",
                    "signatures": [
                      {
                        "display": "pub fn load_config(path: &Path) -> Result<Config, ConfigError>",
                        "language": "rust",
                        "links": [
                          {
                            "range": {
                              "end": 48,
                              "start": 42
                            },
                            "symbol": "rift://symbol/rust/src/config.rs/Config"
                          }
                        ],
                        "parameters": [
                          {
                            "name": "path",
                            "optional": false,
                            "types": [
                              {
                                "origin": "declared",
                                "role": "parameter",
                                "type": {
                                  "language": "rust",
                                  "source": "&Path"
                                }
                              }
                            ],
                            "variadic": false
                          }
                        ],
                        "returns": [
                          {
                            "origin": "declared",
                            "role": "return",
                            "type": {
                              "language": "rust",
                              "source": "Result<Config, ConfigError>"
                            }
                          }
                        ]
                      }
                    ],
                    "types": [
                      {
                        "origin": "declared",
                        "role": "return",
                        "type": {
                          "language": "rust",
                          "source": "Result<Config, ConfigError>"
                        }
                      }
                    ],
                    "visibility": "pub"
                  },
                  "target": "symbol"
                },
                "line": 10,
                "matched_by": [
                  "name"
                ],
                "path": "src/config.rs",
                "range": {
                  "end": 355,
                  "start": 162
                },
                "source": "/// Loads the workspace configuration from `rift.toml`.\npub fn load_config(path: &Path) -> Result<Config, ConfigError> {\n    let text = std::fs::read_to_string(path)?;\n    parse_config(&text)\n}"
              },
              {
                "hit": {
                  "languages": [
                    "rust"
                  ],
                  "size": 241,
                  "target": "file"
                },
                "line": 7,
                "matched_by": [
                  "content"
                ],
                "path": "src/lib.rs",
                "range": {
                  "end": 168,
                  "start": 121
                },
                "source": "    let config = load_config(&arguments.path)?;"
              }
            ]
          }
        ],
        "properties": {
          "pagination": {
            "$ref": "#/$defs/Pagination",
            "description": "Where this page sits in the full result set under the request's `limit`."
          },
          "results": {
            "description": "The hits on this page, in the order the request asked for.",
            "items": {
              "$ref": "#/$defs/SearchHit"
            },
            "type": "array"
          },
          "warnings": {
            "default": [],
            "description": "Warnings attached to this result. Absent when there is nothing to warn about.",
            "items": {
              "$ref": "#/$defs/ReadWarning"
            },
            "type": "array"
          }
        },
        "required": [
          "results",
          "pagination"
        ],
        "type": "object"
      }
    }
  ]
}
