fix(agent): recover stale runs and improve new-user OA delivery

Fix DEV logout cookie clearing, materialize selected MindSpace OA assets before agent runs, and recover zombie runs from synced workspace pages. Add client run wait timeout, harness retry limits, page-edit asset forwarding, and logout/john2 scenario tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-10 20:05:52 +08:00
parent aede1e6fcb
commit 7f8d692d16
34 changed files with 1318 additions and 125 deletions
+4 -2
View File
@@ -2534,8 +2534,7 @@ export async function testLlmProviderKey(
}
export async function logout(): Promise<void> {
if (import.meta.env.DEV) return;
await fetch('/auth/logout', { method: 'POST' });
await fetch('/auth/logout', { method: 'POST', credentials: 'same-origin' });
}
export async function resumeSession(
@@ -2658,6 +2657,9 @@ export async function createAgentRun(
...(options.toolMode ? { tool_mode: options.toolMode } : {}),
...(options.taskType ? { task_type: options.taskType } : {}),
...(options.forceDeepReasoning ? { force_deep_reasoning: true } : {}),
...(options.selectedAssetIds?.length
? { selected_asset_ids: options.selectedAssetIds }
: {}),
}),
},
{ timeoutMs: AGENT_CONNECT_TIMEOUT_MS },