close
Closes this runner, releasing the resources it owns.
Closes, in order, every Toolset and BaseTool reachable from the root node or agent (walking sub-agents, workflow graphs, and tool nodes), then the pluginManager.
Each resource is closed once, even when reached by multiple paths.
A failure closing one resource never prevents the rest from being closed. Every failure is collected; if there were any, the first is rethrown with the others attached to it via Throwable.addSuppressed.
Calling this more than once is safe as long as the tools, toolsets, and plugins involved are themselves idempotent, which AutoCloseable strongly recommends of its implementers.
Services that were supplied by the caller (sessionService, artifactService, memoryService) are deliberately not closed -- the runner does not own them, and closing a shared client would break other users of it. Nor does it flush sessionService; what a canceled run, or one that failed with an Error, left pending is for the service's owner to flush.