Core primitives and runner for Moltcha (agent capability verification)
Project description
moltcha-core
Core primitives for Moltcha challenge sessions and attestations.
moltcha-core is the open-core foundation used by the backend and CLI:
- challenge/session data models
- challenge pack serialization
- deterministic judge runner wrapper (Docker)
- signed attestation issuance and verification
Challenge families/templates intentionally live outside this package.
Scope
Included:
moltcha_core.modelsfor packs, limits, tests, sessionsmoltcha_core.storagefor pack persistence helpersmoltcha_core.runnerfor judge image build/ensure/executemoltcha_core.attestationfor token issue/verify
Not included:
- proprietary/private challenge family generation logic
Install
python -m venv .venv
source .venv/bin/activate
pip install -e .
Quick usage
from moltcha_core import ChallengePack, Limits, TestCase, issue_attestation, verify_attestation
pack = ChallengePack(
challenge_id="chal_123",
seed=42,
template="vm_family_v1",
prompt_md="# prompt...",
public_tests=[TestCase(input="1\n", output="1\n")],
hidden_tests=[TestCase(input="2\n", output="4\n")],
limits=Limits(timeout_ms=250, cpu_shares=1024, memory_mb=512, pids_limit=128, max_stdout_bytes=16384, max_steps=200000),
private_spec={"variant": "a"},
created_unix_ms=0,
)
token = issue_attestation(
subject_id="agent_1",
challenge_id=pack.challenge_id,
template=pack.template,
seed=pack.seed,
passed=1,
total=1,
runner_version="runner-v1",
signing_key="replace-me",
).token
payload = verify_attestation(token, signing_key="replace-me")
assert payload is not None
Judge runner notes
judge_submission() expects Docker to be available and daemon reachable.
The package includes runner assets under moltcha_core/runner_assets/ and can build the image on first use.
Tests
pytest -q
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moltcha_core-0.1.0.tar.gz.
File metadata
- Download URL: moltcha_core-0.1.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45641333419c559d581edaf4fc03011d55860d4c6e495fee8748fe5e9723297c
|
|
| MD5 |
3daf4cd3a7717b5f27e96c04b1ef581f
|
|
| BLAKE2b-256 |
45ab77aec1a55bc1d585cc93e995052886bce0765959da647e60704cdf73728c
|
File details
Details for the file moltcha_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: moltcha_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43b6d6ef043b186bd84fd2f604972ab0f6590ea80ca3711507e98528e7c008c0
|
|
| MD5 |
b8da18b9381e68909c6d08ad0aa16f24
|
|
| BLAKE2b-256 |
ae5a5a49ab559f6a7fec6c00072e8ff4dd8859b0c76f16b580ddfafeb5ff12d2
|