mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 05:54:44 +00:00
feat(asset-read): rewrite read_asset as a reader registry and Operations (#498)
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:
@@ -61,7 +61,7 @@ describe('operation-backed agent tools', () => {
|
||||
})
|
||||
|
||||
describe('tool definitions', () => {
|
||||
it('keeps the existing tool names and adds list_projects', () => {
|
||||
it('keeps the existing tool names and adds list_projects and get_asset_render', () => {
|
||||
expect(
|
||||
buildOperationTools(ctx)
|
||||
.map((t) => t.name)
|
||||
@@ -69,9 +69,11 @@ describe('operation-backed agent tools', () => {
|
||||
).toEqual([
|
||||
'create_folder',
|
||||
'delete_asset',
|
||||
'get_asset_render',
|
||||
'list_assets',
|
||||
'list_projects',
|
||||
'move_assets',
|
||||
'read_asset',
|
||||
'rename_asset',
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user