Skip to main content

moltcha-core

Moltcha Core Logo

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.models for packs, limits, tests, sessions
  • moltcha_core.storage for pack persistence helpers
  • moltcha_core.runner for judge image build/ensure/execute
  • moltcha_core.attestation for 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)

Source distribution for moltcha-core 0.1.0
File Size Uploaded
moltcha_core-0.1.0.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moltcha-core 0.1.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page