Log inGet started
Package

capture.toolbox

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

shared Module

Cross-tool helpers for the capture 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 captureToolResult 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.