SLPackageSet.sleela
lib/operating-system/SLPackageSet.sleela · 99 line(s) · sleela
<< lib/operating-system/SLPackageSet.sleela
SLeeLa Standard Library Definition.
Definition: Defines SLPackageSet — the userland composition of an OS being
constructed: the seed of packages (the base system plus layered software)
that is installed into the root filesystem. This is the compositional heart
of the design — "the desktop is not the kernel, and the kernel is not the
distribution": each package is an independently versioned unit, and the OS
is their assembled whole.
It mirrors the debootstrap-style model the OS lineage uses: a base seed is
laid down first, then desktop / toolchain / service packages are layered on
top. Packages are accumulated into a newline-separated manifest the ISO
builder consumes to populate the rootfs.
Family: operating-system. Pure design model; no native bridge calls. >>
#sleela 2.5
material;
class SLPackageSet {
< ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
<< Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
or catalog can read and (where appropriate) override this record.
Values are faithful to the subject's real origin where publicly known. >>
String metaVersion = "1.0.0";
int metaId = 10936;
String metaAuthor = "Kiro Agent";
String metaDate = "2026-10-16";
String metaCopyright = "SLeeLa project";
String metaTrademark = "none";
String metaCorporation = "none";
< metaOrigin: National | <nation> | International | Galactic >
String metaOrigin = "International";
String metaBirthDate = "2026-10-10";
< metaScienceRating: maturity/robustness on a 1..10 scale >
int metaScienceRating = 9;
< metaNationalSchedule: a real, citable instrument or "none" >
String metaNationalSchedule = "none";
String getMetaVersion() { return metaVersion; }
void setMetaVersion(String v) { metaVersion = v; }
int getMetaId() { return metaId; }
void setMetaId(int v) { metaId = v; }
String getAuthor() { return metaAuthor; }
void setAuthor(String v) { metaAuthor = v; }
String getDate() { return metaDate; }
void setDate(String v) { metaDate = v; }
String getCopyright() { return metaCopyright; }
void setCopyright(String v) { metaCopyright = v; }
String getTrademark() { return metaTrademark; }
void setTrademark(String v) { metaTrademark = v; }
String getCorporation() { return metaCorporation; }
void setCorporation(String v) { metaCorporation = v; }
String getOrigin() { return metaOrigin; }
void setOrigin(String v) { metaOrigin = v; }
String getBirthDate() { return metaBirthDate; }
void setBirthDate(String v) { metaBirthDate = v; }
int getScienceRating() { return metaScienceRating; }
void setScienceRating(int v) { metaScienceRating = v; }
String getNationalSchedule() { return metaNationalSchedule; }
void setNationalSchedule(String v) { metaNationalSchedule = v; }
< newline-separated "name version" lines >
String manifest;
int count;
int configured;
void configure() { manifest = ""; count = 0; configured = 1; }
< Add a package with an explicit version. >
void add(String name, String version) {
String line = name + " " + version;
if (manifest == "") { manifest = line; } else { manifest = manifest + "\n" + line; }
count = count + 1;
}
< Add a package at an unpinned/"latest" version. >
void addLatest(String name) { add(name, "latest"); }
< Seed the base-system packages a shape needs before any layering. >
void baseSeedForShape(SLOSShape shape) {
if (configured != 1) { configure(); }
if (shape.isWindows()) {
add("ntoskrnl", "10.0"); add("win32-base", "10.0");
add("services.exe", "10.0"); add("explorer", "10.0");
return;
}
if (shape.isMac()) {
add("xnu-base", "24.0"); add("libSystem", "24.0");
add("launchd", "24.0"); add("CoreServices", "24.0");
return;
}
< Linux base seed. >
add("libc", "2.39"); add("coreutils", "9.5");
add("bash", "5.2"); add("systemd", "255");
add("util-linux", "2.40");
}
String packages() { return manifest; }
int packageCount() { return count; }
boolean isEmpty() { return count == 0; }
}