@funeste38/freeland-bros
v0.1.0
Published
Freeland Bros - cube diagnostics, runtime solving and RGBA projection layer on top of freeland and morphing.
Maintainers
Readme
@funeste38/freeland-bros
freeland-bros is the visual and diagnostic layer on top of freeland.
Where freeland answers:
- what is this value?
- how is it normalized?
- is it compatible with a target runtime?
freeland-bros answers:
- how do I project that value into a stable RGBA / cube space?
- how do I explain incompatibility quickly?
- what is the minimal transition plan from one runtime target to another?
It uses:
freelandfor typed resolution@funeste38/morphingfor RGBA / compact transport primitives
Install
npm install @funeste38/freeland-brosMain ideas
Every resolved value becomes a cube:
r= kindg= formatb= runtimea= state
Example:
{
r: "executable",
g: "native-binary",
b: "railway",
a: "compatible"
}API
resolveBrosCube(input, options)resolves a Freeland input and returns both the typed value and the cubebrosCubeFromValue(value, runtime?)projects an existing Freeland value into cube spacediagnoseBrosCompatibility(valueOrCube, targetRuntime)returns a short compatibility reportbuildBrosTransitionPlan(valueOrCube, targetRuntime)returns symbolic transitionsprojectBrosCubeToRgba(cube)returns an RGBA tuple viamorphingrotateBrosCube(cube, axis, turns?)applies deterministic symbolic rotations
Example
import {
resolveBrosCube,
diagnoseBrosCompatibility,
projectBrosCubeToRgba
} from "@funeste38/freeland-bros";
const { value, cube } = await resolveBrosCube(
'manifest:json:{"kind":"executable","variants":{"windows":"path:./bin/piper.exe","linux":"path:./bin/piper"}}',
{ runtime: "railway" }
);
const diagnostic = diagnoseBrosCompatibility(value, "railway");
const rgba = projectBrosCubeToRgba(cube);
console.log(value, cube, diagnostic, rgba);Why this package exists
This layer keeps the core packages clean:
freelandstays a parser / normalizer / adaptermorphingstays a low-level binary primitivefreeland-broshandles symbolic cube logic, visual projection and explanation
Development
npm install
npm run build
npm testLicense
MIT
