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:
@@ -2,6 +2,7 @@ import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import {
|
||||
buildAgentExtensionPolicy,
|
||||
buildPageEditAgentPolicy,
|
||||
CAPABILITY_CATALOG,
|
||||
clampUserCapabilities,
|
||||
DEFAULT_USER_CAPABILITIES,
|
||||
@@ -16,6 +17,9 @@ test('default user policy blocks dangerous capabilities', () => {
|
||||
assert.equal(DEFAULT_USER_CAPABILITIES.extension_admin, false);
|
||||
assert.equal(DEFAULT_USER_CAPABILITIES.static_publish, false);
|
||||
assert.equal(DEFAULT_USER_CAPABILITIES.code_browse, false);
|
||||
assert.equal(DEFAULT_USER_CAPABILITIES.memory_store, true);
|
||||
assert.equal(DEFAULT_USER_CAPABILITIES.skills, true);
|
||||
assert.equal(DEFAULT_USER_CAPABILITIES.chat_recall, true);
|
||||
});
|
||||
|
||||
test('buildAgentExtensionPolicy returns null overrides and auto mode for unrestricted users', () => {
|
||||
@@ -86,3 +90,31 @@ test('catalog keys are unique', () => {
|
||||
const keys = CAPABILITY_CATALOG.map((item) => item.key);
|
||||
assert.equal(keys.length, new Set(keys).size);
|
||||
});
|
||||
|
||||
test('buildPageEditAgentPolicy narrows tools to shell when available', () => {
|
||||
const base = buildAgentExtensionPolicy({
|
||||
...DEFAULT_USER_CAPABILITIES,
|
||||
shell: true,
|
||||
filesystem: true,
|
||||
skills: true,
|
||||
});
|
||||
const narrowed = buildPageEditAgentPolicy(base);
|
||||
assert.equal(narrowed.enableContextMemory, false);
|
||||
assert.equal(narrowed.gooseMode, 'auto');
|
||||
assert.deepEqual(narrowed.extensionOverrides, [
|
||||
{
|
||||
type: 'platform',
|
||||
name: 'developer',
|
||||
description: '',
|
||||
display_name: 'developer',
|
||||
bundled: true,
|
||||
available_tools: ['shell'],
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
test('buildPageEditAgentPolicy without shell keeps empty developer tools', () => {
|
||||
const base = buildAgentExtensionPolicy(DEFAULT_USER_CAPABILITIES);
|
||||
const narrowed = buildPageEditAgentPolicy(base);
|
||||
assert.deepEqual(narrowed.extensionOverrides, []);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user