Package
policy-engine
Description
policy-engine/spec/schema/cedar_advice.schema.json and manifest.schema.json are not part of the installed package. policy-engine/sdk/python/pyproject.toml (maturin, python-source = ".") has no include for them, and the 0.3.1b1 wheel on PyPI contains no .json at all:
$ unzip -l agent_control_specification-0.3.1b1-cp311-abi3-manylinux_2_28_x86_64.whl | grep -c '\.json'
0
The sdist carries core/schema/manifest.schema.json but not cedar_advice.schema.json. Neither Python binding exposes translate_advice or advice validation through _native (only parse_manifest, validate_manifest, validate_manifest_overlay, validate_manifest_artifact, validate_artifacts).
A host that writes its own Cedar dispatcher (a type: custom policy) has to reproduce the advice rules from the JSON schema by hand, and there is nothing installed to check against. The contract has already moved under such a copy: the transform root in cedar_advice.schema.json changed from $policy_target to $target in #3939, and manifest.schema.json dropped bundle_url.
Proposed fix
Two shapes, and I would rather ask than guess:
- Ship
policy-engine/spec/schema/*.json in the wheel (maturin include, or copy them into the package directory at build time) and expose them via importlib.resources.
- Expose native advice validation /
translate_advice through _native, so hosts call the engine's own implementation instead of a copy.
Since the engine now comes from the agent-control-spec crate, the schema may belong there instead; happy to move this request if so. I can send a PR once a shape is chosen.
How does this impact your work?
My dispatcher's advice validation is a hand port of the schema, pinned to a commit hash with a drift check that points at a path that no longer exists on main (core/src/cedar.rs moved to the external agent-control-spec crate).
Timeline
Not blocking.
Steps to Reproduce
pip install agent-control-specification==0.3.1b1 (or build main).
python -c "import importlib.resources as r, agent_control_specification as m; print([p.name for p in r.files(m).iterdir() if p.name.endswith('.json')])" prints [].
- Try to validate an advice payload against the shipped contract: nothing installed provides it.
Environment
agent-control-specification 0.3.1b1 (PyPI) and main e7f5d2b, Python 3.12, macOS.
Logs / Error Output
Code of Conduct
Package
policy-engine
Description
policy-engine/spec/schema/cedar_advice.schema.jsonandmanifest.schema.jsonare not part of the installed package.policy-engine/sdk/python/pyproject.toml(maturin,python-source = ".") has no include for them, and the 0.3.1b1 wheel on PyPI contains no.jsonat all:The sdist carries
core/schema/manifest.schema.jsonbut notcedar_advice.schema.json. Neither Python binding exposestranslate_adviceor advice validation through_native(onlyparse_manifest,validate_manifest,validate_manifest_overlay,validate_manifest_artifact,validate_artifacts).A host that writes its own Cedar dispatcher (a
type: custompolicy) has to reproduce the advice rules from the JSON schema by hand, and there is nothing installed to check against. The contract has already moved under such a copy: the transform root incedar_advice.schema.jsonchanged from$policy_targetto$targetin #3939, andmanifest.schema.jsondroppedbundle_url.Proposed fix
Two shapes, and I would rather ask than guess:
policy-engine/spec/schema/*.jsonin the wheel (maturininclude, or copy them into the package directory at build time) and expose them viaimportlib.resources.translate_advicethrough_native, so hosts call the engine's own implementation instead of a copy.Since the engine now comes from the
agent-control-speccrate, the schema may belong there instead; happy to move this request if so. I can send a PR once a shape is chosen.How does this impact your work?
My dispatcher's advice validation is a hand port of the schema, pinned to a commit hash with a drift check that points at a path that no longer exists on main (
core/src/cedar.rsmoved to the externalagent-control-speccrate).Timeline
Not blocking.
Steps to Reproduce
pip install agent-control-specification==0.3.1b1(or build main).python -c "import importlib.resources as r, agent_control_specification as m; print([p.name for p in r.files(m).iterdir() if p.name.endswith('.json')])"prints[].Environment
agent-control-specification 0.3.1b1 (PyPI) and main e7f5d2b, Python 3.12, macOS.
Logs / Error Output
Code of Conduct