Repository navigation
Description
Summary
The ox_core template and the ox_core scaffold output start both scripts with local Ox = require '@ox_core.lib.init', but neither manifest loads ox_lib, which is what provides the '@resource.module' form of require. The resource is expected to error on its first line at start.
Where
templates/oxcore/client/main.lua:1,templates/oxcore/server/main.lua:1templates/oxcore/fxmanifest.lua:8-12(onlydependency 'ox_core', no ox_lib)mcp-server/tools/scaffold.py:19,mcp-server/tools/scaffold.py:29(FRAMEWORK_INIT_CLIENT/FRAMEWORK_INIT_SERVER,oxcore)mcp-server/tools/scaffold.py:101-103(_build_manifest, usesFRAMEWORK_DEPSonly)mcp-server/tools/manifest_common.py:16(FRAMEWORK_DEPS["oxcore"] = "ox_core")
Details
The ox_core docs say to load it with shared_script '@ox_core/lib/init.lua', or alternatively to use the require function from ox_lib. The '@resource.path' module syntax comes from ox_lib's init.lua. The repo's own skills/framework-detection/SKILL.md:119-121 notes that ox_core resources use require '@ox_lib.init'. Neither templates/oxcore/fxmanifest.lua nor the scaffolded manifest declares shared_script '@ox_lib/init.lua' or dependency 'ox_lib'.
Impact
Every resource from templates/oxcore or scaffold_resource_tool(framework="oxcore") fails on line 1 with a module-not-found (or require nil) error, so Ox is never defined. This is the starting point the plugin offers ox_core users.
Steps to reproduce
- Copy
templates/oxcoreinto a server that runs ox_core (and ox_lib, but not referenced by the resource). ensurethe resource.- The client and server consoles show the error resolving
@ox_core.lib.init.
Suggested fix
Choose one approach and apply it to both the template and the scaffolder:
- Add
shared_script '@ox_lib/init.lua'anddependencies { 'ox_lib', 'ox_core' }, keepingrequire; or - Drop
require, addshared_script '@ox_core/lib/init.lua', and use the globalOx.
For the scaffolder, the ox_lib dependency and shared script need to be emitted by the manifest builder for oxcore (not just FRAMEWORK_DEPS).
Acceptance criteria
-
templates/oxcoreloads on a server with ox_core and ox_lib without errors. -
scaffold_resource_tool(framework="oxcore")emits a manifest that loads whatever the init line requires. - The framework-detection skill and the template agree on the init pattern.
Getting started
- Relevant files:
templates/oxcore/fxmanifest.lua,templates/oxcore/client/main.lua,templates/oxcore/server/main.lua,mcp-server/tools/scaffold.py - How to run checks: there is no test suite yet; run the MCP server with
cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in.github/workflows/validate.yml - Related docs:
skills/framework-detection/SKILL.md, ox_core documentation (overextended)
Filed by repo-audit/full-audit at 701824d. Severity: high. Effort: S. audit-key: bug|templates/oxcore/fxmanifest.lua|ox_lib
Activity
TMHSDigital commentedon Nov 21, 2026
Fixed in ce8b804.
The ox_core template and generated manifests now depend on ox_lib and load '@ox_lib/init.lua' before the scripts that call
require; the framework-detection skill documents it.Verified: Checked the template manifest and the output of scaffold_resource and generate_manifest for framework oxcore (ox_lib dependency and shared script present) and that other frameworks are unchanged. Not run on a live FXServer.