* Extract the agent ID from the --id command line flag
()
| 14 | * Extract the agent ID from the --id command line flag |
| 15 | */ |
| 16 | function getAgentIdFromArgs(): string | undefined { |
| 17 | const args = process.argv; |
| 18 | const idIndex = args.indexOf("--id"); |
| 19 | if (idIndex !== -1 && idIndex + 1 < args.length) { |
| 20 | return args[idIndex + 1]; |
| 21 | } |
| 22 | return undefined; |
| 23 | } |
| 24 | |
| 25 | export const reportFailureTool: Tool = { |
| 26 | name: "ReportFailure", |