{
  "schema_version": 1,
  "upstream_commit": "e920c523e3b8a0163fe498af5bf90df35ff51d25",
  "patches": {
    "0001-cmake-reserve-meshnet-patch-stack-abi-marker.patch": {
      "concern": "build-marker",
      "files": {
        "CMakeLists.txt": {
          "before": "81f23d7e70b7378511af5d01be680c03aebc2b15",
          "after": "a9afcffa68bed7cbd8fad39ad9f95ad784251234"
        },
        "cmake/meshnet-patch-stack.cmake": {
          "before": null,
          "after": "910646b4d6164831d4f8e523dd5e49ce7796994f"
        }
      },
      "api_assumptions": [
        "CMake >= 3.14 include() of a project-relative module from the top-level CMakeLists.txt",
        "add_library(<name> INTERFACE) and target_compile_definitions(... INTERFACE ...)"
      ]
    },
    "0002-dense-llama-owned-range-loading.patch": {
      "concern": "range-loading",
      "files": {
        "include/llama.h": {
          "before": "a311ac2023579376ed571a614dcac9d259692e56",
          "after": "229946ede026ef36b4c4f0355e0421b082334ee0"
        },
        "src/llama-model.cpp": {
          "before": "d87481381e46025c9c87c4af5f116015a44124c3",
          "after": "05b8b9c912716fd57061100ec5c47203f79b50ce"
        },
        "src/models/llama.cpp": {
          "before": "4bfebc8843c655e122e5f2064a791c583ad3779b",
          "after": "c3092763b82e93b596ba531a0fb01769df6f0e27"
        }
      },
      "api_assumptions": [
        "llama_model_params is an aggregate C struct initialized by llama_model_default_params()",
        "llama_model_loader::done_getting_tensors(bool partial = false) const",
        "llm_hparams::n_layer() and llama_model_base::load_tensors(llama_model_loader &)",
        "llama_model_llama::load_arch_tensors per-layer create_tensor loop and LLM_ARCH_LLAMA gate"
      ]
    },
    "0003-owned-range-filtered-state-report.patch": {
      "concern": "filtered-state",
      "files": {
        "include/llama.h": {
          "before": "229946ede026ef36b4c4f0355e0421b082334ee0",
          "after": "6fd7ad509006190a7e7dd84a3d1ac2672ad2d21d"
        },
        "src/llama-model.cpp": {
          "before": "05b8b9c912716fd57061100ec5c47203f79b50ce",
          "after": "efb290c1f3dceb868dc5e316e765767ddf0532f8"
        },
        "src/llama-model.h": {
          "before": "45b054cedf1d1e6accc7cf8aafcbae374614e64f",
          "after": "5ef7a1515a9b27858e3e5fe694a285a4a55a8bf2"
        }
      },
      "api_assumptions": [
        "llama_model::impl pimpl struct and llama_model::meshnet_range_report(out) const accessor",
        "pimpl->ctxs_bufs backend buffer map and ggml_backend_buffer_get_size",
        "llama_model_loader::use_mmap public member"
      ]
    },
    "0004-dense-boundary-io-endpoint-guard.patch": {
      "concern": "boundary-io",
      "files": {
        "include/llama.h": {
          "before": "6fd7ad509006190a7e7dd84a3d1ac2672ad2d21d",
          "after": "8a75213494cc07b20ca2d99cd21b30109e758b7b"
        },
        "src/llama-model.cpp": {
          "before": "efb290c1f3dceb868dc5e316e765767ddf0532f8",
          "after": "2ea8598ad2037920082ef88db75684283c65118c"
        },
        "src/models/llama.cpp": {
          "before": "c3092763b82e93b596ba531a0fb01769df6f0e27",
          "after": "3b6854d0c32cdb816a0b31c337767fa1a9305b24"
        }
      },
      "api_assumptions": [
        "llama_model::tensors_by_name is std::vector<std::pair<std::string, ggml_tensor *>>",
        "llama_model::{output_norm, output} members reflect output-head registration",
        "llama_model_llama::graph<embed> constructor and llm_graph_context::n_layer"
      ]
    },
    "0005-worker-range-report-hook.patch": {
      "concern": "worker-hooks",
      "files": {
        "include/llama.h": {
          "before": "8a75213494cc07b20ca2d99cd21b30109e758b7b",
          "after": "5818daf94d481c5eee201ad1300f37e7c0fe60f9"
        },
        "src/llama-model.cpp": {
          "before": "2ea8598ad2037920082ef88db75684283c65118c",
          "after": "c9d3cf6d34cbe2fd50100b91ed2a0436f5b72415"
        },
        "tests/CMakeLists.txt": {
          "before": "855295c152faa78fa4acdec54013940c41627be9",
          "after": "9a7be6eedfd6a311694a8a6a95976fb230ee165c"
        },
        "tests/test-meshnet-range-ownership.cpp": {
          "before": null,
          "after": "6b3aa5ac5dc1b6074401f97b8acd07b00dfa9780"
        }
      },
      "api_assumptions": [
        "LLAMA_API export macro and extern \"C\" block in include/llama.h",
        "tests/CMakeLists.txt llama_build_and_test(<file.cpp>) helper",
        "llama_internal_get_tensor_map(const llama_model *) in src/llama-model.h",
        "gguf empty-context writer API: gguf_init_empty, gguf_add_tensor, gguf_write_to_file"
      ]
    }
  }
}
