@sunboard/core
v0.3.0
Published
Spec schema, validator, and runtime types for Sunboard.
Readme
@sunboard/core
Spec schema, validator, and runtime types for Sunboard.
Most people don't install this directly. It is a dependency of
@sunboard/reactand is bundled into thesunboardCLI. Install it directly only if you're building tooling that needs to parse, validate, or normalize Sunboard YAML specs outside the CLI.
Install
npm i @sunboard/coreUsage
import { parseAndValidateSpec, normalizeSpec, hashSpec } from "@sunboard/core";
const result = parseAndValidateSpec(yamlSource);
if (result.ok) {
const normalized = normalizeSpec(result.spec);
const hash = hashSpec(normalized);
console.log("Spec is valid. Hash:", hash);
} else {
for (const issue of result.issues) {
console.error(issue.path, issue.message);
}
}Subpath exports
@sunboard/core— spec parsing, validation, normalization, and types.@sunboard/core/runtime-api— runtime API request/response types shared between SDK and server.@sunboard/core/segments— segment rule schema and evaluation helpers.
Links
- CLI + agent skills:
sunboard - App: https://app.sunboardhq.com
- Documentation: https://sunboardhq.com
License
MIT — see LICENSE.
