tokenmaster 0.0.1__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.
- tokenmaster-0.0.1/.gitignore +30 -0
- tokenmaster-0.0.1/CHANGELOG.md +8 -0
- tokenmaster-0.0.1/LICENSE +21 -0
- tokenmaster-0.0.1/PKG-INFO +49 -0
- tokenmaster-0.0.1/README.md +31 -0
- tokenmaster-0.0.1/examples/print_about.py +8 -0
- tokenmaster-0.0.1/pyproject.toml +38 -0
- tokenmaster-0.0.1/src/tokenmaster/__init__.py +24 -0
- tokenmaster-0.0.1/tests/test_placeholder.py +15 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.venv/
|
|
8
|
+
venv/
|
|
9
|
+
test_env/
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.coverage
|
|
12
|
+
htmlcov/
|
|
13
|
+
|
|
14
|
+
# Node (future packages)
|
|
15
|
+
node_modules/
|
|
16
|
+
|
|
17
|
+
# Rust (future crates)
|
|
18
|
+
target/
|
|
19
|
+
|
|
20
|
+
# Secrets and local environment
|
|
21
|
+
.env
|
|
22
|
+
.env.local
|
|
23
|
+
*.key
|
|
24
|
+
*secrets*
|
|
25
|
+
|
|
26
|
+
# OS and editors
|
|
27
|
+
.DS_Store
|
|
28
|
+
Thumbs.db
|
|
29
|
+
.vscode/
|
|
30
|
+
.idea/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Muntaser Syed
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tokenmaster
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Core context-budget metering and decision engine for LLM applications: normalized token accounting, effective-budget gauges, turns-to-exhaustion prediction, and compaction/handoff decisions. Placeholder release.
|
|
5
|
+
Project-URL: Homepage, https://github.com/jemsbhai/tokenmaster
|
|
6
|
+
Project-URL: Repository, https://github.com/jemsbhai/tokenmaster
|
|
7
|
+
Author-email: Muntaser Syed <jemsbhai@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: compaction,context-management,context-window,continuation-prompt,llm,metering,tokens
|
|
11
|
+
Classifier: Development Status :: 1 - Planning
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# tokenmaster
|
|
20
|
+
|
|
21
|
+
Core context-budget metering and decision engine for LLM applications.
|
|
22
|
+
|
|
23
|
+
tokenmaster is being built to answer four questions for any model, provider,
|
|
24
|
+
and conversation:
|
|
25
|
+
|
|
26
|
+
1. How much context has been used, and on what (messages, system prompt, tool
|
|
27
|
+
schemas, reasoning tokens, cache reads)?
|
|
28
|
+
2. How much usable budget remains, measured against calibrated effective
|
|
29
|
+
capacity rather than the advertised window?
|
|
30
|
+
3. How many turns remain until exhaustion at the current token velocity?
|
|
31
|
+
4. Should this conversation be compacted or handed off now, and what would
|
|
32
|
+
that decision cost?
|
|
33
|
+
|
|
34
|
+
The package is computational only: it ingests provider-reported usage (with
|
|
35
|
+
tokenizer-based estimation as an optional fallback), maintains meter state,
|
|
36
|
+
and emits snapshots and events through a stable, serializable schema.
|
|
37
|
+
Rendering is deliberately excluded. The companion package ctxmaster provides
|
|
38
|
+
a CLI, terminal gauge, and dashboards on top of this schema, and third
|
|
39
|
+
parties can build their own visualizers against the same contract.
|
|
40
|
+
|
|
41
|
+
## Status
|
|
42
|
+
|
|
43
|
+
0.0.1 is a placeholder release reserving the name while the core API is
|
|
44
|
+
designed. Do not build against it yet. Development happens at
|
|
45
|
+
https://github.com/jemsbhai/tokenmaster
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
MIT
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# tokenmaster
|
|
2
|
+
|
|
3
|
+
Core context-budget metering and decision engine for LLM applications.
|
|
4
|
+
|
|
5
|
+
tokenmaster is being built to answer four questions for any model, provider,
|
|
6
|
+
and conversation:
|
|
7
|
+
|
|
8
|
+
1. How much context has been used, and on what (messages, system prompt, tool
|
|
9
|
+
schemas, reasoning tokens, cache reads)?
|
|
10
|
+
2. How much usable budget remains, measured against calibrated effective
|
|
11
|
+
capacity rather than the advertised window?
|
|
12
|
+
3. How many turns remain until exhaustion at the current token velocity?
|
|
13
|
+
4. Should this conversation be compacted or handed off now, and what would
|
|
14
|
+
that decision cost?
|
|
15
|
+
|
|
16
|
+
The package is computational only: it ingests provider-reported usage (with
|
|
17
|
+
tokenizer-based estimation as an optional fallback), maintains meter state,
|
|
18
|
+
and emits snapshots and events through a stable, serializable schema.
|
|
19
|
+
Rendering is deliberately excluded. The companion package ctxmaster provides
|
|
20
|
+
a CLI, terminal gauge, and dashboards on top of this schema, and third
|
|
21
|
+
parties can build their own visualizers against the same contract.
|
|
22
|
+
|
|
23
|
+
## Status
|
|
24
|
+
|
|
25
|
+
0.0.1 is a placeholder release reserving the name while the core API is
|
|
26
|
+
designed. Do not build against it yet. Development happens at
|
|
27
|
+
https://github.com/jemsbhai/tokenmaster
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
MIT
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tokenmaster"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
description = "Core context-budget metering and decision engine for LLM applications: normalized token accounting, effective-budget gauges, turns-to-exhaustion prediction, and compaction/handoff decisions. Placeholder release."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Muntaser Syed", email = "jemsbhai@gmail.com" },
|
|
15
|
+
]
|
|
16
|
+
keywords = [
|
|
17
|
+
"llm",
|
|
18
|
+
"tokens",
|
|
19
|
+
"context-window",
|
|
20
|
+
"context-management",
|
|
21
|
+
"compaction",
|
|
22
|
+
"continuation-prompt",
|
|
23
|
+
"metering",
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 1 - Planning",
|
|
27
|
+
"Intended Audience :: Developers",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
30
|
+
"Topic :: Software Development :: Libraries",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/jemsbhai/tokenmaster"
|
|
35
|
+
Repository = "https://github.com/jemsbhai/tokenmaster"
|
|
36
|
+
|
|
37
|
+
[tool.hatch.build.targets.wheel]
|
|
38
|
+
packages = ["src/tokenmaster"]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""tokenmaster: core context-budget metering and decision engine for LLM applications.
|
|
2
|
+
|
|
3
|
+
Placeholder release (0.0.1) reserving the package name while the core API is
|
|
4
|
+
designed. Do not build against this version.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "0.0.1"
|
|
8
|
+
|
|
9
|
+
__all__ = ["about", "__version__"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def about() -> dict:
|
|
13
|
+
"""Return basic project metadata for this placeholder release."""
|
|
14
|
+
return {
|
|
15
|
+
"name": "tokenmaster",
|
|
16
|
+
"version": __version__,
|
|
17
|
+
"summary": (
|
|
18
|
+
"Core context-budget metering and decision engine for "
|
|
19
|
+
"LLM applications."
|
|
20
|
+
),
|
|
21
|
+
"companion": "ctxmaster (visualization layer)",
|
|
22
|
+
"repository": "https://github.com/jemsbhai/tokenmaster",
|
|
23
|
+
"status": "placeholder",
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Placeholder-release tests: import, version, and metadata sanity."""
|
|
2
|
+
|
|
3
|
+
import tokenmaster
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_version_matches_placeholder():
|
|
7
|
+
assert tokenmaster.__version__ == "0.0.1"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_about_returns_expected_metadata():
|
|
11
|
+
info = tokenmaster.about()
|
|
12
|
+
assert info["name"] == "tokenmaster"
|
|
13
|
+
assert info["version"] == tokenmaster.__version__
|
|
14
|
+
assert info["status"] == "placeholder"
|
|
15
|
+
assert "ctxmaster" in info["companion"]
|