load Jar
Load every KSLModelBundle from the JAR at jarPath. The outcome depends on whether that path — and that path's content — is already loaded:
New path — the JAR's bundles are appended. Bundles whose
bundleIdalready exists (from a different source) are dropped, first-registration-wins, matching BundleModelProvider's duplicate handling. Returns LoadBundleResult.Loaded, or LoadBundleResult.AlreadyLoaded if everybundleIdwas already present elsewhere.Same path, identical content (same SHA-256) — no-op; returns LoadBundleResult.AlreadyLoaded.
Same path, changed content (a rebuilt JAR) — the prior bundles from that path are replaced by the freshly-loaded ones so the picker serves the new code, and returns LoadBundleResult.Reloaded. The displaced bundles' classloaders are NOT closed immediately (a run in flight, or an already-built model, may still depend on them); they move to an internal retired list and are closed in close. See the retired field.
No bundles in the JAR — returns LoadBundleResult.NoBundles.
Load failure — returns LoadBundleResult.Failed.
onBundlesChanged fires only on Loaded and Reloaded (the cases that change the loaded set), not on AlreadyLoaded, NoBundles, or Failed.
Reload is keyed on sourceJar (the JAR is the atomic classloader unit), so classpath-loaded bundles (sourceJar == null) are never displaced by it.