<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <!-- .NET 10 is the current LTS release (even-numbered releases are
         LTS); framework-dependent publish per v4-implementation-plan.md's
         open decision #4 — Native AOT's reflection constraints don't play
         well with this target's DI-heavy dependency set (Serilog,
         OpenTelemetry, the MCP SDK), so the simpler, safer default wins. -->
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <RootNamespace>{{ namespace }}</RootNamespace>
    <AssemblyName>{{ namespace }}</AssemblyName>
    <InvariantGlobalization>true</InvariantGlobalization>
    <UserSecretsId>{{ namespace }}</UserSecretsId>
{%- if publish_registry %}
    <!-- Generated with the publish-registry flag: pack as a dotnet global
         tool (`dotnet tool install -g`), the .NET-ecosystem equivalent of
         npx/cargo install/pip install for the other targets. Fill in a
         real Authors/PackageId before the first real `dotnet nuget push`
         — see release.yml. -->
    <IsPackable>true</IsPackable>
    <PackAsTool>true</PackAsTool>
    <ToolCommandName>{{ project_name }}</ToolCommandName>
    <PackageId>{{ namespace }}</PackageId>
    <Version>0.1.0</Version>
    <Authors>TODO: set your name or organization</Authors>
{%- endif %}
  </PropertyGroup>

  <ItemGroup>
    <!-- Roslyn analyzers: enforced as a hard gate via `-p:TreatWarningsAsErrors=true`
         passed at verification time (`run_tests.rs`/generated CI), not baked into
         this file, so an end user's own local `dotnet build` isn't unexpectedly
         stricter than before. -->
    <PackageReference Include="Roslynator.Analyzers" Version="4.15.0" PrivateAssets="all" />
    <!-- MCP SDK (toolchain: open decision #1) -->
    <PackageReference Include="ModelContextProtocol" Version="1.4.0" />
    <PackageReference Include="ModelContextProtocol.AspNetCore" Version="1.4.0" />
    <!-- DB driver + vector ext. NU1903 note: the transitive
         SQLitePCLRaw.lib.e_sqlite3 dependency carries a known advisory
         (GHSA-2m69-gcr7-jv3q) with no patched version published upstream
         yet as of this writing — tracked for a future version bump once
         one lands, not fixable by pinning today. -->
    <PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.9" />
    <!-- HTTP client resilience (wraps Polly; also covers the CircuitBreaker
         core module, per architecture.md's "already-installed dependency
         solves it" guidance) -->
    <PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.7.0" />
    <!-- Schema validation -->
    <PackageReference Include="JsonSchema.Net" Version="9.2.2" />
    <!-- Decompresses the zstd-compressed GeneratedSchemas.json.zst asset
         (pure C# port, no native binding needed) -->
    <PackageReference Include="ZstdSharp.Port" Version="0.8.5" />
    <!-- Structured logging -->
    <PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
    <PackageReference Include="Serilog.Formatting.Compact" Version="3.0.0" />
    <!-- Tracing/metrics -->
    <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.16.0" />
    <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.16.0" />
    <!-- Health checks: Microsoft.Extensions.Diagnostics.HealthChecks ships
         as part of the Microsoft.AspNetCore.App shared framework that
         Microsoft.NET.Sdk.Web already references, so no explicit
         PackageReference is needed (one was tried and pruned by NuGet
         with an NU1510 warning). -->
    <!-- CLI invocation (Terminal Client / Harness Server dual-role entry point) -->
    <PackageReference Include="System.CommandLine" Version="2.0.9" />
    <!-- Interactive setup wizard -->
    <PackageReference Include="Spectre.Console" Version="0.57.1" />
    <!-- Embeddings (open decision #2) -->
    <PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.27.0" />
    <PackageReference Include="Microsoft.ML.Tokenizers" Version="2.0.0" />
  </ItemGroup>

  <ItemGroup>
    <!-- Written directly by the Rust generator (not templated) — baked
         into the compiled assembly as embedded resources rather than
         read from disk at runtime, mirroring
         `targets::rust::templates::validation::validator.rs`'s
         `include_bytes!` approach. A glob (rather than one explicit
         `Include` per file) so a later `mcpify add-version` call's new
         `GeneratedSchemas_v<label>.json.zst` sibling is picked up on the
         next build without needing this project file re-rendered too. -->
    <EmbeddedResource Include="Validation\GeneratedSchemas*.json.zst" />
  </ItemGroup>

  <ItemGroup>
    <!-- Tests/ is its own project (Tests/<Namespace>.Tests.csproj, Story
         C7) — exclude it from this project's SDK-style implicit
         globbing so its files aren't compiled into this assembly too. -->
    <Compile Remove="Tests/**" />
    <Content Remove="Tests/**" />
    <None Remove="Tests/**" />
    <!-- Tools/Profiler is its own project too (v6 Part PROF) — same reason:
         it has its own top-level-statement Program.cs, which would collide
         with this project's entry point if implicitly globbed in. Scoped to
         Tools/Profiler/** specifically, not all of Tools/**, since
         Tools/McpTools.cs (Story C6) is real source for *this* project and
         must stay compiled in. -->
    <Compile Remove="Tools/Profiler/**" />
    <Content Remove="Tools/Profiler/**" />
    <None Remove="Tools/Profiler/**" />
  </ItemGroup>

</Project>
