mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-19 14:16:29 +00:00
Introduce @shumai/operations (pure definitions: Zod schemas, metadata, CLI hints) and @shumai/core/src/operations (implementOperation and the runOperation pipeline: validate, authorize, prepare, execute, validate output, audit). Migrate list_assets, create_folder, rename_asset, move_assets and delete_asset to Operations, and add list_projects. The agent now builds these tools from the registry, and the folder create/rename, file rename and reparent routes call the same Operations. Audit logs gain a nullable via column recording the surface. A lint rule keeps the Prisma client out of Operation implementations.
19 lines
673 B
TypeScript
19 lines
673 B
TypeScript
export type { OperationContext } from './context'
|
|
export {
|
|
implementOperation,
|
|
type AuditEntry,
|
|
type AuthzCheck,
|
|
type Operation,
|
|
type OperationImplementation,
|
|
type OperationInput,
|
|
type OperationOutput,
|
|
} from './implement'
|
|
export { runOperation } from './run'
|
|
export { getOperation, getOperationsForSurface, operations } from './registry'
|
|
export { createFolderOp } from './asset/create-folder'
|
|
export { deleteAssetOp } from './asset/delete-asset'
|
|
export { listAssetsOp } from './asset/list-assets'
|
|
export { moveAssetsOp } from './asset/move-assets'
|
|
export { renameAssetOp } from './asset/rename-asset'
|
|
export { listProjectsOp } from './project/list-projects'
|