| 1 | import { Tool } from "./types.js"; |
| 2 | |
| 3 | export const exitTool: Tool = { |
| 4 | name: "Exit", |
| 5 | displayName: "Exit", |
| 6 | description: |
| 7 | "Exit the current process with status code 1, indicating a failure or error", |
| 8 | parameters: { |
| 9 | type: "object", |
| 10 | properties: {}, |
| 11 | }, |
| 12 | readonly: false, |
| 13 | isBuiltIn: true, |
| 14 | run: async (): Promise<string> => { |
| 15 | const { gracefulExit } = await import("../util/exit.js"); |
| 16 | await gracefulExit(1); |
| 17 | return ""; |
| 18 | }, |
| 19 | }; |