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
Metadata
Release files for moltcha-core 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| moltcha_core-0.1.0.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| moltcha_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.1 kB
Release files / moltcha_core-0.1.0.tar.gz
| Download URL | moltcha_core-0.1.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45641333419c559d581edaf4fc03011d55860d4c6e495fee8748fe5e9723297c
|
|
BLAKE2b-256 checksum How to use checksums |
45ab77aec1a55bc1d585cc93e995052886bce0765959da647e60704cdf73728c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.15
|
Release files / moltcha_core-0.1.0-py3-none-any.whl
| Download URL | moltcha_core-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43b6d6ef043b186bd84fd2f604972ab0f6590ea80ca3711507e98528e7c008c0
|
|
BLAKE2b-256 checksum How to use checksums |
ae5a5a49ab559f6a7fec6c00072e8ff4dd8859b0c76f16b580ddfafeb5ff12d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.15
|