diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..468dfaa
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,16 @@
+root = true
+
+[*]
+charset = utf-8
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+
+[*.{json,yaml,yml}]
+indent_size = 2
+
+[*.cs]
+csharp_style_namespace_declarations = file_scoped:suggestion
+
+[*.md]
+trim_trailing_whitespace = false
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index ef0b61a..13152d5 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,4 +1,2 @@
-# These are supported funding model platforms
-
github: [magiccodingman]
custom: ['https://sayou.biz/support', 'https://paypal.me/lancewr']
diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml
new file mode 100644
index 0000000..3006923
--- /dev/null
+++ b/.github/actionlint.yaml
@@ -0,0 +1,3 @@
+self-hosted-runner:
+ labels:
+ - magicquant-smoke
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..0b69677
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,7 @@
+## Change
+
+Describe the problem and resulting behavior. Note changes to numerical policy, configuration, paths, or persisted formats.
+
+## Validation
+
+List relevant tests and any model/hardware checks. State material limitations.
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
new file mode 100644
index 0000000..9889be7
--- /dev/null
+++ b/.github/workflows/dotnet.yml
@@ -0,0 +1,47 @@
+name: .NET checks
+on:
+ push:
+ branches: [main]
+ pull_request:
+permissions:
+ contents: read
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}
+ timeout-minutes: 15
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, windows-latest]
+ configuration: [Debug, Release]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '10.0.x'
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ - run: python -m unittest discover -s scripts -p "test_*.py"
+ - run: dotnet restore MagicQuant.sln --locked-mode -warnaserror
+ - run: dotnet build MagicQuant.sln --configuration ${{ matrix.configuration }} --no-restore -warnaserror
+ - run: dotnet test MagicQuant.sln --configuration ${{ matrix.configuration }} --no-build --blame-hang-timeout 2m --blame-hang-dump-type none --logger trx --logger "console;verbosity=normal" --results-directory TestResults
+ - run: dotnet pack src/MagicQuant --configuration ${{ matrix.configuration }} --no-restore -p:Version=0.0.0-ci -o artifacts -warnaserror
+ - run: python scripts/package_smoke.py artifacts/MagicQuant.0.0.0-ci.nupkg
+ - uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: test-results-${{ matrix.os }}-${{ matrix.configuration }}
+ path: TestResults/
+ secrets:
+ name: Secret scan
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ - run: python scripts/scan_secrets.py
diff --git a/.github/workflows/model-smoke.yml b/.github/workflows/model-smoke.yml
new file mode 100644
index 0000000..ae587fc
--- /dev/null
+++ b/.github/workflows/model-smoke.yml
@@ -0,0 +1,41 @@
+name: Model smoke (manual)
+on:
+ workflow_dispatch:
+ inputs:
+ model_path:
+ description: Complete source model on the trusted runner
+ required: true
+ llama_root:
+ description: Existing llama.cpp checkout on the trusted runner
+ required: true
+ runtime_root:
+ description: Existing MagicQuant runtime with Python dependencies
+ required: true
+ output_root:
+ description: Dedicated smoke output directory on the trusted runner
+ required: true
+permissions:
+ contents: read
+jobs:
+ smoke:
+ # Never trigger self-hosted execution automatically from untrusted pull requests.
+ runs-on: [self-hosted, magicquant-smoke]
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '10.0.x'
+ - run: dotnet restore MagicQuant.sln --locked-mode
+ - run: dotnet test tests/MagicQuant.Tests -c Release --no-restore --filter Category=ModelSmoke --logger trx --results-directory TestResults
+ env:
+ MQ_RUN_MODEL_SMOKE: '1'
+ MQ_SMOKE_MODEL: ${{ inputs.model_path }}
+ MQ_SMOKE_LLAMA_ROOT: ${{ inputs.llama_root }}
+ MQ_SMOKE_RUNTIME_ROOT: ${{ inputs.runtime_root }}
+ MQ_SMOKE_OUTPUT: ${{ inputs.output_root }}
+ - uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: smoke-test-results
+ path: TestResults/*.trx
diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml
new file mode 100644
index 0000000..74d242f
--- /dev/null
+++ b/.github/workflows/publish-nuget.yml
@@ -0,0 +1,84 @@
+name: Publish NuGet
+on:
+ push:
+ branches: [release]
+ workflow_dispatch:
+permissions:
+ contents: read
+jobs:
+ validate:
+ if: github.ref == 'refs/heads/release'
+ runs-on: ${{ matrix.os }}
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, windows-latest]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '10.0.x'
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ - run: dotnet restore MagicQuant.sln --locked-mode -warnaserror
+ - run: dotnet build MagicQuant.sln -c Release --no-restore -warnaserror
+ - run: dotnet test MagicQuant.sln -c Release --no-build --blame-hang-timeout 2m --blame-hang-dump-type none
+ - run: python -m unittest discover -s scripts -p "test_*.py"
+ - run: dotnet pack src/MagicQuant -c Release --no-restore -p:Version=0.0.0-ci -o artifacts -warnaserror
+ - run: python scripts/package_smoke.py artifacts/MagicQuant.0.0.0-ci.nupkg
+ publish:
+ needs: validate
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ environment: release
+ permissions:
+ contents: write
+ id-token: write
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '10.0.x'
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ - name: Reserve or reuse the version for this commit
+ id: version
+ run: |
+ git config user.name 'github-actions[bot]'
+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
+ python scripts/release_version.py --reserve
+ - run: dotnet restore MagicQuant.sln --locked-mode -warnaserror
+ - name: Pack exact release version
+ env:
+ RELEASE_VERSION: ${{ steps.version.outputs.version }}
+ run: dotnet pack src/MagicQuant -c Release --no-restore -p:Version="$RELEASE_VERSION" -p:ContinuousIntegrationBuild=true -o artifacts -warnaserror
+ - name: Validate the release package
+ env:
+ RELEASE_VERSION: ${{ steps.version.outputs.version }}
+ run: python scripts/package_smoke.py "artifacts/MagicQuant.$RELEASE_VERSION.nupkg"
+ - uses: actions/upload-artifact@v4
+ with:
+ name: nuget-${{ steps.version.outputs.version }}
+ path: artifacts/*.nupkg
+ - name: NuGet login through trusted publishing
+ uses: NuGet/login@v1
+ id: login
+ with:
+ user: ${{ secrets.NUGET_USER }}
+ - name: Publish tested package
+ env:
+ NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
+ run: dotnet nuget push artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
+ - name: Create release record
+ env:
+ GH_TOKEN: ${{ github.token }}
+ RELEASE_VERSION: ${{ steps.version.outputs.version }}
+ run: |
+ if ! gh release view "v$RELEASE_VERSION" >/dev/null 2>&1; then
+ gh release create "v$RELEASE_VERSION" --verify-tag --title "MagicQuant $RELEASE_VERSION" --generate-notes
+ fi
diff --git a/.gitignore b/.gitignore
index f6b6248..df057d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,81 @@
.obsidian/
+
+# Build results
+bin/
+obj/
+
+# Rider / JetBrains
+.idea/
+*.sln.iml
+
+# Visual Studio user settings
+*.user
+*.userosscache
+*.suo
+*.cache
+*.dbmdl
+*.bak
+*.ncb
+*.opendb
+*.VC.db
+
+# Other common C# stuff
+*.log
+*.vs/
+
+# Local campaigns and generated model/runtime artifacts
+config.local.yaml
+*.local.yaml
+*.dev.yaml
+**/MagicQuant_SQLite.db*
+*.duckdb
+*.duckdb.wal
+*.gguf
+*.safetensors
+.MagicQuant_tmp/
+TestResults/
+artifacts/
+
+__pycache__/
+
+# Visual Studio / Rider / VS Code per-user and machine state
+.vs/
+.idea/
+.vscode/*
+!.vscode/extensions.json
+!.vscode/settings.example.json
+*.DotSettings.user
+*.sln.DotSettings.user
+*.slnx.user
+*.rsuser
+*.sln.docstates
+_ReSharper*/
+*.ncrunch*
+_NCrunch*/
+[Bb]enchmark[Dd]ot[Nn]et.[Aa]rtifacts/
+[Tt]est[Rr]esults/
+coverage/
+*.coverage
+*.coveragexml
+*.testlog
+
+# Local secrets, package output and OS/editor temporary files
+.env
+.env.*
+!.env.example
+*.pfx
+*.p12
+*.key
+*.pem
+*.nupkg
+*.snupkg
+.DS_Store
+Thumbs.db
+Desktop.ini
+*~
+*.swp
+*.swo
+
+# Local campaign configuration and tool installs
+config.yaml
+.tool-install/
diff --git a/.gitleaks.toml b/.gitleaks.toml
new file mode 100644
index 0000000..dcbd30a
--- /dev/null
+++ b/.gitleaks.toml
@@ -0,0 +1,10 @@
+# Retain every default detector. This exact tensor fixture is not an API key.
+[extend]
+useDefault = true
+
+[[allowlists]]
+description = "Exact native/external tensor-name fixture, including its historical path"
+condition = "AND"
+paths = ['''(^|/)MagicQuant.Tests/ExternalBaselineTensorParityTests\.cs$''']
+regexTarget = "line"
+regexes = ['''^\s*var (native|external) = Metadata\(nextnLayers: 1, "token_embd\.weight", "blk\.0\.attn_q\.weight", "blk\.64\.nextn\.eh_proj\.weight"\);$''']
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..08172ab
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,50 @@
+# Contributing
+
+Start with the [architecture map](docs/architecture.md), [configuration rules](docs/configuration.md), and the [research wiki](https://github.com/magiccodingman/MagicQuant). This repository implements benchmark-driven discovery; the `evolution` name survives as a compatibility alias.
+
+## Local workflow
+
+```sh
+dotnet restore MagicQuant.sln --locked-mode
+dotnet build MagicQuant.sln -c Debug --no-restore
+dotnet test MagicQuant.sln -c Debug --no-build
+dotnet build MagicQuant.sln -c Release --no-restore
+dotnet test MagicQuant.sln -c Release --no-build
+```
+
+CI runs both configurations on Linux and Windows with warnings treated as errors and locked package restores. Use `--filter FullyQualifiedName~YourTestClass` to focus a test run during development. Tests run serially because configuration and runtime registries are global. Source-contract regression tests assume the normal repository/build layout; run the suite from the checkout rather than copying the test DLL elsewhere.
+
+Keep personal settings in an ignored `config.local.yaml` and pass `--config` explicitly. Do not add machine paths or automatic DEBUG campaigns to `Program.cs`. Use IDE run arguments for your campaign. Never commit weights, runtime databases, exported GGUFs, credentials, or local logs.
+
+## Making a change
+
+- Keep commands focused on orchestration; extract cohesive policy or path logic into services when it can be tested independently.
+- Use existing baseline identity, effective-state, and path helpers. Do not duplicate database filenames, tensor-slot ordering, or custom-baseline normalization.
+- Explain why a non-obvious constraint exists in a comment. Avoid comments that merely restate a method call or retain obsolete blocks of disabled implementation.
+- When adding a config option, update the typed model, loader override if needed, commented default YAML, documentation, and a behavior test. Distinguish C# defaults from the distributed YAML profile.
+- Test observable behavior: boundary cases, context scoping, cache reuse/invalidation, ranking/tie rules, path resolution, or failure propagation. Avoid tests that only repeat the implementation's constants without exercising a contract.
+- Treat persisted IDs, database schemas, manifests, and artifact names as compatibility contracts. Provide an explicit migration plan for changes to them.
+
+For a bug fix, add a regression that fails without the fix. Tests that mutate `Config`, `Cache`, or registries must restore prior state in `finally`; use unique temporary roots. Keep unit tests free of network downloads, sudo, model quantization, and persistent changes to a developer's runtime.
+
+## Hardware integration changes
+
+Changes to conversion, quantization arguments, benchmark scheduling, or numerical selection need a small-model integration check in addition to unit tests. Record model identity, hardware, imatrix, dependency revisions, command/config, observed outputs, and before/after metrics. Use an isolated output directory. Do not claim full quantization parity from a passing unit suite.
+
+For documentation or path refactoring, verify examples against actual help and protect historical path rules. Avoid re-running expensive full campaigns when the changed behavior can be checked directly.
+
+## Pull request expectations
+
+Describe the concrete problem and resulting behavior, relevant compatibility effects, and validation performed. Separate numerical policy changes from mechanical cleanup when possible. Mention untested hardware/platform paths and any remaining compiler warnings. Prefer focused commits that can be reviewed without reconstructing the conversation that led to them.
+
+The maintainer still needs to choose a software license before an open-source release; do not infer one from generated model metadata or dependency licenses.
+
+See [testing and merge checks](docs/testing.md) for the manual small-model workflow,
+package lock updates, and required-check setup. [Worked examples](docs/extending.md)
+show how to add configuration and test native/process/path changes.
+
+## Repository layout and release safety
+
+Application projects are under `src/`; test projects are under `tests/`. Program guides belong in `docs/`; research explanations belong in `wiki/`. Use relative links so documentation remains useful in checkouts and forks. Source paths are separate from model/runtime data paths.
+
+Run the [installed-package checks](docs/testing.md#installed-package-and-release-checks) when changing paths, packaging, startup, or bundled files. Publication is controlled by [release branch automation](docs/releases.md). Never put NuGet keys or personal configuration into a workflow. Original contributions are accepted under the repository's AGPL-3.0-only license; retain third-party attribution.
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..f860221
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,5 @@
+
+
+ true
+
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..be3f7b2
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,661 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+.
diff --git a/MagicQuant.sln b/MagicQuant.sln
new file mode 100644
index 0000000..05df0cb
--- /dev/null
+++ b/MagicQuant.sln
@@ -0,0 +1,37 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicQuant", "src\MagicQuant\MagicQuant.csproj", "{9259012B-0EB2-4AD8-81E5-807FD4465AA3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MQ.DB", "src\MQ.DB\MQ.DB.csproj", "{A97D6992-2659-47F9-9AC9-99425D2677A4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicQuant.Tests", "tests\MagicQuant.Tests\MagicQuant.Tests.csproj", "{D106FC82-5FD7-4C95-BF20-0940C64A234C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicQuant.ProcessFixture", "tests\MagicQuant.ProcessFixture\MagicQuant.ProcessFixture.csproj", "{6F77FCF7-A105-44A9-A708-2B9F9F2B3B6D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9259012B-0EB2-4AD8-81E5-807FD4465AA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9259012B-0EB2-4AD8-81E5-807FD4465AA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9259012B-0EB2-4AD8-81E5-807FD4465AA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9259012B-0EB2-4AD8-81E5-807FD4465AA3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A97D6992-2659-47F9-9AC9-99425D2677A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A97D6992-2659-47F9-9AC9-99425D2677A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A97D6992-2659-47F9-9AC9-99425D2677A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A97D6992-2659-47F9-9AC9-99425D2677A4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D106FC82-5FD7-4C95-BF20-0940C64A234C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D106FC82-5FD7-4C95-BF20-0940C64A234C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D106FC82-5FD7-4C95-BF20-0940C64A234C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D106FC82-5FD7-4C95-BF20-0940C64A234C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6F77FCF7-A105-44A9-A708-2B9F9F2B3B6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6F77FCF7-A105-44A9-A708-2B9F9F2B3B6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6F77FCF7-A105-44A9-A708-2B9F9F2B3B6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6F77FCF7-A105-44A9-A708-2B9F9F2B3B6D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/README.md b/README.md
index 0954c99..303aeea 100644
--- a/README.md
+++ b/README.md
@@ -1,222 +1,105 @@
-# MagicQuant (v2.0)
+# MagicQuant
-**MagicQuant is a benchmark-driven GGUF evaluation and hybrid-discovery system.**
-
-> **Which quantized models are actually worth using at each size?**
-
-Most quant releases give you a pile of files, AKA: Q8, Q6, Q5, Q4, and leave you to guess. MagicQuant replaces that guesswork with benchmarks, tensor-group probing, mixed hybrid GGUF builds when they are worth it, and a final survivor list built around meaningful size/fidelity tradeoffs.
+[](https://www.nuget.org/packages/MagicQuant/)
+[](https://www.nuget.org/packages/MagicQuant/)
+[](https://github.com/magiccodingman/MagicQuant/actions/workflows/dotnet.yml)
+[](LICENSE)
----
+**Benchmark-driven GGUF quantization and mixed-precision hybrid discovery for llama.cpp.**
-## What MagicQuant Does
+MagicQuant helps answer: **which quantized versions of a model are worth keeping at each size?** It measures baseline quantizations, learns tensor-group assignments, explores hybrid combinations, and validates candidates against size and fidelity criteria. The result is a selected set of GGUF artifacts with supporting measurements, rather than an unranked collection of quantization levels.
-MagicQuant takes the messy quantization space and turns it into a judged survivor list.
-
-It tests standard baselines, learns from external quant strategies, and builds mixed tensor-group hybrids when there may be a better size/fidelity trade hiding between normal quant levels.
-
-Then it validates the results.
-
-MagicQuant does not assume hybrids are better. It does not assume baselines are safe. Every option has to earn its slot.
-
-A final MagicQuant release is meant to show:
-
-* what is smallest
-* what is safest
-* what is meaningfully in-between
-* what was removed as redundant or not worth the damage
-* and what the real benchmark numbers say
-
-If a model survives MagicQuant, it survived because the trade was worth showing.
+It is a .NET command-line application that orchestrates llama.cpp and Python tooling. It does not invent a new quantization format or use evolutionary search. Hybrids must earn their place: a standard baseline can be the better result.
----
+## How it works
-## Example
+1. **Establish baselines.** Read a local source model and measure standard quantization choices. Optionally learn tensor assignments from compatible external GGUFs.
+2. **Probe tensor groups.** Measure how changes to groups such as attention, embeddings, and feed-forward tensors affect the model.
+3. **Discover hybrids.** Use measured evidence and predictions to explore mixed-precision combinations with promising size/fidelity tradeoffs.
+4. **Validate and select.** Measure candidates, reject poor or redundant trades, and export survivors with metadata and local provenance.
-The following example is Qwen3-4B-2507-Instruct going through MagicQuants pipeline and the final results:
+KLD and perplexity help evaluate fidelity; throughput and file size provide additional context. The results depend on the model, calibration/evaluation data, configuration, and hardware. A smaller KLD in one campaign is not a universal claim about downstream task quality. Read the [research overview](wiki/index.md) for the selection policy and its assumptions.
-| Name | Provider | Quant Family | KLD | Size (GB) |
-| ----------------------------------------------------------------------------------------- | ---------- | ------------ | -------: | --------: |
-| LM-Q8_0 | llama.cpp | Q8_0 | 0.001339 | 3.99 |
-| MQ-Q6_K_1 | MagicQuant | Q6_K | 0.001817 | 3.58 |
-| UD-Q6_K_XL | Unsloth | UD-Q6_K_XL | 0.002111 | 3.41 |
-| LM-Q6_K | llama.cpp | Q6_K | 0.004640 | 3.08 |
-| [MQ-Q5_K_1](#winner-notes "Replaced: MQ-Q5_K") | MagicQuant | Q5_K | 0.006632 | 2.88 |
-| [UD-Q5_K_XL](#winner-notes "Replaced: LM-Q5_K, LM-Q5_K_S") | Unsloth | UD-Q5_K_XL | 0.009839 | 2.73 |
-| [MQ-Q4_K_M_1](#winner-notes "Replaced: MQ-Q4_K_M, UD-Q4_K_XL, LM-Q4_K_M + 1 more") | MagicQuant | Q4_K_M | 0.020346 | 2.44 |
-| [LM-Q4_K_S](#winner-notes "Replaced: LM-IQ4_NL") | llama.cpp | Q4_K_S | 0.029803 | 2.22 |
-| LM-IQ4_XS | llama.cpp | IQ4_XS | 0.031300 | 2.11 |
-| UD-Q3_K_XL | Unsloth | UD-Q3_K_XL | 0.072278 | 1.98 |
+## Support the project
-The table above includes a mix of standard llama.cpp quantizations, Unsloth Dynamic GGUF models, and MagicQuant hybrids.
+I build and maintain MagicQuant on the side, for free. Developing it and experimenting with quantizations has put a frankly ridiculous amount of terabytes written (TBW) on my drives! My Hugging Face storage is also creeping toward its cap, so there will eventually be more storage to fund. If this project helps you, [supporting the work](https://sayou.biz/support) helps with those costs. Anything helps and is always appreciated. ❤️
-In some cases, dominance is absolute. For example, Unsloth’s **Q5_K_XL** fully replaces the standard llama.cpp **Q5_K**, as MagicQuant determined the baseline offered no meaningful tradeoff in comparison.
+## Install and run
-More interesting are the hybrid outcomes. **MQ-Q4_K_M_1** emerged as a clear dominant variant, replacing multiple candidates simultaneously (_UD-Q4_K_XL, MQ-Q4_K_M, LM-Q4_K_M_). While baseline quants can sometimes achieve similar dominance, this case highlights a hybrid configuration that decisively outperformed across the board.
+**Linux is the tested campaign platform.** Windows has automated build, unit-test, and packaged CLI checks; full Windows quantization campaigns have not been validated. No macOS campaign support is claimed.
-**MQ-Q5_K_1** is another notable result. It leverages Unsloth’s learned tensor behavior (_Q5_K_XL_) within the `ffn_up_gate`, discovering a middle ground between **UD-Q5_K_XL** and **LM-Q6_K**. The result is a hybrid that achieves a disproportionately large KLD improvement relative to the additional size cost, exceeding a simple linear tradeoff.
+Install the [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0), then install the CLI from [NuGet](https://www.nuget.org/packages/MagicQuant/):
-The table below breaks down these MagicQuant hybrids by tensor group, showing the assigned quantization for each, whether derived from llama.cpp baselines or Unsloth’s learned tensor mappings.
-
-| Name | embeddings | attn_q | attn_kv | attn_output | ffn_up_gate | ffn_down |
-| ----------- | ---------- | ------ | ------- | ----------- | ----------- | -------- |
-| MQ-Q6_K_1 | Q8_0 | Q8_0 | Q8_0 | Q8_0 | Q6_K | Q8_0 |
-| MQ-Q5_K_1 | Q8_0 | Q5_K | Q8_0 | Q6_K | UD-Q5_K_XL | Q5_K_S |
-| MQ-Q4_K_M_1 | Q8_0 | Q5_K | Q8_0 | Q6_K | IQ4_XS | IQ4_XS |
-
----
+```bash
+dotnet tool install --global MagicQuant
+magicquant --version
+magicquant init-config --output config.yaml
+```
-## Nonlinear Wins
+The package becomes available after the first successful release publication; until then use the [source installation instructions](docs/setup.md#build-from-source).
-MagicQuant does not look for simple "winners" in sub space between baselines. Instead it only allows nonlinear trade wins. Documentation presented later goes further into detail on this subject, but here's the TLDR:
+Edit the generated config for your source model, architecture identity, export destination, and storage. Initialize the external toolchain, validate the config, then start the campaign:
-Imagine a graph like this:
-```
-Size →
-|
-| Q6
-| /
-| /
-| Q5
-| /
-|Q4
-+----------------
+```bash
+magicquant initialize-llama-cpp
+magicquant pipeline --config ./config.yaml --check-config --strict-config
+magicquant pipeline --config ./config.yaml
```
-A nonlinear win looks like:
-```
- Q6
- /
- / ← MQ-Q5_K_1 (above the line)
- Q5
- /
-Q4
-```
+Initialization can download/build llama.cpp and install Python dependencies. NuGet installs MagicQuant, not model weights or a complete GPU toolchain. Follow the [installation guide](docs/setup.md) for native prerequisites, GPU setup, custom toolchains, and environment paths.
-That hybrid sits above the straight line between Q4 and Q5.
+For updates: `dotnet tool update --global MagicQuant`. For reproducible runs, install a particular release with `--version X.Y.Z` and retain your config, model revision, and run provenance.
-Meaning:
-👉 It’s a **more efficient trade** than the normal step-up
+## Configure a campaign
-This is what MagicQuant calls a "nonlinear trade/win" when such wordage is used.
+A minimal example (replace these paths and the architecture identity):
----
-
-## Deeper Understanding
-
-For a deeper dive into MagicQuant and how it works, the [wiki index](https://github.com/magiccodingman/MagicQuant-Wiki/blob/main/wiki/index.md) is a good place to start.
+```yaml
+paths:
+ model_dir: /data/models/my-model
+ scratch_roots:
+ - /mnt/nvme-a/magicquant-scratch
+ - /mnt/nvme-b/magicquant-scratch
+identity:
+ architecture_family_name: my-model-family
+output:
+ output_dir: /data/exports/my-model-MagicQuant
+ output_name_prefix: MyModel
+learning:
+ confirm_tensor_group_profile: true
+```
-When you see a MagicQuant hybrid, it’s not just a “Q4.5” sitting somewhere between Q4 and Q5. It represents a discovered configuration where the **KLD reduction is non-linear relative to the size increase**, a genuinely better trade space. Not universally “better” than everything else, but a variant that earned its place through measurable advantage.
+Custom YAML uses typed defaults for omitted values; it does not merge with the bundled tuning profile. Start with `init-config` when you want that complete profile. See [configuration](docs/configuration.md), [examples](examples), and the [command reference](docs/commands.md).
-Whether the winner is a hybrid or a pure baseline from llama.cpp or Unsloth, any quant that removes another from the final selection does so because its dominance made the alternative no longer worth considering.
+**Plan scratch storage early.** Quantization writes and rereads large intermediate models, and storage can be a major throughput limitation. Fast SSD/NVMe scratch disks, especially separate physical devices, can materially improve throughput when IO is the bottleneck. Multiple folders on the same device still share its bandwidth. Allow space for concurrent intermediate artifacts and keep unrelated data out of managed scratch/export directories. See [storage](docs/storage.md) and [best practices](docs/best-practices.md).
-The goal is not to flood the space with near-duplicates offering negligible KLD gains for minimal size differences, nor to claim superiority for the sake of it. In fact, that’s explicitly what MagicQuant avoids.
+## Learning from external quantizations
-MagicQuant is built around transparency, honesty, maintainability, and most importantly trust. As it evaluates new architectures and quant families, it doesn’t invent quantization schemes in isolation. Instead, it learns from proven tensor assignments provided by trusted sources like llama.cpp and Unsloth. If those baselines are stable, MagicQuant operates within that same safe space, extending rather than reinventing.
+External providers are optional. MagicQuant can run using its local baseline choices alone, but compatible external tensor assignments can provide valuable additional evidence.
-Historical sources expand that tensor vocabulary; they do not vote on the current winner. MagicQuant pins the source revision, rebuilds the available recipes under current controlled conditions, and relearns their effects rather than replaying an old final mixture.
+**Unsloth is the maintainer's recommended starting point** for external GGUF baselines. MagicQuant can learn their tensor-group patterns, rebuild a controlled equivalent from your local source model, and benchmark it in your campaign. It does not simply trust an external file's label or score. Choose the exact matching model and revision, and review its license. See the [Unsloth configuration walkthrough](docs/best-practices.md#optional-unsloth-baselines) and [research explanation](wiki/docs/Learning-From-Existing-Quantizations.md).
-That said, the system is designed to adapt. Edge cases can exist, but the architecture is intentionally flexible to handle them.
+For the same model, prefer linking to the original provider's surviving baselines. For a compatible variant they do not host, cloning can rebuild the full selected set locally. Learning tensor assignments does not automatically reproduce a provider's other processing techniques. See [publishing and cloning guidance](docs/best-practices.md#link-upstream-for-the-same-model-build-locally-for-variants).
-### How MagicQuant Works
+## Documentation
-```
- ┌────────────────────────────┐
- │ Input Quantized Models │
- │ ───────────────────────── │
- │ llama.cpp / Unsloth / etc │
- └────────────┬──────────────┘
- │
- │ Inspect tensors
- ▼
- ┌────────────────────────────┐
- │ Tensor Extraction Layer │
- │ ───────────────────────── │
- │ - Read all tensors │
- │ - Detect quant types │
- │ - Capture F32 / BF16 │
- └────────────┬──────────────┘
- │
- │ Group by role
- ▼
- ┌────────────────────────────┐
- │ Tensor Group Mapping │
- │ ───────────────────────── │
- │ embeddings │
- │ attn_q / attn_kv / output │
- │ ffn_up_gate / ffn_down │
- │ lm_head / moe_* │
- └────────────┬──────────────┘
- │
- │ Learn configs
- ▼
- ┌────────────────────────────┐
- │ Learned Config Library │
- │ ───────────────────────── │
- │ "Q5_K attn_q pattern" │
- │ "UD-Q5_K_XL ffn pattern" │
- │ etc │
- └────────────┬──────────────┘
- │
- │ Normalize external configs
- ▼
- ┌────────────────────────────┐
- │ Controlled Rebuild Layer │
- │ ───────────────────────── │
- │ - Apply configs to BF16 │
- │ - Use MagicQuant imatrix │
- │ - Equal comparison ground │
- └────────────┬──────────────┘
- │
- │ Feed into
- ▼
- ┌────────────────────────────┐
- │ Hybrid Construction Engine │
- │ ───────────────────────── │
- │ Mix tensor groups across │
- │ learned configurations │
- └────────────┬──────────────┘
- │
- │ Evaluate candidates
- ▼
- ┌────────────────────────────┐
- │ Prediction + Isolation │
- │ ───────────────────────── │
- │ - Group-level testing │
- │ - Rank-safe prediction │
- │ - Controlled context tests │
- └────────────┬──────────────┘
- │
- │ Build real GGUF
- ▼
- ┌────────────────────────────┐
- │ Benchmark Layer │
- │ ───────────────────────── │
- │ - KLD (primary) │
- │ - PPL (secondary) │
- │ - Measured GPU scheduling │
- └────────────┬──────────────┘
- │
- │ Final decision
- ▼
- ┌────────────────────────────┐
- │ Survivor Selection │
- │ ───────────────────────── │
- │ - Dominance pruning │
- │ - Nonlinear winners │
- │ - Spacing collapse │
- └────────────────────────────┘
-```
+| Start here | What you will find |
+| --- | --- |
+| [Installation](docs/setup.md) | NuGet, native prerequisites, custom environments, source builds |
+| [Configuration](docs/configuration.md) | YAML, overrides, read-only validation, profiles |
+| [Commands](docs/commands.md) | Pipeline, setup, cloning, prediction validation |
+| [Best practices](docs/best-practices.md) | Scratch disks, Unsloth, reproducibility, first campaigns |
+| [Storage](docs/storage.md) | Persistent data, scratch leases, cache and output ownership |
+| [Research](wiki/index.md) | Measurements, prediction, pruning, hybrid selection |
+| [Contributing](CONTRIBUTING.md) | Development workflow, tests, code boundaries |
+| [Releases](docs/releases.md) | Automatic versions and NuGet trusted publishing |
-The controlled context tests check whether a promising group choice still behaves the same way when the surrounding model moves from a Q4-or-better regime into more aggressive compression. They are bounded and evidence-driven because exhaustive context testing would recreate the full combinatorial problem.
+## Development and history
-GPU scheduling is also measured rather than assumed. A large benchmark can use multiple GPUs in one shared process, while batches of smaller candidates can run concurrently on independent GPUs when that produces higher aggregate throughput.
+Application code lives in `src/`, tests in `tests/`, operational guides in `docs/`, and research documentation in `wiki/`. Both the former MagicQuant-Wiki and MagicQuant-Pipeline histories are retained. The `evolution` command remains a compatibility alias for `pipeline`; existing database and artifact contracts are preserved. Historical research remains under `archival/` and is not current setup guidance.
-The final release is a curated survivor menu. Research campaigns and cross-run audits should preserve the full nondominated evidence frontier before applying spacing, so that a presentation decision does not erase valid results.
+## License
-## Deep Dive Documentation
+MagicQuant's original code and documentation are licensed under **GNU AGPL version 3 only** (`AGPL-3.0-only`). Commercial use is permitted subject to its terms. Distribution and remote interaction with modified versions carry source-availability obligations; the [license text](LICENSE) controls the details.
-- [Wiki index](./wiki/index.md)
-- [Prediction Engine](./wiki/docs/Prediction-Engine.md)
-- [Regime-Aware Tensor Search](./wiki/docs/Regime-Aware-Search.md)
-- [GPU Benchmark Scheduling](./wiki/docs/GPU-Benchmark-Scheduling.md)
-- [Pareto Archives and Reproducibility](./wiki/docs/Pareto-Archives-And-Reproducibility.md)
+This does not automatically relicense model weights or generated GGUFs. Model, dataset, external-provider, and third-party dependency licenses still apply. See [third-party notices](THIRD-PARTY-NOTICES.md).
diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md
new file mode 100644
index 0000000..e7e5f5b
--- /dev/null
+++ b/THIRD-PARTY-NOTICES.md
@@ -0,0 +1,43 @@
+# Third-party notices
+
+MagicQuant's original code is AGPL-3.0-only. Dependencies retain their own licenses; they are not relicensed by this repository. The runtime dependency inventory below is taken from the committed application lock file. License texts and bundled notices are retained in [licenses/](licenses/), also included in the tool package.
+
+LibGit2Sharp is MIT; its native libgit2 component is GPL version 2 with an explicit linking exception permitting combinations with other programs. Keep that exception with its license. SQLitePCLRaw is Apache-2.0; SQLite itself is public domain. Other listed managed components use MIT or BSD-2-Clause. Build/test-only dependencies remain governed by their package notices.
+
+| Package | Version | License |
+| --- | --- | --- |
+| Blake3 | 2.2.0 | BSD-2-Clause |
+| DuckDB.NET.Data.Full | 1.4.3 | MIT |
+| LibGit2Sharp | 0.31.0 | MIT |
+| Spectre.Console | 0.54.0 | MIT |
+| System.Management | 10.0.11 | MIT |
+| YamlDotNet | 17.0.1 | MIT |
+| DuckDB.NET.Bindings.Full | 1.4.3 | MIT |
+| LibGit2Sharp.NativeBinaries | 2.0.323 | GPL-2.0 with linking exception |
+| Microsoft.Data.Sqlite | 10.0.11 | MIT |
+| Microsoft.Data.Sqlite.Core | 10.0.11 | MIT |
+| Microsoft.EntityFrameworkCore | 10.0.11 | MIT |
+| Microsoft.EntityFrameworkCore.Abstractions | 10.0.11 | MIT |
+| Microsoft.EntityFrameworkCore.Analyzers | 10.0.11 | MIT |
+| Microsoft.EntityFrameworkCore.Relational | 10.0.11 | MIT |
+| Microsoft.EntityFrameworkCore.Sqlite | 10.0.11 | MIT |
+| Microsoft.EntityFrameworkCore.Sqlite.Core | 10.0.11 | MIT |
+| Microsoft.Extensions.Caching.Abstractions | 10.0.11 | MIT |
+| Microsoft.Extensions.Caching.Memory | 10.0.11 | MIT |
+| Microsoft.Extensions.Configuration.Abstractions | 10.0.11 | MIT |
+| Microsoft.Extensions.DependencyInjection | 10.0.11 | MIT |
+| Microsoft.Extensions.DependencyInjection.Abstractions | 10.0.11 | MIT |
+| Microsoft.Extensions.DependencyModel | 10.0.11 | MIT |
+| Microsoft.Extensions.Logging | 10.0.11 | MIT |
+| Microsoft.Extensions.Logging.Abstractions | 10.0.11 | MIT |
+| Microsoft.Extensions.Options | 10.0.11 | MIT |
+| Microsoft.Extensions.Primitives | 10.0.11 | MIT |
+| SQLitePCLRaw.bundle_e_sqlite3 | 2.1.12 | Apache-2.0 |
+| SQLitePCLRaw.core | 2.1.12 | Apache-2.0 |
+| SQLitePCLRaw.lib.e_sqlite3 | 2.1.12 | Apache-2.0 |
+| SQLitePCLRaw.provider.e_sqlite3 | 2.1.12 | Apache-2.0 |
+| System.CodeDom | 10.0.11 | MIT |
+
+The native/Python toolchain (including llama.cpp, Python, PyTorch, llama-cpp-python and downloaded packages) is installed separately and retains its own licenses and notices. Model weights, datasets and external GGUF baselines are also separate works; check their specific terms before downloading or redistributing them. MagicQuant does not grant rights to third-party models or training data.
+
+When updating dependencies, refresh the lock files, review their license metadata and native component notices, and update this inventory. Package source repositories and exact source commits are recorded in their NuGet metadata; retain upstream notices when redistributing binaries.
diff --git a/assets/icon.png b/assets/icon.png
new file mode 100644
index 0000000..a2ca809
Binary files /dev/null and b/assets/icon.png differ
diff --git a/docs/architecture.md b/docs/architecture.md
new file mode 100644
index 0000000..896250d
--- /dev/null
+++ b/docs/architecture.md
@@ -0,0 +1,58 @@
+# Architecture and contributor code map
+
+## Execution flow
+
+`src/MagicQuant/Program.cs` dispatches through `CommandCatalog`. Help returns before runtime initialization. A normal command reads and validates YAML/CLI/input paths before loading `Config.Current` and run state into `MQ.DB.Cache`. It records provenance, cleans stale scratch, checks dependencies, and invokes an `ICommand`. `--check-config` exits before those runtime changes.
+
+`src/MagicQuant/Commands/QuantizationPipeline.cs` coordinates full discovery. `Evolution.cs` preserves the historical C# entry point and the CLI registry keeps `evolution` as an alias. The orchestrator should describe stage order; reusable behavior belongs in services.
+
+1. Validate source model and initialize model-local paths.
+2. Obtain model hash; prepare native GGUF and optional projector; review tensor grouping.
+3. Resolve architecture family and tensor-group profile; register custom baselines; handle targeted relearn.
+4. Acquire imatrix context, rebucket existing tensor truth when appropriate, and load/probe the hardware plan.
+5. Establish native benchmark truth and compatibility, then run initial/continuation isolation samples.
+6. Apply isolation policy and materialize the remaining candidate space in DuckDB.
+7. Fit predictions, investigate contextual evidence, choose candidates, and validate them with real benchmarks.
+8. Finalize survivors and write GGUFs, manifests, benchmark summaries, and model cards.
+
+The [research wiki](https://github.com/magiccodingman/MagicQuant) is the source for the mathematical motivation. This guide maps the implementation, not a new algorithm specification.
+
+## Where to change things
+
+| Concern | Main files / services |
+| --- | --- |
+| CLI routing/help | `Program.cs`, `Commands/CommandCatalog.cs`, command `ShowHelp` methods |
+| YAML shape and CLI overrides | `Configuration/MagicQuantYamlConfig.cs`, `MagicQuantYamlLoader.cs`, `config.default.yaml` |
+| Baseline identity and roles | `MQ.DB/Models/BaselineQuants.cs`, `BaselineDefinitionResolver`, `HuggingFaceBaselineService` |
+| Tensor grouping and profile review | `MQ.DB/tensor_groups.yaml`, `TensorGroupReviewService`, `TensorGroupProfileService`, `TensorGroupRebucketService` |
+| Process/tool setup | `InitializeLlamaCpp`, `Helpers/LlamaBuilder`, `Helpers/PythonManager`, `HardwareHelper` |
+| Native conversion and quantization | `NativeModelConversionService`, `QuantizationService`, `ExternalBaselineTensorParity`, `CloneManifestTensorMapBuildService` |
+| Benchmark execution and GPU planning | `BenchmarkCommands`, `BenchmarkLogParser`, `BenchmarkService`, `BenchmarkGpuPlanning`, `LlamaGpuArgumentBuilder` |
+| Isolation sampling and policy | `IsolationPlanningService`, `IsolationOptimizationService`, `Helpers/RuntimeSearchSpace` |
+| SQLite measured truth | `MQ.DB/Data/MagicQuantContext.cs`, `MQ.DB/Models/DbModels`, `HybridBenchmarkRepository` |
+| DuckDB candidate data | `QuantDatabaseService`, `RemainingCombinationStore`, `CombinationDuckDbSchema` |
+| KLD prediction and final selection | `RankSafeKldPredictionService`, `PredictionGuidedHybridSelectionService`, `SmartBaselineTuningFallbackService` |
+| Contextual anomaly/synergy evidence | `AnomalyWorkflowService`, `AnomalyRuleRepository`, `AnomalyAdjustedPredictionService` |
+| Release artifacts | `HybridArtifactExportService`, `FinalArtifactNamingService`, `FinalReleaseMetadataService`, `ReadmeGenerationService` |
+| Native process lifetime | `Runtime/ProcessRunner`, `NativeCommand`, `RunCancellation` |
+| Run provenance | `RunProvenanceService` |
+| Paths and lifecycle | `ModelArtifactPathService`, `ModelRuntimePathService`, `OutputPathService`, `CombinationDatabasePathService`, `ScratchStorageService` |
+
+## Invariants worth protecting
+
+- **Measured truth and prediction are different.** SQLite stores observations and context. DuckDB is a derived candidate/prediction workspace. Do not turn predictions into benchmark truth or silently substitute a standard family for a missing exact custom baseline measurement.
+- **Identity is scoped.** Model hash, architecture family, tensor-group profile, baseline identity, and imatrix context determine which evidence may be reused. Similar display names are not sufficient.
+- **Effective tensor assignments matter.** A carrier quant and an explicit group quant can describe the same effective assignment. Use existing resolvers and canonical baseline identities instead of inventing equality rules.
+- **Runtime search state is mutable.** `RuntimeSearchSpace` controls the current allowed universe. Do not revive legacy static candidate lists as an authority.
+- **Paths are contracts.** Writer and reader use `CombinationDatabasePathService` for the same DuckDB file. `OutputPathService` preserves command-specific destinations. Keep existing filenames, schema IDs, and serialized manifests stable unless a migration is part of the change.
+- **Scratch is leased; downloads are durable.** Use `ScratchStorageService` leases for heavy temporary GGUF work, and durable external-baseline paths for reusable downloads. Do not add ad hoc cleanup of model roots.
+
+## Global state and tests
+
+`Config.Current`, `Cache`, and several baseline/search registries are process-wide mutable state. The CLI runs one command per process. Do not run multiple campaigns concurrently inside one process without redesigning those boundaries.
+
+Tests currently disable parallel execution because these globals are shared. Tests that change them must save and restore the prior state in `finally`, use unique temporary directories, and clean up only those directories. Prefer testing a pure policy/path helper when possible. Executable-level CLI tests protect the entry point separately from command implementation tests.
+
+Large benchmark, quantization, and selection services remain candidates for incremental extraction. Extract a cohesive responsibility behind regression tests instead of splitting files by arbitrary line count or changing numerical policy during a readability patch.
+
+`NativeModelConversionService` owns native artifact completion, while `QuantizationConcurrencyPlan` computes CPU/storage limits without IO. `IProcessRunner` permits failure/cancellation tests at that boundary. `RunCancellation` is an async-scoped bridge for legacy service APIs; new APIs should accept explicit cancellation tokens as well. Numerical policy and persisted evidence remain in their existing services.
diff --git a/docs/best-practices.md b/docs/best-practices.md
new file mode 100644
index 0000000..a43d666
--- /dev/null
+++ b/docs/best-practices.md
@@ -0,0 +1,88 @@
+# Campaign best practices
+
+## Start with a small, identifiable campaign
+
+Use a complete local source model that the selected llama.cpp converter supports. Keep the exact model revision, architecture/profile identity, imatrix settings, and evaluation data consistent when comparing runs. Begin with a small model and the generated profile before scaling up. Run `magicquant pipeline --config config.yaml --check-config --strict-config` first; this validates input structure and paths, not memory capacity or numerical quality.
+
+## Give scratch IO its own resources
+
+Large intermediate GGUFs make storage throughput a potential bottleneck. Prefer fast local SSD/NVMe scratch storage; separate physical disks can allow independent heavy writers. MagicQuant permits one heavy writer per configured scratch root, so two directories on the same disk do not create independent bandwidth and can increase contention.
+
+```yaml
+paths:
+ scratch_roots:
+ - /mnt/nvme-a/magicquant-scratch
+ - /mnt/nvme-b/magicquant-scratch
+```
+
+Use existing writable parent locations dedicated to this work. Allow space for several large model artifacts, monitor free space and device throughput, and leave room for durable downloads and exports too. A faster disk helps when IO is limiting; GPU/CPU compute, RAM, and evaluation workload can instead dominate. Avoid fixed speedup expectations. See [storage ownership and cleanup](storage.md).
+
+## Optional Unsloth baselines
+
+The maintainer recommends Unsloth as a primary place to look for external GGUF tensor assignments. These sources are optional, and their value depends on model compatibility and measured results. Start with a repository for the exact source model; a similar name or matching architecture alone is insufficient.
+
+In the generated configuration, edit `baselines.custom_repositories`. A fuller, explicitly opt-in template is available in [examples/pipeline-external.yaml](../examples/pipeline-external.yaml), including how to add an external baseline to confirmed-anomaly expansion. The following is a structural example, not a promise that a particular upstream file exists. Replace the model/file placeholders, pin `revision` to the provider commit you inspected, and retain the rest of your campaign configuration:
+
+```yaml
+baselines:
+ custom_repositories:
+ - repo_id: unsloth/YOUR-EXACT-MODEL-GGUF
+ revision: PROVIDER_COMMIT_SHA
+ enabled: true
+ short_source_name: UD
+ source_kind: huggingface_gguf_repository
+ require_all_includes_to_resolve: true
+ validate_tensor_names_against_source_model: true
+ includes:
+ - file_name: YOUR-EXACT-MODEL-UD-Q4_K_XL.gguf
+ baseline_family: Q4_K_M
+ quantize_base_name: Q4_K_M
+ display_name: UD_Q4_K_XL
+ allow_as_learning_baseline: true
+ allow_as_combination_carrier: true
+ allow_as_explicit_group_candidate: true
+```
+
+MagicQuant resolves the specified files, validates tensor-name parity, learns assignments, rebuilds using the local source model, and benchmarks the reconstruction. External downloads are durable cache data, distinct from temporary scratch artifacts. Review provider/model licensing and available disk space before enabling sources. Pure external learned baselines are not exported by default; inspect `output.export_external_learned_baselines` if you need them.
+
+For a provider-free campaign leave `baselines.custom_repositories` empty. See [learning from existing quantizations](../wiki/docs/Learning-From-Existing-Quantizations.md) for the research rationale.
+
+## Link upstream for the same model; build locally for variants
+
+For a release of the **same source model** that an external provider such as Unsloth already hosts, the maintainer recommends leaving this pipeline setting off:
+
+```yaml
+output:
+ export_external_learned_baselines: false
+```
+
+MagicQuant will link external pure-baseline survivors to the provider instead of exporting local copies. This gives the original creator credit and downloads, avoids unnecessary duplicate hosting, and is the friendly default. MagicQuant's comparisons measure locally reconstructed tensor configurations under its own conditions. They do not, by themselves, establish whether the provider's original artifact is better or worse. Finding a useful hybrid or size/fidelity trade is not a reason to claim superiority over an untested upstream release.
+
+For a **different model variant**, such as an uncensored model or another fine-tune, the upstream repository may not host those weights. In that case, build the full selected set locally, including both MagicQuant hybrids and external-derived baseline configurations. If running the pipeline on that variant, enable local external-baseline exports:
+
+```yaml
+output:
+ export_external_learned_baselines: true
+```
+
+The equivalent pipeline switch is `--export-external-learned-baselines`. Retain provider attribution and the applicable licenses even when rebuilding from different weights.
+
+**Clone command distinction:** `clone-repository-quants` already rebuilds every artifact entry in its input clone manifest, including external-derived entries; it does not consult this pipeline export flag. You do not need to enable the flag for that command. A source release can leave external export off and still include those configurations in its clone manifest. Clone mode rebuilds the entries present in that manifest, not every quantization ever offered by the provider.
+
+Cloning is a practical way to reuse a strong set of tensor configurations on a compatible variant without repeating full discovery. In the maintainer's experience, repeating discovery for modest fine-tunes can cost substantial time for little additional improvement. That is a starting assumption, not a guarantee: larger weight changes can shift the useful tradeoffs. Clone mode benchmarks the rebuilt artifacts locally, but does not repeat the full search or prove that inherited choices are optimal. Run discovery again when the model changes substantially, the measurements look poor, or you need stronger evidence for the target model. See the [clone command](commands.md#clone-known-tensor-configurations).
+
+## Limits of tensor-configuration copying
+
+MagicQuant learns quantization assignments for tensors and tensor groups, then rebuilds using the local source weights and its supported toolchain. **It does not automatically reproduce every technique used to create an external artifact.** A provider's extra weight transformations, custom quantization procedures, calibration recipes, or other processing are not reproduced merely because their tensor configuration was learned. Such behavior must be explicitly supported to be reproduced.
+
+Treat external configurations as evidence about useful assignments, not as a byte-for-byte clone of the provider's GGUF or a replication of its entire production process. Keep this distinction clear in release descriptions and benchmark claims. See the [research guide](../wiki/docs/Learning-From-Existing-Quantizations.md).
+
+## Retain enough evidence to reproduce a result
+
+Pin the MagicQuant package version and provider/model revisions. Keep the YAML, imatrix/evaluation data identity, llama.cpp revision, hardware context, and local `Runs/*/run.json` records. Provenance captures available versions and settings; it is not a complete frozen environment or numerical reproducibility guarantee. Remove private paths or credentials before sharing logs.
+
+Use the same measurement conditions for comparisons. Reuse validated caches deliberately; changing runtime roots or tensor profiles can change which evidence is selected. Avoid multiple campaigns in the same process and competing runs in the same model/runtime workspace.
+
+## Platform expectations
+
+Linux campaigns have been exercised, including a small-model conversion/quantization smoke test. Windows CI validates builds, ordinary tests, and tool packaging; end-to-end Windows campaigns remain unvalidated. Report failures with package/toolchain versions, sanitized configuration, and relevant logs.
diff --git a/docs/commands.md b/docs/commands.md
new file mode 100644
index 0000000..22dd852
--- /dev/null
+++ b/docs/commands.md
@@ -0,0 +1,72 @@
+# Commands and workflows
+
+Run these examples with the NuGet-installed `magicquant` CLI. Replace paths and identities with your own. For source builds, substitute `dotnet run --project src/MagicQuant -c Release --no-build --` for `magicquant`. `mq` in older help is shorthand, not an installed command.
+
+## Config creation and version
+
+`magicquant init-config --output config.yaml` copies the bundled tuning profile without runtime setup and refuses to overwrite a file. `magicquant --version` prints the application version and available source revision.
+
+## Full discovery pipeline
+
+```sh
+magicquant pipeline \
+ --config config.local.yaml \
+ --model-dir /data/models/my-model \
+ --architecture-family my-model-family \
+ --output-dir /data/exports/my-model \
+ --output-name-prefix MyModel
+```
+
+The pipeline converts/loads the native source, reviews tensor groups, resolves identity and baselines, measures isolation samples, predicts useful hybrids, validates them, and exports survivors. The exact runtime choices depend on benchmark truth and YAML policy. `evolution` invokes the same implementation. `build-hybrids` also enters the full pipeline; it is not limited to exporting previously selected files.
+
+`--use-imatrix` enables the configured acquisition/build flow. Provide an appropriate `imatrix` source in YAML. `--recheck-hardware-probe` refreshes execution-plan probing after hardware changes. `--skip-tensor-group-confirm` suppresses the tensor-group prompt for an already reviewed unattended campaign; it does not bypass all other confirmations.
+
+## Clone known tensor configurations
+
+```sh
+magicquant clone-repository-quants \
+ --config config.local.yaml \
+ --model-dir /data/models/compatible-model \
+ --architecture-family my-model-family \
+ --source-json /data/releases/source/magicquant-manifest/magicquant.clone-configs.json \
+ --output-dir /data/exports/cloned-model
+```
+
+Use `--source-repo owner/repo` instead to read a Hugging Face repository. `--source-json` also accepts an HTTP(S) URL. Clone mode rebuilds the tensor configurations and benchmarks them locally; it does not establish that the new model passed full discovery.
+
+Clone mode rebuilds all entries present in the manifest, including configurations originally learned from external providers. It does not use `output.export_external_learned_baselines`, which controls the pipeline's choice between local exports and upstream links. This is useful when cloning to a fine-tuned or uncensored variant that the original provider does not host. Review the [upstream-link versus variant-export guidance](best-practices.md#link-upstream-for-the-same-model-build-locally-for-variants) and [limits of tensor-configuration copying](best-practices.md#limits-of-tensor-configuration-copying).
+
+By default the manifest must match the target tensor inventory. `--allow-missing-manifest-tensors` explicitly allows a strict subset; unmatched target tensors use base quantization. `--missing-manifest-base-quant Q8_0` additionally selects that base quant. Use these only when that compatibility tradeoff is intended.
+
+## Validate predictions against existing measurements
+
+```sh
+magicquant validate-predictions \
+ --config config.local.yaml \
+ --model-dir /data/models/my-model \
+ --architecture-family my-model-family \
+ --output-dir /data/reports/my-model
+```
+
+This writes `prediction_validation_general.csv` and `prediction_validation_general.md`. It uses existing general-category SQLite benchmark truth rather than launching a fresh full discovery campaign. Startup still runs the common dependency validation and stale-artifact cleanup.
+
+For imatrix measurements supply `--imatrix-path /data/imatrix.dat` or `--imatrix-identity-hash ` to select the exact bucket. Merely enabling `flags.use_imatrix` does not select a validation bucket. Without either option, validation uses no-imatrix truth.
+
+## Rerun and reuse
+
+```sh
+magicquant pipeline \
+ --config config.local.yaml --reuse-existing-final-artifacts
+```
+
+The normal pipeline can reuse scoped measurements, but final export normally cleans/rebuilds output. Artifact reuse is an additional opt-in: pipeline exports require exact filename and benchmark byte-size matches; clone mode also validates its benchmark JSON rows. A file merely existing is not sufficient.
+
+## Help and exit status
+
+No arguments, `help`, `--help`, or `-h` display top-level help. ` --help` and ` -h` display command help without config loading, cleanup, database access, or dependency installation.
+
+The host returns `0` on normal completion/help, `2` for an unknown command, `130` for cooperative cancellation, and `1` for an exception caught at the command boundary. Services may handle individual candidate failures and continue a campaign, so also inspect the reported sample failures and final artifacts.
+
+Use `--check-config` on a normal command to validate local inputs without running it.
+Use `--strict-config` to reject unknown/inactive YAML settings rather than warning.
+See [testing](testing.md) for the opt-in real-model workflow.
diff --git a/docs/configuration.md b/docs/configuration.md
new file mode 100644
index 0000000..d80611e
--- /dev/null
+++ b/docs/configuration.md
@@ -0,0 +1,73 @@
+# Configuration and paths
+
+Create the complete editable tuning profile with `magicquant init-config --output config.yaml`, then pass it explicitly with `--config config.yaml`. See [best practices](best-practices.md) for scratch storage and optional Unsloth baselines.
+
+## Loading and precedence
+
+`--config ` selects a YAML file; otherwise the executable loads its adjacent `config.default.yaml`. Debug and Release follow the same rule. `config.dev.yaml` is no longer selected automatically.
+
+The loader deserializes the selected file into `MagicQuantYamlConfig`, whose property initializers supply omitted fields, applies supported CLI overrides, normalizes values, and updates `Config.Current` and `MQ.DB.Cache`. It does **not** merge a custom file with `config.default.yaml`. The distributed YAML intentionally differs from C# defaults for some research tuning settings. Copy that whole file to reproduce its profile.
+
+Unknown CLI options, duplicate options, missing values, and values supplied to presence-only flags are rejected. CLI string options generally override nonblank YAML values. Many boolean switches only enable a feature; use YAML to disable it unless a specific negative CLI switch exists. Use `--name value` or `--name=value`; quote paths with spaces using normal shell quoting.
+
+Unknown or inactive YAML keys produce a warning with their setting path and line number; `--strict-config` rejects them. Compare with the commented default file and `src/MagicQuant/Configuration/MagicQuantYamlConfig.cs`. CI strictly parses the distributed examples so their keys cannot silently drift.
+
+## Model-neutral startup
+
+The bundled profile selects no model, architecture, provider repository, imatrix source, GPU limit, or scratch disk. `init-config` produces that same profile. Set model/architecture paths and review output/storage before your first campaign; a blank model is intentionally rejected by preflight.
+
+Standard llama.cpp families and general research thresholds remain populated so the file describes a usable starting policy. These values are not a Qwen preset or a claim that every model shares an optimum. The Qwen/other-family patterns in `src/MQ.DB/tensor_groups.yaml` are model-compatibility rules, not a selected campaign; do not erase them when configuring a different model.
+
+Confirmed-anomaly expansion defaults to built-in Q6_K/Q5_K candidates. Add exact external baseline names only after configuring that source. The [external-provider template](../examples/pipeline-external.yaml) shows this opt-in; it contains placeholders and must be edited before use. Existing explicit local campaign configs are not rewritten.
+
+## Main sections
+
+| Section | Responsibility |
+| --- | --- |
+| `paths` | Source model, runtime root, llama.cpp, scratch roots, external cache directory name |
+| `identity` | Architecture-family name and explicit alias override |
+| `flags` | Imatrix, hardware reprobe, high-precision hybrid policy |
+| `learning` | Tensor review, safe profile rebucketing, targeted relearn requests |
+| `baselines` | Built-in roles and external repository definitions, including optional revision pins |
+| `hardware` | Per-GPU usable VRAM limits |
+| `imatrix` | Local/remote matrix or dataset source |
+| `isolation_pruning` | Isolation gating and damage/tradeoff thresholds |
+| `prediction` | Rank-safe KLD fitting and combination memory limits |
+| `candidate_selection` | Final candidate windows, fallback attempts, and spacing/tradeoff rules |
+| `anomaly_detection`, `synergy_detection` | Bounded contextual probes and evidence adjustments |
+| `output` | Export destination, naming, reuse, and external-baseline export policy |
+| `readme` | Generated model card title and frontmatter |
+
+Built-in `standard_baselines_mode` is `all`, `selected`, or `none`. `selected` uses the explicit role lists; an empty list enables none for that role. In `all`, those lists do not restrict built-ins. Custom repositories are configured independently. Native anchors may still be required by the runtime. Historical `standard_only`/`custom_only` comments did not describe implemented filtering modes.
+
+## Path contracts
+
+Paths do not expand shell variables or `~` inside YAML. Prefer absolute paths. Relative `--config`, model, runtime, llama.cpp, dataset, and scratch paths resolve against the process working directory, **not** the YAML file's directory.
+
+| Setting / command | Blank default | Relative value |
+| --- | --- | --- |
+| `paths.magic_quant_root` | `/MagicQuant` | Process working directory |
+| `paths.model_dir` | Required for model commands | Process working directory |
+| Model work directory | `/MagicQuant` | Derived from model path |
+| `pipeline` / `build-hybrids` output | `/MagicQuant/Final_Outputs` | Under `/MagicQuant` |
+| Clone output | `/MagicQuant/FinalOutput` | Process working directory |
+| Prediction validation output via CLI | `/MagicQuant/PredictionValidation` if no YAML output | Process working directory, exact destination |
+| Prediction validation with YAML output only | `/PredictionValidation` | YAML output resolves against process working directory |
+
+These historical output differences are preserved for existing campaigns. `OutputPathService` owns the rules. An absolute `output_dir` avoids ambiguity.
+
+`external_baseline_cache_dir_name` is intended to be a folder name beneath the model work directory; use a simple name such as `ExternalBaselines`. Scratch roots are separate from durable downloads. They need not be physically distinct disks, but the scheduler's one-heavy-writer-per-root policy assumes you choose them thoughtfully.
+
+## Model metadata and compatibility
+
+`readme.frontmatter` accepts arbitrary scalar/list metadata. Set `license`, `base_model`, and other provenance fields for the actual exported model; no model license is inferred for you.
+
+The old `evolution`, `survival`, sensitivity-group, brain-layer, and collapse-penalty config surfaces had no active consumers and have been removed from the typed configuration. Old YAML containing them is tolerated with warnings unless `--strict-config` is selected; they do not tune the current algorithm. See `candidate_selection` and the research wiki for current selection policy.
+
+## Preflight and cancellation
+
+Normal runs validate local inputs before applying global state, creating runtime directories, installing dependencies, or cleaning artifacts. `--check-config` performs only this check. Non-finite numeric values and null required sections are rejected. Clone preflight requires one source manifest/repository, and model discovery requires explicit architecture-family identity.
+
+Exports cannot contain the source model/runtime root or overlap protected model work directories such as GGUF, Benchmarks, Logs, Runs, and ExternalBaselines. Physical symlink targets are considered. These guards do not make arbitrary existing export contents safe: still choose a dedicated directory.
+
+Ctrl+C requests cooperative cancellation, stops active native work, and returns status 130. A second Ctrl+C requests immediate OS termination. Process/lease cleanup is cooperative; forced termination or power loss can still require stale-artifact cleanup on the next run.
diff --git a/docs/extending.md b/docs/extending.md
new file mode 100644
index 0000000..c4edf4d
--- /dev/null
+++ b/docs/extending.md
@@ -0,0 +1,27 @@
+# Worked contributor examples
+
+## Add a configuration option
+
+Suppose a future change adds a limit to a selection stage. First find the owning policy (`RuntimeCandidateSelectionConfig` and its service), and decide whether the option actually affects behavior. Do not add another dormant knob.
+
+1. Add a clearly named typed property with its default and a comment describing the decision it controls.
+2. Add the underscored YAML key to `config.default.yaml`; decide explicitly whether the distributed tuning profile uses the same default.
+3. If a CLI override is useful, add it to `MagicQuantYamlLoader.ApplyCliOverrides` and the value/flag contract in `CliOptionValidator`. Validate numeric input with invariant culture. Add preflight validation for constraints that should fail before work begins.
+4. Add tests for omitted/default values, CLI precedence, and the observable stage behavior. Keep any changed `Config.Current`/`Cache` state scoped and restored.
+5. Update command help and configuration documentation. Run the strict distributed-config tests and the complete suite.
+
+`YamlConfigurationDiagnostics` derives known keys from the typed schema, so it does not need a duplicate property-name list. Free-form `readme.frontmatter` and dictionary keys remain user-defined.
+
+## Change a path or process invocation
+
+For a new benchmark option, update `BenchmarkCommands`, then assert the literal argv sequence in `BenchmarkContractTests`. Use `NativeCommand.CreateStartInfo`, not interpolated shell strings. Include a path with spaces and metacharacters in the test. Keep retries in the calling service; `ProcessRunner` returns a nonzero exit code and only throws for launch/IO/cancellation failures.
+
+For conversion behavior, `NativeModelConversionService` accepts `IProcessRunner`. `NativeConversionTests` injects a small fake that writes a partial output and returns failure or cancellation. That verifies incomplete artifacts never acquire a reusable success marker without invoking Python or a model. Keep production code using the real runner by default.
+
+For output destinations, update `OutputPathService` and `PathSafety`, preserving existing command semantics or documenting a deliberate migration. Test ordinary paths, parent/child collisions, similarly prefixed sibling directories, and linked directories. Run the optional smoke workflow if native argument or artifact lifecycle behavior changed.
+
+## Work on numerical policy
+
+Read the research wiki and the owning service before editing. Add a regression around the actual measured/predicted tradeoff and its context identity. Do not replace exact custom tensor assignments with a built-in family surrogate merely to make a test pass. Model hash, architecture/profile identity, and imatrix scope are part of the input.
+
+Global configuration and registries still exist; this cleanup does not support multiple concurrent campaigns in one process. New helpers should accept explicit inputs, return results, and be testable without mutating those registries. Extract a responsibility with behavior tests rather than mechanically splitting a large class into partial files.
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000..63f04c9
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,14 @@
+# Using and developing MagicQuant
+
+Start with the [project briefing and quick start](../README.md). These guides describe the application; the [research wiki](../wiki/index.md) explains its measurement and selection methodology.
+
+- [Setup](setup.md): NuGet installation, toolchain preparation, source builds, troubleshooting.
+- [Configuration](configuration.md): YAML profile, CLI overrides and path rules.
+- [Commands](commands.md): discovery, clone/export and prediction validation.
+- [Best practices](best-practices.md): scratch disks, optional Unsloth baselines and reproducibility.
+- [Storage](storage.md): runtime/model directories, caches, scratch and provenance.
+- [Architecture](architecture.md): code map, service responsibilities and numerical invariants.
+- [Extending the code](extending.md): worked examples for contributors.
+- [Testing](testing.md): ordinary PR checks, package tests and opt-in model smoke.
+- [Releases](releases.md): automatic versioning and trusted publishing setup.
+- [Migration](migration.md): legacy command/config compatibility and repository history.
diff --git a/docs/migration.md b/docs/migration.md
new file mode 100644
index 0000000..23d9713
--- /dev/null
+++ b/docs/migration.md
@@ -0,0 +1,43 @@
+# Compatibility notes for existing users
+
+This cleanup retains numerical selection policy, SQLite schemas/migrations, manifest names, and existing output destinations. There is no data migration.
+
+## Startup and names
+
+- Prefer `pipeline`; `evolution` remains a case-insensitive CLI alias. The historical `Evolution` C# class delegates through inheritance to `QuantizationPipeline`.
+- Debug builds no longer inject a personal command, model path, or architecture family. With no arguments, both build configurations show help.
+- Pass `--config /path/to/your-config.yaml` explicitly for personal campaigns. Debug no longer auto-selects `config.dev.yaml`. Previously tracked developer campaigns were replaced by portable examples; existing local copies still load when selected explicitly.
+- Command help runs before initialization. Unknown commands return status 2; caught command/config failures return status 1.
+- `initialize-llama-cpp` now honors custom paths from YAML directly, caches the validated paths, and reports invalid custom environments as failures instead of printing an error and returning successfully.
+
+## Removed inactive surfaces
+
+The old evolution/survival knobs and unused sensitivity, brain-layer, collapse-penalty, and MoE-indicator config lists had no active runtime consumers. Their typed properties and inactive CLI overrides were removed. Legacy YAML keys warn (or fail with `--strict-config`); they never tuned the current chooser. Use `prediction`, `candidate_selection`, `anomaly_detection`, and `synergy_detection` for current policy.
+
+Startup no longer enumerates the entire combination universe merely to compare it with a count. That diagnostic helper remains available for explicit development checks. Actual pipeline generation and policy checks remain in place.
+
+## Paths and metadata
+
+Relative-path behavior is preserved, including `Final_Outputs` for pipeline and `FinalOutput` for clone. The shared path services make those differences explicit. Use absolute output paths when sharing configs.
+
+The distributed model-card template no longer asserts `apache-2.0` or a placeholder `base_model`. Set real provenance in your campaign YAML before publishing. Existing explicit frontmatter is still honored.
+
+The documentation now uses the implemented built-in baseline modes (`all`, `selected`, `none`). Older comments referring to `standard_only` and `custom_only` did not match the loader's behavior.
+
+To recover a previously tracked campaign before adopting the new layout, save it as
+an ignored local config (replace the revision placeholder):
+
+```sh
+git show :MagicQuant/config.dev.yaml > config.local.yaml
+```
+
+Then continue with `pipeline --config config.local.yaml` and your explicit model/family
+arguments. The change to DEBUG startup does not change values inside that saved YAML.
+
+## Deeper readiness changes
+
+CLI typos/duplicate options and missing values now fail before work; unknown YAML keys warn, and `--strict-config` makes them errors. `--check-config` performs read-only preflight. Unsafe managed/output overlaps and missing model inputs fail before dependency setup or cleanup. Numeric CLI parsing uses an invariant decimal point.
+
+Native processes now share cancellation/log cleanup and use literal argv for benchmark and quantization launches. CPU llama-bench uses `-ngl 0` because the tested native version rejects the historical `-backend cpu` argument. Native conversion and low-level export require completion markers for reuse; partial/canceled builds are removed. Existing higher-level benchmark-size reuse checks remain in place.
+
+.NET package references were updated within the 10.0 patch line to remove the previously reported transitive vulnerabilities. Package lock files are committed. Database schemas and research selection formulas were not changed.
diff --git a/docs/nuget-readme.md b/docs/nuget-readme.md
new file mode 100644
index 0000000..efdf4a3
--- /dev/null
+++ b/docs/nuget-readme.md
@@ -0,0 +1,34 @@
+# MagicQuant
+
+**Benchmark-driven GGUF quantization and mixed-precision hybrid discovery for llama.cpp.**
+
+MagicQuant measures baselines, learns tensor-group assignments, discovers promising hybrid quantizations, and validates size/fidelity tradeoffs before exporting selected GGUF artifacts. It is a command-line tool, not an evolutionary search algorithm or a new quantization format.
+
+## Install
+
+Install the .NET 10 SDK, then:
+
+```sh
+dotnet tool install --global MagicQuant
+magicquant init-config --output config.yaml
+```
+
+Edit model, architecture, output, and scratch paths, then prepare the native toolchain and run:
+
+```sh
+magicquant initialize-llama-cpp
+magicquant pipeline --config config.yaml --check-config --strict-config
+magicquant pipeline --config config.yaml
+```
+
+NuGet does not bundle model weights or a ready-to-use GPU toolchain. Linux is the tested campaign platform; Windows has automated build/unit/package checks but full campaigns remain unvalidated.
+
+Fast, separate physical scratch disks can help substantially when repeated large GGUF writes are the bottleneck. External quantization providers are optional; Unsloth is the maintainer's recommended starting point for compatible tensor-assignment evidence.
+
+- [Project briefing and research](https://github.com/magiccodingman/MagicQuant)
+- [Installation and prerequisites](https://github.com/magiccodingman/MagicQuant/blob/main/docs/setup.md)
+- [Configuration](https://github.com/magiccodingman/MagicQuant/blob/main/docs/configuration.md)
+- [Scratch disks and optional Unsloth learning](https://github.com/magiccodingman/MagicQuant/blob/main/docs/best-practices.md)
+- [Support spare-time development and storage costs](https://sayou.biz/support)
+
+MagicQuant is licensed under **AGPL-3.0-only**. Model weights and generated GGUFs retain their applicable licenses. See [license and third-party notices](https://github.com/magiccodingman/MagicQuant/blob/main/THIRD-PARTY-NOTICES.md).
diff --git a/docs/releases.md b/docs/releases.md
new file mode 100644
index 0000000..b94b364
--- /dev/null
+++ b/docs/releases.md
@@ -0,0 +1,43 @@
+# NuGet releases
+
+MagicQuant is packaged as a .NET tool, package ID `MagicQuant`, executable `magicquant`. `.github/workflows/publish-nuget.yml` publishes when a commit reaches `release`, normally through a merged PR. Pushes directly to `release` also trigger it; use branch protection to require PRs if desired. Manual dispatch is available to retry publication and only runs on `release`.
+
+## Trusted publishing setup
+
+Configure the following on NuGet.org under your account's **Trusted Publishing** settings:
+
+| Field | Value |
+| --- | --- |
+| Repository owner | `magiccodingman` |
+| Repository | `MagicQuant` |
+| Workflow filename | `publish-nuget.yml` |
+| Environment | `release` |
+| Package scope | `MagicQuant` (allow creation for the first release) |
+
+The workflow filename has no `.github/workflows/` prefix in NuGet's policy. The publishing job uses **`environment: release`** and requests `id-token: write`. Create that GitHub environment and restrict its deployment branch to `release`. Add the repository secret **`NUGET_USER`** containing your NuGet profile username, not an email address or API key. Choose the intended package owner when creating the policy.
+
+The workflow uses `NuGet/login@v1` to exchange GitHub OIDC identity for a temporary NuGet key immediately before pushing. No permanent NuGet API key is needed. See [NuGet's official guide](https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing). Private-repository policies may need activation within NuGet's stated time window; make sure the source for a public package is accessible to its recipients when launching.
+
+## Automatic versions
+
+The first release is **0.1.0**. Each new release commit increments the greatest reserved stable version's patch number: `0.1.0`, `0.1.1`, `0.1.2`, and so on. You do not edit a version for ordinary patch releases.
+
+`release-version.txt` is a **minimum next version**, not a counter. To release a new minor or major version, raise it in the release PR (for example, `0.2.0` or `1.0.0`). Leaving it unchanged continues patch increments. Only stable `major.minor.patch` versions are supported by the release workflow.
+
+After Linux/Windows validation passes, the workflow reserves the chosen version with an annotated `vX.Y.Z` tag pointing at the exact commit. Tag creation on the remote is the atomic claim; concurrent releases retry a version collision without sharing the same version. Jobs are not canceled merely because another release arrives. Publication order may differ if runs finish at different times.
+
+A retry of the **same commit** reuses its tag/version, even if later releases exist. A failed pack or push can leave a reserved tag; rerun that workflow to finish it. Do not delete or move release tags. A new commit gets a new version. Gaps are acceptable if a failed release is intentionally abandoned.
+
+The release package is built with that version and source revision, installed into a clean tool directory, and tested before publication. `--skip-duplicate` makes retrying an already published version harmless; the first successfully published package remains authoritative. NuGet versions are immutable. A GitHub release record is created after publication.
+
+## Validation and maintenance
+
+PR CI validates Linux and Windows, Debug and Release, with locked restores and warnings as errors. Each job tests a locally packed `0.0.0-ci` package without publishing it. Release validation repeats ordinary and package checks on Linux and Windows before reserving a version. The exact versioned release package is then verified again on Linux before upload.
+
+Package checks inspect bundled config, Python helper, native libraries, license/readme/icon metadata, and tool startup from a directory outside the source tree. They exercise config creation, refusal to overwrite, and read-only path validation. These are not full Windows campaigns or numerical parity tests.
+
+The package uses committed dependencies; the installed llama.cpp/Python runtime is separately managed. Record both for research reproducibility. Required merge checks and environment policies are repository settings, not guaranteed merely by committing a workflow.
+
+## Migration PR merge method
+
+The launch PR connects the original Wiki and Pipeline histories through an unsquashed subtree import, then reorganizes the tree in later commits. **Merge that PR with a merge commit, not squash or rebase**, to retain both histories in `main`. Do not force-push the existing repository history. Future ordinary PRs can use the project's preferred merge policy.
diff --git a/docs/setup.md b/docs/setup.md
new file mode 100644
index 0000000..04224ae
--- /dev/null
+++ b/docs/setup.md
@@ -0,0 +1,82 @@
+# Setup and troubleshooting
+
+## Install from NuGet
+
+Linux is the tested campaign platform. Windows CI covers builds, ordinary tests and installed-package startup; full Windows campaigns remain unvalidated. Install the [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) first.
+
+```sh
+dotnet tool install --global MagicQuant
+magicquant --version
+magicquant init-config --output config.yaml
+```
+
+NuGet publication begins with the first successful release. If the package is not yet listed, use the source-build route below. The CLI command is `magicquant`; `dotnet add package` is not the installation command for this application.
+
+If your shell cannot find `magicquant`, ensure the .NET tools directory is on `PATH`: `$HOME/.dotnet/tools` on Linux or `%USERPROFILE%\.dotnet\tools` on Windows, then reopen the shell. Use `dotnet tool update --global MagicQuant` to update, `dotnet tool uninstall --global MagicQuant` to remove the tool, or add `--version X.Y.Z` to install an exact version. Removing/updating the tool does not remove model/runtime data.
+
+Edit the generated YAML; set `paths.model_dir`, `identity.architecture_family_name`, `output.output_dir`, and dedicated `paths.scratch_roots`. For a first run:
+
+```sh
+magicquant initialize-llama-cpp
+magicquant pipeline --config ./config.yaml --check-config --strict-config
+magicquant pipeline --config ./config.yaml
+```
+
+`init-config` copies the full bundled tuning profile and refuses to overwrite existing files. `--check-config` is read-only. The actual pipeline can perform dependency setup and write model/runtime artifacts. Fast scratch disks are especially valuable for the repeated large GGUF writes; read [best practices](best-practices.md) before a large campaign.
+
+## Build from source
+
+All solution projects target `net10.0`. The solution includes `src/MagicQuant`, `src/MQ.DB`, `tests/MagicQuant.Tests`, and the offline `tests/MagicQuant.ProcessFixture` helper.
+
+```sh
+git clone https://github.com/magiccodingman/MagicQuant.git
+cd MagicQuant
+dotnet restore MagicQuant.sln --locked-mode -warnaserror
+dotnet build MagicQuant.sln -c Release --no-restore -warnaserror
+dotnet test MagicQuant.sln -c Release --no-build
+dotnet run --project src/MagicQuant -c Release --no-build -- init-config --output config.yaml
+```
+
+For source execution, replace `magicquant` in the other examples with `dotnet run --project src/MagicQuant -c Release --no-build --`. Build/test commands do not install llama.cpp or Python packages; ordinary tests do not require CUDA or weights. To exercise the actual package locally, see [testing](testing.md).
+
+## Runtime setup
+
+`initialize-llama-cpp` prepares the shared `/MagicQuant` installation. On apt-based Linux it checks build tools, CMake, Ninja, Git, Python/venv/pip, and libcurl development files; NVIDIA detection also adds a CUDA toolkit package. Missing packages may trigger sudo. The Python setup installs model conversion and dataset dependencies, PyTorch, and llama-cpp-python. `--update` requests dependency updates and a native rebuild, so record the resulting llama.cpp revision for reproducible research.
+
+The installer uses the configured hardware to choose native build options. macOS automatic setup is unsupported. Windows bootstrap code exists, but validate it on the target machine rather than assuming parity with Linux.
+
+You can bypass automatic native setup by providing an existing environment:
+
+```yaml
+paths:
+ llama_root: /opt/llama.cpp
+ llama_bin: /opt/llama.cpp/build/bin
+ convert_script: /opt/llama.cpp/convert_hf_to_gguf.py
+```
+
+All three paths are required together. This branch validates their existence and detects hardware; it does not install the Python dependencies. The application expects its Python executable under `/MagicQuant-Env/bin/python` on Linux, or `MagicQuant-Env/python.exe` on Windows. Use the normal initializer first when using the default runtime root. `--validate` and `--verify` are historical setup flags, not read-only dependency checks.
+
+An explicit `paths.magic_quant_root` changes the SQLite/runtime root but **does not relocate the shared installer**. If you isolate that root, provision its expected Python environment as well. For example, on Linux an isolated root can link `MagicQuant-Env` to an already initialized shared environment. Make that choice explicitly; sharing Python still shares installed dependency versions. See [storage](storage.md) before moving existing campaign data.
+
+## Model input
+
+Use a complete source model directory supported by your llama.cpp conversion revision. `pipeline` requires at least one top-level `.safetensors` file. Model config/tokenizer files are also needed by conversion. A directory containing only a downloaded quantized GGUF is not a source model directory.
+
+Architecture-family identity scopes learned data. Choose the intended family deliberately; `--allow-architecture-family-alias-override` bypasses an identity guard and should not be a routine setup flag.
+
+## Troubleshooting
+
+| Symptom | Check |
+| --- | --- |
+| Missing SDK / unsupported target framework | `dotnet --info`; install a .NET 10 SDK |
+| Missing config | Pass `--config` explicitly; the default is next to the executable |
+| Missing model directory or safetensors | Set `paths.model_dir` to the complete local source model |
+| Partial custom llama.cpp paths | Supply root, binary directory, and converter together |
+| Python executable/package failure with isolated root | Check `/MagicQuant-Env` and its installed packages |
+| Conversion or unknown tensor failure | Check model support in the actual llama.cpp checkout and review tensor grouping |
+| Hardware plan no longer fits | Check GPU visibility and configured VRAM limits; use `--recheck-hardware-probe` after hardware changes |
+| Unexpected export location | Check command-specific relative-path rules in [configuration](configuration.md) |
+| Prediction reports use the wrong bucket | Use the same model/runtime database and exact imatrix identity as the measured run |
+| No cached results reused | Check model hash, architecture family, tensor-group profile, and imatrix scope before considering relearn |
+
+For a useful bug report include the command, sanitized YAML, commit, .NET/OS/native dependency versions, GPU information, and relevant logs. Do not attach model weights or a whole runtime database by default.
diff --git a/docs/storage.md b/docs/storage.md
new file mode 100644
index 0000000..bfe81f1
--- /dev/null
+++ b/docs/storage.md
@@ -0,0 +1,54 @@
+# Storage, caching, and reruns
+
+The runtime root and model work directory are different things. With default settings:
+
+```text
+/MagicQuant/
+ MagicQuant_SQLite.db # measured truth, learned mappings, hardware probe state
+ llama.cpp/ # shared native checkout/build
+ MagicQuant-Env/ # Python environment
+
+/
+ *.safetensors # input weights
+ config.json # source metadata and tokenizer assets alongside it
+ MagicQuant/
+ GGUF/ # durable native/base artifacts
+ Benchmarks/ # measurements, corpora, reference logits
+ Logs/Quantization/ # quantization process logs
+ Runs//run.json # local campaign provenance and terminal status
+ ExternalBaselines/ # durable downloaded external GGUFs
+ MagicQuant_Combinations___.duckdb
+ Final_Outputs/ # pipeline default export directory
+ FinalOutput/ # clone default export directory
+ PredictionValidation/ # prediction report default
+```
+
+Output is configurable and only directories needed by a run are created. Other service-specific files may also appear. Final exports put JSON evidence under `magicquant-manifest/`, including clone configurations, final survivors, replacements, hybrid maps, isolation samples, and bad-trade reports as appropriate to the workflow. `MagicQuantManifestPathService` owns those filenames and links.
+
+## Durable truth
+
+SQLite is initialized/migrated automatically when its context is opened. Existing migrations and stored IDs are compatibility boundaries. Back up the database and related model artifacts while the process is stopped before manual moves or experiments. Do not delete the database as routine troubleshooting: it contains measured evidence that can be expensive to reconstruct.
+
+Changing the runtime root selects another SQLite database. It does not move data or the shared native installer. Changing a tensor-group regex/profile changes the applicable evidence scope; normal rebucketing can copy existing learned mappings into the new profile without erasing the original observations. Targeted relearn settings explicitly delete scoped truth after the program's confirmation step.
+
+## Derived candidate space
+
+DuckDB stores the current allowed combinations and prediction materialization. Both writer and reader resolve the same model/imatrix/high-precision filename through `CombinationDatabasePathService`. The pipeline rebuilds candidate data; the database is not interchangeable with SQLite benchmark evidence.
+
+Do not rename its files or add a scope component on only one side of a writer/reader pair. That can make a populated candidate space appear empty.
+
+## Scratch and cleanup
+
+Configured `paths.scratch_roots` hold `.MagicQuant_tmp` directories for leased heavy writes; blank configuration uses the model-local fallback. The service enforces one heavy writer per root and uses artifact leases and stale-state checks. Separate directory names do not establish separate physical disks.
+
+External baseline downloads are durable and managed separately from transient quantization artifacts. Startup cleanup runs before commands and model-specific cleanup runs after model paths are initialized. Keep personal files outside both managed scratch and dedicated export directories.
+
+## Reproducibility
+
+Retain the exact command, selected YAML, program commit, llama.cpp revision, model source revision/hash, external repository revision pins, imatrix identity/source, hardware plan, and emitted manifests/benchmark reports for a release. Custom repository `revision` can pin a branch, tag, or commit; a commit avoids moving references. Reusing output does not replace recording these inputs.
+
+## Local run provenance
+
+After preflight, each real command creates a unique `Runs//run.json` under the model work directory (or runtime root for setup). It snapshots argv, normalized input configuration, config SHA-256, program/.NET versions, and timestamps. Available llama.cpp revision, Python version/package inventory, final model/profile/imatrix identities, output path, and completion/failure/cancellation status are recorded as execution progresses. An unfinalized `running` record may indicate abrupt termination.
+
+Writes replace the manifest atomically. Records are separate from export cleanup and are **not published automatically**: argv/config may include private paths or URLs. Review before sharing. A missing tool-version field means it could not be obtained, not that the tool had a known default version.
diff --git a/docs/testing.md b/docs/testing.md
new file mode 100644
index 0000000..a062963
--- /dev/null
+++ b/docs/testing.md
@@ -0,0 +1,71 @@
+# Testing and PR checks
+
+## Ordinary checks
+
+```sh
+dotnet restore MagicQuant.sln --locked-mode -warnaserror
+dotnet build MagicQuant.sln -c Release --no-restore -warnaserror
+dotnet test MagicQuant.sln -c Release --no-build
+```
+
+Repeat with `-c Debug` when changing startup or compilation-dependent behavior. CI runs both configurations on Linux and Windows. It restores the committed NuGet lock files, treats warnings as errors, runs all ordinary tests, and uploads TRX reports. `MagicQuant.ProcessFixture` is a small offline executable used to test native process exit, full stdout/stderr pipes, literal arguments, and cancellation; it is not a user command.
+
+The suite covers CLI startup/preflight, YAML contracts, managed/output path containment, symlinks on Linux, SQLite/DuckDB identity, native argument construction, log parsing, conversion success markers, concurrency policy, and existing research-policy regressions. It does not establish numerical equivalence for every model or hardware topology. Tests remain serial because the legacy runtime registries are shared.
+
+To update dependencies intentionally, edit package versions, run an unlocked `dotnet restore`, review `packages.lock.json` changes, and rerun the suite. Audit with:
+
+```sh
+dotnet list MagicQuant.sln package --vulnerable --include-transitive
+```
+
+## Read-only campaign validation
+
+```sh
+dotnet run --project src/MagicQuant -c Release -- pipeline \
+ --config config.local.yaml --check-config --strict-config
+```
+
+This reads YAML and local input/path metadata but does not create a database, initialize tools, clean artifacts, or quantize. `--strict-config` turns unknown/inactive YAML keys into errors; without it, those keys produce warnings. Normal runs perform the same preflight before runtime mutation. This check verifies local paths and model input structure, not available RAM, remote repository existence, tokenizer compatibility with every converter, or numerical quality.
+
+## Opt-in small-model smoke test
+
+The test is explicitly skipped in ordinary CI. On a prepared Linux machine, set these variables to existing resources and a dedicated writable output parent:
+
+```sh
+MQ_RUN_MODEL_SMOKE=1 \
+MQ_SMOKE_MODEL=/data/models/small-model \
+MQ_SMOKE_LLAMA_ROOT=/opt/llama.cpp \
+MQ_SMOKE_RUNTIME_ROOT=/data/MagicQuant \
+MQ_SMOKE_OUTPUT=/data/test-results/magicquant \
+dotnet test tests/MagicQuant.Tests -c Release --filter Category=ModelSmoke
+```
+
+The runtime root must contain `MagicQuant-Env` with the converter/gguf dependencies already installed. The test does not install dependencies or download a model. It copies source metadata and links weights into a unique test model directory containing spaces, then exercises native conversion/reuse, Q8 scratch leases, export/reuse, GGUF metadata parity, the native CPU benchmark, and manifest-path writing. It has a 20-minute cancellation deadline. It removes generated GGUFs and input weight links and retains logs plus `smoke-result.json` beneath the output parent. The sample tensor-map JSON is a smoke artifact, not a full clone/release manifest.
+
+This is an IO/toolchain smoke check, not a full discovery campaign or a PPL/KLD parity study. Quantization/selection policy changes still need before/after measurements on representative models.
+
+A manual GitHub Actions workflow is provided for a trusted self-hosted runner labeled `magicquant-smoke`. Review the selected ref before dispatching it. It never runs automatically for an incoming PR, and no runner has been provisioned by this change. Do not route untrusted PR code to a machine containing private model or campaign data.
+
+## Requiring checks before merge
+
+The workflow reports failures; branch protection or a ruleset must require its checks to block merges. Configure `main` to require all four Linux/Windows Debug/Release test jobs after the workflow has run. If merge queues are enabled later, add a `merge_group` workflow trigger as well.
+
+The unified MagicQuant repository is public. At launch preparation, `main` had no branch protection configured. Require the four `test (OS, Configuration)` checks plus `Secret scan` in repository settings if you want failures to block merging. Configure the `release` branch and deployment environment deliberately before publishing; a workflow alone does not prevent bypassing checks.
+
+## Installed-package and release checks
+
+```sh
+python3 -m unittest discover -s scripts -p 'test_*.py'
+dotnet pack src/MagicQuant -c Release --no-restore -p:Version=0.0.0-ci -o artifacts -warnaserror
+python3 scripts/package_smoke.py artifacts/MagicQuant.0.0.0-ci.nupkg
+```
+
+Use `python` instead of `python3` where appropriate. The package smoke installs only from a temporary local feed, verifies shipped assets and native library presence, exercises CLI help/version and config creation outside the checkout, checks paths containing spaces, and confirms preflight is read-only. It never installs a model or native toolchain. Release-version tests use an isolated local bare Git remote; they never push to GitHub.
+
+PR CI runs these checks on both operating systems. [Release documentation](releases.md) explains the separately gated trusted-publishing workflow.
+
+## Secret checks
+
+The `Secret scan` CI job runs a checksum-pinned Gitleaks binary on full fetched history and the current tree. On Linux x64 run `python3 scripts/scan_secrets.py`. Reports redact candidate credentials. `.gitleaks.toml` retains default detectors and narrowly allows only the exact known tensor-name test fixture; do not suppress whole directories to silence new findings.
+
+A scanner is one check, not proof that every kind of sensitive information is absent. Review changes for private model names, personal paths, datasets, and credentials too. Git history preserves deleted files and author metadata. If a real credential is found, rotate it before planning any history rewrite.
diff --git a/examples/clone.yaml b/examples/clone.yaml
new file mode 100644
index 0000000..29482f7
--- /dev/null
+++ b/examples/clone.yaml
@@ -0,0 +1,12 @@
+# Supply --source-json or --source-repo on the command line.
+# Clone rebuilds all manifest entries, including external-derived baselines.
+# output.export_external_learned_baselines is a pipeline-only export choice;
+# it is not needed to include those entries when cloning to a model variant.
+paths:
+ model_dir: /data/models/my-compatible-model
+identity:
+ architecture_family_name: my-model-family
+output:
+ output_dir: /data/exports/my-cloned-model
+ output_name_prefix: MyClonedModel
+ reuse_existing_final_artifacts: true
diff --git a/examples/pipeline-external.yaml b/examples/pipeline-external.yaml
new file mode 100644
index 0000000..81c3b16
--- /dev/null
+++ b/examples/pipeline-external.yaml
@@ -0,0 +1,40 @@
+# Optional provider template, NOT a ready-to-run model preset.
+# Replace ALL placeholders and confirm the exact model/revision/file match.
+# For the bundled research tuning profile, first run magicquant init-config,
+# then copy the baselines/anomaly sections below into your generated config.
+# Loading this file directly uses typed defaults for omitted sections.
+paths:
+ model_dir: /data/models/YOUR-SOURCE-MODEL
+identity:
+ architecture_family_name: YOUR-MODEL-FAMILY
+output:
+ output_dir: /data/exports/YOUR-MODEL-MagicQuant
+ output_name_prefix: YOUR-MODEL
+ # Prefer upstream links when the provider hosts the same model.
+ export_external_learned_baselines: false
+baselines:
+ standard_baselines_mode: all
+ custom_repositories:
+ - repo_id: unsloth/YOUR-EXACT-MODEL-GGUF
+ revision: PROVIDER_COMMIT_SHA
+ enabled: true
+ short_source_name: UD
+ source_kind: huggingface_gguf_repository
+ require_all_includes_to_resolve: true
+ validate_tensor_names_against_source_model: true
+ delete_partial_or_dirty_downloads: true
+ resume_or_retry_downloads: true
+ includes:
+ - file_name: YOUR-EXACT-MODEL-UD-Q6_K_XL.gguf
+ baseline_family: Q6_K
+ quantize_base_name: Q6_K
+ display_name: UD_Q6_K_XL
+ allow_as_learning_baseline: true
+ allow_as_combination_carrier: true
+ allow_as_explicit_group_candidate: true
+# Optional: include the configured external baseline in the small expansion pass
+# around confirmed anomalies. This is not required just to learn from a provider.
+anomaly_detection:
+ confirmed_anomaly_expansion:
+ allowed_reference_quants: [Q8_0]
+ allowed_candidate_quants: [Q6_K, Q5_K, UD_Q6_K_XL]
diff --git a/examples/pipeline.yaml b/examples/pipeline.yaml
new file mode 100644
index 0000000..6385850
--- /dev/null
+++ b/examples/pipeline.yaml
@@ -0,0 +1,12 @@
+# Copy to config.local.yaml and edit. Pass explicitly with --config.
+# Omitted settings use C# defaults, not a merge with config.default.yaml.
+# For the full distributed tuning profile, run magicquant init-config instead.
+paths:
+ model_dir: /data/models/my-model
+identity:
+ architecture_family_name: my-model-family
+output:
+ output_dir: /data/exports/my-model-MagicQuant
+ output_name_prefix: MyModel
+learning:
+ confirm_tensor_group_profile: true
diff --git a/licenses/Blake3-license.txt b/licenses/Blake3-license.txt
new file mode 100644
index 0000000..e091cb9
--- /dev/null
+++ b/licenses/Blake3-license.txt
@@ -0,0 +1,29 @@
+Copyright (c) 2020, Alexandre Mutel
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification
+, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+> The underlying blake3_dotnet native library is using the code from https://github.com/BLAKE3-team/BLAKE3
+> with the following license https://github.com/BLAKE3-team/BLAKE3/blob/master/LICENSE
+
+This work is released into the public domain with CC0 1.0. Alternatively, it is
+licensed under the Apache License 2.0.
\ No newline at end of file
diff --git a/licenses/DuckDB.NET.Bindings.Full-LICENSE-DuckDB.txt b/licenses/DuckDB.NET.Bindings.Full-LICENSE-DuckDB.txt
new file mode 100644
index 0000000..a79d955
--- /dev/null
+++ b/licenses/DuckDB.NET.Bindings.Full-LICENSE-DuckDB.txt
@@ -0,0 +1,7 @@
+Copyright 2018-2022 Stichting DuckDB Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/licenses/DuckDB.NET.Bindings.Full-LICENSE.md b/licenses/DuckDB.NET.Bindings.Full-LICENSE.md
new file mode 100644
index 0000000..7a5aace
--- /dev/null
+++ b/licenses/DuckDB.NET.Bindings.Full-LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Giorgi Dalakishvili
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/LibGit2Sharp-LICENSE.md b/licenses/LibGit2Sharp-LICENSE.md
new file mode 100644
index 0000000..c705543
--- /dev/null
+++ b/licenses/LibGit2Sharp-LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) LibGit2Sharp contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/licenses/LibGit2Sharp.NativeBinaries-libgit2.license.txt b/licenses/LibGit2Sharp.NativeBinaries-libgit2.license.txt
new file mode 100644
index 0000000..701792e
--- /dev/null
+++ b/licenses/LibGit2Sharp.NativeBinaries-libgit2.license.txt
@@ -0,0 +1,1410 @@
+ libgit2 is Copyright (C) the libgit2 contributors,
+ unless otherwise stated. See the AUTHORS file for details.
+
+ Note that the only valid version of the GPL as far as this project
+ is concerned is _this_ particular version of the license (ie v2, not
+ v2.2 or v3.x or whatever), unless explicitly otherwise stated.
+
+----------------------------------------------------------------------
+
+ LINKING EXCEPTION
+
+ In addition to the permissions in the GNU General Public License,
+ the authors give you unlimited permission to link the compiled
+ version of this library into combinations with other programs,
+ and to distribute those combinations without any restriction
+ coming from the use of this file. (The General Public License
+ restrictions do apply in other respects; for example, they cover
+ modification of the file, and distribution when not linked into
+ a combined executable.)
+
+----------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
+----------------------------------------------------------------------
+
+The bundled ZLib code is licensed under the ZLib license:
+
+ (C) 1995-2022 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+----------------------------------------------------------------------
+
+The Clar framework is licensed under the ISC license:
+
+Copyright (c) 2011-2015 Vicent Marti
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+----------------------------------------------------------------------
+
+The bundled PCRE implementation (deps/pcre/) is licensed under the BSD
+license.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the name of Google
+ Inc. nor the names of their contributors may be used to endorse or
+ promote products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+
+The bundled winhttp definition files (deps/winhttp/) are licensed under
+the GNU LGPL (available at the end of this file).
+
+Copyright (C) 2007 Francois Gouget
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+
+----------------------------------------------------------------------
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+----------------------------------------------------------------------
+
+The bundled SHA1 collision detection code is licensed under the MIT license:
+
+MIT License
+
+Copyright (c) 2017:
+ Marc Stevens
+ Cryptology Group
+ Centrum Wiskunde & Informatica
+ P.O. Box 94079, 1090 GB Amsterdam, Netherlands
+ marc@marc-stevens.nl
+
+ Dan Shumow
+ Microsoft Research
+ danshu@microsoft.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+----------------------------------------------------------------------
+
+The bundled wildmatch code is licensed under the BSD license:
+
+Copyright Rich Salz.
+All rights reserved.
+
+Redistribution and use in any form are permitted provided that the
+following restrictions are are met:
+
+1. Source distributions must retain this entire copyright notice
+ and comment.
+2. Binary distributions must include the acknowledgement ``This
+ product includes software developed by Rich Salz'' in the
+ documentation or other materials provided with the
+ distribution. This must not be represented as an endorsement
+ or promotion without specific prior written permission.
+3. The origin of this software must not be misrepresented, either
+ by explicit claim or by omission. Credits must appear in the
+ source and documentation.
+4. Altered versions must be plainly marked as such in the source
+ and documentation and must not be misrepresented as being the
+ original software.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+----------------------------------------------------------------------
+
+Portions of the OpenSSL headers are included under the OpenSSL license:
+
+Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+All rights reserved.
+
+This package is an SSL implementation written
+by Eric Young (eay@cryptsoft.com).
+The implementation was written so as to conform with Netscapes SSL.
+
+This library is free for commercial and non-commercial use as long as
+the following conditions are aheared to. The following conditions
+apply to all code found in this distribution, be it the RC4, RSA,
+lhash, DES, etc., code; not just the SSL code. The SSL documentation
+included with this distribution is covered by the same copyright terms
+except that the holder is Tim Hudson (tjh@cryptsoft.com).
+
+Copyright remains Eric Young's, and as such any Copyright notices in
+the code are not to be removed.
+If this package is used in a product, Eric Young should be given attribution
+as the author of the parts of the library used.
+This can be in the form of a textual message at program startup or
+in documentation (online or textual) provided with the package.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ "This product includes cryptographic software written by
+ Eric Young (eay@cryptsoft.com)"
+ The word 'cryptographic' can be left out if the rouines from the library
+ being used are not cryptographic related :-).
+4. If you include any Windows specific code (or a derivative thereof) from
+ the apps directory (application code) you must include an acknowledgement:
+ "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+
+THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+The licence and distribution terms for any publically available version or
+derivative of this code cannot be changed. i.e. this code cannot simply be
+copied and put under another distribution licence
+[including the GNU Public Licence.]
+
+====================================================================
+Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. All advertising materials mentioning features or use of this
+ software must display the following acknowledgment:
+ "This product includes software developed by the OpenSSL Project
+ for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+
+4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ openssl-core@openssl.org.
+
+5. Products derived from this software may not be called "OpenSSL"
+ nor may "OpenSSL" appear in their names without prior written
+ permission of the OpenSSL Project.
+
+6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes software developed by the OpenSSL Project
+ for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+
+THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+
+The xoroshiro256** implementation is licensed in the public domain:
+
+Written in 2018 by David Blackman and Sebastiano Vigna (vigna@acm.org)
+
+To the extent possible under law, the author has dedicated all copyright
+and related and neighboring rights to this software to the public domain
+worldwide. This software is distributed without any warranty.
+
+See .
+
+----------------------------------------------------------------------
+
+The built-in SHA256 support (src/hash/rfc6234) is taken from RFC 6234
+under the following license:
+
+Copyright (c) 2011 IETF Trust and the persons identified as
+authors of the code. All rights reserved.
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following
+conditions are met:
+
+- Redistributions of source code must retain the above
+ copyright notice, this list of conditions and
+ the following disclaimer.
+
+- Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+- Neither the name of Internet Society, IETF or IETF Trust, nor
+ the names of specific contributors, may be used to endorse or
+ promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+
+The built-in git_fs_path_basename_r() function is based on the
+Android implementation, BSD licensed:
+
+Copyright (C) 2008 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+----------------------------------------------------------------------
+
+The bundled ntlmclient code is licensed under the MIT license:
+
+Copyright (c) Edward Thomson. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+----------------------------------------------------------------------
+
+Portions of this software derived from Team Explorer Everywhere:
+
+Copyright (c) Microsoft Corporation
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+---------------------------------------------------------------------------
+
+Portions of this software derived from the LLVM Compiler Infrastructure:
+
+Copyright (c) 2003-2016 University of Illinois at Urbana-Champaign.
+All rights reserved.
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to
+ endorse or promote products derived from this Software without specific
+ prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+SOFTWARE.
+
+---------------------------------------------------------------------------
+
+Portions of this software derived from Unicode, Inc:
+
+Copyright 2001-2004 Unicode, Inc.
+
+Disclaimer
+
+This source code is provided as is by Unicode, Inc. No claims are
+made as to fitness for any particular purpose. No warranties of any
+kind are expressed or implied. The recipient agrees to determine
+applicability of information provided. If this file has been
+purchased on magnetic or optical media from Unicode, Inc., the
+sole remedy for any claim will be exchange of defective media
+within 90 days of receipt.
+
+Limitations on Rights to Redistribute This Code
+
+Unicode, Inc. hereby grants the right to freely use the information
+supplied in this file in the creation of products supporting the
+Unicode Standard, and to make copies of this file in any form
+for internal or external distribution as long as this notice
+remains attached.
+
+---------------------------------------------------------------------------
+
+Portions of this software derived from sheredom/utf8.h:
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to
+
+---------------------------------------------------------------------------
+
+Portions of this software derived from RFC 1320:
+
+Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
+
+License to copy and use this software is granted provided that it
+is identified as the "RSA Data Security, Inc. MD4 Message-Digest
+Algorithm" in all material mentioning or referencing this software
+or this function.
+
+License is also granted to make and use derivative works provided
+that such works are identified as "derived from the RSA Data
+Security, Inc. MD4 Message-Digest Algorithm" in all material
+mentioning or referencing the derived work.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+
+----------------------------------------------------------------------
+
+The bundled llhttp dependency is licensed under the MIT license:
+
+Copyright Fedor Indutny, 2018.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/licenses/Microsoft.Extensions.Caching.Abstractions-THIRD-PARTY-NOTICES.TXT b/licenses/Microsoft.Extensions.Caching.Abstractions-THIRD-PARTY-NOTICES.TXT
new file mode 100644
index 0000000..1e194f3
--- /dev/null
+++ b/licenses/Microsoft.Extensions.Caching.Abstractions-THIRD-PARTY-NOTICES.TXT
@@ -0,0 +1,1418 @@
+.NET Runtime uses third-party libraries or other resources that may be
+distributed under licenses different than the .NET Runtime software.
+
+In the event that we accidentally failed to list a required notice, please
+bring it to our attention. Post an issue or email us:
+
+ dotnet@microsoft.com
+
+The attached notices are provided for information only.
+
+License notice for ASP.NET
+-------------------------------
+
+Copyright (c) .NET Foundation. All rights reserved.
+Licensed under the Apache License, Version 2.0.
+
+Available at
+https://github.com/dotnet/aspnetcore/blob/main/LICENSE.txt
+
+License notice for Slicing-by-8
+-------------------------------
+
+http://sourceforge.net/projects/slicing-by-8/
+
+Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved
+
+
+This software program is licensed subject to the BSD License, available at
+http://www.opensource.org/licenses/bsd-license.html.
+
+
+License notice for Unicode data
+-------------------------------
+
+https://www.unicode.org/license.html
+
+Copyright © 1991-2024 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of data files and any associated documentation (the "Data Files") or
+software and any associated documentation (the "Software") to deal in the
+Data Files or Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, and/or sell
+copies of the Data Files or Software, and to permit persons to whom the
+Data Files or Software are furnished to do so, provided that either (a)
+this copyright and permission notice appear with all copies of the Data
+Files or Software, or (b) this copyright and permission notice appear in
+associated Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+THIRD PARTY RIGHTS.
+
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in these Data Files or Software without prior written
+authorization of the copyright holder.
+
+License notice for zlib-ng
+-----------------------
+
+https://github.com/zlib-ng/zlib-ng/blob/d54e3769be0c522015b784eca2af258b1c026107/LICENSE.md
+
+(C) 1995-2024 Jean-loup Gailly and Mark Adler
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+
+License notice for opentelemetry-dotnet
+---------------------------------------
+
+https://github.com/open-telemetry/opentelemetry-dotnet/blob/805dd6b4abfa18ef2706d04c30d0ed28dbc2955e/LICENSE.TXT#L1
+
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+Copyright The OpenTelemetry Authors
+
+
+License notice for LinuxTracepoints
+-----------------------------------
+
+https://github.com/microsoft/LinuxTracepoints/blob/main/LICENSE
+
+Copyright (c) Microsoft Corporation.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE
+
+License notice for Mono
+-------------------------------
+
+http://www.mono-project.com/docs/about-mono/
+
+Copyright (c) .NET Foundation Contributors
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the Software), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License notice for International Organization for Standardization
+-----------------------------------------------------------------
+
+Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+
+License notice for Intel
+------------------------
+
+"Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License notice for Xamarin and Novell
+-------------------------------------
+
+Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+Copyright (c) 2011 Novell, Inc (http://www.novell.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+Third party notice for W3C
+--------------------------
+
+"W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE
+Status: This license takes effect 13 May, 2015.
+This work is being provided by the copyright holders under the following license.
+License
+By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
+Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications:
+The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.
+Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)."
+Disclaimers
+THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.
+The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders."
+
+License notice for Bit Twiddling Hacks
+--------------------------------------
+
+Bit Twiddling Hacks
+
+By Sean Eron Anderson
+seander@cs.stanford.edu
+
+Individually, the code snippets here are in the public domain (unless otherwise
+noted) — feel free to use them however you please. The aggregate collection and
+descriptions are © 1997-2005 Sean Eron Anderson. The code and descriptions are
+distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY and
+without even the implied warranty of merchantability or fitness for a particular
+purpose.
+
+License notice for Brotli
+--------------------------------------
+
+Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+compress_fragment.c:
+Copyright (c) 2011, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+decode_fuzzer.c:
+Copyright (c) 2015 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+
+License notice for Json.NET
+-------------------------------
+
+https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md
+
+The MIT License (MIT)
+
+Copyright (c) 2007 James Newton-King
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License notice for vectorized base64 encoding / decoding
+--------------------------------------------------------
+
+Copyright (c) 2005-2007, Nick Galbreath
+Copyright (c) 2013-2017, Alfred Klomp
+Copyright (c) 2015-2017, Wojciech Mula
+Copyright (c) 2016-2017, Matthieu Darbois
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License notice for vectorized hex parsing
+--------------------------------------------------------
+
+Copyright (c) 2022, Geoff Langdale
+Copyright (c) 2022, Wojciech Mula
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License notice for RFC 3492
+---------------------------
+
+The punycode implementation is based on the sample code in RFC 3492
+
+Copyright (C) The Internet Society (2003). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it
+or assist in its implementation may be prepared, copied, published
+and distributed, in whole or in part, without restriction of any
+kind, provided that the above copyright notice and this paragraph are
+included on all such copies and derivative works. However, this
+document itself may not be modified in any way, such as by removing
+the copyright notice or references to the Internet Society or other
+Internet organizations, except as needed for the purpose of
+developing Internet standards in which case the procedures for
+copyrights defined in the Internet Standards process must be
+followed, or as required to translate it into languages other than
+English.
+
+The limited permissions granted above are perpetual and will not be
+revoked by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Copyright(C) The Internet Society 1997. All Rights Reserved.
+
+This document and translations of it may be copied and furnished to others,
+and derivative works that comment on or otherwise explain it or assist in
+its implementation may be prepared, copied, published and distributed, in
+whole or in part, without restriction of any kind, provided that the above
+copyright notice and this paragraph are included on all such copies and
+derivative works.However, this document itself may not be modified in any
+way, such as by removing the copyright notice or references to the Internet
+Society or other Internet organizations, except as needed for the purpose of
+developing Internet standards in which case the procedures for copyrights
+defined in the Internet Standards process must be followed, or as required
+to translate it into languages other than English.
+
+The limited permissions granted above are perpetual and will not be revoked
+by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an "AS IS"
+basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE
+DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY
+RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
+PARTICULAR PURPOSE.
+
+License notice for Algorithm from RFC 4122 -
+A Universally Unique IDentifier (UUID) URN Namespace
+----------------------------------------------------
+
+Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
+Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
+Digital Equipment Corporation, Maynard, Mass.
+Copyright (c) 1998 Microsoft.
+To anyone who acknowledges that this file is provided "AS IS"
+without any express or implied warranty: permission to use, copy,
+modify, and distribute this file for any purpose is hereby
+granted without fee, provided that the above copyright notices and
+this notice appears in all source code copies, and that none of
+the names of Open Software Foundation, Inc., Hewlett-Packard
+Company, Microsoft, or Digital Equipment Corporation be used in
+advertising or publicity pertaining to distribution of the software
+without specific, written prior permission. Neither Open Software
+Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
+Equipment Corporation makes any representations about the
+suitability of this software for any purpose."
+
+License notice for The LLVM Compiler Infrastructure
+---------------------------------------------------
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to
+ endorse or promote products derived from this Software without specific
+ prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+SOFTWARE.
+
+License notice for Bob Jenkins
+------------------------------
+
+By Bob Jenkins, 1996. bob_jenkins@burtleburtle.net. You may use this
+code any way you wish, private, educational, or commercial. It's free.
+
+License notice for Greg Parker
+------------------------------
+
+Greg Parker gparker@cs.stanford.edu December 2000
+This code is in the public domain and may be copied or modified without
+permission.
+
+License notice for libunwind based code
+----------------------------------------
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License notice for Printing Floating-Point Numbers (Dragon4)
+------------------------------------------------------------
+
+/******************************************************************************
+ Copyright (c) 2014 Ryan Juckett
+ http://www.ryanjuckett.com/
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source
+ distribution.
+******************************************************************************/
+
+License notice for Printing Floating-point Numbers (Grisu3)
+-----------------------------------------------------------
+
+Copyright 2012 the V8 project authors. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of Google Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License notice for xxHash
+-------------------------
+
+xxHash - Extremely Fast Hash algorithm
+Header File
+Copyright (C) 2012-2021 Yann Collet
+
+BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+You can contact the author at:
+ - xxHash homepage: https://www.xxhash.com
+ - xxHash source repository: https://github.com/Cyan4973/xxHash
+
+License notice for Berkeley SoftFloat Release 3e
+------------------------------------------------
+
+https://github.com/ucb-bar/berkeley-softfloat-3
+https://github.com/ucb-bar/berkeley-softfloat-3/blob/master/COPYING.txt
+
+License for Berkeley SoftFloat Release 3e
+
+John R. Hauser
+2018 January 20
+
+The following applies to the whole of SoftFloat Release 3e as well as to
+each source file individually.
+
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
+University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions, and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License notice for xoshiro RNGs
+--------------------------------
+
+Written in 2018 by David Blackman and Sebastiano Vigna (vigna@acm.org)
+
+To the extent possible under law, the author has dedicated all copyright
+and related and neighboring rights to this software to the public domain
+worldwide. This software is distributed without any warranty.
+
+See .
+
+License for fastmod (https://github.com/lemire/fastmod), ibm-fpgen (https://github.com/nigeltao/parse-number-fxx-test-data) and fastrange (https://github.com/lemire/fastrange)
+--------------------------------------
+
+ Copyright 2018 Daniel Lemire
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+License for sse4-strstr (https://github.com/WojciechMula/sse4-strstr)
+--------------------------------------
+
+ Copyright (c) 2008-2016, Wojciech Mula
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License notice for The C++ REST SDK
+-----------------------------------
+
+C++ REST SDK
+
+The MIT License (MIT)
+
+Copyright (c) Microsoft Corporation
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+License notice for MessagePack-CSharp
+-------------------------------------
+
+MessagePack for C#
+
+MIT License
+
+Copyright (c) 2017 Yoshifumi Kawai
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+License notice for lz4net
+-------------------------------------
+
+lz4net
+
+Copyright (c) 2013-2017, Milosz Krajewski
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License notice for Nerdbank.Streams
+-----------------------------------
+
+The MIT License (MIT)
+
+Copyright (c) Andrew Arnott
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+License notice for RapidJSON
+----------------------------
+
+Tencent is pleased to support the open source community by making RapidJSON available.
+
+Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+
+Licensed under the MIT License (the "License"); you may not use this file except
+in compliance with the License. You may obtain a copy of the License at
+
+http://opensource.org/licenses/MIT
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.
+
+License notice for DirectX Math Library
+---------------------------------------
+
+https://github.com/microsoft/DirectXMath/blob/master/LICENSE
+
+ The MIT License (MIT)
+
+Copyright (c) 2011-2020 Microsoft Corp
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this
+software and associated documentation files (the "Software"), to deal in the Software
+without restriction, including without limitation the rights to use, copy, modify,
+merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License notice for ldap4net
+---------------------------
+
+The MIT License (MIT)
+
+Copyright (c) 2018 Alexander Chermyanin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License notice for vectorized sorting code
+------------------------------------------
+
+MIT License
+
+Copyright (c) 2020 Dan Shechter
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+License notice for musl
+-----------------------
+
+musl as a whole is licensed under the following standard MIT license:
+
+Copyright © 2005-2020 Rich Felker, et al.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+License notice for "Faster Unsigned Division by Constants"
+------------------------------
+
+Reference implementations of computing and using the "magic number" approach to dividing
+by constants, including codegen instructions. The unsigned division incorporates the
+"round down" optimization per ridiculous_fish.
+
+This is free and unencumbered software. Any copyright is dedicated to the Public Domain.
+
+
+License notice for mimalloc
+-----------------------------------
+
+MIT License
+
+Copyright (c) 2019 Microsoft Corporation, Daan Leijen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+License for remote stack unwind (https://github.com/llvm/llvm-project/blob/main/lldb/source/Symbol/CompactUnwindInfo.cpp)
+--------------------------------------
+
+Copyright 2019 LLVM Project
+
+Licensed under the Apache License, Version 2.0 (the "License") with LLVM Exceptions;
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+https://llvm.org/LICENSE.txt
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+License notice for Apple header files
+-------------------------------------
+
+Copyright (c) 1980, 1986, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+License notice for JavaScript queues
+-------------------------------------
+
+CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
+
+Statement of Purpose
+The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
+Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
+For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
+the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
+moral rights retained by the original author(s) and/or performer(s);
+publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
+rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
+rights protecting the extraction, dissemination, use and reuse of data in a Work;
+database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
+other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
+2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
+3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
+4. Limitations and Disclaimers.
+a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
+b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
+c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
+d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
+
+
+License notice for FastFloat algorithm
+-------------------------------------
+MIT License
+Copyright (c) 2021 csFastFloat authors
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+License notice for MsQuic
+--------------------------------------
+
+Copyright (c) Microsoft Corporation.
+Licensed under the MIT License.
+
+Available at
+https://github.com/microsoft/msquic/blob/main/LICENSE
+
+License notice for m-ou-se/floatconv
+-------------------------------
+
+Copyright (c) 2020 Mara Bos
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License notice for code from The Practice of Programming
+-------------------------------
+
+Copyright (C) 1999 Lucent Technologies
+
+Excerpted from 'The Practice of Programming
+by Brian W. Kernighan and Rob Pike
+
+You may use this code for any purpose, as long as you leave the copyright notice and book citation attached.
+
+Notice for Euclidean Affine Functions and Applications to Calendar
+Algorithms
+-------------------------------
+
+Aspects of Date/Time processing based on algorithm described in "Euclidean Affine Functions and Applications to Calendar
+Algorithms", Cassio Neri and Lorenz Schneider. https://arxiv.org/pdf/2102.06959.pdf
+
+License notice for amd/aocl-libm-ose
+-------------------------------
+
+Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+3. Neither the name of the copyright holder nor the names of its contributors
+ may be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+License notice for fmtlib/fmt
+-------------------------------
+
+Formatting library for C++
+
+Copyright (c) 2012 - present, Victor Zverovich
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License for Jb Evain
+---------------------
+
+Copyright (c) 2006 Jb Evain (jbevain@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+--- Optional exception to the license ---
+
+As an exception, if, as a result of your compiling your source code, portions
+of this Software are embedded into a machine-executable object form of such
+source code, you may redistribute such embedded portions in such object form
+without including the above copyright and permission notices.
+
+
+License for MurmurHash3
+--------------------------------------
+
+https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp
+
+MurmurHash3 was written by Austin Appleby, and is placed in the public
+domain. The author hereby disclaims copyright to this source
+
+License for Fast CRC Computation
+--------------------------------------
+
+https://github.com/intel/isa-l/blob/33a2d9484595c2d6516c920ce39a694c144ddf69/crc/crc32_ieee_by4.asm
+https://github.com/intel/isa-l/blob/33a2d9484595c2d6516c920ce39a694c144ddf69/crc/crc64_ecma_norm_by8.asm
+
+Copyright(c) 2011-2015 Intel Corporation All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License for C# Implementation of Fast CRC Computation
+-----------------------------------------------------
+
+https://github.com/SixLabors/ImageSharp/blob/f4f689ce67ecbcc35cebddba5aacb603e6d1068a/src/ImageSharp/Formats/Png/Zlib/Crc32.cs
+
+Copyright (c) Six Labors.
+Licensed under the Apache License, Version 2.0.
+
+Available at
+https://github.com/SixLabors/ImageSharp/blob/f4f689ce67ecbcc35cebddba5aacb603e6d1068a/LICENSE
+
+License for the Teddy multi-substring searching implementation
+--------------------------------------
+
+https://github.com/BurntSushi/aho-corasick
+
+The MIT License (MIT)
+
+Copyright (c) 2015 Andrew Gallant
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+License notice for Avx512Vbmi base64 encoding / decoding
+--------------------------------------------------------
+
+Copyright (c) 2015-2018, Wojciech Muła
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------
+
+Aspects of base64 encoding / decoding are based on algorithm described in "Base64 encoding and decoding at almost the speed of a memory
+copy", Wojciech Muła and Daniel Lemire. https://arxiv.org/pdf/1910.05109.pdf
+
+License for FormatJS Intl.Segmenter grapheme segmentation algorithm
+--------------------------------------------------------------------------
+Available at https://github.com/formatjs/formatjs/blob/58d6a7b398d776ca3d2726d72ae1573b65cc3bef/packages/intl-segmenter/LICENSE.md
+
+MIT License
+
+Copyright (c) 2022 FormatJS
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License for SharpFuzz and related samples
+--------------------------------------
+
+https://github.com/Metalnem/sharpfuzz
+https://github.com/Metalnem/dotnet-fuzzers
+https://github.com/Metalnem/libfuzzer-dotnet
+
+MIT License
+
+Copyright (c) 2018 Nemanja Mijailovic
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+License for National Institute of Standards and Technology ACVP Data
+--------------------------------------------------------------------
+Available at https://github.com/usnistgov/ACVP-Server/blob/85f8742965b2691862079172982683757d8d91db/README.md#License
+
+NIST-developed software is provided by NIST as a public service. You may use, copy, and distribute copies of the software in any medium, provided that you keep intact this entire notice. You may improve, modify, and create derivative works of the software or any portion of the software, and you may copy and distribute such modifications or works. Modified works should carry a notice stating that you changed the software and should note the date and nature of any such change. Please explicitly acknowledge the National Institute of Standards and Technology as the source of the software.
+
+NIST-developed software is expressly provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED, IN FACT, OR ARISING BY OPERATION OF LAW, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND DATA ACCURACY. NIST NEITHER REPRESENTS NOR WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE CORRECTED. NIST DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE SOFTWARE OR THE RESULTS THEREOF, INCLUDING BUT NOT LIMITED TO THE CORRECTNESS, ACCURACY, RELIABILITY, OR USEFULNESS OF THE SOFTWARE.
+
+You are solely responsible for determining the appropriateness of using and distributing the software and you assume all risks associated with its use, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and the unavailability or interruption of operation. This software is not intended to be used in any situation where a failure could cause risk of injury or damage to property. The software developed by NIST employees is not subject to copyright protection within the United States.
+
diff --git a/licenses/SQLitePCLRaw-LICENSE.TXT b/licenses/SQLitePCLRaw-LICENSE.TXT
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/licenses/SQLitePCLRaw-LICENSE.TXT
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/licenses/Spectre.Console-LICENSE.md b/licenses/Spectre.Console-LICENSE.md
new file mode 100644
index 0000000..a8373c4
--- /dev/null
+++ b/licenses/Spectre.Console-LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Patrik Svensson, Phil Scott, Nils Andresen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/YamlDotNet-LICENSE.txt b/licenses/YamlDotNet-LICENSE.txt
new file mode 100644
index 0000000..d4f2924
--- /dev/null
+++ b/licenses/YamlDotNet-LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Antoine Aubry and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/licenses/dotnet-LICENSE.TXT b/licenses/dotnet-LICENSE.TXT
new file mode 100644
index 0000000..a616ed1
--- /dev/null
+++ b/licenses/dotnet-LICENSE.TXT
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) .NET Foundation and Contributors
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/release-version.txt b/release-version.txt
new file mode 100644
index 0000000..6e8bf73
--- /dev/null
+++ b/release-version.txt
@@ -0,0 +1 @@
+0.1.0
diff --git a/scripts/package_smoke.py b/scripts/package_smoke.py
new file mode 100644
index 0000000..fcca021
--- /dev/null
+++ b/scripts/package_smoke.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python3
+"""Install the actual nupkg into a clean local tool directory and test portable startup."""
+import argparse
+import os
+from pathlib import Path
+import subprocess
+import tempfile
+import xml.etree.ElementTree as ET
+import zipfile
+
+
+def run(args, cwd, success=True, env=None):
+ result = subprocess.run(list(map(str, args)), cwd=cwd, capture_output=True, text=True, timeout=120, env=env)
+ if success and result.returncode != 0:
+ raise RuntimeError(result.stdout + result.stderr)
+ if not success and result.returncode == 0:
+ raise AssertionError("Command unexpectedly succeeded: " + str(args))
+ return result.stdout + result.stderr
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("package", type=Path)
+ args = parser.parse_args()
+ package = args.package.resolve()
+ with zipfile.ZipFile(package) as archive:
+ names = archive.namelist()
+ for expected in ["README.md", "LICENSE", "icon.png", "THIRD-PARTY-NOTICES.md",
+ "tools/net10.0/any/config.default.yaml", "tools/net10.0/any/Helpers/pip_runner.py",
+ "tools/net10.0/any/MQ.DB.dll"]:
+ assert expected in names, f"Missing packaged asset: {expected}"
+ for native in ["libe_sqlite3.so", "e_sqlite3.dll", "libduckdb.so", "duckdb.dll"]:
+ assert any(n.endswith('/'+native) for n in names), f"Missing native asset: {native}"
+ assert any(n.startswith("licenses/") for n in names), "Missing third-party license texts"
+ root = ET.fromstring(archive.read("MagicQuant.nuspec"))
+ ns = {"n": root.tag.split("}")[0][1:]}
+ meta = root.find("n:metadata", ns)
+ version = meta.find("n:version", ns).text
+ assert meta.find("n:license", ns).text == "AGPL-3.0-only"
+ with tempfile.TemporaryDirectory(prefix="magicquant package smoke ") as temp:
+ root = Path(temp)
+ feed = root / "feed"
+ feed.mkdir()
+ import shutil
+ shutil.copy2(package, feed / package.name)
+ config = root / "nuget.config"
+ config.write_text('')
+ tool = root / "tool"
+ run(["dotnet", "tool", "install", "MagicQuant", "--tool-path", tool, "--version", version,
+ "--configfile", config], root, env={**os.environ, "NUGET_PACKAGES": str(root / "packages")})
+ command = tool / ("magicquant.exe" if os.name == "nt" else "magicquant")
+ work = root / "unrelated working directory"
+ work.mkdir()
+ assert run([command, "--version"], work).strip().split("+")[0] == version
+ for sub in [[], ["pipeline"], ["init-config"], ["initialize-llama-cpp"], ["clone-repository-quants"]]:
+ run([command, *sub, "--help"], work)
+ assert list(work.iterdir()) == [], "Help created runtime files"
+ run([command, "init-config", "--output", "campaign with spaces.yaml"], work)
+ campaign = work / "campaign with spaces.yaml"
+ original = campaign.read_bytes()
+ assert b"scratch_roots:" in original and b"custom_repositories:" in original
+ run([command, "init-config", "--output", campaign], work, success=False)
+ assert campaign.read_bytes() == original, "init-config overwrote user settings"
+ # Fake input metadata is enough for read-only path checks, not conversion.
+ model = work / "model with spaces"
+ model.mkdir()
+ (model / "config.json").write_text('{}')
+ (model / "model.safetensors").touch()
+ import json
+ preflight = work / "preflight.yaml"
+ preflight.write_text('paths:\n model_dir: ' + json.dumps(str(model)) + '\n magic_quant_root: ' +
+ json.dumps(str(work / 'runtime')) + '\nidentity:\n architecture_family_name: package-test\n')
+ run([command, "pipeline", "--config", preflight, "--check-config", "--strict-config"], work)
+ assert not (work / "runtime").exists() and not (model / "MagicQuant").exists()
+ assert "not found" in run([command, "pipeline", "--config", "missing.yaml"], work, success=False)
+ print(f"Installed package {version}: assets, native libraries, help, config generation, and path preflight passed.")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/release_version.py b/scripts/release_version.py
new file mode 100644
index 0000000..de11825
--- /dev/null
+++ b/scripts/release_version.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+"""Reserve a release version with an immutable remote Git tag.
+
+Tag creation is the atomic claim: concurrent releases retry collisions, while
+reruns of the same commit reuse its reservation even if publication failed.
+"""
+import argparse
+import os
+from pathlib import Path
+import re
+import subprocess
+
+PATTERN = re.compile(r"v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)\Z")
+
+
+def parse_version(value):
+ match = PATTERN.fullmatch("v" + value)
+ if not match:
+ raise ValueError("Release version must be a stable major.minor.patch value.")
+ return tuple(map(int, match.groups()))
+
+
+def select_version(tags, current_tags, minimum):
+ existing = [t for t in current_tags if PATTERN.fullmatch(t)]
+ if len(existing) > 1:
+ raise ValueError("Commit has multiple release tags; resolve the ambiguity manually.")
+ if existing:
+ return existing[0][1:]
+ versions = [parse_version(t[1:]) for t in tags if PATTERN.fullmatch(t)]
+ version = parse_version(minimum)
+ if versions:
+ major, minor, patch = max(versions)
+ version = max(version, (major, minor, patch + 1))
+ return ".".join(map(str, version))
+
+
+def git(*args, check=True):
+ return subprocess.run(["git", *args], check=check, capture_output=True, text=True)
+
+
+def reserve(minimum):
+ head = git("rev-parse", "HEAD").stdout.strip()
+ for _ in range(20):
+ git("fetch", "origin", "--tags")
+ tags = git("tag", "--list").stdout.splitlines()
+ current = git("tag", "--points-at", head).stdout.splitlines()
+ version = select_version(tags, current, minimum)
+ tag = "v" + version
+ if tag in current:
+ # A local tag alone is not a successful remote reservation.
+ remote = git("ls-remote", "origin", "refs/tags/" + tag).stdout.strip()
+ if remote:
+ return version
+ else:
+ git("tag", "-a", tag, "-m", f"MagicQuant {version}; reserved for {head}", head)
+ pushed = git("push", "origin", "refs/tags/" + tag, check=False)
+ if pushed.returncode == 0:
+ return version
+ git("tag", "-d", tag)
+ # Only a genuine tag race is retryable; auth/network failures must fail.
+ if not git("ls-remote", "origin", "refs/tags/" + tag).stdout.strip():
+ raise RuntimeError(pushed.stderr)
+ raise RuntimeError("Could not reserve a release version after 20 concurrent tag collisions.")
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("--reserve", action="store_true", help="Create and push an immutable version tag")
+ args = parser.parse_args()
+ minimum = Path("release-version.txt").read_text().strip()
+ parse_version(minimum)
+ if args.reserve:
+ version = reserve(minimum)
+ else:
+ version = select_version(git("tag", "--list").stdout.splitlines(),
+ git("tag", "--points-at", "HEAD").stdout.splitlines(), minimum)
+ print(version)
+ if os.environ.get("GITHUB_OUTPUT"):
+ with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
+ output.write(f"version={version}\n")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/scan_secrets.py b/scripts/scan_secrets.py
new file mode 100644
index 0000000..cf12023
--- /dev/null
+++ b/scripts/scan_secrets.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+"""Run a checksum-pinned Gitleaks build on Git history and the working tree (Linux x64)."""
+import hashlib
+from pathlib import Path
+import subprocess
+import tarfile
+import tempfile
+import urllib.request
+
+VERSION = '8.30.1'
+SHA256 = '551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb'
+
+
+def main():
+ with tempfile.TemporaryDirectory(prefix='mq-secret-scan-') as temp:
+ root = Path(temp)
+ archive = root / 'gitleaks.tar.gz'
+ url = f'https://github.com/gitleaks/gitleaks/releases/download/v{VERSION}/gitleaks_{VERSION}_linux_x64.tar.gz'
+ urllib.request.urlretrieve(url, archive)
+ if hashlib.sha256(archive.read_bytes()).hexdigest() != SHA256:
+ raise RuntimeError('Gitleaks checksum mismatch')
+ binary = root / 'gitleaks'
+ with tarfile.open(archive) as tar:
+ binary.write_bytes(tar.extractfile('gitleaks').read())
+ binary.chmod(0o700)
+ results = []
+ for mode, extra in [('git', ['--log-opts=--all']), ('dir', [])]:
+ results.append(subprocess.run([str(binary), mode, '.', *extra, '--redact', '--config', '.gitleaks.toml']).returncode)
+ if any(results):
+ raise SystemExit(1)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/test_doc_links.py b/scripts/test_doc_links.py
new file mode 100644
index 0000000..be886b5
--- /dev/null
+++ b/scripts/test_doc_links.py
@@ -0,0 +1,32 @@
+"""Protect active documentation links; archival documents retain their historical context."""
+from pathlib import Path
+import re
+import unittest
+from urllib.parse import unquote
+
+ROOT = Path(__file__).resolve().parent.parent
+
+
+class DocumentationTests(unittest.TestCase):
+ def test_local_documentation_targets_exist(self):
+ files = [ROOT / name for name in ['README.md', 'CONTRIBUTING.md', 'THIRD-PARTY-NOTICES.md']]
+ files += list((ROOT / 'docs').rglob('*.md')) + list((ROOT / 'wiki').rglob('*.md'))
+ errors = []
+ for path in files:
+ for match in re.finditer(r'\]\(([^)]+)\)', path.read_text(encoding='utf-8')):
+ url = match.group(1).split(' "')[0].strip('<>')
+ if url.startswith(('https:', 'http:', 'mailto:', '#')):
+ continue
+ target = unquote(url.split('#')[0])
+ if target and not (path.parent / target).exists():
+ errors.append(f'{path.relative_to(ROOT)}: {url}')
+ self.assertEqual([], errors)
+
+ def test_current_docs_use_canonical_repository_url(self):
+ files = [ROOT / 'README.md', *list((ROOT / 'docs').rglob('*.md')), *list((ROOT / 'wiki').rglob('*.md'))]
+ for path in files:
+ self.assertNotIn('github.com/magiccodingman/magicquant-wiki', path.read_text(encoding='utf-8').lower(), str(path))
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/scripts/test_release_version.py b/scripts/test_release_version.py
new file mode 100644
index 0000000..2c122cc
--- /dev/null
+++ b/scripts/test_release_version.py
@@ -0,0 +1,60 @@
+import importlib.util
+from pathlib import Path
+import subprocess
+import tempfile
+import unittest
+
+spec = importlib.util.spec_from_file_location("release_version", Path(__file__).with_name("release_version.py"))
+module = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(module)
+
+
+class ReleaseVersionTests(unittest.TestCase):
+ def test_first_release(self):
+ self.assertEqual("0.1.0", module.select_version([], [], "0.1.0"))
+
+ def test_patch_uses_numeric_order(self):
+ self.assertEqual("0.1.11", module.select_version(["v0.1.9", "v0.1.10", "research-v2"], [], "0.1.0"))
+
+ def test_retry_reuses_original_version(self):
+ self.assertEqual("0.1.2", module.select_version(["v0.1.2", "v0.1.3"], ["v0.1.2"], "1.0.0"))
+
+ def test_minor_and_major_floor(self):
+ for floor in ["0.2.0", "1.0.0"]:
+ self.assertEqual(floor, module.select_version(["v0.1.9"], [], floor))
+
+ def test_invalid_versions_and_ambiguous_tags_fail(self):
+ for value in ["1.0", "1.0.0-rc.1", "01.2.3", "1.0.0\nmalicious"]:
+ with self.assertRaises(ValueError):
+ module.parse_version(value)
+ with self.assertRaises(ValueError):
+ module.select_version([], ["v0.1.0", "v0.1.1"], "0.1.0")
+
+ def test_real_remote_reservation_and_retry(self):
+ with tempfile.TemporaryDirectory() as temp:
+ root = Path(temp)
+ def git(*args):
+ subprocess.run(["git", *args], cwd=root, check=True, capture_output=True)
+ git("init", "--bare", "remote.git")
+ git("clone", "remote.git", "checkout")
+ checkout = root / "checkout"
+ def local(*args):
+ subprocess.run(["git", *args], cwd=checkout, check=True, capture_output=True)
+ local("config", "user.email", "test@example.invalid")
+ local("config", "user.name", "Test")
+ (checkout / "release-version.txt").write_text("0.1.0\n")
+ local("add", ".")
+ local("commit", "-m", "first")
+ script = str(Path(__file__).with_name("release_version.py").resolve())
+ def reserve():
+ import sys
+ return subprocess.check_output([sys.executable, script, "--reserve"], cwd=checkout, text=True).strip()
+ self.assertEqual("0.1.0", reserve())
+ self.assertEqual("0.1.0", reserve())
+ local("commit", "--allow-empty", "-m", "second")
+ self.assertEqual("0.1.1", reserve())
+ self.assertEqual("0.1.1", reserve())
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/src/MQ.DB/Cache.cs b/src/MQ.DB/Cache.cs
new file mode 100644
index 0000000..a1d403a
--- /dev/null
+++ b/src/MQ.DB/Cache.cs
@@ -0,0 +1,142 @@
+using MQ.DB.Models;
+
+namespace MQ.DB;
+
+public class Cache
+{
+ ///
+ /// Full path to llama.cpp repo
+ ///
+ public static string? LlamaRoot;
+
+ ///
+ /// Full path to /llama.cpp/build/bin/
+ ///
+ public static string? LlamaBin;
+
+ ///
+ /// full path to convert_hf_to_gguf.py
+ ///
+ public static string? ConvertScript;
+
+ ///
+ /// System information about the PC that's detected
+ /// during the initial llama cpp validation phase.
+ ///
+ public static SystemInfo? SysInfo;
+
+ ///
+ /// Root MagicQuant working directory. This is also where the Python
+ /// environment, default config files, and shared caches live.
+ ///
+ public static string? MagicQuantDirectory;
+
+ ///
+ /// Full path to the desired model directory where the safetensors are.
+ ///
+ public static string? ModelDirectory;
+
+ ///
+ /// Per-model MagicQuant working directory.
+ ///
+ public static string? ModelMagicQuantDirectory;
+
+ ///
+ /// Absolute path to the active YAML config that was loaded for this run.
+ ///
+ public static string? ActiveConfigPath { get; set; }
+
+ ///
+ /// Root directory where external/custom baseline GGUF files are staged.
+ ///
+ public static string? ExternalBaselineCacheDirectory { get; set; }
+
+
+ ///
+ /// Normalized configured scratch roots for transient heavy GGUF writes.
+ ///
+ public static List ScratchRoots { get; set; } = new();
+
+
+ ///
+ /// Aka BF16, F16, or F32
+ ///
+ public static MainTorchType? TorchType;
+
+ public enum MainTorchType
+ {
+ BF16 = 1,
+ F16 = 2,
+ F32 = 3
+ }
+
+ /*
+ * Groups not present in the current model graph. These are forced to NULL/ignored
+ * by runtime search-space planning.
+ */
+ public static List UnusedTensorGroups = new();
+
+ public static string CurrentModelId { get; set; } = string.Empty;
+
+ public static string CurrentArchitectureFamilyName { get; set; } = string.Empty;
+
+ public static string CurrentArchitectureFamilyNormalizedName =>
+ string.IsNullOrWhiteSpace(CurrentArchitectureFamilyName)
+ ? string.Empty
+ : CurrentArchitectureFamilyName.Trim().ToLowerInvariant();
+
+ public static bool AllowArchitectureFamilyAliasOverride { get; set; }
+
+ public static int? CurrentArchitectureFamilyId { get; set; }
+
+ public static int? CurrentTensorGroupProfileId { get; set; }
+
+ public static string? CurrentTensorGroupProfileFingerprintHash { get; set; }
+
+ ///
+ /// When true, MagicQuant prints the BF16/native tensor grouping summary and asks
+ /// for confirmation before any tensor-group-scoped learning/search work continues.
+ ///
+ public static bool ConfirmTensorGroupProfile { get; set; } = true;
+
+ ///
+ /// Transient repair mode for regex/profile mistakes. When true, MagicQuant tries
+ /// to rebuild learned tensor mappings for the active TensorGroupProfile from
+ /// existing family/profile truth instead of redownloading/requantizing pure
+ /// learning baselines just to rediscover per-tensor truth.
+ ///
+ public static bool RebucketLearnedTensorGroupsFromExistingTruth { get; set; } = true;
+
+ public static bool ForceRefreshHardwareProbe { get; set; }
+
+ public static bool UseImatrix { get; set; }
+
+ public static bool ForceImatrixRebuild { get; set; }
+
+ public static Dictionary GpuMemoryLimitsGb { get; set; } = new();
+
+ public static bool IsImatrixAvailable { get; set; }
+
+ public static string? ActiveImatrixPath { get; set; }
+
+ public static string? ActiveImatrixIdentityHash { get; set; }
+
+
+ ///
+ /// When false, long-running llama.cpp child processes write their full stdout/stderr
+ /// to log files only. This keeps the CLI readable during large export/clone runs.
+ ///
+ public static bool VerboseProcessOutput { get; set; }
+
+ ///
+ /// Clone/export-only flows may benchmark for release metadata without polluting the
+ /// learning/discovery SQLite truth tables.
+ ///
+ public static bool SuppressBenchmarkPersistence { get; set; }
+
+
+ ///
+ /// Final export/output directory for selected survivor artifacts.
+ ///
+ public static string? OutputDirectory { get; set; }
+}
diff --git a/src/MQ.DB/Data/MagicQuantContext.cs b/src/MQ.DB/Data/MagicQuantContext.cs
new file mode 100644
index 0000000..22145bc
--- /dev/null
+++ b/src/MQ.DB/Data/MagicQuantContext.cs
@@ -0,0 +1,389 @@
+using Microsoft.EntityFrameworkCore;
+using MQ.DB.Interfaces;
+using MQ.DB.Models;
+using MQ.DB.Models.DbModels;
+
+namespace MQ.DB.Data;
+
+public class MagicQuantContext : DbContext
+{
+ // --------------------------------------------------------
+ // Self-Initialization Logic
+ // --------------------------------------------------------
+ private static readonly HashSet InitializedDatabaseDirectories = new(StringComparer.Ordinal);
+ private static readonly object _initLock = new();
+
+ public MagicQuantContext()
+ {
+ EnsureInitialized();
+ }
+
+ public MagicQuantContext(DbContextOptions options)
+ : base(options)
+ {
+ EnsureInitialized();
+ }
+
+ private void EnsureInitialized()
+ {
+ // 🚫 Never run during EF tooling (migrations, etc.)
+ if (IsDesignTime())
+ return;
+
+ string initializationKey = ResolveDatabaseDirectory();
+ lock (_initLock)
+ {
+ if (InitializedDatabaseDirectories.Contains(initializationKey))
+ return;
+
+ InitializeDatabase();
+ InitializedDatabaseDirectories.Add(initializationKey);
+ }
+ }
+
+ private static string ResolveDatabaseDirectory()
+ {
+ string directory = string.IsNullOrWhiteSpace(Cache.MagicQuantDirectory)
+ ? Directory.GetCurrentDirectory()
+ : Cache.MagicQuantDirectory;
+ return Path.GetFullPath(directory);
+ }
+
+ private void InitializeDatabase()
+ {
+ var directory = Cache.MagicQuantDirectory;
+
+ // Safety fallback
+ if (string.IsNullOrEmpty(directory))
+ directory = Directory.GetCurrentDirectory();
+
+ if (!Directory.Exists(directory))
+ {
+ Directory.CreateDirectory(directory);
+ }
+
+ // 🔥 Apply migrations automatically
+ Database.Migrate();
+ EnsureBaselineQuantDefinitions();
+ }
+
+
+private void EnsureBaselineQuantDefinitions()
+{
+ var now = DateTime.UtcNow;
+ var expected = BaselineQuants.GetBuiltInStandardBaselines()
+ .Concat(BaselineQuants.GetExactHighPrecisionAliases(allowHighPrecisionHybrids: true))
+ .Append(BaselineQuants.GetNativeQuant())
+ .Select(x => new BaselineQuantDefinition
+ {
+ ArchitectureFamilyId = null,
+ RuntimeBaselineId = x.UniqueId,
+ CanonicalKey = x.CanonicalKey,
+ NormalizedCanonicalKey = NormalizeKey(x.CanonicalKey),
+ BaselineName = x.Names[0],
+ DisplayName = x.Names[0],
+ QuantizeBaseArgumentName = x.QuantizeBaseArgumentName,
+ DefaultTensorSchemeId = x.DefaultTensorScheme!.UniqueId,
+ DefaultTensorSchemeName = x.DefaultTensorScheme.Names[0],
+ SourceKind = x.SourceKind,
+ SourceOwner = x.SourceOwner,
+ SourceRepository = x.SourceRepository,
+ NormalizedSourceRepository = NormalizeNullable(x.SourceRepository),
+ SourceFileName = x.SourceFileName,
+ NormalizedSourceFileName = NormalizeFileNullable(x.SourceFileName),
+ ShortSourceName = x.ShortSourceName,
+ BaselineFamily = x.Names[0],
+ IsCustomBaseline = x.IsCustomBaseline,
+ IsLearningBaseline = x.IsLearningBaseline,
+ IsCombinationCarrierCandidate = x.IsCombinationCarrierCandidate,
+ IsExplicitGroupCombinationCandidate = x.IsExplicitGroupCombinationCandidate,
+ RequiresImatrix = x.RequiresImatrix,
+ BitRange = x.BitRange,
+ ExplicitCandidateSortOrder = x.ExplicitCandidateSortOrder,
+ IsActiveInCurrentConfig = true,
+ FirstSeenUtc = now,
+ LastSeenUtc = now,
+ LastUpdatedUtc = now
+ })
+ .OrderBy(x => x.RuntimeBaselineId)
+ .ToList();
+
+ var current = BaselineQuantDefinitions
+ .Where(x => x.ArchitectureFamilyId == null)
+ .ToList();
+
+ var currentByCanonicalKey = current
+ .Where(x => !string.IsNullOrWhiteSpace(x.NormalizedCanonicalKey))
+ .GroupBy(x => x.NormalizedCanonicalKey, StringComparer.Ordinal)
+ .ToDictionary(g => g.Key, g => g.OrderBy(x => x.RuntimeBaselineId).First(), StringComparer.Ordinal);
+
+ var currentByRuntimeId = current.ToDictionary(x => x.RuntimeBaselineId);
+ var changed = false;
+
+ foreach (var expectedRow in expected)
+ {
+ BaselineQuantDefinition? target = null;
+
+ if (!string.IsNullOrWhiteSpace(expectedRow.NormalizedCanonicalKey) &&
+ currentByCanonicalKey.TryGetValue(expectedRow.NormalizedCanonicalKey, out var byCanonicalKey))
+ {
+ target = byCanonicalKey;
+ }
+ else if (currentByRuntimeId.TryGetValue(expectedRow.RuntimeBaselineId, out var byId))
+ {
+ target = byId;
+ }
+
+ if (target == null)
+ {
+ BaselineQuantDefinitions.Add(expectedRow);
+ changed = true;
+ continue;
+ }
+
+ if (!BaselineDefinitionEquals(target, expectedRow))
+ {
+ ApplyBaselineDefinitionUpdate(target, expectedRow, preserveFirstSeen: true);
+ target.LastUpdatedUtc = now;
+ changed = true;
+ }
+
+ target.IsActiveInCurrentConfig = true;
+ target.LastSeenUtc = now;
+ }
+
+ if (changed)
+ SaveChanges();
+}
+
+private static bool BaselineDefinitionEquals(BaselineQuantDefinition a, BaselineQuantDefinition b)
+{
+ return a.ArchitectureFamilyId == b.ArchitectureFamilyId &&
+ a.RuntimeBaselineId == b.RuntimeBaselineId &&
+ a.DefaultTensorSchemeId == b.DefaultTensorSchemeId &&
+ a.IsCustomBaseline == b.IsCustomBaseline &&
+ a.IsLearningBaseline == b.IsLearningBaseline &&
+ a.IsCombinationCarrierCandidate == b.IsCombinationCarrierCandidate &&
+ a.IsExplicitGroupCombinationCandidate == b.IsExplicitGroupCombinationCandidate &&
+ a.RequiresImatrix == b.RequiresImatrix &&
+ a.BitRange == b.BitRange &&
+ a.ExplicitCandidateSortOrder == b.ExplicitCandidateSortOrder &&
+ a.IsActiveInCurrentConfig == b.IsActiveInCurrentConfig &&
+ string.Equals(a.CanonicalKey, b.CanonicalKey, StringComparison.Ordinal) &&
+ string.Equals(a.NormalizedCanonicalKey, b.NormalizedCanonicalKey, StringComparison.Ordinal) &&
+ string.Equals(a.BaselineName, b.BaselineName, StringComparison.Ordinal) &&
+ string.Equals(a.DisplayName, b.DisplayName, StringComparison.Ordinal) &&
+ string.Equals(a.QuantizeBaseArgumentName, b.QuantizeBaseArgumentName, StringComparison.Ordinal) &&
+ string.Equals(a.DefaultTensorSchemeName, b.DefaultTensorSchemeName, StringComparison.Ordinal) &&
+ string.Equals(a.SourceKind, b.SourceKind, StringComparison.Ordinal) &&
+ string.Equals(a.SourceOwner, b.SourceOwner, StringComparison.Ordinal) &&
+ string.Equals(a.SourceRepository, b.SourceRepository, StringComparison.Ordinal) &&
+ string.Equals(a.NormalizedSourceRepository, b.NormalizedSourceRepository, StringComparison.Ordinal) &&
+ string.Equals(a.SourceFileName, b.SourceFileName, StringComparison.Ordinal) &&
+ string.Equals(a.NormalizedSourceFileName, b.NormalizedSourceFileName, StringComparison.Ordinal) &&
+ string.Equals(a.ShortSourceName, b.ShortSourceName, StringComparison.Ordinal) &&
+ string.Equals(a.BaselineFamily, b.BaselineFamily, StringComparison.Ordinal);
+}
+
+public static void ApplyBaselineDefinitionUpdate(BaselineQuantDefinition target, BaselineQuantDefinition source, bool preserveFirstSeen = true)
+{
+ var firstSeen = target.FirstSeenUtc;
+ target.ArchitectureFamilyId = source.ArchitectureFamilyId;
+ target.RuntimeBaselineId = source.RuntimeBaselineId;
+ target.CanonicalKey = source.CanonicalKey;
+ target.NormalizedCanonicalKey = source.NormalizedCanonicalKey;
+ target.BaselineName = source.BaselineName;
+ target.DisplayName = source.DisplayName;
+ target.QuantizeBaseArgumentName = source.QuantizeBaseArgumentName;
+ target.DefaultTensorSchemeId = source.DefaultTensorSchemeId;
+ target.DefaultTensorSchemeName = source.DefaultTensorSchemeName;
+ target.SourceKind = source.SourceKind;
+ target.SourceOwner = source.SourceOwner;
+ target.SourceRepository = source.SourceRepository;
+ target.NormalizedSourceRepository = source.NormalizedSourceRepository;
+ target.SourceFileName = source.SourceFileName;
+ target.NormalizedSourceFileName = source.NormalizedSourceFileName;
+ target.ShortSourceName = source.ShortSourceName;
+ target.BaselineFamily = source.BaselineFamily;
+ target.IsCustomBaseline = source.IsCustomBaseline;
+ target.IsLearningBaseline = source.IsLearningBaseline;
+ target.IsCombinationCarrierCandidate = source.IsCombinationCarrierCandidate;
+ target.IsExplicitGroupCombinationCandidate = source.IsExplicitGroupCombinationCandidate;
+ target.RequiresImatrix = source.RequiresImatrix;
+ target.BitRange = source.BitRange;
+ target.ExplicitCandidateSortOrder = source.ExplicitCandidateSortOrder;
+ target.IsActiveInCurrentConfig = source.IsActiveInCurrentConfig;
+ target.LastSeenUtc = source.LastSeenUtc;
+ target.LastUpdatedUtc = source.LastUpdatedUtc;
+ if (!preserveFirstSeen)
+ target.FirstSeenUtc = source.FirstSeenUtc;
+ else if (firstSeen != default)
+ target.FirstSeenUtc = firstSeen;
+}
+
+private static string NormalizeKey(string value) => (value ?? string.Empty).Trim().ToLowerInvariant();
+private static string? NormalizeNullable(string? value) => string.IsNullOrWhiteSpace(value) ? null : value.Trim().ToLowerInvariant();
+private static string? NormalizeFileNullable(string? value) => string.IsNullOrWhiteSpace(value) ? null : value.Trim().Replace('\\', '/').ToLowerInvariant();
+
+ private static bool IsDesignTime()
+ {
+ return AppDomain.CurrentDomain.GetAssemblies()
+ .Any(a => a.FullName != null &&
+ a.FullName.Contains("EntityFrameworkCore.Design", StringComparison.OrdinalIgnoreCase));
+ }
+
+ // --------------------------------------------------------
+ // DbSets
+ // --------------------------------------------------------
+
+ public DbSet AiBenchmarks { get; set; }
+ public DbSet AiModelHashes { get; set; }
+ public DbSet TensorCombos { get; set; }
+ public DbSet QuantizationRuns { get; set; }
+ public DbSet BenchmarkRuns { get; set; }
+ public DbSet LearnedBaselineTensorQuants { get; set; }
+ public DbSet BaselineQuantDefinitions { get; set; }
+ public DbSet TensorGroupProfiles { get; set; }
+ public DbSet AiBenchmarkLearnedSources { get; set; }
+ public DbSet ExecutionPlanProbeCaches { get; set; }
+ public DbSet ImatrixDefinitions { get; set; }
+ public DbSet ArchitectureFamilies { get; set; }
+ public DbSet ArchitectureFamilyModelHashes { get; set; }
+ public DbSet AnomalyProbeSessions { get; set; }
+ public DbSet AnomalyProbeObservations { get; set; }
+ public DbSet AnomalyInteractionRules { get; set; }
+ public DbSet AnomalyInteractionRuleGroupStates { get; set; }
+
+
+ // --------------------------------------------------------
+ // Imatrix Ownership Guard
+ // --------------------------------------------------------
+
+ public override int SaveChanges()
+ {
+ ValidateImatrixOwnershipBeforeSaveAsync(CancellationToken.None).GetAwaiter().GetResult();
+ return base.SaveChanges();
+ }
+
+ public override int SaveChanges(bool acceptAllChangesOnSuccess)
+ {
+ ValidateImatrixOwnershipBeforeSaveAsync(CancellationToken.None).GetAwaiter().GetResult();
+ return base.SaveChanges(acceptAllChangesOnSuccess);
+ }
+
+ public override async Task SaveChangesAsync(CancellationToken cancellationToken = default)
+ {
+ await ValidateImatrixOwnershipBeforeSaveAsync(cancellationToken);
+ return await base.SaveChangesAsync(cancellationToken);
+ }
+
+ public override async Task SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken = default)
+ {
+ await ValidateImatrixOwnershipBeforeSaveAsync(cancellationToken);
+ return await base.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken);
+ }
+
+ private async Task ValidateImatrixOwnershipBeforeSaveAsync(CancellationToken ct)
+ {
+ var pairs = ChangeTracker.Entries()
+ .Where(e => e.State is EntityState.Added or EntityState.Modified)
+ .Select(e => e.Entity)
+ .Select(entity => entity switch
+ {
+ AiBenchmark x => (EntityName: nameof(AiBenchmark), x.AiModelHashId, x.ImatrixDefinitionId),
+ BenchmarkRun x => (EntityName: nameof(BenchmarkRun), x.AiModelHashId, x.ImatrixDefinitionId),
+ QuantizationRun x => (EntityName: nameof(QuantizationRun), x.AiModelHashId, x.ImatrixDefinitionId),
+ ExecutionPlanProbeCache x => (EntityName: nameof(ExecutionPlanProbeCache), x.AiModelHashId, x.ImatrixDefinitionId),
+ AnomalyProbeSession x => (EntityName: nameof(AnomalyProbeSession), x.AiModelHashId, x.ImatrixDefinitionId),
+ AnomalyProbeObservation x => (EntityName: nameof(AnomalyProbeObservation), x.AiModelHashId, x.ImatrixDefinitionId),
+ AnomalyInteractionRule x => (EntityName: nameof(AnomalyInteractionRule), x.AiModelHashId, x.ImatrixDefinitionId),
+ _ => default
+ })
+ .Where(x => !string.IsNullOrWhiteSpace(x.EntityName) && x.ImatrixDefinitionId.HasValue)
+ .Distinct()
+ .ToList();
+
+ if (pairs.Count == 0)
+ return;
+
+ var ids = pairs
+ .Select(x => x.ImatrixDefinitionId!.Value)
+ .Distinct()
+ .ToList();
+
+ var owners = await ImatrixDefinitions
+ .AsNoTracking()
+ .Where(x => ids.Contains(x.Id))
+ .Select(x => new { x.Id, x.AiModelHashId })
+ .ToDictionaryAsync(x => x.Id, x => x.AiModelHashId, ct);
+
+ foreach (var pair in pairs)
+ {
+ if (!owners.TryGetValue(pair.ImatrixDefinitionId!.Value, out var ownerHashId) ||
+ ownerHashId != pair.AiModelHashId)
+ {
+ throw new InvalidOperationException(
+ $"{pair.EntityName} attempted to save AiModelHashId={pair.AiModelHashId} with " +
+ $"ImatrixDefinitionId={pair.ImatrixDefinitionId.Value}, but that imatrix belongs to " +
+ $"AiModelHashId={(owners.TryGetValue(pair.ImatrixDefinitionId.Value, out var found) ? found.ToString() : "missing")}. " +
+ "ImatrixDefinition ownership is exact-model-hash scoped.");
+ }
+ }
+ }
+
+ // --------------------------------------------------------
+ // Configuration
+ // --------------------------------------------------------
+
+ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+ {
+ if (!optionsBuilder.IsConfigured)
+ {
+ var directory = Cache.MagicQuantDirectory;
+
+ if (string.IsNullOrEmpty(directory))
+ directory = Directory.GetCurrentDirectory();
+
+ var dbPath = Path.Combine(directory, "MagicQuant_SQLite.db");
+
+ optionsBuilder.UseSqlite($"Data Source={dbPath};Foreign Keys=True;");
+ }
+ }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ modelBuilder.ApplyConfigurationsFromAssembly(typeof(MagicQuantContext).Assembly);
+ ValidateDbSetsImplementInterface();
+ base.OnModelCreating(modelBuilder);
+ }
+
+ // --------------------------------------------------------
+ // Strict Validation
+ // --------------------------------------------------------
+
+ private void ValidateDbSetsImplementInterface()
+ {
+ var dbSetGenericTypes = this.GetType()
+ .GetProperties()
+ .Where(p => p.PropertyType.IsGenericType &&
+ p.PropertyType.GetGenericTypeDefinition() == typeof(DbSet<>))
+ .Select(p => p.PropertyType.GetGenericArguments()[0])
+ .ToHashSet();
+
+ var configuredTypes = typeof(MagicQuantContext).Assembly
+ .GetTypes()
+ .Where(t => t.GetInterfaces().Any(i =>
+ i.IsGenericType && i.GetGenericTypeDefinition() == typeof(ISQLiteEntity<>)))
+ .ToHashSet();
+
+ var missingConfigs = dbSetGenericTypes.Except(configuredTypes).ToList();
+
+ if (missingConfigs.Any())
+ {
+ var names = string.Join(", ", missingConfigs.Select(t => t.Name));
+ throw new InvalidOperationException(
+ $"STRICT MODE ERROR: The following DbSets do not implement ISQLiteEntity: [{names}]. "
+ );
+ }
+ }
+}
diff --git a/src/MQ.DB/Interfaces/ISQLiteEntity.cs b/src/MQ.DB/Interfaces/ISQLiteEntity.cs
new file mode 100644
index 0000000..3e6cba9
--- /dev/null
+++ b/src/MQ.DB/Interfaces/ISQLiteEntity.cs
@@ -0,0 +1,10 @@
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+
+namespace MQ.DB.Interfaces;
+using Microsoft.EntityFrameworkCore;
+
+internal interface ISQLiteEntity : IEntityTypeConfiguration
+ where T : class
+{
+
+}
\ No newline at end of file
diff --git a/src/MQ.DB/MQ.DB.csproj b/src/MQ.DB/MQ.DB.csproj
new file mode 100644
index 0000000..dbbc1aa
--- /dev/null
+++ b/src/MQ.DB/MQ.DB.csproj
@@ -0,0 +1,31 @@
+
+
+
+ net10.0
+ enable
+ enable
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
diff --git a/src/MQ.DB/Migrations/20260501195554_InitialCreate.Designer.cs b/src/MQ.DB/Migrations/20260501195554_InitialCreate.Designer.cs
new file mode 100644
index 0000000..4e8e213
--- /dev/null
+++ b/src/MQ.DB/Migrations/20260501195554_InitialCreate.Designer.cs
@@ -0,0 +1,1151 @@
+//
+using System;
+using MQ.DB.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace MQ.DB.Migrations
+{
+ [DbContext(typeof(MagicQuantContext))]
+ [Migration("20260501195554_InitialCreate")]
+ partial class InitialCreate
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.1");
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.AiBenchmark", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AiModelHashId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ImatrixDefinitionId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Ngl")
+ .HasColumnType("INTEGER");
+
+ b.Property("SizeBytes")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorComboId")
+ .HasColumnType("TEXT");
+
+ b.Property("TensorGroupProfileId")
+ .HasColumnType("INTEGER");
+
+ b.Property("TokensPerSecond")
+ .HasColumnType("REAL");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AiModelHashId");
+
+ b.HasIndex("ImatrixDefinitionId");
+
+ b.HasIndex("TensorComboId");
+
+ b.HasIndex("TensorGroupProfileId");
+
+ b.HasIndex("ArchitectureFamilyId", "TensorGroupProfileId", "TensorComboId");
+
+ b.HasIndex("ArchitectureFamilyId", "TensorGroupProfileId", "AiModelHashId", "ImatrixDefinitionId", "TensorComboId")
+ .IsUnique();
+
+ b.ToTable("AiBenchmarks");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.AiBenchmarkLearnedSource", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AiBenchmarkId")
+ .HasColumnType("TEXT");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("BaselineCanonicalKey")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("BaselineQuantDefinitionId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("SourceLearningBenchmarkId")
+ .HasColumnType("TEXT");
+
+ b.Property("TensorComboId")
+ .HasColumnType("TEXT");
+
+ b.Property("TensorGroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorGroupProfileId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BaselineQuantDefinitionId");
+
+ b.HasIndex("SourceLearningBenchmarkId");
+
+ b.HasIndex("TensorComboId");
+
+ b.HasIndex("TensorGroupProfileId");
+
+ b.HasIndex("AiBenchmarkId", "TensorGroupId")
+ .IsUnique();
+
+ b.HasIndex("ArchitectureFamilyId", "TensorGroupProfileId", "BaselineQuantDefinitionId");
+
+ b.ToTable("AiBenchmarkLearnedSources");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.AiModelHash", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("UniqueHash")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UniqueHash");
+
+ b.ToTable("AiModelHashes");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.ArchitectureFamily", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("TensorCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorSignatureHash")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique();
+
+ b.HasIndex("TensorSignatureHash", "TensorCount");
+
+ b.ToTable("ArchitectureFamilies");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.ArchitectureFamilyModelHash", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AiModelHashId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("IsCanonical")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AiModelHashId")
+ .IsUnique();
+
+ b.HasIndex("ArchitectureFamilyId", "AiModelHashId")
+ .IsUnique();
+
+ b.ToTable("ArchitectureFamilyModelHashes");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.BaselineQuantDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("BaselineFamily")
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("BaselineName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("BitRange")
+ .HasColumnType("INTEGER");
+
+ b.Property("CanonicalKey")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("DefaultTensorSchemeId")
+ .HasColumnType("INTEGER");
+
+ b.Property("DefaultTensorSchemeName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("ExplicitCandidateSortOrder")
+ .HasColumnType("INTEGER");
+
+ b.Property("FirstSeenUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("IsActiveInCurrentConfig")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsCombinationCarrierCandidate")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsCustomBaseline")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsExplicitGroupCombinationCandidate")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsLearningBaseline")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastSeenUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("LastUpdatedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedCanonicalKey")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedSourceFileName")
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedSourceRepository")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("QuantizeBaseArgumentName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("RequiresImatrix")
+ .HasColumnType("INTEGER");
+
+ b.Property("RuntimeBaselineId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ShortSourceName")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("SourceFileName")
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("SourceKind")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("SourceOwner")
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("SourceRepository")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsActiveInCurrentConfig");
+
+ b.HasIndex("ArchitectureFamilyId", "NormalizedCanonicalKey")
+ .IsUnique();
+
+ b.HasIndex("ArchitectureFamilyId", "RuntimeBaselineId")
+ .IsUnique();
+
+ b.HasIndex("RuntimeBaselineId", "ArchitectureFamilyId");
+
+ b.HasIndex("ArchitectureFamilyId", "NormalizedSourceRepository", "NormalizedSourceFileName")
+ .IsUnique();
+
+ b.ToTable("BaselineQuantDefinitions");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.BenchmarkRun", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AiBenchmarkId")
+ .HasColumnType("TEXT");
+
+ b.Property("AiModelHashId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Category")
+ .HasColumnType("INTEGER");
+
+ b.Property("CategoryBenchmarkId")
+ .HasColumnType("TEXT");
+
+ b.Property("CompletedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("DurationMs")
+ .HasColumnType("INTEGER");
+
+ b.Property("Error")
+ .HasMaxLength(4000)
+ .HasColumnType("TEXT");
+
+ b.Property("ImatrixDefinitionId")
+ .HasColumnType("INTEGER");
+
+ b.Property("StartedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("Succeeded")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorComboId")
+ .HasColumnType("TEXT");
+
+ b.Property("TensorGroupProfileId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AiBenchmarkId");
+
+ b.HasIndex("AiModelHashId");
+
+ b.HasIndex("ArchitectureFamilyId");
+
+ b.HasIndex("CategoryBenchmarkId");
+
+ b.HasIndex("ImatrixDefinitionId");
+
+ b.HasIndex("StartedUtc");
+
+ b.HasIndex("TensorComboId");
+
+ b.HasIndex("TensorGroupProfileId");
+
+ b.HasIndex("AiBenchmarkId", "Category");
+
+ b.ToTable("BenchmarkRuns");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.CategoryBenchmark", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AiBenchmarkId")
+ .HasColumnType("TEXT");
+
+ b.Property("Category")
+ .HasColumnType("INTEGER");
+
+ b.Property("Kld")
+ .HasColumnType("REAL");
+
+ b.Property("Ppl")
+ .HasColumnType("REAL");
+
+ b.Property("PplError")
+ .HasColumnType("REAL");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AiBenchmarkId");
+
+ b.ToTable("CategoryBenchmark");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.ExecutionPlanProbeCache", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AiModelHashId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("DiscoveryTokenTarget")
+ .HasColumnType("INTEGER");
+
+ b.Property("GpuMemoryLimitsJson")
+ .IsRequired()
+ .HasMaxLength(4000)
+ .HasColumnType("TEXT");
+
+ b.Property("GroupSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("HardwareFingerprint")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("TEXT");
+
+ b.Property("ImatrixDefinitionId")
+ .HasColumnType("INTEGER");
+
+ b.Property("MaxCandidateNgl")
+ .HasColumnType("INTEGER");
+
+ b.Property("NativeModelSizeBytes")
+ .HasColumnType("INTEGER");
+
+ b.Property("NativeQuantizationKey")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("NativeStableNgl")
+ .HasColumnType("INTEGER");
+
+ b.Property("ProbeSchemaVersion")
+ .HasColumnType("INTEGER");
+
+ b.Property("Q8ModelSizeBytes")
+ .HasColumnType("INTEGER");
+
+ b.Property("Q8StableNgl")
+ .HasColumnType("INTEGER");
+
+ b.Property("QuantizationKey")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("QuantizedModelFingerprint")
+ .IsRequired()
+ .HasMaxLength(2048)
+ .HasColumnType("TEXT");
+
+ b.Property("SlotsJson")
+ .IsRequired()
+ .HasMaxLength(8000)
+ .HasColumnType("TEXT");
+
+ b.Property("StaticNgl")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorGroupProfileId")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorSplitJson")
+ .IsRequired()
+ .HasMaxLength(4000)
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("UsesGpu")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AiModelHashId");
+
+ b.HasIndex("ArchitectureFamilyId");
+
+ b.HasIndex("ImatrixDefinitionId");
+
+ b.HasIndex("TensorGroupProfileId");
+
+ b.HasIndex("ArchitectureFamilyId", "TensorGroupProfileId", "AiModelHashId", "ImatrixDefinitionId", "HardwareFingerprint", "QuantizedModelFingerprint", "QuantizationKey", "DiscoveryTokenTarget")
+ .IsUnique();
+
+ b.ToTable("ExecutionPlanProbeCaches");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.ImatrixDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AiModelHashId")
+ .HasColumnType("INTEGER");
+
+ b.Property("BuildFingerprint")
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("CanonicalPath")
+ .HasMaxLength(2048)
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("IdentityHash")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("MetadataJson")
+ .HasMaxLength(8000)
+ .HasColumnType("TEXT");
+
+ b.Property("SourceKind")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("TokenCount")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AiModelHashId", "IdentityHash")
+ .IsUnique();
+
+ b.ToTable("ImatrixDefinitions");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.LearnedBaselineTensorQuant", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AiBenchmarkId")
+ .HasColumnType("TEXT");
+
+ b.Property("AiModelHashId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("BaselineCanonicalKey")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("BaselineQuantDefinitionId")
+ .HasColumnType("INTEGER");
+
+ b.Property("BaselineQuantId")
+ .HasColumnType("INTEGER");
+
+ b.Property("BaselineSourceFileName")
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("BaselineSourceKind")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.Property("BaselineSourceRepository")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("FinalQuantType")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("TEXT");
+
+ b.Property("TensorComboId")
+ .HasColumnType("TEXT");
+
+ b.Property("TensorGroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorGroupProfileId")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorName")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("TEXT");
+
+ b.Property("TensorWeightSchemeId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AiBenchmarkId");
+
+ b.HasIndex("AiModelHashId");
+
+ b.HasIndex("BaselineQuantDefinitionId");
+
+ b.HasIndex("TensorComboId");
+
+ b.HasIndex("TensorGroupProfileId");
+
+ b.HasIndex("ArchitectureFamilyId", "TensorGroupProfileId", "BaselineQuantDefinitionId", "TensorGroupId");
+
+ b.HasIndex("ArchitectureFamilyId", "TensorGroupProfileId", "BaselineQuantDefinitionId", "TensorWeightSchemeId", "TensorName")
+ .IsUnique();
+
+ b.ToTable("LearnedBaselineTensorQuants");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.QuantizationRun", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AiBenchmarkId")
+ .HasColumnType("TEXT");
+
+ b.Property("AiModelHashId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CompletedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("DurationMs")
+ .HasColumnType("INTEGER");
+
+ b.Property("Error")
+ .HasMaxLength(4000)
+ .HasColumnType("TEXT");
+
+ b.Property("ImatrixDefinitionId")
+ .HasColumnType("INTEGER");
+
+ b.Property("OutputModelPath")
+ .HasMaxLength(2048)
+ .HasColumnType("TEXT");
+
+ b.Property("StartedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("Succeeded")
+ .HasColumnType("INTEGER");
+
+ b.Property("TensorComboId")
+ .HasColumnType("TEXT");
+
+ b.Property("TensorGroupProfileId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AiBenchmarkId");
+
+ b.HasIndex("AiModelHashId");
+
+ b.HasIndex("ArchitectureFamilyId");
+
+ b.HasIndex("ImatrixDefinitionId");
+
+ b.HasIndex("StartedUtc");
+
+ b.HasIndex("TensorComboId");
+
+ b.HasIndex("TensorGroupProfileId");
+
+ b.ToTable("QuantizationRuns");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.TensorCombo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AttnKV")
+ .HasColumnType("INTEGER");
+
+ b.Property("AttnOutput")
+ .HasColumnType("INTEGER");
+
+ b.Property("AttnQ")
+ .HasColumnType("INTEGER");
+
+ b.Property("BaseQuant")
+ .HasColumnType("INTEGER");
+
+ b.Property("Embeddings")
+ .HasColumnType("INTEGER");
+
+ b.Property("FfnDown")
+ .HasColumnType("INTEGER");
+
+ b.Property("FfnUpGate")
+ .HasColumnType("INTEGER");
+
+ b.Property("LmHead")
+ .HasColumnType("INTEGER");
+
+ b.Property("MoeExperts")
+ .HasColumnType("INTEGER");
+
+ b.Property("MoeRouter")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BaseQuant", "Embeddings", "LmHead", "AttnQ", "AttnKV", "AttnOutput", "FfnUpGate", "FfnDown", "MoeExperts", "MoeRouter")
+ .IsUnique();
+
+ b.ToTable("TensorCombos");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.TensorGroupProfile", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ArchitectureFamilyId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("FingerprintHash")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("IsActive")
+ .HasColumnType("INTEGER");
+
+ b.Property("SnapshotJson")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ArchitectureFamilyId", "FingerprintHash")
+ .IsUnique();
+
+ b.HasIndex("ArchitectureFamilyId", "IsActive");
+
+ b.ToTable("TensorGroupProfiles");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.AiBenchmark", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiModelHash", "AiModelHash")
+ .WithMany()
+ .HasForeignKey("AiModelHashId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ImatrixDefinition", "ImatrixDefinition")
+ .WithMany()
+ .HasForeignKey("ImatrixDefinitionId")
+ .OnDelete(DeleteBehavior.Restrict);
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorCombo", "TensorCombo")
+ .WithMany()
+ .HasForeignKey("TensorComboId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorGroupProfile", "TensorGroupProfile")
+ .WithMany()
+ .HasForeignKey("TensorGroupProfileId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("AiModelHash");
+
+ b.Navigation("ArchitectureFamily");
+
+ b.Navigation("ImatrixDefinition");
+
+ b.Navigation("TensorCombo");
+
+ b.Navigation("TensorGroupProfile");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.AiBenchmarkLearnedSource", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiBenchmark", "AiBenchmark")
+ .WithMany("LearnedSources")
+ .HasForeignKey("AiBenchmarkId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.BaselineQuantDefinition", "BaselineQuantDefinition")
+ .WithMany()
+ .HasForeignKey("BaselineQuantDefinitionId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.AiBenchmark", "SourceLearningBenchmark")
+ .WithMany()
+ .HasForeignKey("SourceLearningBenchmarkId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorCombo", "TensorCombo")
+ .WithMany()
+ .HasForeignKey("TensorComboId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorGroupProfile", "TensorGroupProfile")
+ .WithMany()
+ .HasForeignKey("TensorGroupProfileId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AiBenchmark");
+
+ b.Navigation("ArchitectureFamily");
+
+ b.Navigation("BaselineQuantDefinition");
+
+ b.Navigation("SourceLearningBenchmark");
+
+ b.Navigation("TensorCombo");
+
+ b.Navigation("TensorGroupProfile");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.ArchitectureFamilyModelHash", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiModelHash", "AiModelHash")
+ .WithMany()
+ .HasForeignKey("AiModelHashId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AiModelHash");
+
+ b.Navigation("ArchitectureFamily");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.BaselineQuantDefinition", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.Navigation("ArchitectureFamily");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.BenchmarkRun", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiBenchmark", "AiBenchmark")
+ .WithMany()
+ .HasForeignKey("AiBenchmarkId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.AiModelHash", "AiModelHash")
+ .WithMany()
+ .HasForeignKey("AiModelHashId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.CategoryBenchmark", "CategoryBenchmark")
+ .WithMany()
+ .HasForeignKey("CategoryBenchmarkId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.HasOne("MQ.DB.Models.DbModels.ImatrixDefinition", "ImatrixDefinition")
+ .WithMany()
+ .HasForeignKey("ImatrixDefinitionId")
+ .OnDelete(DeleteBehavior.Restrict);
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorCombo", "TensorCombo")
+ .WithMany()
+ .HasForeignKey("TensorComboId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorGroupProfile", "TensorGroupProfile")
+ .WithMany()
+ .HasForeignKey("TensorGroupProfileId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("AiBenchmark");
+
+ b.Navigation("AiModelHash");
+
+ b.Navigation("ArchitectureFamily");
+
+ b.Navigation("CategoryBenchmark");
+
+ b.Navigation("ImatrixDefinition");
+
+ b.Navigation("TensorCombo");
+
+ b.Navigation("TensorGroupProfile");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.CategoryBenchmark", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiBenchmark", "AiBenchmark")
+ .WithMany("CategorBenchmarks")
+ .HasForeignKey("AiBenchmarkId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AiBenchmark");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.ExecutionPlanProbeCache", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiModelHash", "AiModelHash")
+ .WithMany()
+ .HasForeignKey("AiModelHashId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ImatrixDefinition", "ImatrixDefinition")
+ .WithMany()
+ .HasForeignKey("ImatrixDefinitionId")
+ .OnDelete(DeleteBehavior.Restrict);
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorGroupProfile", "TensorGroupProfile")
+ .WithMany()
+ .HasForeignKey("TensorGroupProfileId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("AiModelHash");
+
+ b.Navigation("ArchitectureFamily");
+
+ b.Navigation("ImatrixDefinition");
+
+ b.Navigation("TensorGroupProfile");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.ImatrixDefinition", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiModelHash", "AiModelHash")
+ .WithMany()
+ .HasForeignKey("AiModelHashId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AiModelHash");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.LearnedBaselineTensorQuant", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiBenchmark", "AiBenchmark")
+ .WithMany()
+ .HasForeignKey("AiBenchmarkId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.AiModelHash", "AiModelHash")
+ .WithMany()
+ .HasForeignKey("AiModelHashId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.BaselineQuantDefinition", "BaselineQuantDefinition")
+ .WithMany()
+ .HasForeignKey("BaselineQuantDefinitionId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorCombo", "TensorCombo")
+ .WithMany()
+ .HasForeignKey("TensorComboId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorGroupProfile", "TensorGroupProfile")
+ .WithMany()
+ .HasForeignKey("TensorGroupProfileId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("AiBenchmark");
+
+ b.Navigation("AiModelHash");
+
+ b.Navigation("ArchitectureFamily");
+
+ b.Navigation("BaselineQuantDefinition");
+
+ b.Navigation("TensorCombo");
+
+ b.Navigation("TensorGroupProfile");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.QuantizationRun", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.AiBenchmark", "AiBenchmark")
+ .WithMany()
+ .HasForeignKey("AiBenchmarkId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.HasOne("MQ.DB.Models.DbModels.AiModelHash", "AiModelHash")
+ .WithMany()
+ .HasForeignKey("AiModelHashId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.ImatrixDefinition", "ImatrixDefinition")
+ .WithMany()
+ .HasForeignKey("ImatrixDefinitionId")
+ .OnDelete(DeleteBehavior.Restrict);
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorCombo", "TensorCombo")
+ .WithMany()
+ .HasForeignKey("TensorComboId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("MQ.DB.Models.DbModels.TensorGroupProfile", "TensorGroupProfile")
+ .WithMany()
+ .HasForeignKey("TensorGroupProfileId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("AiBenchmark");
+
+ b.Navigation("AiModelHash");
+
+ b.Navigation("ArchitectureFamily");
+
+ b.Navigation("ImatrixDefinition");
+
+ b.Navigation("TensorCombo");
+
+ b.Navigation("TensorGroupProfile");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.TensorGroupProfile", b =>
+ {
+ b.HasOne("MQ.DB.Models.DbModels.ArchitectureFamily", "ArchitectureFamily")
+ .WithMany()
+ .HasForeignKey("ArchitectureFamilyId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("ArchitectureFamily");
+ });
+
+ modelBuilder.Entity("MQ.DB.Models.DbModels.AiBenchmark", b =>
+ {
+ b.Navigation("CategorBenchmarks");
+
+ b.Navigation("LearnedSources");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/MQ.DB/Migrations/20260501195554_InitialCreate.cs b/src/MQ.DB/Migrations/20260501195554_InitialCreate.cs
new file mode 100644
index 0000000..d03c1b5
--- /dev/null
+++ b/src/MQ.DB/Migrations/20260501195554_InitialCreate.cs
@@ -0,0 +1,895 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace MQ.DB.Migrations
+{
+ ///
+ public partial class InitialCreate : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "AiModelHashes",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ UniqueHash = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AiModelHashes", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "ArchitectureFamilies",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ NormalizedName = table.Column(type: "TEXT", maxLength: 256, nullable: false),
+ DisplayName = table.Column(type: "TEXT", maxLength: 256, nullable: false),
+ TensorSignatureHash = table.Column(type: "TEXT", maxLength: 128, nullable: false),
+ TensorCount = table.Column(type: "INTEGER", nullable: false),
+ CreatedUtc = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ArchitectureFamilies", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "TensorCombos",
+ columns: table => new
+ {
+ Id = table.Column(type: "TEXT", nullable: false),
+ AttnKV = table.Column(type: "INTEGER", nullable: false),
+ AttnOutput = table.Column(type: "INTEGER", nullable: false),
+ AttnQ = table.Column(type: "INTEGER", nullable: false),
+ BaseQuant = table.Column(type: "INTEGER", nullable: false),
+ Embeddings = table.Column(type: "INTEGER", nullable: false),
+ FfnDown = table.Column(type: "INTEGER", nullable: false),
+ FfnUpGate = table.Column(type: "INTEGER", nullable: false),
+ LmHead = table.Column(type: "INTEGER", nullable: false),
+ MoeExperts = table.Column(type: "INTEGER", nullable: false),
+ MoeRouter = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_TensorCombos", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "ImatrixDefinitions",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ AiModelHashId = table.Column(type: "INTEGER", nullable: false),
+ IdentityHash = table.Column(type: "TEXT", maxLength: 128, nullable: false),
+ CanonicalPath = table.Column(type: "TEXT", maxLength: 2048, nullable: true),
+ SourceKind = table.Column(type: "TEXT", maxLength: 64, nullable: false),
+ CreatedUtc = table.Column(type: "TEXT", nullable: false),
+ MetadataJson = table.Column(type: "TEXT", maxLength: 8000, nullable: true),
+ TokenCount = table.Column(type: "INTEGER", nullable: true),
+ BuildFingerprint = table.Column(type: "TEXT", maxLength: 512, nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ImatrixDefinitions", x => x.Id);
+ table.ForeignKey(
+ name: "FK_ImatrixDefinitions_AiModelHashes_AiModelHashId",
+ column: x => x.AiModelHashId,
+ principalTable: "AiModelHashes",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "ArchitectureFamilyModelHashes",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ ArchitectureFamilyId = table.Column(type: "INTEGER", nullable: false),
+ AiModelHashId = table.Column(type: "INTEGER", nullable: false),
+ IsCanonical = table.Column(type: "INTEGER", nullable: false),
+ CreatedUtc = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ArchitectureFamilyModelHashes", x => x.Id);
+ table.ForeignKey(
+ name: "FK_ArchitectureFamilyModelHashes_AiModelHashes_AiModelHashId",
+ column: x => x.AiModelHashId,
+ principalTable: "AiModelHashes",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_ArchitectureFamilyModelHashes_ArchitectureFamilies_ArchitectureFamilyId",
+ column: x => x.ArchitectureFamilyId,
+ principalTable: "ArchitectureFamilies",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "BaselineQuantDefinitions",
+ columns: table => new
+ {
+ Id = table.Column