@caffinate/workflow-format
v0.1.0
Published
Caffinate workflow package format — parser, validator, and packer. Canonical reference implementation of the v1 spec.
Maintainers
Readme
@caffinate/workflow-format
Canonical reference implementation of the Caffinate workflow package format.
This package is used by every Caffinate tool that reads, writes, validates, or
distributes workflow packages — the MCP server (@caffinate/mcp-server),
the backend API, and the web publish flow.
Installation
npm install @caffinate/workflow-format
# or: pnpm add @caffinate/workflow-formatUsage
Validate a manifest
import { safeParseManifest } from "@caffinate/workflow-format";
const result = safeParseManifest(JSON.parse(raw));
if (!result.ok) {
for (const err of result.errors) console.error(err);
} else {
console.log("valid:", result.manifest.slug, result.manifest.version);
}Pack a workflow directory
import { packDirectory } from "@caffinate/workflow-format";
const packed = await packDirectory("./my-workflow");
console.log(`${packed.files.length} files, ${packed.totalBytes} bytes`);
// packed.manifest is the validated Manifest
// packed.files is PackedFile[] — ready to uploadScaffold a blank manifest
import { stubManifest } from "@caffinate/workflow-format";
const manifest = stubManifest({
slug: "my-workflow",
title: "My Workflow",
category: "Content",
});The spec
The full human-readable specification lives in SPEC.md. It describes the directory layout, every manifest field, the integrations table, versioning rules, and the unpacked install layout.
License
MIT
