Home /Modules/os-level-support/SLOsSupportCatalog.sleela

SLOsSupportCatalog.sleela

lib/os-level-support/SLOsSupportCatalog.sleela · 227 line(s) · sleela

<< SLeeLa Standard Library Definition.
  Definition: Canonical taxonomy, grouping terms, and portable OS-support API catalogue.
  All lists are descriptive catalogues. Native operations are performed only by
  a registered VM/native bridge and the host OS permission model. >>
#sleela 2.5
material;

class SLOsSupportCatalog {
  < ---- 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 each record.
     Values are faithful to the subject's real origin where publicly known. >>
  String metaVersion = "1.0.0";
  int metaId = 0;
  String metaAuthor = "mearvk";
  String metaDate = "2026-11-05";
  String metaCopyright = "Copyright mearvk LLC";
  String metaTrademark = "none";
  String metaCorporation = "mearvk LLC";
  < metaOrigin: National | <nation> | International | Galactic >
  String metaOrigin = "International";
  String metaBirthDate = "2026-11-05";
  < metaScienceRating: maturity/robustness on a 1..10 scale >
  int metaScienceRating = 8;
  < metaNationalSchedule: a real, citable instrument or "none" >
  String metaNationalSchedule = "none";

  String getMetaVersion() { return metaVersion; }
  void setMetaVersion(String value) { metaVersion = value; }
  int getMetaId() { return metaId; }
  void setMetaId(int value) { metaId = value; }
  String getMetaAuthor() { return metaAuthor; }
  void setMetaAuthor(String value) { metaAuthor = value; }
  String getMetaDate() { return metaDate; }
  void setMetaDate(String value) { metaDate = value; }
  String getMetaCopyright() { return metaCopyright; }
  void setMetaCopyright(String value) { metaCopyright = value; }
  String getMetaTrademark() { return metaTrademark; }
  void setMetaTrademark(String value) { metaTrademark = value; }
  String getMetaCorporation() { return metaCorporation; }
  void setMetaCorporation(String value) { metaCorporation = value; }
  String getMetaOrigin() { return metaOrigin; }
  void setMetaOrigin(String value) { metaOrigin = value; }
  String getMetaBirthDate() { return metaBirthDate; }
  void setMetaBirthDate(String value) { metaBirthDate = value; }
  int getMetaScienceRating() { return metaScienceRating; }
  void setMetaScienceRating(int value) { metaScienceRating = value; }
  String getMetaNationalSchedule() { return metaNationalSchedule; }
  void setMetaNationalSchedule(String value) { metaNationalSchedule = value; }
  String catalogVersion = "1.0.0";
  String packageName = "os-level-support";
  String commonNamespace = "osls";
  String runtimeNamespace = "osls_runtime";
  String loaderNamespace = "sl_native";

  String getCatalogVersion() { return catalogVersion; }
  String getPackageName() { return packageName; }

  < Canonical capability groups; terms are stable grouping identifiers. >
  SLList getGroupTerms() {
    SLList out = new SLList();
    out.add("HostIdentity");
    out.add("ProcessInspection");
    out.add("ProcessControl");
    out.add("Environment");
    out.add("FileSystem");
    out.add("PathManagement");
    out.add("VolumeStorage");
    out.add("CPUArchitecture");
    out.add("MemoryManagement");
    out.add("TimeClock");
    out.add("TimeZoneCalendar");
    out.add("NetworkInterfaces");
    out.add("NetworkConfiguration");
    out.add("SocketIO");
    out.add("Scheduling");
    out.add("TimersAndWait");
    out.add("RuntimeEvents");
    out.add("CooperativeTasks");
    out.add("DynamicModules");
    out.add("CapabilityDiscovery");
    out.add("ErrorDiagnostics");
    out.add("SecurityBoundary");
    out.add("VMInterop");
    out.add("PlatformExtensions");
    return out;
  }

  < Existing portable C ABI functions, alphabetically. >
  SLList getCommonOSLSFunctions() {
    SLList out = new SLList();
    out.add("osls_cron_next_after");
    out.add("osls_cron_validate");
    out.add("osls_enumerate_environment");
    out.add("osls_enumerate_processes");
    out.add("osls_get_cpu_info");
    out.add("osls_get_environment_value");
    out.add("osls_get_file_info");
    out.add("osls_get_network_interfaces");
    out.add("osls_get_process_info");
    out.add("osls_get_system_info");
    out.add("osls_get_timezone_info");
    out.add("osls_list_directory");
    return out;
  }

