refactor(agent): remove executeAgentToolWorkflow and invoke core services directly (#362)

* refactor(agent): remove executeAgentToolWorkflow and invoke core services directly

* fix(core): ensure creation atomicity, strict assetType filtering, and id-desc listing
This commit is contained in:
Yiling-J
2026-08-29 15:19:08 +08:00
committed by GitHub
parent 4b62c31f29
commit 083753a96d
27 changed files with 1044 additions and 1554 deletions
+4 -1
View File
@@ -160,9 +160,12 @@ export const updateAssetNameRequestSchema = z.object({
})
export type UpdateAssetNameRequest = z.infer<typeof updateAssetNameRequestSchema>
export const assetTypeFilterSchema = z.enum(['file', 'folder', 'all'])
export type AssetTypeFilter = z.infer<typeof assetTypeFilterSchema>
export const listChildrenRequestSchema = z.object({
assetId: z.string().optional(),
assetType: z.string(),
assetType: assetTypeFilterSchema.optional().default('all'),
projectId: z.string().optional(),
showDeleted: z.boolean().optional(),
prefix: z.string().optional(),
+2 -1
View File
@@ -1,6 +1,7 @@
import { z } from 'zod'
import { UserType } from '@shumai/db/enums'
import { paginationPageInfoSchema, paginationParamsSchema } from './pagination'
import { assetTypeFilterSchema } from './asset'
export const createProjectRequestSchema = z.object({
name: z.string(),
@@ -58,7 +59,7 @@ export type ProjectUserInfo = z.infer<typeof projectUserInfoSchema>
export const recentlyDeletedRequestSchema = z
.object({
assetType: z.string(),
assetType: assetTypeFilterSchema.optional().default('all'),
sort: z.enum(['createdAt', 'name', 'size']).optional(),
order: z.enum(['asc', 'desc']).optional(),
})