@dudko.dev/baton-format
v0.1.2
Published
Baton workspace file format: parsing, validation, and deterministic serialization.
Maintainers
Readme
baton-format
The workspace file format of Baton, the git-native
API client: parsing, validation, and deterministic serialization for
baton.yaml, collections, folders, requests, environments, and schedules.
Deterministic is the point. Fixed key order, two-space indent, LF endings, and stable quoting mean parse → serialize is idempotent, so a workspace edited by the app, the worker, or an AI agent produces the same bytes and diffs stay small enough to review in a pull request.
import { parseRequestFile, serializeRequestFile } from "@dudko.dev/baton-format";
const request = parseRequestFile(text);
request.name = "List users";
writeFileSync(path, serializeRequestFile(request));The same format is implemented a second time in Dart for the app, and both implementations are pinned to byte-level conformance fixtures — a file written by one is byte-identical to the same file written by the other.
Requires Node.js 24 or newer.
License
Proprietary — see LICENSE.
Free for personal, non-commercial use. Commercial use is free for small entities: your group must have raised less than USD 250,000 in total, be valued at less than USD 250,000, and have annual gross revenue under USD 1,000,000. Above any of the three, commercial use needs a license — write to [email protected].
Redistribution is not permitted. Installing from npm, caching in your own registry proxy, and building your own deployment images are (see Section 4 of the license); republishing, forking, or bundling these packages into something you ship are not.
