(dir: string)
| 283 | |
| 284 | const PLUGIN_GLOB = new Bun.Glob("{plugin,plugins}/*.{ts,js}") |
| 285 | async function loadPlugin(dir: string) { |
| 286 | const plugins: string[] = [] |
| 287 | |
| 288 | for await (const item of PLUGIN_GLOB.scan({ |
| 289 | absolute: true, |
| 290 | followSymlinks: true, |
| 291 | dot: true, |
| 292 | cwd: dir, |
| 293 | })) { |
| 294 | plugins.push(pathToFileURL(item).href) |
| 295 | } |
| 296 | return plugins |
| 297 | } |
| 298 | |
| 299 | export const McpLocal = z |
| 300 | .object({ |