feat: enable C&C, compact mise tasks, update docs
- Cherry-pick C&C support (ntfy poller for commands, response handling) - Compact mise.toml with native dependency chaining - Update AGENTS.md with C&C documentation - Update README.md with display modes and C&C usage
This commit is contained in:
47
mise.toml
47
mise.toml
@@ -5,46 +5,55 @@ pkl = "latest"
|
||||
|
||||
[tasks]
|
||||
# =====================
|
||||
# Development
|
||||
# Testing
|
||||
# =====================
|
||||
|
||||
test = "uv run pytest"
|
||||
test-v = "uv run pytest -v"
|
||||
test-cov = "uv run pytest --cov=engine --cov-report=term-missing --cov-report=html"
|
||||
test-cov-open = "uv run pytest --cov=engine --cov-report=term-missing --cov-report=html && open htmlcov/index.html"
|
||||
test-v = { run = "uv run pytest -v", depends = ["sync-all"] }
|
||||
test-cov = { run = "uv run pytest --cov=engine --cov-report=term-missing --cov-report=html", depends = ["sync-all"] }
|
||||
test-cov-open = { run = "mise run test-cov && open htmlcov/index.html", depends = ["sync-all"] }
|
||||
|
||||
test-browser-install = { run = "uv run playwright install chromium", depends = ["sync-all"] }
|
||||
test-browser = { run = "uv run pytest tests/e2e/", depends = ["test-browser-install"] }
|
||||
|
||||
# =====================
|
||||
# Linting & Formatting
|
||||
# =====================
|
||||
|
||||
lint = "uv run ruff check engine/ mainline.py"
|
||||
lint-fix = "uv run ruff check --fix engine/ mainline.py"
|
||||
format = "uv run ruff format engine/ mainline.py"
|
||||
|
||||
# =====================
|
||||
# Runtime
|
||||
# Runtime Modes
|
||||
# =====================
|
||||
|
||||
run = "uv run mainline.py"
|
||||
run-poetry = "uv run mainline.py --poetry"
|
||||
run-firehose = "uv run mainline.py --firehose"
|
||||
run-websocket = { run = "uv run mainline.py --websocket", depends = ["sync-all"] }
|
||||
run-both = { run = "uv run mainline.py --display both", depends = ["sync-all"] }
|
||||
run-client = { run = "uv run mainline.py --display both & WEBSOCKET_PID=$! && sleep 2 && case $(uname -s) in Darwin) open http://localhost:8766 ;; Linux) xdg-open http://localhost:8766 ;; CYGWIN*) cmd /c start http://localhost:8766 ;; *) echo 'Unknown platform' ;; esac && wait $WEBSOCKET_PID", depends = ["sync-all"] }
|
||||
|
||||
daemon = "nohup uv run mainline.py > /dev/null 2>&1 &"
|
||||
daemon-stop = "pkill -f 'uv run mainline.py' 2>/dev/null || true"
|
||||
daemon-restart = "mise run daemon-stop && sleep 2 && mise run daemon"
|
||||
run-websocket = { run = "uv run mainline.py --display websocket", depends = ["sync-all"] }
|
||||
run-both = { run = "uv run mainline.py --display both", depends = ["sync-all"] }
|
||||
run-client = { run = "mise run run-both & sleep 2 && $(open http://localhost:8766 2>/dev/null || xdg-open http://localhost:8766 2>/dev/null || echo 'Open http://localhost:8766 manually'); wait", depends = ["sync-all"] }
|
||||
|
||||
# =====================
|
||||
# Command & Control
|
||||
# =====================
|
||||
|
||||
cmd = "uv run cmdline.py"
|
||||
cmd-stats = "bash -c 'uv run cmdline.py -w \"/effects stats\"';:"
|
||||
cmd-stats = { run = "uv run cmdline.py -w \"/effects stats\"", depends = ["sync-all"] }
|
||||
|
||||
# Initialize ntfy topics (warm up before first use - also done automatically by mainline)
|
||||
# Initialize ntfy topics (warm up before first use)
|
||||
topics-init = "curl -s -d 'init' https://ntfy.sh/klubhaus_terminal_mainline_cc_cmd > /dev/null && curl -s -d 'init' https://ntfy.sh/klubhaus_terminal_mainline_cc_resp > /dev/null && curl -s -d 'init' https://ntfy.sh/klubhaus_terminal_mainline > /dev/null"
|
||||
|
||||
# =====================
|
||||
# Daemon
|
||||
# =====================
|
||||
|
||||
daemon = "nohup uv run mainline.py > nohup.out 2>&1 &"
|
||||
daemon-stop = "pkill -f 'uv run mainline.py' 2>/dev/null || true"
|
||||
daemon-restart = "mise run daemon-stop && sleep 2 && mise run daemon"
|
||||
|
||||
# =====================
|
||||
# Environment
|
||||
# =====================
|
||||
@@ -52,24 +61,20 @@ topics-init = "curl -s -d 'init' https://ntfy.sh/klubhaus_terminal_mainline_cc_c
|
||||
sync = "uv sync"
|
||||
sync-all = "uv sync --all-extras"
|
||||
install = "mise run sync"
|
||||
install-dev = "mise run sync && uv sync --group dev"
|
||||
|
||||
bootstrap = "uv sync && uv run mainline.py --help"
|
||||
install-dev = { run = "mise run sync-all && uv sync --group dev", depends = ["sync-all"] }
|
||||
bootstrap = { run = "mise run sync-all && uv run mainline.py --help", depends = ["sync-all"] }
|
||||
|
||||
clean = "rm -rf .venv htmlcov .coverage tests/.pytest_cache .mainline_cache_*.json nohup.out"
|
||||
|
||||
# Aggressive cleanup - removes all generated files, caches, and venv
|
||||
clobber = "git clean -fdx && rm -rf .venv htmlcov .coverage tests/.pytest_cache .mainline_cache_*.json nohup.out"
|
||||
|
||||
# =====================
|
||||
# CI/CD
|
||||
# =====================
|
||||
|
||||
ci = "mise run topics-init && uv sync --group dev && uv run pytest --cov=engine --cov-report=term-missing --cov-report=xml"
|
||||
ci-lint = "uv run ruff check engine/ mainline.py"
|
||||
ci = { run = "mise run topics-init && mise run lint && mise run test-cov", depends = ["topics-init", "lint", "test-cov"] }
|
||||
|
||||
# =====================
|
||||
# Git Hooks (via hk)
|
||||
# =====================
|
||||
|
||||
pre-commit = "hk run pre-commit"
|
||||
pre-commit = "hk run pre-commit"
|
||||
Reference in New Issue
Block a user