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:
@@ -22,3 +22,37 @@ test('lists workspace temp files for cleanup', async () => {
|
||||
assert.equal(items[0].kind, 'workspace_temp');
|
||||
assert.equal(items[0].label, 'draft.html');
|
||||
});
|
||||
|
||||
test('lists stale page versions for cleanup', async () => {
|
||||
const pool = {
|
||||
query: async (sql, params) => {
|
||||
if (sql.includes('FROM h5_upload_sessions')) return [[], []];
|
||||
if (sql.includes('FROM h5_page_versions pv')) {
|
||||
return [
|
||||
[
|
||||
{
|
||||
version_id: 'ver-old',
|
||||
page_id: 'page-1',
|
||||
version_no: 2,
|
||||
content_asset_id: 'asset-old',
|
||||
bundle_asset_id: null,
|
||||
title: 'Demo Page',
|
||||
size_bytes: 4096,
|
||||
display_name: 'Demo Page · v2',
|
||||
created_at: 1000,
|
||||
bundle_size_bytes: 0,
|
||||
},
|
||||
],
|
||||
[],
|
||||
];
|
||||
}
|
||||
return [[], []];
|
||||
},
|
||||
};
|
||||
const cleanup = createCleanupService(pool, { h5Root: os.tmpdir(), storageRoot: os.tmpdir() });
|
||||
const items = await cleanup.listCandidates('user-1', 'john');
|
||||
const stale = items.filter((item) => item.kind === 'stale_page_version');
|
||||
assert.equal(stale.length, 1);
|
||||
assert.equal(stale[0].sizeBytes, 4096);
|
||||
assert.match(stale[0].label, /Demo Page · v2/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user