refactor: decouple Coin Hunter from Hermes for cross-platform usage

- Add unified coinhunter_shim.py that accepts subcommands (pre/gate/review/rotate-log)
- Update SKILL.md gate pseudocode to read optional ~/.coinhunter/platform.json
- Split cron/setup examples into Hermes and OpenClaw variants across docs
- Introduce platform.json schema in user-data-layout.md
- Remove stale auto_trader.py/run_trader.sh references from auto-trading-guide.md
- Keep legacy shims as backward-compatible wrappers
This commit is contained in:
2026-04-16 03:03:25 +08:00
parent 863d10b872
commit c07b9c1ae5
12 changed files with 409 additions and 110 deletions

View File

@@ -1,16 +1,33 @@
# CoinHunter shim templates
These files are tiny compatibility shims for Hermes platform features that currently expect scripts under `~/.hermes/scripts/`.
These files are tiny compatibility shims for cron-based platforms (Hermes, OpenClaw, etc.) that expect scripts under a scripts directory such as `~/.hermes/scripts/` or `~/.openclaw/scripts/`.
When needed, copy them like this:
## Unified shim (recommended)
`templates/coinhunter_shim.py` is the cross-platform wrapper. It takes the subcommand as its first argument and delegates to the installed `coinhunter` CLI:
```bash
cp templates/coinhunter_shim.py ~/.hermes/scripts/coinhunter_shim.py
# or
cp templates/coinhunter_shim.py ~/.openclaw/scripts/coinhunter_shim.py
```
Usage examples:
- `coinhunter_shim.py pre`
- `coinhunter_shim.py gate`
- `coinhunter_shim.py review`
- `coinhunter_shim.py rotate-log`
## Legacy shims (backward compatibility)
The original individual shims are still provided for existing Hermes users who already have them deployed. Their behavior is unchanged:
- `templates/coinhunter_precheck_shim.py` -> `~/.hermes/scripts/coinhunter_precheck.py`
- `templates/coinhunter_external_gate_shim.py` -> `~/.hermes/scripts/coinhunter_external_gate.py`
- `templates/coinhunter_review_context_shim.py` -> `~/.hermes/scripts/coinhunter_review_context.py`
- `templates/rotate_external_gate_log_shim.sh` -> `~/.hermes/scripts/rotate_external_gate_log.sh`
- `templates/rotate_external_gate_log_shim.py` -> `~/.hermes/scripts/rotate_external_gate_log.py`
The real business logic stays inside the skill under:
- `~/.hermes/skills/coinhunter/scripts/`
The real business logic lives in the external `coinhunter` CLI package (installed from PyPI). These shims only delegate to it.
The user runtime data stays under:
- `~/.coinhunter/`