mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 21:04:59 +00:00
feat(asset-read): rewrite read_asset as a reader registry and Operations
Replace the monolithic agent read_asset tool with a reader registry in @shumai/core/src/asset-read (model3d, image, video, document) behind a shared pipeline that handles access checks, version stacks, annotations, render tasks, and waiting. - Add read_asset and get_asset_render Operations (agent surface only). Renders that outlast the caller's wait budget return "pending" with the workflow task ID; the read request is stored on the task payload so get_asset_render works across restarts and instances (requester only). - Add workflowService.waitFor and presign expiry support. - Keep agent output compatible via an agent tool extension (s3KeyOnly, image blocks, session image details); autofill keeps its team-scoped tool. - Cap video frames at 20 per call; add the get_asset_render agent toggle.
This commit is contained in:
@@ -82,6 +82,11 @@ const BUILTIN_TOOLS = [
|
||||
name: () => m.agent_tool_read_asset_name(),
|
||||
description: () => m.agent_tool_read_asset_desc(),
|
||||
},
|
||||
{
|
||||
id: 'get_asset_render',
|
||||
name: () => m.agent_tool_get_asset_render_name(),
|
||||
description: () => m.agent_tool_get_asset_render_desc(),
|
||||
},
|
||||
{
|
||||
id: 'list_projects',
|
||||
name: () => m.agent_tool_list_projects_name(),
|
||||
|
||||
@@ -609,6 +609,8 @@
|
||||
"agent_tool_read_skill_desc": "Allows the agent to load and read skill definitions to perform specialized actions.",
|
||||
"agent_tool_read_asset_name": "Read Asset",
|
||||
"agent_tool_read_asset_desc": "Allows the agent to view and inspect images, video frames, and document pages.",
|
||||
"agent_tool_get_asset_render_name": "Get Asset Render",
|
||||
"agent_tool_get_asset_render_desc": "Allows the agent to pick up video frames or document pages that took longer to render.",
|
||||
"agent_tool_list_projects_name": "List Projects",
|
||||
"agent_tool_list_projects_desc": "Allows the agent to list the projects you have access to and find their root folders.",
|
||||
"agent_tool_list_assets_name": "Browse Shumai",
|
||||
|
||||
@@ -609,6 +609,8 @@
|
||||
"agent_tool_read_skill_desc": "允许智能体加载和读取技能定义以执行特定操作。",
|
||||
"agent_tool_read_asset_name": "读取资源",
|
||||
"agent_tool_read_asset_desc": "允许智能体查看和分析图片、视频画面和文档页面。",
|
||||
"agent_tool_get_asset_render_name": "获取资源渲染结果",
|
||||
"agent_tool_get_asset_render_desc": "允许智能体获取渲染耗时较长的视频画面或文档页面。",
|
||||
"agent_tool_list_projects_name": "列出项目",
|
||||
"agent_tool_list_projects_desc": "允许智能体列出您有权访问的项目并找到其根文件夹。",
|
||||
"agent_tool_list_assets_name": "浏览 Shumai",
|
||||
|
||||
Reference in New Issue
Block a user