KSLModel Bundle
The service-provider interface for a self-describing KSL model bundle.
A bundle is a JAR containing one or more KSLBundledModel instances plus the metadata needed to discover, identify, and version them. Bundles are discovered at runtime via java.util.ServiceLoader against this interface; the corresponding registration lives at META-INF/services/ksl.app.bundle.KSLModelBundle inside the JAR.
This interface is GUI-agnostic by design. The four Swing apps are the first consumer, but the same surface is intended to be consumed by a future REST/gRPC host, an MCP server for agent-callable simulation, and a CLI scripting host. Bundle metadata therefore never carries presentation hints (icons, themes, layout); such concerns live in per-consumer sidecars.
Optional metadata (author, homepage, license, tags, recipesFor) has defaulted implementations so the SPI may grow in a backward-compatible fashion: new optional members are added with safe defaults, allowing existing bundle implementations to compile unchanged.
Properties
Short description, typically two or three sentences.
Human-readable name shown in bundle pickers.
The major.minor version of the KSL API the bundle was built against. Loaders may refuse to load (or warn on) a bundle whose kslApiVersion is incompatible with the running KSL build. This is the bundle-level compatibility surface; the descriptor JSON carries its own schema version independently.
The models packaged in this bundle. Building this list must not instantiate ksl.simulation.Model objects — that work is deferred to each KSLBundledModel.builder().