feat(mindspace): add page quota grace write and local delivery guardrails.
Memind CI / Test, build, and release guards (pull_request) Failing after 18s

Centralize page HTML quota checks with grace-write semantics across page
services and workspace tools, keep localhost MindSpace links clickable in
chat display, and expand Page Data/static-page skill plus local dev docs
for quota, delivery URLs, and native Aider/OpenHands tooling.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-30 10:27:16 +08:00
parent b553107817
commit 371900bae5
18 changed files with 503 additions and 39 deletions
+11 -2
View File
@@ -32,8 +32,17 @@ export function stripMindSpaceContextPrefix(text) {
return next;
}
const ASSISTANT_DELIVERABLE_RE =
/\[[^\]]+\]\(https?:\/\/[^)]+\)|https?:\/\/(?:m\.)?[^/\s]*tkmind\.(?:cn|ai)\/MindSpace\//i;
/** MindSpace 交付链接:生产域名与本地 dev127.0.0.1 / localhost)都必须可点击,不可被架构脱敏替换。 */
export const MINDSPACE_DELIVERABLE_ORIGIN_RE =
'(?:127\\.0\\.0\\.1|localhost):\\d+|(?:m\\.)?[^/\\s]*tkmind\\.(?:cn|ai)';
const ASSISTANT_DELIVERABLE_RE = new RegExp(
[
'\\[[^\\]]+\\]\\(https?:\\/\\/[^)]+\\)',
`https?:\\/\\/${MINDSPACE_DELIVERABLE_ORIGIN_RE}\\/MindSpace\\/`,
].join('|'),
'i',
);
const INTERNAL_ASSISTANT_MARKERS = [
/data-mindspace-page-tag/i,