holdout 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. holdout-0.1.0/.gitignore +61 -0
  2. holdout-0.1.0/CLAUDE.md +153 -0
  3. holdout-0.1.0/CODE_OF_CONDUCT.md +128 -0
  4. holdout-0.1.0/CONTRIBUTING.md +51 -0
  5. holdout-0.1.0/LICENSE +189 -0
  6. holdout-0.1.0/PKG-INFO +121 -0
  7. holdout-0.1.0/README.md +101 -0
  8. holdout-0.1.0/docs/Holdout Build Spec.docx +0 -0
  9. holdout-0.1.0/docs/Holdout Build Spec.md +150 -0
  10. holdout-0.1.0/docs/Holdout Design Document Hardened.docx +0 -0
  11. holdout-0.1.0/docs/Holdout Design Document Hardened.md +175 -0
  12. holdout-0.1.0/docs/Holdout Testing Strategy.docx +0 -0
  13. holdout-0.1.0/docs/Holdout Testing Strategy.md +239 -0
  14. holdout-0.1.0/prompts/commit.txt +15 -0
  15. holdout-0.1.0/prompts/concurrence.txt +16 -0
  16. holdout-0.1.0/prompts/crux.txt +11 -0
  17. holdout-0.1.0/pyproject.toml +67 -0
  18. holdout-0.1.0/src/holdout/__init__.py +10 -0
  19. holdout-0.1.0/src/holdout/cli.py +132 -0
  20. holdout-0.1.0/src/holdout/protocol/__init__.py +0 -0
  21. holdout-0.1.0/src/holdout/protocol/commit.py +68 -0
  22. holdout-0.1.0/src/holdout/protocol/concurrence.py +56 -0
  23. holdout-0.1.0/src/holdout/protocol/crux.py +47 -0
  24. holdout-0.1.0/src/holdout/protocol/engine.py +75 -0
  25. holdout-0.1.0/src/holdout/protocol/tabulate.py +35 -0
  26. holdout-0.1.0/src/holdout/providers/__init__.py +0 -0
  27. holdout-0.1.0/src/holdout/providers/base.py +32 -0
  28. holdout-0.1.0/src/holdout/providers/fake.py +48 -0
  29. holdout-0.1.0/src/holdout/providers/openai_compat.py +62 -0
  30. holdout-0.1.0/src/holdout/report/__init__.py +0 -0
  31. holdout-0.1.0/src/holdout/report/render.py +47 -0
  32. holdout-0.1.0/src/holdout/report/template.html.j2 +68 -0
  33. holdout-0.1.0/src/holdout/store/__init__.py +0 -0
  34. holdout-0.1.0/src/holdout/store/schema.sql +28 -0
  35. holdout-0.1.0/src/holdout/store/sqlite.py +147 -0
  36. holdout-0.1.0/src/holdout/types.py +194 -0
  37. holdout-0.1.0/tests/__init__.py +0 -0
  38. holdout-0.1.0/tests/conftest.py +15 -0
  39. holdout-0.1.0/tests/test_cli.py +318 -0
  40. holdout-0.1.0/tests/test_commit.py +263 -0
  41. holdout-0.1.0/tests/test_concurrence.py +147 -0
  42. holdout-0.1.0/tests/test_crux.py +122 -0
  43. holdout-0.1.0/tests/test_engine.py +335 -0
  44. holdout-0.1.0/tests/test_openai_compat.py +207 -0
  45. holdout-0.1.0/tests/test_report.py +217 -0
  46. holdout-0.1.0/tests/test_store.py +214 -0
  47. holdout-0.1.0/tests/test_tabulate.py +154 -0
  48. holdout-0.1.0/tests/test_types.py +209 -0
  49. holdout-0.1.0/verify_contract.py +124 -0
