miracle-claw 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- miracle_claw-0.1.0/CHANGELOG.md +64 -0
- miracle_claw-0.1.0/CLAW.md +127 -0
- miracle_claw-0.1.0/CLAW.md.example +55 -0
- miracle_claw-0.1.0/INSTALL.md +147 -0
- miracle_claw-0.1.0/LICENSE +78 -0
- miracle_claw-0.1.0/MANIFEST.in +18 -0
- miracle_claw-0.1.0/NOTICE +67 -0
- miracle_claw-0.1.0/PKG-INFO +258 -0
- miracle_claw-0.1.0/README.md +219 -0
- miracle_claw-0.1.0/aliases.py +67 -0
- miracle_claw-0.1.0/auth.py +713 -0
- miracle_claw-0.1.0/commands.py +1426 -0
- miracle_claw-0.1.0/completion.py +278 -0
- miracle_claw-0.1.0/context.py +148 -0
- miracle_claw-0.1.0/docs/TIER_DESIGN.md +356 -0
- miracle_claw-0.1.0/history.py +79 -0
- miracle_claw-0.1.0/jobs.py +352 -0
- miracle_claw-0.1.0/llm.py +227 -0
- miracle_claw-0.1.0/mentions.py +91 -0
- miracle_claw-0.1.0/miracle_claw.egg-info/PKG-INFO +258 -0
- miracle_claw-0.1.0/miracle_claw.egg-info/SOURCES.txt +42 -0
- miracle_claw-0.1.0/miracle_claw.egg-info/dependency_links.txt +1 -0
- miracle_claw-0.1.0/miracle_claw.egg-info/entry_points.txt +3 -0
- miracle_claw-0.1.0/miracle_claw.egg-info/requires.txt +13 -0
- miracle_claw-0.1.0/miracle_claw.egg-info/top_level.txt +23 -0
- miracle_claw-0.1.0/miracle_claw_cli.py +59 -0
- miracle_claw-0.1.0/miracle_claw_imports.py +43 -0
- miracle_claw-0.1.0/miracle_claw_serve.py +42 -0
- miracle_claw-0.1.0/mlg +722 -0
- miracle_claw-0.1.0/mlg-serve +551 -0
- miracle_claw-0.1.0/multiline_repl.py +658 -0
- miracle_claw-0.1.0/profile.py +103 -0
- miracle_claw-0.1.0/pyproject.toml +98 -0
- miracle_claw-0.1.0/repl.py +709 -0
- miracle_claw-0.1.0/runtime.py +56 -0
- miracle_claw-0.1.0/safety.py +162 -0
- miracle_claw-0.1.0/session.py +97 -0
- miracle_claw-0.1.0/setup.cfg +4 -0
- miracle_claw-0.1.0/tiers/__init__.py +87 -0
- miracle_claw-0.1.0/tiers/local.py +141 -0
- miracle_claw-0.1.0/turn.py +276 -0
- miracle_claw-0.1.0/ui.py +340 -0
- miracle_claw-0.1.0/voice.py +242 -0
- miracle_claw-0.1.0/wizard.py +283 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `miracle-claw` are documented here.
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added (planned for Phase 5)
|
|
10
|
+
- **Auto-update daemon** (`update.py`) — checks GitHub Releases API
|
|
11
|
+
on launch, notifies when newer version is available, supports
|
|
12
|
+
one-command upgrade.
|
|
13
|
+
- **Docker image** — `Dockerfile` plus `docker push` workflow to
|
|
14
|
+
`ghcr.io/milagro-distribution/miracle-claw`.
|
|
15
|
+
- **Comprehensive docs site** — single-page mkdocs site with
|
|
16
|
+
install / quickstart / commands / architecture.
|
|
17
|
+
- **Optional `[bundled]` extra** — pin faster-whisper, aiohttp, etc.
|
|
18
|
+
so `pip install miracle-claw[all]` gives a complete experience.
|
|
19
|
+
|
|
20
|
+
## [0.1.0] — 2026-06-29
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- **PyPI packaging** — `pip install miracle-claw` from source tree
|
|
24
|
+
or PyPI gives a working `mlg` + `mlg-serve` on PATH.
|
|
25
|
+
- `pyproject.toml` (setuptools, PEP 621 metadata).
|
|
26
|
+
- `miracle_claw_cli.py` / `miracle_claw_serve.py` entry-point shims
|
|
27
|
+
that `exec()` the original `mlg` and `mlg-serve` scripts.
|
|
28
|
+
- `miracle_claw_imports.py` helper to load `profile.py` despite
|
|
29
|
+
stdlib shadowing on pip-installed layouts.
|
|
30
|
+
- `MANIFEST.in` excludes dev cruft (voice_venv, recordings, etc.).
|
|
31
|
+
- Entry-point scripts shipped as PEP 376 data-files.
|
|
32
|
+
- **Optional extras**:
|
|
33
|
+
- `miracle-claw[voice]` — faster-whisper dependency
|
|
34
|
+
- `miracle-claw[serve]` — aiohttp for the browser frontend
|
|
35
|
+
- `miracle-claw[dev]` — pytest, ruff, build, twine
|
|
36
|
+
- **Sdist + wheel builds verified** in fresh Python venv.
|
|
37
|
+
- `python3 -m build --sdist --wheel` produces both artifacts.
|
|
38
|
+
- `pip install miracle_claw-0.1.0-py3-none-any.whl` works.
|
|
39
|
+
- `mlg --help` and `mlg-serve` both run end-to-end.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
- `profile.py` shadowing stdlib's `profile` module in pip-installed
|
|
43
|
+
layouts — fixed via `importlib.util.spec_from_file_location` shim.
|
|
44
|
+
|
|
45
|
+
### Internal
|
|
46
|
+
- `[tool.miracle-claw]` config table added to `pyproject.toml`
|
|
47
|
+
(auto-update channel, GitHub endpoint).
|
|
48
|
+
|
|
49
|
+
## [0.0.x] — 2026-05 to 2026-06 (pre-PyPI)
|
|
50
|
+
|
|
51
|
+
Phase 1, 2, 3, 4 of Miracle Claw development. Tier-1 + tier-2 + tier-3
|
|
52
|
+
features all shipped in-tree. See `MEMORY.md` and
|
|
53
|
+
`memory/projects/miracle_claw_phases.md` for the full history.
|
|
54
|
+
|
|
55
|
+
- **Phase 4 #1-7** — security hardening (headers, rate limit, HIBP,
|
|
56
|
+
JWT rotation, CORS tightening, audit log, dependency audit).
|
|
57
|
+
- **Phase 3** — Stripe billing + Postmark email.
|
|
58
|
+
- **Phase 2** — multi-user + org roles.
|
|
59
|
+
- **Phase 1** — auth + tiers.
|
|
60
|
+
- **Tier 2 / 3 features** — slash commands, `@file` mentions,
|
|
61
|
+
voice input, background jobs, local LLM fast-path, etc.
|
|
62
|
+
|
|
63
|
+
[Unreleased]: https://github.com/milagro-distribution/miracle-claw/compare/v0.1.0...HEAD
|
|
64
|
+
[0.1.0]: https://github.com/milagro-distribution/miracle-claw/releases/tag/v0.1.0
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# CLAW.md — Milagro Claw System Rules
|
|
2
|
+
|
|
3
|
+
This file is loaded as the system prompt every time you run `mlg`.
|
|
4
|
+
Edit freely — your rules, your machine.
|
|
5
|
+
|
|
6
|
+
## Voice
|
|
7
|
+
- Be direct, terse, no filler. No "I'd be happy to help!"
|
|
8
|
+
- For conversational replies (no code): the `explanation` field IS your
|
|
9
|
+
reply. Just write the answer directly. NEVER start with phrases like:
|
|
10
|
+
- "Here's a brief overview of..."
|
|
11
|
+
- "This command will..."
|
|
12
|
+
- "I'll list..."
|
|
13
|
+
- "I will explain..."
|
|
14
|
+
- "Here's a quick summary of..."
|
|
15
|
+
- "Prints X" (when the code is just echoing that X)
|
|
16
|
+
- "Describes X" (when the explanation is just describing X)
|
|
17
|
+
Just say the thing. No meta-commentary about what you're doing.
|
|
18
|
+
- For code replies: ONE short `explanation` clause stating the result
|
|
19
|
+
("Lists top CPU consumers."), then the `code`. The result, not the plan.
|
|
20
|
+
- No emojis in explanations (the shell adds its own)
|
|
21
|
+
- Match the user's language (English by default)
|
|
22
|
+
|
|
23
|
+
## Default to conversation, not code
|
|
24
|
+
- If the user's request is vague, ambiguous, or conversational, DO NOT
|
|
25
|
+
jump straight to a bash command. Reply with a clarifying question or
|
|
26
|
+
a brief conversational answer. Set `"code": ""` and put the response
|
|
27
|
+
in `"explanation"`.
|
|
28
|
+
- Triggers that REQUIRE no code (just explanation text):
|
|
29
|
+
- Greetings ("hi", "hello", "good morning") — greet back briefly.
|
|
30
|
+
- Thanks ("thanks", "thx", "appreciate it") — acknowledge briefly.
|
|
31
|
+
NEVER echo the thanks back via shell. Just say "You're welcome."
|
|
32
|
+
- Follow-ups / acknowledgments ("ok thanks", "great", "cool") —
|
|
33
|
+
respond briefly, no code.
|
|
34
|
+
- Open-ended asks ("what can you do?", "help", "how does this work?")
|
|
35
|
+
— describe your capabilities, no code.
|
|
36
|
+
- Vague intents ("do something with files", "make it work") — ask what
|
|
37
|
+
they actually want done.
|
|
38
|
+
- NEVER run `echo`, `printf`, or any shell command just to repeat text
|
|
39
|
+
from your `explanation`. If your explanation already says "X is a city
|
|
40
|
+
in New Mexico", do NOT also have `code: "echo 'X is a city in New Mexico'"`.
|
|
41
|
+
The shell is for actions, not chat. Your `explanation` field IS your reply.
|
|
42
|
+
- If the user's question can be answered entirely in prose (geography,
|
|
43
|
+
definitions, opinions, summaries, plans, recommendations), reply with
|
|
44
|
+
`"language": ""` and `"code": ""`. Only run code when the user wants
|
|
45
|
+
the system to DO something (list files, run a command, transform data).
|
|
46
|
+
- Only produce code when the user's intent is specific and actionable
|
|
47
|
+
("list .txt files in cwd", "show disk usage", "rename X to Y").
|
|
48
|
+
|
|
49
|
+
## Code style
|
|
50
|
+
- Prefer coreutils + stdlib over external tools
|
|
51
|
+
- One self-contained snippet per turn
|
|
52
|
+
- Print results to STDOUT — nothing fancy
|
|
53
|
+
- Never invent APIs or flags you don't know
|
|
54
|
+
- When in doubt, ask a clarifying question
|
|
55
|
+
|
|
56
|
+
## Safety defaults
|
|
57
|
+
- Always print the full command before running it
|
|
58
|
+
- Read-only commands (ls, cat, grep, find, du, df, ps, top, etc.) may auto-run
|
|
59
|
+
- Anything touching files outside CWD needs explicit confirmation
|
|
60
|
+
- Network commands (curl, wget, ssh) warn before running
|
|
61
|
+
- Sudo / rm -rf / chmod 777 / dd / mkfs always warn twice
|
|
62
|
+
|
|
63
|
+
## Response format (strict JSON)
|
|
64
|
+
You MUST reply with a single JSON object and nothing else:
|
|
65
|
+
{
|
|
66
|
+
"language": "bash" | "python" | "perl" | "",
|
|
67
|
+
"explanation": "one short sentence OR a clarifying question",
|
|
68
|
+
"code": "self-contained snippet, or empty string if asking a question"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
Set `"language": ""` and `"code": ""` when you're asking a clarifying
|
|
72
|
+
question — just write the question in `"explanation"`.
|
|
73
|
+
|
|
74
|
+
No markdown fences. No prose outside the JSON. No trailing comments.
|
|
75
|
+
|
|
76
|
+
## Directory context
|
|
77
|
+
A snapshot of the current directory (depth 2) is included with each turn.
|
|
78
|
+
Use it to give accurate answers about what's available locally.
|
|
79
|
+
File contents are NEVER sent — names only.
|
|
80
|
+
|
|
81
|
+
## Memory
|
|
82
|
+
You can read files the user explicitly names.
|
|
83
|
+
You can write to ~/miracle_claw/notes/ for persistent notes across sessions.
|
|
84
|
+
Never write outside the user's home directory without explicit permission.
|
|
85
|
+
|
|
86
|
+
## Examples
|
|
87
|
+
|
|
88
|
+
User: "what's eating my CPU?"
|
|
89
|
+
{"language": "bash", "explanation": "Top CPU consumers, sorted.", "code": "ps aux --sort=-%cpu | head -10"}
|
|
90
|
+
|
|
91
|
+
User: "summarize this csv"
|
|
92
|
+
{"language": "python", "explanation": "Row count of the CSV.", "code": "import csv, sys; print('rows:', sum(1 for _ in csv.reader(open(sys.argv[1]))))"}
|
|
93
|
+
|
|
94
|
+
User: "ok, excellent, thanks"
|
|
95
|
+
{"language": "", "explanation": "You're welcome.", "code": ""}
|
|
96
|
+
|
|
97
|
+
User: "hi"
|
|
98
|
+
{"language": "", "explanation": "Hey! What are we working on?", "code": ""}
|
|
99
|
+
|
|
100
|
+
User: "what's the plan for today?"
|
|
101
|
+
{"language": "", "explanation": "Plan: 1) review code, 2) test help formatting, 3) cloud vs local check, 4) integration tests, 5) update docs.", "code": ""}
|
|
102
|
+
|
|
103
|
+
User: "Where is Albuquerque?"
|
|
104
|
+
{"language": "", "explanation": "Albuquerque is a city in central New Mexico, USA, in the high desert along the Rio Grande.", "code": ""}
|
|
105
|
+
|
|
106
|
+
User: "Where is Los Angeles?"
|
|
107
|
+
{"language": "", "explanation": "Los Angeles is a major city on the West Coast of the United States, in southern California.", "code": ""}
|
|
108
|
+
|
|
109
|
+
User: "help"
|
|
110
|
+
{"language": "", "explanation": "I can run shell commands, write Python one-liners, and answer questions about your system. Try asking me to list files, check disk usage, or rename something. What do you need?", "code": ""}
|
|
111
|
+
|
|
112
|
+
User: "do something with files"
|
|
113
|
+
{"language": "", "explanation": "Which files, and what should I do with them? (list, count, rename, delete, search...)", "code": ""}
|
|
114
|
+
|
|
115
|
+
## ❌ Bad examples — do NOT produce these
|
|
116
|
+
|
|
117
|
+
User: "Where is Albuquerque?"
|
|
118
|
+
❌ BAD: {"language": "bash", "explanation": "Prints a brief description of Albuquerque's location.", "code": "echo 'Albuquerque is a city in New Mexico.'"}
|
|
119
|
+
✅ GOOD: {"language": "", "explanation": "Albuquerque is a city in central New Mexico, USA, in the high desert along the Rio Grande.", "code": ""}
|
|
120
|
+
|
|
121
|
+
User: "Hello, what's the word?"
|
|
122
|
+
❌ BAD: {"language": "bash", "explanation": "Prints a random English word from the system dictionary.", "code": "if [[ -f /usr/share/dict/words ]]; then shuf -n 1 /usr/share/dict/words; ..."}
|
|
123
|
+
✅ GOOD: {"language": "bash", "explanation": "Random word.", "code": "shuf -n 1 /usr/share/dict/words"}
|
|
124
|
+
|
|
125
|
+
User: "ok thanks"
|
|
126
|
+
❌ BAD: {"language": "bash", "explanation": "Echoes a friendly response.", "code": "echo 'You\\'re welcome.'"}
|
|
127
|
+
✅ GOOD: {"language": "", "explanation": "You're welcome.", "code": ""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# CLAW.md — Milagro Claw System Rules
|
|
2
|
+
|
|
3
|
+
This file is loaded as the system prompt every time you run `mlg`.
|
|
4
|
+
Edit freely — your rules, your machine.
|
|
5
|
+
|
|
6
|
+
## Voice
|
|
7
|
+
- Be direct, terse, no filler. No "I'd be happy to help!"
|
|
8
|
+
- Explain in ONE line first, then code
|
|
9
|
+
- No emojis in explanations (the shell adds its own)
|
|
10
|
+
- Match the user's language (English by default)
|
|
11
|
+
|
|
12
|
+
## Code style
|
|
13
|
+
- Prefer coreutils + stdlib over external tools
|
|
14
|
+
- One self-contained snippet per turn
|
|
15
|
+
- Print results to STDOUT — nothing fancy
|
|
16
|
+
- Never invent APIs or flags you don't know
|
|
17
|
+
- If unsure, ask a clarifying question instead of guessing
|
|
18
|
+
|
|
19
|
+
## Safety defaults
|
|
20
|
+
- Always print the full command before running it
|
|
21
|
+
- Read-only commands (ls, cat, grep, find, du, df, ps, top, etc.) may auto-run
|
|
22
|
+
- Anything touching files outside CWD needs explicit confirmation
|
|
23
|
+
- Network commands (curl, wget, ssh) warn before running
|
|
24
|
+
- Sudo / rm -rf / chmod 777 / dd / mkfs always warn twice
|
|
25
|
+
|
|
26
|
+
## Response format (strict JSON)
|
|
27
|
+
You MUST reply with a single JSON object and nothing else:
|
|
28
|
+
{
|
|
29
|
+
"language": "bash" | "python" | "perl",
|
|
30
|
+
"explanation": "one short sentence",
|
|
31
|
+
"code": "self-contained snippet, empty string if you need clarification"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
No markdown fences. No prose outside the JSON. No trailing comments.
|
|
35
|
+
|
|
36
|
+
## Directory context
|
|
37
|
+
A snapshot of the current directory (depth 2) is included with each turn.
|
|
38
|
+
Use it to give accurate answers about what's available locally.
|
|
39
|
+
File contents are NEVER sent — names only.
|
|
40
|
+
|
|
41
|
+
## Memory
|
|
42
|
+
You can read files the user explicitly names.
|
|
43
|
+
You can write to ~/miracle_claw/notes/ for persistent notes across sessions.
|
|
44
|
+
Never write outside the user's home directory without explicit permission.
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
User: "what's eating my CPU?"
|
|
49
|
+
{"language": "bash", "explanation": "Lists top CPU consumers sorted.", "code": "ps aux --sort=-%cpu | head -10"}
|
|
50
|
+
|
|
51
|
+
User: "summarize this csv"
|
|
52
|
+
{"language": "python", "explanation": "Prints shape and first 3 rows of the CSV.", "code": "import csv, sys; print('rows:', sum(1 for _ in csv.reader(open(sys.argv[1]))))"}
|
|
53
|
+
|
|
54
|
+
User: "thanks"
|
|
55
|
+
{"language": "bash", "explanation": "You're welcome.", "code": "echo '👍'"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Installing Miracle Claw
|
|
2
|
+
|
|
3
|
+
Miracle Claw runs on Linux, macOS, and Windows (via Docker Desktop).
|
|
4
|
+
There are three install paths; pick the one that fits.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Path 1 — Docker (recommended, cross-platform)
|
|
9
|
+
|
|
10
|
+
**Best for**: Windows users, anyone who doesn't want to manage Python deps.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# 1. Install Docker Desktop (Windows/macOS) or docker + compose (Linux)
|
|
14
|
+
# https://www.docker.com/products/docker-desktop/
|
|
15
|
+
|
|
16
|
+
# 2. Clone the repo
|
|
17
|
+
git clone https://github.com/milagro-distribution/miracle-claw.git
|
|
18
|
+
cd miracle-claw
|
|
19
|
+
|
|
20
|
+
# 3. Set your API key
|
|
21
|
+
echo "MILAGRO_API_KEY=sk-..." > .env
|
|
22
|
+
|
|
23
|
+
# 4. Run interactively
|
|
24
|
+
docker compose run --rm mlg
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
You'll get a shell inside the container with mlg preinstalled. Your
|
|
28
|
+
current directory is mounted at `/work`. To pass a one-shot question:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
docker compose run --rm mlg "list all python files modified today"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For the browser frontend (xterm.js):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
docker compose --profile serve up
|
|
38
|
+
# Open http://localhost:7777 in your browser
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Voice input requires ALSA devices, which only work when Docker Desktop
|
|
42
|
+
uses the WSL2 backend AND you grant the container access to `/dev/snd`.
|
|
43
|
+
On Windows, run mlg natively in WSL Ubuntu instead (Path 2).
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Path 2 — Native Linux / WSL Ubuntu / macOS
|
|
48
|
+
|
|
49
|
+
**Best for**: Linux power users, WSL users on Windows.
|
|
50
|
+
|
|
51
|
+
### Linux / WSL Ubuntu
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
sudo apt install -y python3 python3-pip git bash alsa-utils ffmpeg
|
|
55
|
+
git clone https://github.com/milagro-distribution/miracle-claw.git
|
|
56
|
+
cd miracle-claw
|
|
57
|
+
pip install --user -e ".[voice]"
|
|
58
|
+
echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc
|
|
59
|
+
source ~/.bashrc
|
|
60
|
+
|
|
61
|
+
export MILAGRO_API_KEY=***
|
|
62
|
+
mlg
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### macOS
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Install Homebrew if you haven't: https://brew.sh
|
|
69
|
+
brew install python git ffmpeg portaudio
|
|
70
|
+
|
|
71
|
+
git clone https://github.com/milagro-distribution/miracle-claw.git
|
|
72
|
+
cd miracle-claw
|
|
73
|
+
pip3 install --user -e ".[voice]"
|
|
74
|
+
export MILAGRO_API_KEY=***
|
|
75
|
+
./mlg
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Voice on macOS uses a separate audio backend (`sounddevice`) — install
|
|
79
|
+
with `pip install sounddevice` if `/voice` doesn't work out of the box.
|
|
80
|
+
(Coming soon: full macOS support without extra deps.)
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Path 3 — pip install (no repo clone)
|
|
85
|
+
|
|
86
|
+
**Best for**: trying mlg without checking out the source.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip install miracle-claw[voice]
|
|
90
|
+
export MILAGRO_API_KEY=***
|
|
91
|
+
mlg
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
(Not yet on PyPI. Coming once v0.2 ships.)
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## What you need
|
|
99
|
+
|
|
100
|
+
| | Docker | Native Linux/WSL | Native macOS |
|
|
101
|
+
|---|---|---|---|
|
|
102
|
+
| Python 3.10+ | bundled | required | required |
|
|
103
|
+
| Bash | bundled | required | required |
|
|
104
|
+
| Git | bundled | required | required |
|
|
105
|
+
| ALSA (`arecord`) | optional | optional (voice) | n/a |
|
|
106
|
+
| `ffmpeg` | bundled | optional (voice) | required (voice) |
|
|
107
|
+
| Ollama (local LLM) | optional | optional | optional |
|
|
108
|
+
|
|
109
|
+
**Voice input** is the only feature that doesn't work fully cross-platform
|
|
110
|
+
in Path 1. Everything else — slash commands, MAIC routing, background
|
|
111
|
+
jobs, browser frontend, session persistence — works identically.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Quick health check
|
|
116
|
+
|
|
117
|
+
After install, confirm everything is wired:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
mlg --help
|
|
121
|
+
mlg "/help"
|
|
122
|
+
mlg "/model local" # if Ollama is running
|
|
123
|
+
mlg "/voice --print-only 3" # records 3s, transcribes, doesn't send to LLM
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
If those three work, you're set.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Troubleshooting
|
|
131
|
+
|
|
132
|
+
**`MILAGRO_API_KEY not set`** — set the env var before running mlg.
|
|
133
|
+
For Docker, put it in `.env` next to `docker-compose.yml`.
|
|
134
|
+
|
|
135
|
+
**`arecord` not found** — only matters for `/voice`. Other commands work.
|
|
136
|
+
|
|
137
|
+
**`ollama` not found** — only matters for `/model local`. MAIC routing
|
|
138
|
+
works without it.
|
|
139
|
+
|
|
140
|
+
**`bash: ! cmd: event not found`** — your shell is doing history expansion
|
|
141
|
+
before mlg sees the line. Quote it: `mlg '! echo hello'`.
|
|
142
|
+
|
|
143
|
+
**PTY-related errors on Windows native** — run mlg inside WSL Ubuntu or
|
|
144
|
+
use Docker (Path 1).
|
|
145
|
+
|
|
146
|
+
**Anything else** — file an issue at
|
|
147
|
+
https://github.com/milagro-distribution/miracle-claw/issues
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Miracle Claw (miracle_claw)
|
|
2
|
+
Copyright (c) 2026 Milagro Distribution Corp.
|
|
3
|
+
|
|
4
|
+
PROPRIETARY SOFTWARE — ALL RIGHTS RESERVED
|
|
5
|
+
|
|
6
|
+
This software and associated documentation files (the "Software") are the
|
|
7
|
+
exclusive property of Milagro Distribution Corp. and are protected by
|
|
8
|
+
United States and international copyright, trademark, and other
|
|
9
|
+
intellectual property laws.
|
|
10
|
+
|
|
11
|
+
USE OF THE SOFTWARE
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this Software, to use, copy, modify, merge, publish, and distribute the
|
|
15
|
+
Software, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
1. The above copyright notice and this permission notice shall be included
|
|
18
|
+
in all copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
2. The Software may not be sold, sublicensed, or included as part of any
|
|
21
|
+
commercial product or service without prior written consent from
|
|
22
|
+
Milagro Distribution Corp.
|
|
23
|
+
|
|
24
|
+
3. Redistributions of the Software in source code form must reproduce the
|
|
25
|
+
above copyright notice, this list of conditions, and the following
|
|
26
|
+
disclaimer.
|
|
27
|
+
|
|
28
|
+
4. Redistributions in binary form must reproduce the above copyright
|
|
29
|
+
notice, this list of conditions, and the following disclaimer in the
|
|
30
|
+
documentation and/or other materials provided with the distribution.
|
|
31
|
+
|
|
32
|
+
5. Neither the name of Milagro Distribution Corp. nor the names of its
|
|
33
|
+
contributors may be used to endorse or promote products derived from
|
|
34
|
+
the Software without specific prior written permission.
|
|
35
|
+
|
|
36
|
+
DISCLAIMER
|
|
37
|
+
|
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
39
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
40
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
41
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR
|
|
42
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE,
|
|
43
|
+
ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
44
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
45
|
+
|
|
46
|
+
THIRD-PARTY DEPENDENCIES
|
|
47
|
+
|
|
48
|
+
Miracle Claw integrates with the following third-party components. Their
|
|
49
|
+
respective licenses govern their use:
|
|
50
|
+
|
|
51
|
+
- Python 3.x (PSF License) — runtime
|
|
52
|
+
- aiohttp (Apache License 2.0) — HTTP/WebSocket server
|
|
53
|
+
- websockets (BSD 3-Clause) — WebSocket protocol
|
|
54
|
+
- xterm.js (MIT License) — terminal emulator (loaded from CDN)
|
|
55
|
+
- Milagro AI Cloud (proprietary, Milagro Distribution Corp.) — backend gateway
|
|
56
|
+
- Ollama Cloud API — optional model provider
|
|
57
|
+
|
|
58
|
+
PATENT NOTICE
|
|
59
|
+
|
|
60
|
+
Milagro Distribution Corp. is committed to providing a clean-room
|
|
61
|
+
implementation of the features described in this Software. The Software
|
|
62
|
+
does not knowingly infringe on any third-party patents. If you believe
|
|
63
|
+
the Software may infringe on a patent, please contact:
|
|
64
|
+
|
|
65
|
+
Milagro Distribution Corp.
|
|
66
|
+
6011 San Francisco Rd NE
|
|
67
|
+
Albuquerque, NM 87109
|
|
68
|
+
Phone: (505) 797-0060
|
|
69
|
+
Website: www.adealauto.com
|
|
70
|
+
|
|
71
|
+
TRADEMARK
|
|
72
|
+
|
|
73
|
+
"Miracle Claw", "miracle_claw", and the lightning-bolt logo are trademarks
|
|
74
|
+
of Milagro Distribution Corp. All other trademarks are the property of
|
|
75
|
+
their respective owners.
|
|
76
|
+
|
|
77
|
+
For licensing inquiries (commercial, OEM, embedded), contact Milagro
|
|
78
|
+
Distribution Corp. at the address above.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
include LICENSE NOTICE README.md CHANGELOG.md INSTALL.md CLAW.md CLAW.md.example
|
|
2
|
+
include docs/man/mlg.1
|
|
3
|
+
include mlg mlg-serve
|
|
4
|
+
include miracle_claw_cli.py miracle_claw_serve.py pyproject.toml
|
|
5
|
+
recursive-include docs *.md
|
|
6
|
+
recursive-include static *
|
|
7
|
+
recursive-include tiers *.py
|
|
8
|
+
|
|
9
|
+
# Exclude dev cruft
|
|
10
|
+
exclude voice_venv
|
|
11
|
+
exclude recordings
|
|
12
|
+
exclude __pycache__
|
|
13
|
+
exclude *.pyc
|
|
14
|
+
exclude *.bak
|
|
15
|
+
exclude *.egg-info
|
|
16
|
+
exclude .pytest_cache
|
|
17
|
+
exclude .ruff_cache
|
|
18
|
+
prune recordings/ voice_venv/ __pycache__/ .pytest_cache/ .ruff_cache/ *.egg-info/
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
NOTICE — Miracle Claw (miracle_claw)
|
|
2
|
+
Copyright (c) 2026 Milagro Distribution Corp.
|
|
3
|
+
=========================================================
|
|
4
|
+
|
|
5
|
+
This product includes software developed by third parties:
|
|
6
|
+
|
|
7
|
+
──────────────────────────────────────────────────────────
|
|
8
|
+
Python
|
|
9
|
+
──────────────────────────────────────────────────────────
|
|
10
|
+
Copyright (c) 2001-2026 Python Software Foundation; All Rights Reserved
|
|
11
|
+
Licensed under the Python Software Foundation License (PSF License)
|
|
12
|
+
https://docs.python.org/3/license.html
|
|
13
|
+
|
|
14
|
+
──────────────────────────────────────────────────────────
|
|
15
|
+
aiohttp
|
|
16
|
+
──────────────────────────────────────────────────────────
|
|
17
|
+
Copyright (c) aiohttp contributors
|
|
18
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
you may not use this file except in compliance with the License.
|
|
20
|
+
You may obtain a copy of the License at
|
|
21
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
Source: https://github.com/aio-libs/aiohttp
|
|
23
|
+
|
|
24
|
+
──────────────────────────────────────────────────────────
|
|
25
|
+
websockets
|
|
26
|
+
──────────────────────────────────────────────────────────
|
|
27
|
+
Copyright (c) 2013-2026 Aymeric Augustin and contributors
|
|
28
|
+
Licensed under the BSD 3-Clause License
|
|
29
|
+
Source: https://github.com/python-websockets/websockets
|
|
30
|
+
|
|
31
|
+
──────────────────────────────────────────────────────────
|
|
32
|
+
xterm.js
|
|
33
|
+
──────────────────────────────────────────────────────────
|
|
34
|
+
Copyright (c) 2014, sourcey organizations
|
|
35
|
+
Licensed under the MIT License
|
|
36
|
+
Source: https://github.com/xtermjs/xterm.js
|
|
37
|
+
Loaded at runtime from https://cdn.jsdelivr.net/npm/xterm@5.3.0/
|
|
38
|
+
|
|
39
|
+
──────────────────────────────────────────────────────────
|
|
40
|
+
Milagro AI Cloud (backend)
|
|
41
|
+
──────────────────────────────────────────────────────────
|
|
42
|
+
Copyright (c) 2026 Milagro Distribution Corp.
|
|
43
|
+
Proprietary — see LICENSE file.
|
|
44
|
+
|
|
45
|
+
──────────────────────────────────────────────────────────
|
|
46
|
+
Ollama Cloud API (optional model provider)
|
|
47
|
+
──────────────────────────────────────────────────────────
|
|
48
|
+
Model outputs subject to the upstream model's terms of service.
|
|
49
|
+
Ollama Inc. — https://ollama.com
|
|
50
|
+
|
|
51
|
+
──────────────────────────────────────────────────────────
|
|
52
|
+
Model Licenses (via Ollama Cloud)
|
|
53
|
+
──────────────────────────────────────────────────────────
|
|
54
|
+
Miracle Claw is model-agnostic. The models accessed via Ollama Cloud
|
|
55
|
+
(e.g. gpt-oss:120b, qwen3-coder:480b, llama3.2-vision:90b) are subject
|
|
56
|
+
to their respective upstream licenses:
|
|
57
|
+
- LLaMA family: LLaMA Community License (Meta)
|
|
58
|
+
- Qwen family: Tongyi Qianwen License (Alibaba)
|
|
59
|
+
- GPT-OSS: Apache 2.0
|
|
60
|
+
- Other models: see https://ollama.com/library for individual licenses
|
|
61
|
+
|
|
62
|
+
Miracle Distribution Corp. does not redistribute model weights;
|
|
63
|
+
models are accessed remotely via the Ollama Cloud HTTP API.
|
|
64
|
+
|
|
65
|
+
=========================================================
|
|
66
|
+
END OF NOTICE
|
|
67
|
+
=========================================================
|