Home /Modules/vm/VMSharpOSCreatorRun.sleela

VMSharpOSCreatorRun.sleela

lib/vm/vmsharp/VMSharpOSCreatorRun.sleela · 166 line(s) · sleela

<< lib/vm/vmsharp/VMSharpOSCreatorRun.sleela
   SLeeLa Standard Library Definition.
   Definition: VMSharp(TM) -> OS Creator run MODEL (first brush). It wires the
   full path the user described: VMSharp reaches a GitHub repository over its
   networking stack, acquires it (clone / tarball / zip), then runs the OS
   Creator pointed at that repository for its installation instructions, data
   and code. This orchestrator targets mearvk/OS.Sensitivity.III -- the
   OS-grade source warehouse for the SLeeLa OS Creator -- and produces the
   ordered run plan plus the acquisition command and the OS Creator invocation.

   It composes VMSharpNetworkStack (reach), VMSharpRepoAcquisition (clone/tar/
   zip), and the operating-system family's SLOSModel (the OS being built) with
   an SLDistroSource reference to the target repo. The plan is fail-closed: the
   OS Creator step is reported ready only after the repo is reachable and
   acquired.

   Honesty boundary: declarative model only. Nothing is reached, cloned,
   downloaded, unpacked, compiled, or installed here; a real reach+acquire+build
   is performed by the host under the VMSharp OS, honoring the user's
   confirmation and the VMSharpLevy disclosure. The target repository keeps its
   own compliance posture (clean-room; no proprietary code/trademarks),
   respectful of United States law and of the persons and groupings of peoples
   it concerns. Authored for the User MEARVK LLC. Family: vm. >>
#sleela 3.0
material;
class VMSharpOSCreatorRun {
  < ---- 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 = 38007;
  String metaAuthor = "Max Rupplin 2026; George Soros a Kindness 2507+";
  String metaDate = "2026-11-05";
  String metaCopyright = "MEARVK LLC";
  String metaTrademark = "VMSharp";
  String metaCorporation = "MEARVK LLC";
  < metaOrigin: National | <nation> | International | Galactic >
  String metaOrigin = "United States";
  String metaBirthDate = "2026-11-05";
  < metaScienceRating: maturity/robustness on a 1..10 scale >
  int metaScienceRating = 7;
  < 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; }

  < ---- the target OS source warehouse ---- >
  String targetOwner = "mearvk";
  String targetRepo = "OS.Sensitivity.III";
  String targetBranch = "main";
  String targetHost = "github.com";
  String destDir = "vmsharp-os-sensitivity-iii";

  VMSharpNetworkStack netStack;
  VMSharpRepoAcquisition acq;
  VMSharpDiskLayout disk;
  boolean reachable;
  boolean acquired;

  void configure() {
    netStack = new VMSharpNetworkStack();
    acq = new VMSharpRepoAcquisition();
    acq.configure(targetOwner, targetRepo, targetBranch);
    disk = new VMSharpDiskLayout();
    disk.configure();
    reachable = false;
    acquired = false;
  }

  VMSharpNetworkStack network() { return netStack; }
  VMSharpRepoAcquisition acquisition() { return acq; }
  < The initial hard-drive layout (filesystem choice + partition manifest). >
  VMSharpDiskLayout diskLayout() { return disk; }
  String getTargetRepo() { return targetOwner + "/" + targetRepo; }
  String getTargetHost() { return targetHost; }

<< Record that the host resolver reached github.com (caller passes the
   oslsNetworkResolve result). Marks reachable when resolution succeeded. >>
  void recordReach(String addresses) {
    netStack.recordResolution(targetHost, addresses);
    reachable = netStack.isReachable();
  }

<< Mark the repo acquired (caller runs acquisitionCommand() on the host and
   reports success). Acquisition is gated on reachability first. >>
  boolean markAcquired() {
    if (!reachable) { return false; }
    acquired = true;
    return true;
  }

  boolean isReachable() { return reachable; }
  boolean isAcquired() { return acquired; }

  < The acquisition command for the chosen method into the destination dir. >
  String acquisitionCommand() { return acq.acquisitionCommand(destDir); }

  << An SLDistroSource reference to the target repo, so the OS Creator records
     explicit provenance for where its instructions/data/code came from. This
     configures the stock Ubuntu reference then is not used for its URL; the
     VMSharp target is named directly here to keep provenance honest. >>
  String provenanceLine() {
    return "OS Creator source: " + getTargetRepo() + "@" + targetBranch
         + " (" + acq.resourceUrl() + ")";
  }

  << The OS Creator invocation once the repo is acquired: build an SLOSModel
     and point the Creator at the acquired tree for its installation
     instructions, data and code. Returns the command a VMSharp Desktop session
     would run. >>
  String osCreatorCommand() {
    return "sleela os-creator --source " + destDir
         + " --provenance " + getTargetRepo() + "@" + targetBranch
         + " --emit iso";
  }

<< The OS Creator step is ready only after the repo is reachable AND acquired
   AND the initial disk layout is ready (rootable filesystem + FAT ESP + a
   designated target device) -- fail-closed: no build on an unreached or
   unacquired source, and no install onto an unprepared or undesignated disk. >>
  boolean osCreatorReady() { return reachable && acquired && disk.isReady(); }

  << The ordered run plan for the whole first-brush path. A VMSharp Desktop
     session walks these steps; this model lists and gates them. >>
  SLList runPlan() {
    SLList out = new SLList();
    out.add("vmsharp-desktop-up");
    out.add("resolve-" + targetHost);
    out.add("reach-over-network-stack");
    out.add("acquire-repo-" + acq.getMethodName());
    out.add("verify-acquired-tree");
    out.add("choose-root-filesystem-" + disk.getRootFilesystem());
    out.add("designate-target-disk");
    out.add("partition-and-format-disk");
    out.add("build-os-model");
    out.add("point-os-creator-at-source");
    out.add("os-creator-readiness-gate");
    out.add("run-os-creator-emit-iso");
    return out;
  }

  int runPlanSteps() { SLList p = runPlan(); return p.length(); }
}