omni-token-economy/pyproject.toml
Jesse Freitas 5fc3ea3d2d feat: initial release — omni-token-economy v0.1.0 (clean, zero secrets)
Biblioteca universal de compactação de tokens para aplicações LLM.
Zero lock-in de backend — funciona com qualquer dict/object + regras declarativas.

Core API (paridade TS ↔ Python):

- compactRecord / compact_record — remove redundância via regras declarativas
- compactRecords / compact_records — map em lista
- compressContext / compress_context — adaptive: top-N verbatim + summary pro resto
- compactSecret / compact_secret — whitelist only, valor NUNCA sai (A.8.12)
- estimateTokens, detectRedundancy, compactTimestamp — helpers

Testes: 27 TS (vitest) + 27 Py (pytest). Fixtures sanitizadas — todos os valores
de teste usam placeholders FAKE_TEST_TOKEN_DO_NOT_USE obviamente fake.

Regra cardinal #5 (CLAUDE.md): fixtures jamais contêm credencial real.

Compliance ISO 27001 / OmniForge baseline:
- A.8.10 (exclusão de info desnecessária) — função primária
- A.8.11 (mascaramento) — compact_secret whitelist-only
- A.8.12 (prevenção de vazamento) — impossível retornar valor de secret
- A.8.25/28/29 (dev seguro, codificação, testes) — SDD + TDD + paridade

Stack:
- TypeScript: Node 24+, ESM, vitest — zero runtime deps
- Python: 3.11+, pytest, hatchling — zero runtime deps
- CI: lint + test × (3.11, 3.12, 3.13) + gitleaks + CodeQL + benchmark

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 01:35:25 -03:00

53 lines
1.4 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "omni-token-economy"
version = "0.1.0"
description = "Biblioteca universal de compactação de tokens para aplicações LLM. Zero lock-in de backend."
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [
{ name = "OmniForge", email = "jesse.freitas@omniforge.com.br" },
]
keywords = ["llm", "tokens", "compact", "claude", "openai", "compression", "context", "mcp"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = []
[project.urls]
Homepage = "https://github.com/jessefreitas/omni-token-economy"
Repository = "https://github.com/jessefreitas/omni-token-economy.git"
Issues = "https://github.com/jessefreitas/omni-token-economy/issues"
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"ruff>=0.7",
"mypy>=1.13",
]
[tool.hatch.build.targets.wheel]
packages = ["src/py/omni_token_economy"]
[tool.pytest.ini_options]
testpaths = ["tests/py"]
python_files = ["test_*.py"]
addopts = "-ra"
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B"]