capforge 0.4.0__tar.gz → 0.4.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.
- {capforge-0.4.0 → capforge-0.4.1}/CHANGELOG.md +23 -1
- {capforge-0.4.0/capforge.egg-info → capforge-0.4.1}/PKG-INFO +1 -1
- capforge-0.4.1/capforge/_version.py +24 -0
- {capforge-0.4.0 → capforge-0.4.1/capforge.egg-info}/PKG-INFO +1 -1
- {capforge-0.4.0 → capforge-0.4.1}/capforge.egg-info/SOURCES.txt +2 -1
- {capforge-0.4.0 → capforge-0.4.1}/pyproject.toml +1 -1
- capforge-0.4.1/tests/test_version.py +53 -0
- capforge-0.4.0/capforge/_version.py +0 -3
- {capforge-0.4.0 → capforge-0.4.1}/.github/workflows/ci.yml +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/.gitignore +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/ARCHITECTURE.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/CONTRIBUTING.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/DECISIONS.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/LICENSE +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/RESEARCH_REPORT.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/ROADMAP.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/SECURITY.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/SPEC.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/SPECIFICATION.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/benchmarks/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/benchmarks/acm_benchmarks.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/__init__.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/_acm.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/_crypto.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/_delegation.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/_exceptions.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/_model.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/_policy.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/_validator.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/cli/__init__.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/cli/main.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge/py.typed +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge.egg-info/dependency_links.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge.egg-info/entry_points.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge.egg-info/requires.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge.egg-info/top_level.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge_langgraph/__init__.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge_langgraph/_tool_wrapper.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/capforge_langgraph/pyproject.toml +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/cli/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/cli/run_cli_examples.sh +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/crewai/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/crewai/acm_controlled_crew.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/crewai/requirements.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/fastapi/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/fastapi/acm_protected_api.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/fastapi/requirements.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/github_actions/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/github_actions/verify_acm.yml +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/langgraph/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/langgraph/basic_acm_agent.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/langgraph/requirements.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/openai_agents/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/openai_agents/acm_controlled_agent.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/openai_agents/requirements.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/policy/README.md +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/policy/requirements.txt +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/examples/policy/runtime_checks.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/setup.cfg +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/spec/acm-schema.json +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/spec/examples/expired-acm.json +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/spec/examples/minimal-acm.json +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/spec/examples/valid-acm.json +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/tests/__init__.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/tests/test_acm.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/tests/test_crypto.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/tests/test_langgraph_adapter.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/tests/test_model.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/tests/test_policy.py +0 -0
- {capforge-0.4.0 → capforge-0.4.1}/tests/test_validator.py +0 -0
|
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## [0.4.1] — 2026-07-22 — Dynamic Version Resolution
|
|
15
|
+
|
|
16
|
+
> Fixes the version drift bug where ``capforge.__version__`` returned
|
|
17
|
+
> ``0.1.0`` while the installed package was ``0.4.0``. The version is now
|
|
18
|
+
> derived from installed package metadata.
|
|
19
|
+
|
|
12
20
|
### Fixed
|
|
13
21
|
|
|
14
22
|
- **GitHub Actions CI** — Fixed `ModuleNotFoundError: No module named 'langchain_core'`
|
|
@@ -18,9 +26,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
18
26
|
`pip install -e ".[dev]"` alone.
|
|
19
27
|
- **GitHub Actions CI** — Fixed `mypy: error: Cannot read file 'acm'`
|
|
20
28
|
by changing `mypy acm/` to `mypy capforge/` after the package rename.
|
|
29
|
+
- **`capforge.__version__`** — Now derived dynamically from
|
|
30
|
+
`importlib.metadata.version("capforge")` with a `"0.0.0.dev0"` fallback
|
|
31
|
+
for development. This ensures the version always matches the installed
|
|
32
|
+
package metadata (single source of truth: `pyproject.toml`), preventing
|
|
33
|
+
the bug where `__version__` returned `"0.1.0"` while `pip show` reported
|
|
34
|
+
`"0.4.0"`.
|
|
21
35
|
|
|
22
36
|
### Added
|
|
23
37
|
|
|
38
|
+
- **`tests/test_version.py`** — 3 tests verifying:
|
|
39
|
+
- `capforge.__version__` is a non-empty string
|
|
40
|
+
- `capforge.__version__` matches `importlib.metadata.version("capforge")`
|
|
41
|
+
- `importlib.metadata.version` matches `pyproject.toml`
|
|
24
42
|
- **Production examples** (`examples/`):
|
|
25
43
|
- `examples/langgraph/README.md` + `requirements.txt` — polished LangGraph
|
|
26
44
|
example documentation with architecture diagram and expected output
|
|
@@ -54,6 +72,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
54
72
|
|
|
55
73
|
### Changed
|
|
56
74
|
|
|
75
|
+
- **`capforge/_version.py`** — Replaced static `__version__ = "0.1.0"` with
|
|
76
|
+
dynamic resolution via `importlib.metadata.version("capforge")`.
|
|
77
|
+
- **Package version** bumped from `0.4.0` to `0.4.1`.
|
|
57
78
|
- **README.md** — Completely rewritten for Phase 5 with:
|
|
58
79
|
- Framework integration sections (LangGraph, CrewAI, FastAPI, OpenAI Agents
|
|
59
80
|
SDK) with code snippets
|
|
@@ -272,7 +293,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
272
293
|
|
|
273
294
|
## Version Comparison Links
|
|
274
295
|
|
|
275
|
-
[Unreleased]: https://github.com/shashank123r/capforge/compare/v0.4.
|
|
296
|
+
[Unreleased]: https://github.com/shashank123r/capforge/compare/v0.4.1...HEAD
|
|
297
|
+
[0.4.1]: https://github.com/shashank123r/capforge/compare/v0.4.0...v0.4.1
|
|
276
298
|
[0.4.0]: https://github.com/shashank123r/capforge/compare/v0.3.0...v0.4.0
|
|
277
299
|
[0.3.0]: https://github.com/shashank123r/capforge/compare/v0.2.0...v0.3.0
|
|
278
300
|
[0.2.0]: https://github.com/shashank123r/capforge/compare/v0.1.0...v0.2.0
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""Version information for the capforge package.
|
|
2
|
+
|
|
3
|
+
The version is derived from installed package metadata (setuptools / pyproject.toml)
|
|
4
|
+
so that a single source of truth is maintained. If the package is not installed
|
|
5
|
+
e.g. during development before ``pip install -e .``, a fallback version is used.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import importlib.metadata
|
|
11
|
+
|
|
12
|
+
_PACKAGE_NAME = "capforge"
|
|
13
|
+
_DEV_VERSION = "0.0.0.dev0"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _resolve_version() -> str:
|
|
17
|
+
"""Return the installed package version, or a dev fallback."""
|
|
18
|
+
try:
|
|
19
|
+
return importlib.metadata.version(_PACKAGE_NAME)
|
|
20
|
+
except importlib.metadata.PackageNotFoundError:
|
|
21
|
+
return _DEV_VERSION
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
__version__: str = _resolve_version()
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "capforge"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.1"
|
|
8
8
|
description = "Policy-as-Code SDK for AI agents with signed capability manifests and runtime authorization."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Tests for the capforge package version.
|
|
2
|
+
|
|
3
|
+
Verifies that ``capforge.__version__`` matches the version registered in
|
|
4
|
+
the installed package metadata (setuptools / importlib.metadata).
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import importlib.metadata
|
|
10
|
+
import re
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
import capforge
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _get_pyproject_version() -> str:
|
|
17
|
+
"""Parse the version from ``pyproject.toml`` for cross-check."""
|
|
18
|
+
pyproject = Path(__file__).resolve().parent.parent / "pyproject.toml"
|
|
19
|
+
text = pyproject.read_text(encoding="utf-8")
|
|
20
|
+
m = re.search(r'^version\s*=\s*"([^"]+)"', text, re.MULTILINE)
|
|
21
|
+
if m is None:
|
|
22
|
+
raise AssertionError("Could not find version in pyproject.toml")
|
|
23
|
+
return m.group(1)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class TestVersion:
|
|
27
|
+
"""Verify that ``capforge.__version__`` is correct and consistent."""
|
|
28
|
+
|
|
29
|
+
def test_version_is_string(self) -> None:
|
|
30
|
+
"""__version__ must be a non-empty string."""
|
|
31
|
+
assert isinstance(capforge.__version__, str)
|
|
32
|
+
assert len(capforge.__version__) > 0
|
|
33
|
+
|
|
34
|
+
def test_version_matches_importlib_metadata(self) -> None:
|
|
35
|
+
"""__version__ must equal importlib.metadata.version('capforge')."""
|
|
36
|
+
expected = importlib.metadata.version("capforge")
|
|
37
|
+
assert capforge.__version__ == expected, (
|
|
38
|
+
f"capforge.__version__ ({capforge.__version__!r}) "
|
|
39
|
+
f"!= importlib.metadata.version ({expected!r})"
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
def test_version_matches_pyproject_toml(self) -> None:
|
|
43
|
+
"""The version in pyproject.toml must be reachable via importlib.metadata.
|
|
44
|
+
|
|
45
|
+
This ensures the single source of truth (pyproject.toml) is what
|
|
46
|
+
``importlib.metadata`` sees.
|
|
47
|
+
"""
|
|
48
|
+
pyproject_version = _get_pyproject_version()
|
|
49
|
+
meta_version = importlib.metadata.version("capforge")
|
|
50
|
+
assert meta_version == pyproject_version, (
|
|
51
|
+
f"importlib.metadata ({meta_version!r}) != "
|
|
52
|
+
f"pyproject.toml ({pyproject_version!r})"
|
|
53
|
+
)
|
|
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
|