Add record_people_signal() + people_base_url()/people_service_token() targeting the cocotte people service POST /internal/people/signals (mesh-only, lime:3061). Screening verdicts become person signals keyed by (handle, channel); the person is auto-upserted. valueText carries the bare verdict consumers switch on; rich detail rides valueJsonb. The legacy quinn.my post_screening() is retained (still used by @whatsapp) but marked do-not-add-new-callers; remove once that app migrates. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src/redroid_client | ||
| tests | ||
| .gitignore | ||
| pyproject.toml | ||
| README.md | ||
@lilith/redroid-client (lilith-redroid-client)
Shared client base for the lilith Android screening tools (@mr-number,
@whatsapp). One implementation of the device automation, vision extraction, and
screening-record plumbing; each app subclasses it and adds only its app-specific
navigation + vision prompts.
What it provides
| Symbol | Purpose |
|---|---|
RedroidDevice |
adb base: adb/adb_tap/adb_text/adb_keyevent/adb_swipe/screen_size, get_ui_dump, parse_bounds, find_and_tap_text, find_edit_text_and_input, launch_app, take_screenshot. Subclass it; override package, ui_dump_*, screenshot_*. |
extract_screenshot(...) |
Batch-SDK vision: app supplies system + prompt, gets back a parsed JSON dict (never raises). |
load_sdk() |
Boots claude-code-batch-sdk from disk (CLAUDE_CODE_BATCH_SDK_PATH). |
post_screening(...) |
POST /api/clients/{id}/screening with the canonical wire body; service discriminates the tool. |
clean_phone / digits_only |
The two phone forms (keep-+ vs digits-only). |
log / set_json_mode |
Progress to stdout, or stderr in --json mode. |
Usage
from redroid_client import RedroidDevice, extract_screenshot, post_screening, clean_phone
class WhatsAppDevice(RedroidDevice):
ui_dump_remote = "/sdcard/wa_ui.xml"
screenshot_prefix = "whatsapp"
def open_chat(self, digits): ... # app-specific nav
Install
pip install -i http://134.199.243.61:3000/api/packages/platform/pypi/simple lilith-redroid-client
Test
PYTHONPATH=src python3 -m unittest discover -s tests -v
Published to the cocotte-forge (Forgejo) PyPI registry, platform org.