feat(page-data): add validation suggestions, repair path, and thinking fixes
Memind CI / Test, build, and release guards (push) Failing after 3m18s

Map Page Data failure codes to Chinese remediation hints, trigger one-shot
goosed repair for remediable cases, and recover poisoned thinking sessions.
Route local DeepSeek through the no-think proxy via host.docker.internal so
tool rounds no longer hit reasoning_content 400; document gate and case-study
scenarios for event registration repair.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-25 23:01:55 +08:00
parent 6b6f9ed01c
commit 8ccf2db05c
28 changed files with 1652 additions and 154 deletions
+8 -25
View File
@@ -19,6 +19,7 @@ import {
import { listPageAccessPolicies } from './page-data-policy-store.mjs';
import { buildPublicUrl, resolvePageDataDeliveryBaseUrl } from './user-publish.mjs';
import { detectProhibitedBrowserStorage } from './mindspace-browser-storage-policy.mjs';
import { buildPageDataValidationRepairPrompt } from './page-data-validation-suggestions.mjs';
export { inferPageDataBindAccessMode };
@@ -436,31 +437,13 @@ export function buildPageDataCollectRepairPrompt({
htmlIssues = [],
unboundFiles = [],
} = {}) {
const lines = [
'【系统交付门禁】本轮用户已要求使用专属 PostgreSQL 数据空间,但 Page Data 页面交付尚未验证完成。请立即按 page-data-collect 技能修复:',
'1. load_skill → page-data-collect',
'2. 确保 public/*.html 引入 /assets/page-data-client.js,且 JS 使用 MindSpacePageData.createClient({ apiBase: "/api" })',
'3. 禁止 /api/page-data/ 旁路、localStorage 或自建后端',
'4. 对每个 public/*.html 调用 private_data_bind_workspace_page(问卷页 public insert,后台页 password read,口令默认 88888888',
'5. 向用户交付的链接必须使用 Portal(本地 http://127.0.0.1:8081),不要用 Vite 5173',
];
if (htmlIssues.length) {
lines.push('', 'HTML 问题:');
for (const item of htmlIssues) {
lines.push(`- ${item.relativePath}: ${item.issue}`);
}
}
if (unboundFiles.length) {
lines.push('', '尚未 bind 的 Page Data 页面:');
for (const file of unboundFiles) {
const reasons = Array.isArray(file.bindReasons) && file.bindReasons.length
? ` (${file.bindReasons.join(', ')})`
: '';
lines.push(`- ${file.relativePath}${reasons}`);
}
}
lines.push('', '修复完成前不要告诉用户“已发布/已可提交”。');
return lines.join('\n');
// Tier A suggestions are folded into the goosed repair turn so the agent
// receives actionable Chinese remediation, not only raw issue ids.
return buildPageDataValidationRepairPrompt({
htmlIssues,
unboundFiles,
message: '本轮用户已要求使用专属 PostgreSQL 数据空间,但 Page Data 页面交付尚未验证完成。',
});
}
export function shouldRetryPageDataCollectReply({