working on api docs

This commit is contained in:
Astronand committed 2026-11-26 21:06:36 -05:00
1 parent 56d8fb2016
commit 38d56ced19
43 files changed
+5669 -618

No files matched your search

+112
View File
@@ -0,0 +1,112 @@
---@meta Hyperion-kernel
--#region kernel
---@class HyperionOS.kernel
--- NOT AVAILBLE IN USERSPACE
--- AT TOP DO "local kernel=..." OF YOUR MODULE
local kernel={}
---@class HyperionOS.kernel
---@field LOG_Text string
---@field version string Human readable version
---@field tag string version tag
---@field process string current process name
---@field users table user translation table
---@field hostname string computer hostname
---@field groups table unused
---@field uid number current task user id
---@field gid number unused?
---@field status string run status
---@field key table a uniq table to identifiy as the kernel if needed
---@field cache {preload:{}} unused
---@field unixSockets table unixSockets table
---@field config HyperionOS.kernel.config
kernel._G=_G
kernel.sleep=sleep
---@class HyperionOS.userspace.syscall
local syscall
kernel.syscalls=syscall
--- Logs a message to the system log and console.
--- @param msg string The message to log
--- @param tag? string Log tag (defaults to "INFO")
--- @param c? number 24-bit RGB color (defaults to 0x6D6D6D)
--- @param nopanic? boolean Prevents a logging error from triggering a kernel panic
function kernel.log(msg, tag, c, nopanic) end
--- Crash the OS and display a message
--- @param msg string
function kernel.panic(msg) end
kernel.PANIC=kernel.panic
--#endregion kernel
--#region userspace
--- Returns the current system time in milliseconds.
--- @return number
function syscall.time() end
--- Returns the current system date.
--- @return string
function syscall.date() end
--- Logs a message to the system log and console.
--- @param msg string The message to log
--- @param tag? string Log tag (defaults to "INFO")
--- @param c? number 24-bit RGB color (defaults to 0x6D6D6D)
--- @param nopanic? boolean Prevents a logging error from triggering a kernel panic
function syscall.log(msg, tag, c, nopanic) end
--- Returns the HyperionOS version tag.
--- @return string
function syscall.tag() end
--- Returns the system uptime.
--- @return number
function syscall.getUptime() end
--- Returns a username.
--- @param uid? number User ID (defaults to current user)
--- @return string?
function syscall.getUsername(uid) end
--- Returns the system hostname.
--- @return string
function syscall.getHostname() end
--- Returns the host environment identifier.
--- @return string
function syscall.getHost() end
--- Returns the HyperionOS version.
--- @return string
function syscall.version() end
--- Changes the system hostname. Requires root.
--- @param name string New hostname
function syscall.setHostname(name) end
--- Returns the system architecture.
--- @return string
function syscall.arch() end
--- Returns a list of registered syscall names.
--- @return string[]
function syscall.sysdump() end
--- Reboots the system. Requires root or wheel group.
function syscall.reboot() end
--- Shuts down the system. Requires root or wheel group.
function syscall.shutdown() end
--- Halts the system. Requires root or wheel group.
function syscall.halt() end
--- Saves the system log. Requires root or wheel group.
function syscall.saveLog() end
--#endregion userspace