fork of prime agent with changes i want but are not upstreamable probqbly (and some fixes)

Steer heartbeats by default with configurable delivery mode (#358) master

* feat(coding-agent): steer heartbeats by default with configurable delivery mode Scheduled heartbeat prompts now steer (interrupt the current turn) by default instead of queueing as follow-up messages. Delivery mode is configurable as "steer" or "follow_up" for both user /heartbeat jobs and internal rlm_heartbeat jobs, which share the cron scheduler plumbing. - Add AgentHeartbeatDeliveryMode with DEFAULT_HEARTBEAT_DELIVERY_MODE=steer - Persist deliveryMode on heartbeat/rlm_heartbeat cron jobs - /heartbeat accepts --steer/--follow-up (and --deliver <mode>) - rlm_heartbeat skill create/update accept delivery_mode - shouldDeferHeartbeatCronJob is delivery-mode-aware: steer heartbeats interrupt a plain streaming turn, follow_up still defers - Update CLI/slash help, autocomplete, protocol/connection types, and docs * fix(coding-agent): validate heartbeat delivery mode edge cases Address Macroscope findings on PR #358: - Parse delivery flags that appear after the /heartbeat instruction. - Normalize and validate daemon heartbeat_set deliveryMode before persisting. - Clear stale queued RLM heartbeat follow-ups when only deliveryMode changes. Adds focused regressions for each case. * fix(coding-agent): keep middle heartbeat delivery flags literal Consume /heartbeat delivery flags only from option positions: leading flags, trailing flags, or immediately after the interval. This preserves literal mentions of --follow-up/--steer in the middle of free-form instructions while still supporting trailing opt-out syntax. * fix(coding-agent): clear queued steered heartbeat prompts Address Cursor Bugbot's PR #358 finding: steer-delivered heartbeat prompts can queue in the steering queue, so pause/clear/replace cleanup must remove them by heartbeat queue key just like follow-up heartbeat prompts. Adds queueKey support for steering messages and a regression covering queued steered heartbeat removal. * fix(coding-agent): reject invalid heartbeat delivery flag values Strictly validate --deliver values in /heartbeat command option positions so invalid delivery modes cannot silently become part of the instruction text. Keeps delivery-like text in the middle of free-form instructions literal. * fix(coding-agent): preserve steering queue keys across restart Steered heartbeat prompts rely on their heartbeat queue key for pause/clear and replace cleanup. Preserve that key in update-restart snapshots and restore it when queued steering messages are replayed. * fix(coding-agent): address heartbeat review findings (fixes #358) * fix(coding-agent): preserve heartbeat delivery mode (fixes #358) * fix(coding-agent): preserve queue keys on expanded steer commands Forward queueKey and agentMessageId through AgentSession.steer() for daemon steer commands that use the normal prompt-expansion path. This keeps keyed cleanup working for steered heartbeat prompts regardless of restore path. --------- Co-authored-by: Kevin Thomas <kevin.jt2007@gmail.com>