Merge pull request 'feat(mindspace): add page quota grace write and local delivery guardrails' (#41) from codex/mindspace-page-quota-delivery into main
Memind CI / Test, build, and release guards (push) Has been cancelled

This commit was merged in pull request #41.
This commit is contained in:
2026-07-30 02:56:45 +00:00
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,