hayDocs
Documentation / Reference

Package and manifest

The self-contained files and versioned contracts Hay accepts.

A source project contains manifest.json, index.html, and optionally initial-data.json. The SDK builds these into a .hay-plugin.json bundle. Project metadata and build output are not installed.

Manifest fields

FieldContract
schemaVersionExactly hay.app/1.
idStable lower-case identity with dot or hyphen-separated segments, up to 80 characters.
name, description, authorDisplay metadata. Author names are self-reported, not verified.
versionThree non-negative numeric components, such as 0.1.0. No prerelease labels in this format.
entrypointExactly index.html.
icon, colorIcon name and six-digit hex color.
capabilitiesRequested host capabilities. Duplicates and unknown values are refused.
views1–12 named views with unique IDs, titles and descriptions.
intentsUp to 16 prompt suggestions, each pointing to a declared view.
defaultTaskOptional initial task title and declared view ID.
agent.instructionsOptional domain guidance, up to 6,000 characters; cannot grant permissions.

See the quickstart manifest and the public TypeScript contract for complete field types.

Bundle format

json
{
  "schemaVersion": "hay.bundle/1",
  "manifest": {"...": "complete hay.app/1 manifest"},
  "html": "<!doctype html>...",
  "initialData": {
    "state": {"welcome": "Example record"},
    "documents": [{"id": "example", "name": "Example.txt", "text": "Fictional content"}]
  }
}

This is a shape illustration; replace manifest with a complete valid manifest. initialData is optional. Hay’s installed-plugin exports intentionally omit it and omit live workspace data.

Resources and limits

HTML, CSS, and JavaScript must be self-contained. External scripts, resource directories, remote styles, CSS imports, and referenced assets are not supported by version 1. No plugin Node.js process runs in the desktop host.

Source files must be plain files without symlinks and fit within the packager’s 1 MB file limit. HTML is bounded at 1,000,000 characters; the final serialized bundle must fit in 2,000,000 bytes. Registries bound each catalog page or legacy index at 1,000,000 bytes and each bundle at 2,000,000 bytes. Paged browsing has additional aggregate limits.

Unknown package fields, duplicate view or intent IDs, and references to missing views are refused. Validation of structure does not prove that plugin code is safe or useful; review the code you distribute.

Sample data

initial-data.json can seed JSON state and up to 100 sample documents. Document IDs must be unique and stable. Hay labels imported sample documents as samples. Initial data applies only to a fresh namespace; reinstall and update never replace saved user records with samples.

Keep secrets, credentials, installation metadata, workspace paths, and real user records out of distributable bundles.

SDK 0.1 · Package and registry format v1