leancontext 2.0.0__tar.gz → 2.0.2__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.
- {leancontext-2.0.0 → leancontext-2.0.2}/.github/workflows/ci.yml +1 -1
- {leancontext-2.0.0 → leancontext-2.0.2}/AGENTS.md +1 -1
- {leancontext-2.0.0 → leancontext-2.0.2}/CHANGELOG.md +8 -1
- {leancontext-2.0.0 → leancontext-2.0.2}/CONTRIBUTING.md +1 -1
- {leancontext-2.0.0 → leancontext-2.0.2}/PKG-INFO +7 -3
- {leancontext-2.0.0 → leancontext-2.0.2}/README.md +1 -1
- {leancontext-2.0.0 → leancontext-2.0.2}/pyproject.toml +8 -4
- {leancontext-2.0.0 → leancontext-2.0.2}/.editorconfig +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.github/CODEOWNERS +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.github/dependabot.yml +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.github/workflows/publish.yml +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.gitignore +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/.pre-commit-config.yaml +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/CITATION.cff +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/CODE_OF_CONDUCT.md +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/LICENSE +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/RELEASING.md +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/SECURITY.md +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/assets/logo.png +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/assets/logo.svg +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/bench.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/demo.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/docs/ARCHITECTURE.md +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/examples/basic_usage.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/examples/validate_caching.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/__init__.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/cli.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/core.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/cost.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/fidelity.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/__init__.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/_common.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/anthropic_native.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/clients.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/decorator.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/frameworks.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/litellm.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/mcp_server.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/otel.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/integrations/proxy.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/messages.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/paging.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/py.typed +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/reducers/__init__.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/reducers/base.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/reducers/diff.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/reducers/html.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/reducers/json_data.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/reducers/logs.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/reducers/stacktrace.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/reducers/table.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/leancontext/tokens.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_cache.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_core.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_differentiators.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_fidelity.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_frameworks.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_gateway.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_gemini.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_limits.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_mcp.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_messages.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_otel.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_paging.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_proxy.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_reducers.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_table.py +0 -0
- {leancontext-2.0.0 → leancontext-2.0.2}/tests/test_tokens.py +0 -0
|
@@ -134,7 +134,7 @@ def search_logs(query: str) -> str:
|
|
|
134
134
|
|
|
135
135
|
## 8. Conventions
|
|
136
136
|
|
|
137
|
-
- Python 3.
|
|
137
|
+
- Python 3.10+. Standard library only in the core path; optional extras (tiktoken) behind a flag.
|
|
138
138
|
- Type hints everywhere. Dataclasses for results.
|
|
139
139
|
- Pure functions for reducers: `reduce(text, **opts) -> Reduction`. No global state, no I/O.
|
|
140
140
|
- Determinism is a test requirement: same input must yield byte-identical output.
|
|
@@ -5,6 +5,12 @@ All notable changes to this project are documented here. The format is based on
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [2.0.2] - 2026-06-21
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Lower the minimum Python from 3.14 to 3.10 so the package installs on current
|
|
12
|
+
interpreters (the code already supports 3.10+; CI runs 3.10 through 3.14).
|
|
13
|
+
|
|
8
14
|
## [2.0.0] - 2026-06-21
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -28,5 +34,6 @@ All notable changes to this project are documented here. The format is based on
|
|
|
28
34
|
- Targets Python 3.14; ruff, mypy, and coverage run in CI; examples, contributor, and
|
|
29
35
|
security docs included.
|
|
30
36
|
|
|
31
|
-
[Unreleased]: https://github.com/pankajniet/LeanContext/compare/v2.0.
|
|
37
|
+
[Unreleased]: https://github.com/pankajniet/LeanContext/compare/v2.0.2...HEAD
|
|
38
|
+
[2.0.2]: https://github.com/pankajniet/LeanContext/releases/tag/v2.0.2
|
|
32
39
|
[2.0.0]: https://github.com/pankajniet/LeanContext/releases/tag/v2.0.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: leancontext
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Deterministic, type-aware reduction of agent tool outputs at the source. Cut LLM token cost without making the agent do less.
|
|
5
5
|
Project-URL: Homepage, https://github.com/pankajniet/LeanContext
|
|
6
6
|
Project-URL: Repository, https://github.com/pankajniet/LeanContext
|
|
@@ -14,10 +14,14 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
21
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
22
|
Classifier: Topic :: Software Development :: Libraries
|
|
19
23
|
Classifier: Typing :: Typed
|
|
20
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.10
|
|
21
25
|
Provides-Extra: dev
|
|
22
26
|
Requires-Dist: mypy>=1.19; extra == 'dev'
|
|
23
27
|
Requires-Dist: opentelemetry-sdk>=1.39; extra == 'dev'
|
|
@@ -51,7 +55,7 @@ Description-Content-Type: text/markdown
|
|
|
51
55
|
<p align="center">
|
|
52
56
|
<a href="https://pypi.org/project/leancontext/"><img alt="PyPI" src="https://img.shields.io/pypi/v/leancontext.svg"></a>
|
|
53
57
|
<a href="LICENSE"><img alt="License: Apache 2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
|
|
54
|
-
<img alt="Python 3.
|
|
58
|
+
<img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-blue.svg">
|
|
55
59
|
<a href="https://github.com/pankajniet/LeanContext/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/pankajniet/LeanContext/actions/workflows/ci.yml/badge.svg"></a>
|
|
56
60
|
<a href="https://github.com/astral-sh/ruff"><img alt="Ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json"></a>
|
|
57
61
|
<img alt="mypy" src="https://img.shields.io/badge/types-mypy-blue.svg">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://pypi.org/project/leancontext/"><img alt="PyPI" src="https://img.shields.io/pypi/v/leancontext.svg"></a>
|
|
11
11
|
<a href="LICENSE"><img alt="License: Apache 2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
|
|
12
|
-
<img alt="Python 3.
|
|
12
|
+
<img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-blue.svg">
|
|
13
13
|
<a href="https://github.com/pankajniet/LeanContext/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/pankajniet/LeanContext/actions/workflows/ci.yml/badge.svg"></a>
|
|
14
14
|
<a href="https://github.com/astral-sh/ruff"><img alt="Ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json"></a>
|
|
15
15
|
<img alt="mypy" src="https://img.shields.io/badge/types-mypy-blue.svg">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "leancontext"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.2"
|
|
4
4
|
description = "Deterministic, type-aware reduction of agent tool outputs at the source. Cut LLM token cost without making the agent do less."
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
7
|
license = { text = "Apache-2.0" }
|
|
8
8
|
authors = [{ name = "Pankaj Pandey" }]
|
|
9
9
|
keywords = ["llm", "agents", "tokens", "cost", "context", "compression", "rag"]
|
|
@@ -12,6 +12,10 @@ classifiers = [
|
|
|
12
12
|
"Intended Audience :: Developers",
|
|
13
13
|
"License :: OSI Approved :: Apache Software License",
|
|
14
14
|
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: 3.10",
|
|
16
|
+
"Programming Language :: Python :: 3.11",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"Programming Language :: Python :: 3.13",
|
|
15
19
|
"Programming Language :: Python :: 3.14",
|
|
16
20
|
"Topic :: Software Development :: Libraries",
|
|
17
21
|
"Typing :: Typed",
|
|
@@ -49,7 +53,7 @@ filterwarnings = ["ignore::UserWarning:requests"]
|
|
|
49
53
|
|
|
50
54
|
[tool.ruff]
|
|
51
55
|
line-length = 110
|
|
52
|
-
target-version = "
|
|
56
|
+
target-version = "py310"
|
|
53
57
|
|
|
54
58
|
[tool.ruff.lint]
|
|
55
59
|
select = ["E", "F", "I", "UP", "B"]
|
|
@@ -59,5 +63,5 @@ select = ["E", "F", "I", "UP", "B"]
|
|
|
59
63
|
extend-immutable-calls = ["fastapi.Body", "fastapi.Depends", "fastapi.Query"]
|
|
60
64
|
|
|
61
65
|
[tool.mypy]
|
|
62
|
-
python_version = "3.
|
|
66
|
+
python_version = "3.10"
|
|
63
67
|
ignore_missing_imports = true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|