@@ -0,0 +1,61 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.pyd
6
+ .Python
7
+ *.egg
8
+ *.egg-info/
9
+ dist/
10
+ build/
11
+ eggs/
12
+ parts/
13
+ var/
14
+ sdist/
15
+ wheels/
16
+ *.egg-link
17
+ .installed.cfg
18
+ MANIFEST
19
+
20
+ # Virtual environments
21
+ .venv/
22
+ venv/
23
+ env/
24
+ ENV/
25
+
26
+ # Testing
27
+ .pytest_cache/
28
+ .coverage
29
+ coverage.xml
30
+ htmlcov/
31
+
32
+ # Type checking
33
+ .mypy_cache/
34
+ .dmypy.json
35
+ dmypy.json
36
+
37
+ # Linting
38
+ .ruff_cache/
39
+
40
+ # Environment / secrets
41
+ .env
42
+ .env.*
43
+ *.key
44
+
45
+ # SQLite databases
46
+ *.db
47
+ *.sqlite
48
+ *.sqlite3
49
+
50
+ # IDE
51
+ .vscode/
52
+ .idea/
53
+ *.swp
54
+ *.swo
55
+
56
+ # macOS
57
+ .DS_Store
58
+
59
+ # Distribution
60
+ *.tar.gz
61
+ *.whl
@@ -0,0 +1,153 @@
1
+ # CLAUDE.md
2
+
3
+ Steering for Claude Code working on **MAGI**. Read this fully before any task. It is
4
+ deliberately short. When this file and a vibe disagree, this file wins.
5
+
6
+ ---
7
+
8
+ ## What MAGI is (one paragraph)
9
+
10
+ MAGI takes a question that has **no verifiable answer** and puts it to N independently
11
+ prompted agents, each committing a written rationale and a YES/NO vote **before seeing
12
+ any peer**. It preserves every rationale — including the losing one — as a durable
13
+ record, and on disagreement returns a **crux** instead of a forced answer. The output is
14
+ an artifact, not a decision. MAGI makes **no accuracy claim** and has **no benchmark**.
15
+
16
+ The full case lives in the design docs. You do not need them to build. You need this
17
+ file, the build spec, and the testing strategy.
18
+
19
+ ---
20
+
21
+ ## The two invariants (do not violate, ever)
22
+
23
+ These are the whole point of the project. Most "improvements" an agent is tempted to make
24
+ violate one of them. If a change touches either, stop and re-read this section.
25
+
26
+ ### I. NO SYNTHESIS
27
+ The system **never** merges the positions into a single answer. There is no "final
28
+ answer," no "consensus summary," no "recommended decision" beyond the prevailing vote or
29
+ the crux.
30
+ - `Record` has **no field** that could hold a merged answer. Do not add one
31
+ (`synthesis`, `answer`, `final`, `summary`, `consensus`, `verdict_text`, etc.).
32
+ - The terminal step builds a `Record` from `Position` objects + an `Outcome` (+ optional
33
+ crux, + optional concurrence flag). It produces **no free text that aggregates the
34
+ rationales**.
35
+ - If a task seems to want a "summary of what the panel decided," the answer is the
36
+ `Record` itself, rendered faithfully. Not a synthesized paragraph.
37
+
38
+ ### II. BLIND COMMITMENT
39
+ Each agent commits **without sight of any peer's output**.
40
+ - The commitment function takes the question and **exactly one agent** — never the panel,
41
+ never a list of peer rationales. Do not add a parameter through which peer output could
42
+ pass.
43
+ - The N commitment calls are dispatched **concurrently** and awaited together, so none can
44
+ depend on another's result.
45
+ - A peer rationale must never appear in an agent's prompt. This is enforced by the
46
+ function boundary and **tested by surveillance** (sentinel tokens in scripted
47
+ rationales; assert no agent's prompt contains a peer's token). Never weaken that test.
48
+
49
+ Both invariants are **encoded in the types and call graph**, not just in docs. Keep them
50
+ there. A pre-merge gate fails if the no-synthesis field-absence test or the
51
+ blind-commitment surveillance test is removed or skipped.
52
+
53
+ ---
54
+
55
+ ## Hard rules
56
+
57
+ - **No agent framework.** No LangChain, CrewAI, LlamaIndex, AutoGen, or similar. They
58
+ impose the synthesis/coordination patterns MAGI rejects; importing one smuggles the
59
+ convergence bias back through a dependency. Talk to providers over plain async HTTP.
60
+ - **Provider is an injected seam.** Everything depends on the one-method `Provider`
61
+ protocol, never a concrete provider. The default test double is `FakeProvider`. The
62
+ whole engine must be testable **offline, deterministically, with no API key**.
63
+ - **The contract (`types.py`) is depended on by everything and depends on nothing.** Build
64
+ it first; change it rarely; never loosen its validators to make a test pass.
65
+ - **Tests are structural where it matters.** For the two invariants, test the *property*
66
+ (can it happen at all?), not an *example* (did it happen this time?). See the testing
67
+ strategy.
68
+ - **Don't test prompt quality in the unit suite.** Whether a crux is *wise* is a prompt
69
+ loop, not a test. Tests assert plumbing: prompt loads, fields populate, response parses.
70
+ - **`async` throughout the protocol.** The fan-out is inherently parallel; modeling it
71
+ synchronously models it wrong.
72
+ - **Keep the public API tiny.** `Agent`, `Position`, `Record`, `Vote`, `Tier`, `Outcome`,
73
+ and `Panel.deliberate`. Resist surface-area growth.
74
+
75
+ ---
76
+
77
+ ## Repo map
78
+
79
+ ```
80
+ src/holdout/
81
+ __init__.py public API (tiny)
82
+ types.py THE CONTRACT — build first, change rarely
83
+ providers/
84
+ base.py Provider protocol (one method)
85
+ openai_compat.py the ONE real adapter (httpx) — the only live surface
86
+ fake.py deterministic test double; also records prompts
87
+ protocol/
88
+ commit.py blind commitment: parallel fan-out, one agent per call
89
+ tabulate.py vote counting; threshold by tier
90
+ crux.py consequence-anchored crux (LLM call)
91
+ concurrence.py fragile-agreement detection (LLM call)
92
+ engine.py orchestrates the steps -> Record
93
+ store/
94
+ schema.sql the record schema, verbatim from the spec
95
+ sqlite.py write, get-by-id, recent, similar
96
+ report/
97
+ template.html.j2 faithful, equal-weight render
98
+ render.py
99
+ cli.py thin typer wrapper over the library
100
+ prompts/ versioned prompt text, SEPARATE from logic
101
+ tests/ mirror the modules above
102
+ ```
103
+
104
+ Module boundaries mirror the protocol steps on purpose: a task is usually "implement
105
+ `<module>.py` so `tests/test_<module>.py` is green." Keep it that way.
106
+
107
+ ---
108
+
109
+ ## Build order (each step ends green before the next)
110
+
111
+ 1. `types.py` + `providers/base.py` + `providers/fake.py` — contract and test harness, no
112
+ behavior. (Reference contract already passes 21 checks; keep them green.)
113
+ 2. `protocol/commit.py` + `tabulate.py` — run a deliberation against the fake, get a
114
+ majority result. Blind-commitment tests (surveillance + concurrency + signature) land
115
+ here and are non-negotiable.
116
+ 3. `protocol/crux.py` + `concurrence.py` — split and fragile-agreement paths. Test wiring
117
+ and structural result only, not crux quality.
118
+ 4. `store/` — schema, write, get-by-id, recent, then similar. Faithful round-trip;
119
+ verbatim mandate (auditability).
120
+ 5. `report/` — faithful, equal-weight render; minority labelled on-record, never error.
121
+ Ties to the no-synthesis faithfulness test.
122
+ 6. Two-tier handling + caller-asserted tier at the entrypoint.
123
+ 7. `cli.py`; then `providers/openai_compat.py` (offline via respx; one opt-in live smoke
124
+ test).
125
+
126
+ Don't jump ahead. Don't hold more than one module's complexity at once.
127
+
128
+ ---
129
+
130
+ ## Workflow expectations
131
+
132
+ - **Run the gate before declaring done:** `ruff check`, `ruff format --check`,
133
+ `mypy --strict src`, `pytest` (excludes live by default).
134
+ - **`mypy --strict` must stay clean on `src`.** The contract is typed; enforce it.
135
+ - **Live tests are opt-in** (`-m live`, needs a key). Never make them gate ordinary work.
136
+ - **Small, reviewable commits**, one module/concern each. The invariants must remain
137
+ visible in diffs — a change that touches synthesis or blind commitment should be
138
+ obvious to a reviewer.
139
+ - **If a task tempts you to violate an invariant, surface it instead of doing it.** Say
140
+ which invariant and why the task seems to want it. The likely resolution is that the
141
+ task is misread, not that the invariant should bend.
142
+
143
+ ---
144
+
145
+ ## Quick self-check before any change
146
+
147
+ - Does this add a field or path that could hold a merged answer? → **Stop (Invariant I).**
148
+ - Could a peer rationale reach an agent's prompt after this? → **Stop (Invariant II).**
149
+ - Am I adding a framework or a heavy dependency? → **Stop (hard rule).**
150
+ - Am I testing whether a prompt is *good* rather than *wired*? → **Wrong layer.**
151
+ - Did I loosen a `types.py` validator to pass a test? → **Fix the test, not the contract.**
152
+
153
+ If all five are clear, proceed.
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ .
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,51 @@
1
+ # Contributing
2
+
3
+ ## Set up
4
+
5
+ ```bash
6
+ git clone https://github.com/mehrabr/holdout.git
7
+ cd holdout
8
+ uv pip install -e ".[dev]" # or: pip install -e ".[dev]"
9
+ ```
10
+
11
+ Requires Python 3.11+.
12
+
13
+ ## Run the gate
14
+
15
+ All four must pass before a PR is ready:
16
+
17
+ ```bash
18
+ ruff check src tests # lint
19
+ ruff format --check src tests # formatting
20
+ mypy --strict src # types (strict; src only)
21
+ pytest # tests (live tests excluded by default)
22
+ ```
23
+
24
+ Run them together:
25
+
26
+ ```bash
27
+ ruff check src tests && ruff format --check src tests && mypy --strict src && pytest
28
+ ```
29
+
30
+ Live tests hit a real provider endpoint and need an API key. They are opt-in and never
31
+ gate ordinary work:
32
+
33
+ ```bash
34
+ pytest -m live
35
+ ```
36
+
37
+ ## Before opening a PR
38
+
39
+ - Keep commits small and focused on one module or concern.
40
+ - Any change that touches synthesis prevention or blind commitment should be obviously
41
+ visible in the diff — reviewers look for this.
42
+ - If a change seems to require loosening a validator in `types.py`, fix the change, not
43
+ the contract.
44
+ - If a change seems to require merging agent positions or passing peer output between
45
+ agents, read `CLAUDE.md` — the two invariants explain why those paths are closed.
46
+
47
+ ## Project structure
48
+
49
+ The repo map and build order are in `CLAUDE.md`. The two design invariants (no synthesis,
50
+ blind commitment) are described there too; they are encoded in the types and call graph,
51
+ not just in docs.
holdout-0.1.0/LICENSE ADDED
@@ -0,0 +1,189 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal,
51
+ or written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of discussing and
55
+ improving the Work, but excluding communication that is conspicuously
56
+ marked or designated in writing by the copyright owner as "Not a
57
+ Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
60
+ whom a Contribution has been received by the Licensor and included
61
+ within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the
68
+ Work and such Derivative Works in Source or Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ (except as stated in this section) patent license to make, have made,
74
+ use, offer to sell, sell, import, and otherwise transfer the Work,
75
+ where such license applies only to those patent claims licensable
76
+ by such Contributor that are necessarily infringed by their
77
+ Contribution(s) alone or by the combination of their Contribution(s)
78
+ with the Work to which such Contribution(s) was submitted. If You
79
+ institute patent litigation against any entity (including a cross-claim
80
+ or counterclaim in a lawsuit) alleging that the Work or any
81
+ Contribution embodied within the Work constitutes direct or contributory
82
+ patent infringement, then any patent licenses granted to You under
83
+ this License for that Work shall terminate as of the date such
84
+ litigation is filed.
85
+
86
+ 4. Redistribution. You may reproduce and distribute copies of the
87
+ Work or Derivative Works thereof in any medium, with or without
88
+ modifications, and in Source or Object form, provided that You
89
+ meet the following conditions:
90
+
91
+ (a) You must give any other recipients of the Work or Derivative
92
+ Works a copy of this License; and
93
+
94
+ (b) You must cause any modified files to carry prominent notices
95
+ stating that You changed the files; and
96
+
97
+ (c) You must retain, in the Source form of any Derivative Works
98
+ that You distribute, all copyright, patent, trademark, and
99
+ attribution notices from the Source form of the Work,
100
+ excluding those notices that do not pertain to any part of
101
+ the Derivative Works; and
102
+
103
+ (d) If the Work includes a "NOTICE" text file as part of its
104
+ distribution, You must include a readable copy of the
105
+ attribution notices contained within such NOTICE file, in
106
+ at least one of the following places: within a NOTICE text
107
+ file distributed as part of the Derivative Works; within
108
+ the Source form or documentation, if provided along with the
109
+ Derivative Works; or, within a display generated by the
110
+ Derivative Works, if and wherever such third-party notices
111
+ normally appear. The contents of the NOTICE file are for
112
+ informational purposes only and do not modify the License.
113
+ You may add Your own attribution notices within Derivative
114
+ Works that You distribute, alongside or in addition to the
115
+ NOTICE text from the Work, provided that such additional
116
+ attribution notices cannot be construed as modifying the License.
117
+
118
+ You may add Your own license statement for Your modifications and
119
+ may provide additional grant of rights to use, copy, modify, merge,
120
+ publish, distribute, sublicense, and/or sell copies of the
121
+ Contribution, either on their own or together with this Work.
122
+
123
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
124
+ any Contribution intentionally submitted for inclusion in the Work
125
+ by You to the Licensor shall be under the terms and conditions of
126
+ this License, without any additional terms or conditions.
127
+ Notwithstanding the above, nothing herein shall supersede or modify
128
+ the terms of any separate license agreement you may have executed
129
+ with Licensor regarding such Contributions.
130
+
131
+ 6. Trademarks. This License does not grant permission to use the trade
132
+ names, trademarks, service marks, or product names of the Licensor,
133
+ except as required for reasonable and customary use in describing the
134
+ origin of the Work and reproducing the content of the NOTICE file.
135
+
136
+ 7. Disclaimer of Warranty. Unless required by applicable law or
137
+ agreed to in writing, Licensor provides the Work (and each
138
+ Contributor provides its Contributions) on an "AS IS" BASIS,
139
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
140
+ implied, including, without limitation, any warranties or conditions
141
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
142
+ PARTICULAR PURPOSE. You are solely responsible for determining the
143
+ appropriateness of using or reproducing the Work and assume any
144
+ risks associated with Your exercise of permissions under this License.
145
+
146
+ 8. Limitation of Liability. In no event and under no legal theory,
147
+ whether in tort (including negligence), contract, or otherwise,
148
+ unless required by applicable law (such as deliberate and grossly
149
+ negligent acts) or agreed to in writing, shall any Contributor be
150
+ liable to You for damages, including any direct, indirect, special,
151
+ incidental, or exemplary damages of any character arising as a
152
+ result of this License or out of the use or inability to use the
153
+ Work (including but not limited to damages for loss of goodwill,
154
+ work stoppage, computer failure or malfunction, or all other
155
+ commercial damages or losses), even if such Contributor has been
156
+ advised of the possibility of such damages.
157
+
158
+ 9. Accepting Warranty or Additional Liability. While redistributing
159
+ the Work or Derivative Works thereof, You may choose to offer,
160
+ and charge a fee for, acceptance of support, warranty, indemnity,
161
+ or other liability obligations and/or rights consistent with this
162
+ License. However, in accepting such obligations, You may offer only
163
+ conditions consistent with this License, subject to any additional
164
+ terms You require or accept.
165
+
166
+ END OF TERMS AND CONDITIONS
167
+
168
+ APPENDIX: How to apply the Apache License to your work.
169
+
170
+ To apply the Apache License to your work, attach the following
171
+ boilerplate notice, with the fields enclosed by brackets "[]"
172
+ replaced with your own identifying information. (Don't include
173
+ the brackets!) The text should be enclosed in the appropriate
174
+ comment syntax for the file format in question. It may be
175
+ appropriate to place the header in a source file's first section.
176
+
177
+ Copyright 2026 mehrabr
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.