mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 15:08:38 +01:00
Verifying the sleep-mode loop surfaced this gap: cloud-mode dispatches go through pending_commands and never created an orchestration_runs row, so agent-hook-bridge.sh:finish_orchestration_run silently no-opped on Vercel (no /tmp/cockpit-run-<tab> sentinel was ever written). - InjectPayload gains an optional runId so the run id can be threaded from server-side dispatch to the local daemon over the pending-commands queue. - /api/orchestration/run cloud-mode block now creates a tracked run row before enqueueing (mirroring the local-mode path), excluding lifecycle intents. runId is returned to the caller so the client can correlate. - cockpit-daemon.sh:inject case reads payload.runId and writes the /tmp/cockpit-run-<tab> sentinel before execute_inject, so the existing stop hook closes the loop unchanged. With this, the next live agent run dispatched from cockpitapp.vercel.app will produce its first end-to-end outcome row. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>