@promptkiddie/daemon
v0.1.2
Published
Event-driven daemon that evaluates playbook actions against engagement events.
Downloads
43
Readme
Supervisor
Event-driven process that watches engagement events via Postgres LISTEN/NOTIFY and dispatches playbook actions. Not an LLM; pure code.
Usage
pk supervisor <engagement-id>
pk supervisor <engagement-id> --mode race # max parallelism
pk supervisor <engagement-id> --mode learning # human gates before LLM actionsOr directly:
pnpm --filter @promptkiddie/supervisor start -- <engagement-id>How it works
- Connects to Postgres and
LISTEN pk_events - Emits
EngagementStartedto kick off the playbook - On each event: evaluates all action triggers, dispatches matches
- Script actions (
runfield) execute viadocker execon the attackbox - Prompt actions (
promptfield) send the task to the orchestrator inbox - Output streams to connected WebSocket clients on port 3200
Execution modes
| Mode | Concurrency | LLM dispatch | Use case | |------|-------------|-------------|----------| | race | 5 | Immediate | CTF competitions | | standard | 3 | On trigger | Normal CTF, bug bounty | | methodical | 1 | Queued until gate | Pentest, compliance | | learning | 1 | Shows reasoning, waits for human | Practice |
WebSocket protocol
Connects on ws://localhost:3200 (configurable via PK_WS_PORT).
Messages from supervisor to client:
{ "type": "event", "data": { "type": "PortDiscovered", "payload": {...} } }
{ "type": "action_start", "data": { "name": "port_scan" } }
{ "type": "action_end", "data": { "name": "port_scan" } }
{ "type": "output", "data": { "action": "port_scan", "line": "80/tcp open http" } }Environment
DATABASE_URL- Postgres connection stringPK_WS_PORT- WebSocket server port (default: 3200)PK_ATTACKBOX- Docker container name (default: promptkiddie-attackbox)
