(agentId: string)
| 414 | * Call this when an agent completes, fails, or is aborted to free memory. |
| 415 | */ |
| 416 | export function unregisterAgent(agentId: string): void { |
| 417 | if (!isEnabled) return |
| 418 | agentRegistry.delete(agentId) |
| 419 | agentIdToProcessId.delete(agentId) |
| 420 | } |
| 421 | |
| 422 | /** |
| 423 | * Start an API call span |