feat(mindspace): add page quota grace write and local delivery guardrails.
Memind CI / Test, build, and release guards (pull_request) Failing after 2s
Memind CI / Test, build, and release guards (pull_request) Failing after 2s
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:
@@ -32,8 +32,17 @@ export function stripMindSpaceContextPrefix(text) {
|
||||
return next;
|
||||
}
|
||||
|
||||
const ASSISTANT_DELIVERABLE_RE =
|
||||
/\[[^\]]+\]\(https?:\/\/[^)]+\)|https?:\/\/(?:m\.)?[^/\s]*tkmind\.(?:cn|ai)\/MindSpace\//i;
|
||||
/** MindSpace 交付链接:生产域名与本地 dev(127.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,
|
||||
@@ -56,7 +65,8 @@ export const USER_FACING_ARCHITECTURE_TERM_REPLACEMENTS = Object.freeze([
|
||||
[/\b(?:stdio\s*)?mcp\b|\btkmind-search\b|\bsandbox-fs\b/gi, '工具扩展'],
|
||||
[/\bopenhands\b|\baider\b|\blitellm\b/gi, '代码助手'],
|
||||
[/\borchestrator\b|\bmemindadm\b|\bportal\b(?=\s*(?:api|server|runtime|8081|8085))/gi, '后台服务'],
|
||||
[/host\.docker\.internal|127\.0\.0\.1:\d{4,5}/gi, '本地服务'],
|
||||
// 仅脱敏非交付用途的 localhost;MindSpace 公开页链接(…/MindSpace/…)必须保留真实 host:port。
|
||||
[/host\.docker\.internal|(?:127\.0\.0\.1|localhost):\d{4,5}(?!\/MindSpace\/)/gi, '本地服务'],
|
||||
[/platform\/web|web_search|fetch_url|tkmind_search|tkmind_read/gi, '联网搜索'],
|
||||
[/\bpostgres(?:ql)?\b|\bredis\b|\bmysql\b|\bweaviate\b/gi, '数据服务'],
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user