mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-13 14:37:26 +00:00
Add waiting arcade MVP
This commit is contained in:
parent
b1d8fe475a
commit
4682b261c0
16 changed files with 1192 additions and 2 deletions
45
docs/arcade.md
Normal file
45
docs/arcade.md
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Waiting Arcade
|
||||
|
||||
Waiting Arcade lets you play small terminal games while Logicsrc runs long tasks.
|
||||
|
||||
```bash
|
||||
logicsrc arcade list
|
||||
logicsrc arcade play hangman
|
||||
logicsrc --yolo --arcade=hangman
|
||||
logicsrc agentswarm --yolo --arcade=random
|
||||
logicsrc agentswarm --yolo --no-arcade
|
||||
```
|
||||
|
||||
Built-in games:
|
||||
|
||||
- `hangman`
|
||||
- `snake`
|
||||
- `moon-runner`
|
||||
- `minefield`
|
||||
- `agent-swarm`
|
||||
|
||||
Use `random` to pick a built-in game.
|
||||
|
||||
## Task Mode
|
||||
|
||||
When arcade mode is launched from `--yolo` or `agentswarm --yolo`, the task continues in the background. The game shows a compact task overlay with status, phase, progress, last message, and cost when available.
|
||||
|
||||
The arcade pauses immediately when the task completes, fails, needs approval, or needs expense approval. Expense approval requires an explicit modal action; the game never silently approves cost.
|
||||
|
||||
## Shortcuts
|
||||
|
||||
| Key | Action |
|
||||
| --- | --- |
|
||||
| `L` / `Ctrl+G` | Toggle task logs |
|
||||
| `Esc` | Pause game |
|
||||
| `Q` | Quit arcade |
|
||||
| `Ctrl+C` | Open stop prompt in interactive mode |
|
||||
| `Arrow` / `WASD` | Move in supported games |
|
||||
|
||||
## Non-Interactive Terminals
|
||||
|
||||
In CI or redirected output, Waiting Arcade does not enter raw interactive mode. It prints a static arcade snapshot and returns without changing terminal state.
|
||||
|
||||
## Safety
|
||||
|
||||
The runtime restores raw mode, cursor visibility, and the alternate screen on normal exit or `Ctrl+C`. Quitting the arcade does not imply task approval.
|
||||
51
docs/config.md
Normal file
51
docs/config.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# Config
|
||||
|
||||
Logicsrc stores user config at:
|
||||
|
||||
```text
|
||||
$HOME/.logicsrc/config.json
|
||||
```
|
||||
|
||||
Read and write values with dot paths:
|
||||
|
||||
```bash
|
||||
logicsrc config get waiting.arcade.enabled
|
||||
logicsrc config set waiting.arcade.enabled true
|
||||
logicsrc config set waiting.arcade.defaultGame hangman
|
||||
logicsrc config set waiting.arcade.autoStartAfterSeconds 15
|
||||
```
|
||||
|
||||
Default Waiting Arcade config:
|
||||
|
||||
```json
|
||||
{
|
||||
"waiting": {
|
||||
"arcade": {
|
||||
"enabled": true,
|
||||
"defaultGame": "hangman",
|
||||
"random": false,
|
||||
"autoStartAfterSeconds": 0,
|
||||
"interruptOnApproval": true,
|
||||
"interruptOnDone": true,
|
||||
"interruptOnError": true,
|
||||
"showTaskStatusOverlay": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Precedence for arcade launch behavior is:
|
||||
|
||||
1. CLI flags
|
||||
2. Environment variables
|
||||
3. User config
|
||||
4. Defaults
|
||||
|
||||
Environment variables:
|
||||
|
||||
```bash
|
||||
LOGICSRC_ARCADE=1
|
||||
LOGICSRC_ARCADE_GAME=hangman
|
||||
LOGICSRC_NO_ARCADE=1
|
||||
LOGICSRC_ARCADE_AUTOSTART_SECONDS=15
|
||||
```
|
||||
13
docs/tui.md
Normal file
13
docs/tui.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# TUI
|
||||
|
||||
The Logicsrc TUI package contains terminal rendering helpers for the static dashboard and Waiting Arcade.
|
||||
|
||||
```bash
|
||||
logicsrc tui
|
||||
logicsrc arcade
|
||||
logicsrc arcade play snake
|
||||
```
|
||||
|
||||
Waiting Arcade is dependency-free and runs inside the terminal. It uses keyboard input only and falls back to a static snapshot when stdout or stdin is not a TTY.
|
||||
|
||||
Task integrations should emit progress, log, approval, expense, completion, and error events into the arcade runtime so attention events can pause the game and show an actionable modal.
|
||||
Loading…
Add table
Add a link
Reference in a new issue