feat: add generate_docx sandbox MCP tool for public Word downloads

Expose generate_docx in mindspace-sandbox-mcp so agents can write public/*.docx
before linking HTML download pages, with tests mirroring the Mark summary flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-04 00:18:43 +08:00
parent 702871a98c
commit 52c7082c70
5 changed files with 232 additions and 2 deletions
+2
View File
@@ -194,6 +194,7 @@ test('sandboxMcpTools returns correct tool list based on capabilities', () => {
'write_file',
'edit_file',
'create_dir',
'generate_docx',
'generate_long_image',
'private_data_info',
'private_data_schema',
@@ -257,6 +258,7 @@ test('static_publish with sandboxMcp uses stdio sandbox-fs extension instead of
assert.equal(sandboxExt.args[1], '/opt/h5/MindSpace/abc123'); // also passed as argv[2]
assert.ok(sandboxExt.available_tools.includes('write_file'));
assert.ok(sandboxExt.available_tools.includes('read_file'));
assert.ok(sandboxExt.available_tools.includes('generate_docx'));
assert.ok(sandboxExt.available_tools.includes('generate_long_image'));
// built-in developer extension should only remain for read_image (image_read: true by default)