Correctness:
- controlplane-db.ts: add claimTask() — atomically updates task status
from 'pending' to 'in_progress' via conditional UPDATE. Returns false
if already claimed, preventing double-execution between onTaskCreated
callback and heartbeat loop.
- controlplane-heartbeat.ts: claim task before running agent in both
the on-demand task loop and the per-agent heartbeat task pickup.
Skip with 'task_already_claimed' if race lost.
Dead code removed:
- config.ts: remove ENCRYPTED_DIR, ENCRYPTED_SCREENSHOTS_DIR,
TMP_SKILLS_DIR, SCREENSHOTS_DIR, AGENT_LOG_FILE, AGENT_ERROR_LOG
(never imported outside config.ts)
- controlplane-db.ts: remove getAgentById (never imported)
Docs:
- GIT-JAIL-FORGEJO-HANDOFF.md: note SSH automation in setup/git.ts,
GIT_LOCAL_URL injection, local-first skills update
- MULTI-PROVIDER-ARCHITECTURE.md: note current default zai/glm-5-turbo
and just pi-config for runtime changes
Build: pass | Tests: not run (Linux) (Sam & Claude)