Millrace runtime rewrite baseline package
Project description
Millrace
Millrace is a thin-core autonomous runtime packaged as millrace_ai.
The runtime bootstraps all operational files under <workspace>/millrace-agents/ and keeps canonical source code in the package itself.
Source Layout
- importable code lives under
src/millrace_ai/ - tests mirror package ownership under
tests/assets/,tests/cli/,tests/config/,tests/runners/,tests/runtime/,tests/workspace/, andtests/integration/ - preserved compatibility facades remain at the package root for legacy imports such as
millrace_ai.control,millrace_ai.run_inspection,millrace_ai.runner,millrace_ai.entrypoints, and workspace support modules
Use docs/source-package-map.md for the old-to-new module map and the intentionally preserved facade list.
Quick Start
WORKSPACE=/absolute/path/to/workspace
uv run --extra dev python -m millrace_ai compile validate --workspace "$WORKSPACE"
uv run --extra dev python -m millrace_ai run once --workspace "$WORKSPACE"
uv run --extra dev python -m millrace_ai status --workspace "$WORKSPACE"
Equivalent installed CLI:
millrace compile validate --workspace "$WORKSPACE"
millrace run once --workspace "$WORKSPACE"
millrace status --workspace "$WORKSPACE"
Core Commands
millrace run oncemillrace run daemon --max-ticks Nmillrace status showmillrace status watch --workspace <PATH> [--workspace <PATH> ...]millrace runs lsmillrace runs show <RUN_ID>millrace runs tail <RUN_ID>millrace queue lsmillrace queue show <WORK_ITEM_ID>millrace queue add-task <path-to-task.md|path-to-task.json>millrace queue add-spec <path-to-spec.md|path-to-spec.json>millrace queue add-idea <path-to-idea.md>millrace planning retry-active [--reason "..."]millrace config showmillrace config validate [--mode MODE_ID]millrace config reloadmillrace control retry-active [--reason "..."]millrace control pausemillrace control resumemillrace control stopmillrace control clear-stale-statemillrace control reload-configmillrace doctormillrace modes listmillrace modes show --mode MODE_IDmillrace compile validate [--mode MODE_ID]millrace compile show [--mode MODE_ID]
Compatibility aliases for common operator flows remain available at top level:
millrace add-task, millrace add-spec, millrace pause, millrace resume, millrace stop,
millrace retry-active, millrace clear-stale-state, and millrace reload-config.
Work Artifacts
Canonical queue artifacts are lightweight headed markdown work documents (.md) under:
millrace-agents/tasks/{queue,active,done,blocked}/millrace-agents/specs/{queue,active,done,blocked}/millrace-agents/incidents/{incoming,active,resolved,blocked}/
Task/spec/incident files use a human-facing shape with an H1 title plus plain field headings such as:
# Add run inspection CLI
Task-ID: example-task-001
Title: Add run inspection CLI
Target-Paths:
- src/millrace_ai/cli/commands/runs.py
Acceptance:
- `millrace runs ls` reports persisted run summaries.
JSON remains runtime-internal for snapshot, diagnostics, mailbox archives, and event/log surfaces.
Stage Runner Resolution
Runtime stage execution now routes through a configurable runner dispatcher.
Resolution order per stage request:
request.runner_name(compiled from mode/stage bindings)runners.default_runnerfrom runtime config- fallback literal
codex_cli
Default adapter is Codex CLI. Add runner settings in <workspace>/millrace-agents/millrace.toml:
[runners]
default_runner = "codex_cli"
[runners.codex]
command = "codex"
args = ["exec"]
permission_default = "basic"
# permission_by_stage = { builder = "elevated" }
# permission_by_model = { "gpt-5.4" = "maximum" }
skip_git_repo_check = true
Permission levels map to Codex CLI flags:
basic:--full-autoelevated:-c approval_policy="never" --sandbox danger-full-accessmaximum:--dangerously-bypass-approvals-and-sandbox
Runtime Docs
docs/runtime/millrace-runtime-architecture.mddocs/runtime/millrace-cli-reference.mddocs/runtime/millrace-entrypoint-mapping.mddocs/runtime/millrace-runner-architecture.mddocs/source-package-map.md
Verification
Authoritative local verification commands:
uv run --extra dev python -m pytest -q
uv run --with ruff ruff check src/millrace_ai tests
uv run --with mypy mypy src/millrace_ai
Operational source + wheel checks (minimum functionality workspace):
WORKSPACE=/absolute/path/to/minimum-functionality-workspace
rm -rf "$WORKSPACE/millrace-agents"
uv run --extra dev python -m millrace_ai compile validate --workspace "$WORKSPACE"
uv run --extra dev python -m millrace_ai run once --workspace "$WORKSPACE"
uv run --extra dev python -m millrace_ai status --workspace "$WORKSPACE"
rm -rf "$WORKSPACE/millrace-agents"
uv build --wheel
python3 -m venv /tmp/millrace-wheel-test
source /tmp/millrace-wheel-test/bin/activate
pip install dist/*.whl
millrace compile validate --workspace "$WORKSPACE"
millrace run once --workspace "$WORKSPACE"
millrace status --workspace "$WORKSPACE"
For clean proof runs, refresh only "$WORKSPACE/millrace-agents/" in place. Do not mutate operator-authored files elsewhere in the workspace root.
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 millrace_ai-0.11.0.tar.gz.
File metadata
- Download URL: millrace_ai-0.11.0.tar.gz
- Upload date:
- Size: 112.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcbf1a2890f0d52e88320247693f8a52027cb4a37f2468b8714083fe68e815ea
|
|
| MD5 |
084bf94852da4f9e898766dc1cd10f26
|
|
| BLAKE2b-256 |
83beba517f3c2aa0da27668168b8ecee2c53c5eeaf552080236200da0da5aad0
|
Provenance
The following attestation bundles were made for millrace_ai-0.11.0.tar.gz:
Publisher:
publish-to-pypi.yml on tim-osterhus/millrace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
millrace_ai-0.11.0.tar.gz -
Subject digest:
fcbf1a2890f0d52e88320247693f8a52027cb4a37f2468b8714083fe68e815ea - Sigstore transparency entry: 1323246561
- Sigstore integration time:
-
Permalink:
tim-osterhus/millrace@f4bd76450368606a442f4c26cae79941efe15552 -
Branch / Tag:
refs/tags/v0.11.0 - Owner: https://github.com/tim-osterhus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f4bd76450368606a442f4c26cae79941efe15552 -
Trigger Event:
push
-
Statement type:
File details
Details for the file millrace_ai-0.11.0-py3-none-any.whl.
File metadata
- Download URL: millrace_ai-0.11.0-py3-none-any.whl
- Upload date:
- Size: 161.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63ff61a0803fce66e50526b204f1b2a82619bc32860c6d37d8e6fa7e55fd777c
|
|
| MD5 |
2fff5c5616665e729471d442911e0119
|
|
| BLAKE2b-256 |
760deb0b9fec26fe96a39007f640b5e71cf1fed6eb865e3b0e10b1042a1744f1
|
Provenance
The following attestation bundles were made for millrace_ai-0.11.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on tim-osterhus/millrace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
millrace_ai-0.11.0-py3-none-any.whl -
Subject digest:
63ff61a0803fce66e50526b204f1b2a82619bc32860c6d37d8e6fa7e55fd777c - Sigstore transparency entry: 1323246669
- Sigstore integration time:
-
Permalink:
tim-osterhus/millrace@f4bd76450368606a442f4c26cae79941efe15552 -
Branch / Tag:
refs/tags/v0.11.0 - Owner: https://github.com/tim-osterhus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f4bd76450368606a442f4c26cae79941efe15552 -
Trigger Event:
push
-
Statement type: