feat(page-data): complete Phase 4-5, ops UI, and publish integration
Add visitor roles, row-level scope, owner ops APIs, MySQL policy index, Turnstile captcha, browser client SDK, publish-panel dataset binding, acceptance tests, and usage documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -132,7 +132,7 @@ test('sandbox MCP exposes and protects the user private data space', async (t) =
|
||||
test('sandbox MCP registers datasets and page policies for Page Data API', async (t) => {
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'mindspace-sandbox-page-data-'));
|
||||
const server = startSandbox(root, {
|
||||
ALLOWED_TOOLS: 'private_data_execute,private_data_register_dataset,private_data_set_page_policy',
|
||||
ALLOWED_TOOLS: 'private_data_execute,private_data_register_dataset,private_data_set_page_policy,private_data_close_page_dataset',
|
||||
PRIVATE_DATA_USER_ID: 'user-1',
|
||||
});
|
||||
t.after(() => server.child.kill());
|
||||
@@ -187,6 +187,15 @@ test('sandbox MCP registers datasets and page policies for Page Data API', async
|
||||
const saved = JSON.parse(fs.readFileSync(path.join(root, '.mindspace', 'page-data-policies', 'page-1.json'), 'utf8'));
|
||||
assert.equal(saved.pageId, 'page-1');
|
||||
assert.equal(saved.datasets.signups.insert, true);
|
||||
|
||||
const close = await server.request('tools/call', {
|
||||
name: 'private_data_close_page_dataset',
|
||||
arguments: { pageId: 'page-1', dataset: 'signups' },
|
||||
});
|
||||
assert.equal(close.result.isError, false);
|
||||
const closed = JSON.parse(close.result.content[0].text);
|
||||
assert.equal(closed.closed, true);
|
||||
assert.equal(closed.insert, false);
|
||||
});
|
||||
|
||||
test('sandbox MCP exposes schedule tools only when schedule env is configured', async (t) => {
|
||||
|
||||
Reference in New Issue
Block a user