@aiassesstech/validation-instruments-worker
v0.3.8
Published
Hetzner poll worker for validation instruments I-2 (DeepTeam) and I-6 (ethical-ai)
Maintainers
Readme
@aiassesstech/validation-instruments-worker
Hetzner-side poll worker for I-2 (DeepTeam) and I-6 (ethical-ai) validation instruments.
Architecture
- Polls
GET /api/validation-instruments/worker/pending(HMAC auth) - Claims runs via
POST /api/validation-instruments/worker/claim - Runs bundled Python subprocesses for I-2 / I-6
- I-2 live mode uses Vercel relay (
POST /worker/relay/{runId}) — API keys stay on Vercel - I-6 live mode runs bundled ethical-ai (GPL subprocess quarantine) with provider keys on Hetzner
- Posts results to
POST /api/validation-instruments/ingest - No Neon credentials on VPS — Neon is updated via Vercel ingest only
Install (Hetzner)
npm install -g @aiassesstech/[email protected]
PKG="$(npm root -g)/@aiassesstech/validation-instruments-worker"
# I-6 live (Ubuntu: apt install libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info)
pip install -r "$PKG/python-workers/requirements-i6.txt"
# I-2 live only (separate venv if you also run I-2 on same host)
pip install -r "$PKG/python-workers/requirements-i2.txt"
validation-instruments-worker doctorethical-ai ships inside the npm package at $PKG/ethical-ai/. Override only if needed:
export ETHICAL_AI_ROOT=/custom/pathBundled Python scripts live in $PKG/python-workers/. Override with:
export VALIDATION_PYTHON_WORKERS_DIR=/custom/pathEnvironment
| Variable | Required | Notes |
|----------|----------|-------|
| VALIDATION_API_BASE_URL | Yes | e.g. https://www.aiassesstech.com |
| VALIDATION_WORKER_HMAC_SECRET | Yes | Shared with Vercel |
| VALIDATION_I2_LIVE | I-2 live | 1 — uses relay (batch must be armed) |
| VALIDATION_I6_LIVE | I-6 live | 1 — uses bundled ethical-ai + XAI_API_KEY |
| XAI_API_KEY or GROK_API_KEY | I-6 live | Provider key on Hetzner (not Vercel relay) |
| ETHICAL_AI_ROOT | No | Defaults to bundled $PKG/ethical-ai |
| VALIDATION_PYTHON_WORKERS_DIR | No | Override bundled python-workers |
I-2 live prerequisites
POST /api/validation-instruments/batch/{id}/armwithjudgeKeyBinding+modelKeyBindingsexport VALIDATION_I2_LIVE=1
I-6 live prerequisites
- Arm batch on Vercel (same as I-2)
export VALIDATION_I6_LIVE=1andexport XAI_API_KEY=...(orGROK_API_KEY)- Remove
VALIDATION_I6_STUBif set - Expect 30–60+ minutes per cell (100 questions × 3 samples)
systemd (example)
[Unit]
Description=Validation instruments worker
After=network.target
[Service]
Type=simple
EnvironmentFile=/root/.validation-instruments-worker.env
ExecStart=/usr/bin/validation-instruments-worker poll
Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.targetRollback
Stop the systemd unit. Pending Hetzner runs stay pending in Neon — safe to retry after fix.
Publish (maintainers)
cd packages/validation-instruments-worker
npm run sync-python-workers && npm run sync-ethical-ai && npm run build
npm publish --access public
npm view @aiassesstech/validation-instruments-worker version