  < Current in-process runtime API, alphabetically. >
  SLList getRuntimeFunctions() {
    SLList out = new SLList();
    out.add("osls_runtime_create");
    out.add("osls_runtime_destroy");
    out.add("osls_runtime_emit");
    out.add("osls_runtime_pending");
    out.add("osls_runtime_post");
    out.add("osls_runtime_run_one");
    out.add("osls_runtime_subscribe");
    out.add("osls_runtime_unsubscribe");
    return out;
  }

  < Current native module loader API, alphabetically. >
  SLList getModuleFunctions() {
    SLList out = new SLList();
    out.add("sl_native_abi_version");
    out.add("sl_native_close");
    out.add("sl_native_loader_error");
    out.add("sl_native_open");
    out.add("sl_native_run");
    out.add("sl_native_run_module");
    out.add("sl_native_status_string");
    return out;
  }

  << Read-only inspection functions registered and VM-callable since revision
     1.1 through OP_OSLS_CALL operation IDs 12..24. These WERE planned; they are
     now exported and reachable, joining the original twelve (ids 0..11) for 25
     registered osls_* calls in total. >>
  SLList getRegisteredInspectionFunctions() {
    SLList out = new SLList();
    out.add("osls_get_available_memory");
    out.add("osls_get_capabilities");
    out.add("osls_get_disk_space");
    out.add("osls_get_memory_info");
    out.add("osls_get_native_error");
    out.add("osls_get_path_info");
    out.add("osls_get_runtime_info");
    out.add("osls_get_system_load");
    out.add("osls_get_volume_info");
    out.add("osls_network_resolve");
    out.add("osls_path_join");
    out.add("osls_path_normalize");
    out.add("osls_path_resolve");
    return out;
  }

  << State-changing and handle/stream functions that remain PLANNED and are
     deliberately NOT registered through the read-only OP_OSLS_CALL path. Per
     DESIGNATE.md section 9 each of these mutates host state, opens an opaque
     handle, or blocks, so it must be specified with its own explicitly granted
     capability (not the default host-read) and invoked as a distinct
     state-changing operation. Listing one here never makes it callable. >>
  SLList getStateChangingPlannedFunctions() {
    SLList out = new SLList();
    out.add("osls_close");
    out.add("osls_copy_file");
    out.add("osls_create_directory");
    out.add("osls_file_read");
    out.add("osls_file_write");
    out.add("osls_flush_file");
    out.add("osls_get_socket_info");
    out.add("osls_move_file");
    out.add("osls_open_file");
    out.add("osls_open_socket");
    out.add("osls_read_file");
    out.add("osls_remove_directory");
    out.add("osls_remove_file");
    out.add("osls_rename_file");
    out.add("osls_sleep");
    out.add("osls_socket_accept");
    out.add("osls_socket_bind");
    out.add("osls_socket_close");
    out.add("osls_socket_connect");
    out.add("osls_socket_listen");
    out.add("osls_socket_receive");
    out.add("osls_socket_send");
    out.add("osls_socket_set_option");
    out.add("osls_socket_wait");
    out.add("osls_timer_cancel");
    out.add("osls_timer_create");
    out.add("osls_timer_wait");
    out.add("osls_write_file");
    return out;
  }

  < Terms used to organize native backends and normalized VM values. >
  SLList getBackendTerms() {
    SLList out = new SLList();
    out.add("LinuxBackend");
    out.add("WindowsBackend");
    out.add("MacOSBackend");
    out.add("CommonBackendContract");
    out.add("NativeSymbol");
    out.add("PortableOperation");
    out.add("CapabilityRecord");
    out.add("NativeErrorRecord");
    out.add("PermissionOutcome");
    out.add("UnsupportedOutcome");
    out.add("VMValue");
    out.add("VMCallDescriptor");
    return out;
  }

  < Operations must be categorized before a backend call is dispatched. >
  SLList getOperationClassTerms() {
    SLList out = new SLList();
    out.add("ReadOnlyQuery");
    out.add("ReadOnlyEnumeration");
    out.add("ProcessLocalOperation");
    out.add("StateChangingOperation");
    out.add("BlockingOperation");
    out.add("AsynchronousOperation");
    out.add("PermissionSensitiveOperation");
    out.add("UnsupportedOperation");
    return out;
  }
}