Skip to main content

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/, and tests/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"

Operator Surface

Use the shortest truthful forms for routine operation:

  • millrace run once
  • millrace status
  • millrace runs ls
  • millrace queue add-task <path-to-task.md|path-to-task.json>
  • millrace pause, millrace resume, millrace stop

millrace status show remains available as the explicit subcommand form, but the canonical operator example is millrace status.

Use docs/OPERATOR_GUIDE.md for the current operator workflow and docs/runtime/millrace-cli-reference.md for the full command inventory, grouped forms, and alias details.

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:

  1. request.runner_name (compiled from mode/stage bindings)
  2. runners.default_runner from runtime config
  3. 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-auto
  • elevated: -c approval_policy="never" --sandbox danger-full-access
  • maximum: --dangerously-bypass-approvals-and-sandbox

Runtime Docs

  • docs/runtime/millrace-runtime-architecture.md
  • docs/runtime/millrace-cli-reference.md
  • docs/runtime/millrace-entrypoint-mapping.md
  • docs/runtime/millrace-runner-architecture.md
  • docs/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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

millrace_ai-0.11.1.tar.gz (115.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

millrace_ai-0.11.1-py3-none-any.whl (165.6 kB view details)

Uploaded Python 3

File details

Details for the file millrace_ai-0.11.1.tar.gz.

File metadata

  • Download URL: millrace_ai-0.11.1.tar.gz
  • Upload date:
  • Size: 115.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for millrace_ai-0.11.1.tar.gz
Algorithm Hash digest
SHA256 a4c63537021a2c4b3f6e48598f589949c96dbf393a9c681dbdf96e1d835ad346
MD5 e7062fdd24db50cec71f9472d767f20b
BLAKE2b-256 8c94f31acb37739d06a5ba0a3af0238b8ca73e91d7e70d3a726a7fff695d44f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for millrace_ai-0.11.1.tar.gz:

Publisher: publish-to-pypi.yml on tim-osterhus/millrace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file millrace_ai-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: millrace_ai-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 165.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for millrace_ai-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 726eb2d33a1d4acbcbcf76b40260f0ba19a82cbabb3ee5116658b892c627585b
MD5 cad18c3b3352b567133214c30563bf0a
BLAKE2b-256 e95fbcaa401a906ebefbd97cb19ccb761da8a35d7089a160a2cab60b5598d8d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for millrace_ai-0.11.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on tim-osterhus/millrace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page