mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 10:55:27 +00:00
feat: move MCP to /mcp and add teammate operations (#500)
* feat(operations): move MCP to /mcp and add search, comment, metadata, version, and upload operations - Serve the MCP server at /mcp instead of /api/mcp - Add search_assets, copy_assets, get_folder_instructions, list_comments, create_comment, resolve_comment, list_metadata_fields, update_asset_metadata, create_version_stack, list_versions, and remove_version on the agent, MCP, and CLI - Add create_file and create_version (agent, MCP) with Creation Context metadata, and complete_upload (MCP) for presigned two-step uploads - Replace the native agent create_file/create_version tools with Operation-backed ones - Route the comment-complete, metadata, copy, version stack, and AGENTS.md read REST endpoints through their Operations * docs(readme): add built-in MCP server and CLI to features list
This commit is contained in:
@@ -67,18 +67,35 @@ describe('operation-backed agent tools', () => {
|
||||
.map((t) => t.name)
|
||||
.sort(),
|
||||
).toEqual([
|
||||
'copy_assets',
|
||||
'create_comment',
|
||||
'create_file',
|
||||
'create_folder',
|
||||
'create_version',
|
||||
'create_version_stack',
|
||||
'delete_asset',
|
||||
'download_asset',
|
||||
'get_asset_render',
|
||||
'get_folder_instructions',
|
||||
'list_assets',
|
||||
'list_comments',
|
||||
'list_metadata_fields',
|
||||
'list_projects',
|
||||
'list_versions',
|
||||
'move_assets',
|
||||
'read_asset',
|
||||
'remove_version',
|
||||
'rename_asset',
|
||||
'resolve_comment',
|
||||
'search_assets',
|
||||
'update_asset_metadata',
|
||||
])
|
||||
})
|
||||
|
||||
it('does not give the agent complete_upload: its create tools finish uploads themselves', () => {
|
||||
expect(buildOperationTools(ctx).map((t) => t.name)).not.toContain('complete_upload')
|
||||
})
|
||||
|
||||
it('keeps the existing parameter names', () => {
|
||||
const params = (name: string) =>
|
||||
Object.keys((getTool(name).parameters as unknown as { properties: object }).properties)
|
||||
@@ -353,6 +370,7 @@ describe('operation-backed agent tools', () => {
|
||||
id: 'asset-1',
|
||||
name: 'x',
|
||||
type,
|
||||
parentId: null,
|
||||
teamId: 'team-1',
|
||||
projectId: 'proj-1',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user