(name: string)
| 132 | } |
| 133 | |
| 134 | export const validateName = (name: string) => |
| 135 | /^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(name) |
| 136 | ? Effect.void |
| 137 | : Effect.fail(new RegistrationError({ name, message: `Invalid tool name: ${name}` })) |
| 138 | |
| 139 | export const withPermission = <Input extends SchemaType<any>, Output extends SchemaType<any>>( |
| 140 | tool: Definition<Input, Output>, |