Add MindSpace page live edit, chat skills, and H5 deploy tooling.

Introduce page edit sessions with draft preview and patch API, chat skill picker, user memory profile, h5ApiBase resolution, voice WAV transport, and scripts for 105/g2 deployment and Plaza local dev.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
John
2026-06-15 22:09:38 -07:00
parent 3cd322ccfe
commit 6ee6fd64dd
94 changed files with 7015 additions and 2136 deletions
+38
View File
@@ -0,0 +1,38 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import {
buildMindSpacePageSaveInstructions,
extractMindSpacePagePatch,
mergeMindSpacePagePatch,
} from './mindspace-page-patch.mjs';
test('extractMindSpacePagePatch parses assistant update block', () => {
const text = `好的,标题已更新。
\`\`\`mindspace-page-update
{"title":"新标题","summary":"新摘要"}
\`\`\``;
assert.deepEqual(extractMindSpacePagePatch(text), {
title: '新标题',
summary: '新摘要',
});
});
test('mergeMindSpacePagePatch keeps unchanged fields', () => {
assert.deepEqual(
mergeMindSpacePagePatch(
{ title: '旧标题', summary: '旧摘要', content: '正文' },
{ title: '新标题' },
),
{ title: '新标题', summary: '旧摘要', content: '正文' },
);
});
test('buildMindSpacePageSaveInstructions mentions page id and block format', () => {
const lines = buildMindSpacePageSaveInstructions({
id: 'page-1',
contentFormat: 'markdown',
});
assert.match(lines.join('\n'), /page-1/);
assert.match(lines.join('\n'), /mindspace-page-update/);
});