shared Module
Cross-tool helpers for the sim toolbox. Every tool inside this
toolbox can pull these in with require(".shared").
Purpose
This module holds the small set of helpers that more than one tool in
the toolbox needs — typically the ok(value, formatted?) /
fail(message, exitCode?) constructors that produce the canonical
simToolResult shape, plus any toolbox-wide parsers,
validators, or shared state. Keep it focused: per-tool implementation
stays inside each <x>.tool/init.luau (with its own --!desc /
--!arg / --!return / --!example annotations).
Usage
local shared = require(".shared")
function M.someTool(...)
if not ok then
return shared.fail("reason", 1)
end
return shared.ok(value, "")
end
Exports
See init.luau for the full export surface. Typical exports include
shared.ok(value, formatted?) and shared.fail(message, exitCode?)
for building the toolbox's standard result envelope.
Scoped to this part · feeds back into the world's score.