lilith-platform.live/codebase/@features/quinn-ai/docs/cli.md

94 lines
3.1 KiB
Markdown
Raw Permalink Normal View History

# CLI reference
All commands run via `./run quinn-outreach <subcommand>` from the package root.
## Engine mode (§39)
```
./run quinn-outreach mode get
./run quinn-outreach mode set <auto-fire|draft-only|monitor-only|off> [--reason=<text>] [--by=<actor>]
```
| Mode | Behavior |
|------|----------|
| `auto-fire` | Classify + send (still gated by 8 §38 checks) |
| `draft-only` | Classify + emit DRAFT event; never auto-send. **← default** |
| `monitor-only` | Classify + emit categorization; no body proposal |
| `off` | Do not poll |
**Always pass `--by` and `--reason`** — they go in the persisted config and event_log for audit.
## Block-list (§49 / §50)
```
./run quinn-outreach block <handle> <reason> # add (idempotent on duplicate)
./run quinn-outreach unblock <handle> # remove
./run quinn-outreach list-blocked # show all entries
./run quinn-outreach init-block-list # seed with §50 6-contact registry (no-op if file exists)
```
Hot-reloaded — every gate evaluation re-reads the file. No daemon restart needed.
## Watcher / parser (Quinn-approval flow)
```
./run quinn-outreach watch # run inbound watcher (LISTEN message_inserted)
./run quinn-outreach parse # run reply-parser (Quinn's self-thread replies)
./run quinn-outreach loop # run watcher + parser supervised (both children)
```
## Auto-respond engine (gated dispatch)
```
./run quinn-outreach autorespond # run auto-respond engine (watches ALL inbound)
```
Subject to engine mode + 8 pre-fire gates. With mode=`draft-only` (default), nothing dispatches.
## Scheduled-send queue
```
./run quinn-outreach scheduled-send list [--status=STATUS]
./run quinn-outreach scheduled-send cancel <id>
./run quinn-outreach scheduled-send-worker # run durable send worker (heartbeat)
```
Status values: `pending`, `sent`, `failed`, `cancelled`.
## Booking worker (§32)
```
./run quinn-outreach booking-worker # run §32 deposit-pending expiry worker
```
Ticks every 60s. On expiry: transitions row to `expired-no-deposit` AND emits `cover_story_proposed` event with a draft.
## Calendar
```
./run quinn-outreach calendar show
./run quinn-outreach calendar set [--tonight-city=...] [--tomorrow-city=...] \
[--tour-end-default=...] [--tour-end-max=...] \
[--busy-dependent=true|false] \
[--location-state=...]
```
## Diagnostics
```
./run quinn-outreach status [--last N] # heartbeat / event-log / awaiting-quinn
./run quinn-outreach smoke # end-to-end smoke test (10 steps)
./run quinn-outreach dry-run [--days=7] [--output=FILE] [--limit=200] [--unmasked]
# evaluate engine on real inbound, no send
./run quinn-outreach test # unit tests
```
## Build commands (not via `./run`)
```bash
bun install
bun run build # tsup → dist/
bun run typecheck # tsc --noEmit
bun test # node:test runner
```