Log inGet started
What it does

shared

Cross-tool helpers for the blender toolbox. Every tool inside the toolbox can pull these in with require(".shared"). Holds the small set of helpers that more than one tool needs — typically the ok(value, formatted?) / fail(message, exitCode?) constructors that produce the canonical blenderToolResult shape, plus any toolbox-wide parsers, validators, or shared state. Per-tool implementation stays inside each <x>.tool/init.luau; this module is not a place to forward logic from.

Exports

  • M.ok(value: any?, formatted: string?) -> blenderToolResult — success envelope (exitCode = 0, ok = true).
  • M.fail(message: string, exitCode: number?) -> blenderToolResult — failure envelope (exitCode defaults to 1, ok = false).

Types:

  • blenderToolResult = { stdout: string, stderr: string, exitCode: number, ok: boolean, value: any? }
    • stdout — human-readable formatted output; empty when the op produces no text.
    • stderr — error message on failure; empty on success.
    • exitCode — POSIX-style exit code: 0 success, 1 generic failure, 2 bad arguments.
    • ok — true iff exitCode == 0.
    • value — structured return from the underlying op; nil for void ops.

Usage

local shared = require(".shared")

function M.someTool(args)
    if not args.id then
        return shared.fail("missing id", 2)
    end
    return shared.ok({ id = args.id }, "created " .. args.id)
end

Notes

  • Pure constructors — no engine calls, no state. Safe to call from any context.
  • Tools that opt into this shape get a stable envelope every other tool in the toolbox can rely on. Tools that do something custom can return whatever shape they want — blenderToolResult is opt-in.
  • Per-tool implementations still own their own --!desc / --!arg / --!return / --!example annotations even when their result is constructed through these helpers.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

0items
This part has no composite children. See the Files segment for its leaf payloads.
This part has no leaf payloads.

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.