mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-07 01:21:37 +00:00
* fix(cursor): in-place relaunch when switching live session to Auto When ACP does not advertise literal auto, switch to Auto by respawning the same hub session under --model auto + session/load instead of rejecting. Keeps #1819 CLI Auto pin semantics. Fixes #1908. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): widen in-place relaunch spawn model typing Allow null/undefined rollback spawn models from resolveCursorSpawnModel. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): re-pin ACP session id after in-place relaunch load If session/load returns a different agent id, update hub metadata the same way as a fresh session so resume stays recoverable. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): coordinate message loop with in-place Auto relaunch Await relaunch completion before prompting, re-read the live backend after model apply, and publish this.backend only after session/load. Addresses tip bot Majors on #1909. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): harden Auto relaunch against prompt races and cleanup Hold promptInFlight before mode apply, end the loop if backend restore fails instead of requeue-spinning, and discard late replacement backends when session teardown has started. Addresses tip bot Majors on #1909. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): avoid continue-in-try circular typing; finish relaunch harden Refactor mismatch requeue off continue-inside-try so typecheck passes, keeping promptInFlight hold and teardown discard for #1909 tip bot Majors. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): preserve queued turns and Auto-review across relaunch failure Requeue dequeued batches before ending when restore fails, and still record Auto-review (slash after publish) when mode flips while backend is null mid-relaunch. Addresses tip bot Majors on #1909 @ 9e5f241f1. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): defer hub ack until Auto relaunch has a live backend Avoid acknowledging queued turns before a usable ACP process exists, and reset Auto-review slash bookkeeping on in-place process replacement. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): recompute Auto-review spawn flag for replacement ACP Slash bookkeeping after in-place relaunch must use the replacement process's --auto-review arg, not the prior process's sticky flag. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): drop queued Auto-review slash when replacement has --auto-review Cursor treats /auto-review as a toggle; leave no leftover slash for a spawn that already enabled Auto-review via the CLI flag. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(cursor): discard held Auto-review toggle after --auto-review relaunch Mark internal toggles so queue reconcile and post-relaunch dispatch drop only HAPI-generated /auto-review slashes, preserving user-sent commands. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>