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
+3 -2
View File
@@ -174,8 +174,9 @@ export function buildChatSkillPrompt(promptKey, skillName) {
return '请深入分析以下内容,给出结构化解读:背景、关键发现、风险或机会、以及建议下一步:';
case 'generate-page':
return (
`请使用 ${skillName ?? PUBLISH_SKILL_NAME} 技能:在我的专属 MindSpace 发布目录生成静态 HTML 页面,并给出可公网访问的完整链接。` +
'默认只生成 HTML:必须先 load_skill,再用 write_file/edit_file 写入 public/页面.html完成后直接返回 Markdown 可点击公网链接 `[页面标题](URL)`。' +
`请使用 ${skillName ?? PUBLISH_SKILL_NAME} 技能:在我的专属 MindSpace 发布目录生成 HTML 页面,并给出可公网访问的完整链接。` +
'默认只生成 HTML:必须先 load_skill,再用 write_file/edit_file 写入 public/页面.html允许图表、动画等动态效果,但脚本必须适合沙箱发布,优先使用平台已支持的本地/可信库,禁止 javascript:、onxxx 内联事件、未知第三方脚本和跨用户私有资源。' +
'完成前必须验证文件已写入、页面安全检查/发布状态可用、链接返回 200 且正文包含关键数据;验证失败时不要宣称“已完成”,应修复后再回复 Markdown 可点击公网链接 `[页面标题](URL)`。' +
'禁止只给本地路径(如 hello/index.html),禁止询问是否还要发布,除非写文件工具实际失败。' +
'只有用户明确要求 Word / docx 下载时,才先 `load_skill` → `docx-generate`,生成 `public/*.docx` 并确认文件已存在,再写 HTML 并用同目录相对路径链接该文档。' +
'只有用户明确要求长图下载时,才先 `load_skill` → `long-image-download`,调用 `generate_long_image` 生成 `public/*.long.png` 并确认文件已存在,再给长图预览链接和 `?download=long-image` 下载链接。不要在没有明确需求时强制生成伴生文件。'