CyberM.resource.generation([resource])
Generation number, incremented on every reload.
With no argument, returns the current resource generation. Pass a resource name to inspect that resource, or receive nil when it is missing.
Registered in ResourceHost.cpp as LuaResourceGeneration (line 6518).
CyberM.resource.hasPermission(permission)
Whether the resource holds this permission.
Checks whether the current resource manifest grants an exact CyberM capability. It is a read-only convenience check; native APIs still enforce their own permission and must handle refusal results.
Registered in ResourceHost.cpp as LuaHasPermission (line 6522).
CyberM.resource.name()
Name of the current resource.
Returns the current resource's immutable manifest name. This is equivalent to GetCurrentResourceName() and remains stable for the lifetime of the resource definition.
Registered in ResourceHost.cpp as LuaResourceName (line 6517).
CyberM.resource.readFile(path)
Reads a file from the resource, within its declared allowlist.
Reads a file declared by the current resource manifest through a safe relative path. Undeclared files, traversal, oversized content and host filesystem paths are rejected.
Registered in ResourceHost.cpp as LuaReadFile (line 6521).
CyberM.resource.state([resource])
State of a resource.
Returns the lifecycle state known for a resource name, or for the current resource when omitted. It is an immediate snapshot and does not wait for dependencies or mutate lifecycle state.
Registered in ResourceHost.cpp as LuaGetResourceState (line 6520).
CyberM.resource.version()
Version declared in cyberm.lua.
Returns the version string declared by the current resource manifest. It is package metadata and is unrelated to the CyberM runtime or Lua interpreter version.
Registered in ResourceHost.cpp as LuaResourceVersion (line 6519).