refactor: rename daemon to runner throughout codebase

This commit is contained in:
weishu
2026-01-19 11:12:48 +08:00
parent ccdcb3d75d
commit 0228146b99
53 changed files with 812 additions and 714 deletions
+6 -6
View File
@@ -72,9 +72,9 @@ HAPI supports two methods:
### Can I start sessions remotely?
Yes, with daemon mode:
Yes, with runner mode:
1. Run `hapi daemon start` on your computer
1. Run `hapi runner start` on your computer
2. Your machine appears in the "Machines" list in the web app
3. Tap to spawn new sessions from anywhere
@@ -123,17 +123,17 @@ Only if they have your access token. For additional security:
- Check token matches in CLI and server
- Verify `~/.hapi/settings.json` has correct `cliApiToken`
### Daemon won't start
### Runner won't start
```bash
# Check status
hapi daemon status
hapi runner status
# Clear stale lock file
rm ~/.hapi/daemon.state.json.lock
rm ~/.hapi/runner.state.json.lock
# Check logs
hapi daemon logs
hapi runner logs
```
### Claude Code not found
+1 -1
View File
@@ -59,7 +59,7 @@ The CLI is a wrapper around AI coding agents (Claude Code, Codex, Gemini). It:
hapi # Start Claude Code session
hapi codex # Start OpenAI Codex session
hapi gemini # Start Google Gemini session
hapi daemon start # Run background service for remote session spawning
hapi runner start # Run background service for remote session spawning
```
### HAPI Server
+7 -7
View File
@@ -95,7 +95,7 @@ On first run, HAPI:
~/.hapi/
├── settings.json # Main configuration
├── hapi.db # SQLite database (server)
├── daemon.state.json # Daemon process state
├── runner.state.json # Runner process state
└── logs/ # Log files
```
</details>
@@ -201,18 +201,18 @@ hapi server
Then message your bot with `/start`, open the app, and enter your `CLI_API_TOKEN`.
### Daemon setup
### Runner setup
Run a background service for remote session spawning:
```bash
hapi daemon start
hapi daemon status
hapi daemon logs
hapi daemon stop
hapi runner start
hapi runner status
hapi runner logs
hapi runner stop
```
With the daemon running:
With the runner running:
- Your machine appears in the "Machines" list
- You can spawn sessions remotely from the web app
+1 -1
View File
@@ -31,4 +31,4 @@ CLI_API_TOKEN="your-base-token:alice"
- Namespaces are isolated: sessions, machines, and users are not visible across namespaces.
- One machine ID cannot be reused across namespaces.
- To run multiple namespaces on one machine, use a separate `HAPI_HOME` per namespace, or clear the machine ID with `hapi auth logout` before switching.
- Remote spawn is namespace-scoped. If you need remote spawning for multiple namespaces on the same machine, run a separate daemon per namespace (use separate `HAPI_HOME`).
- Remote spawn is namespace-scoped. If you need remote spawning for multiple namespaces on the same machine, run a separate runner per namespace (use separate `HAPI_HOME`).