External creator protocol
Normative, version 1. A creator MAY be any executable named
app-anything-create-<id> on PATH; the tool talks to it over JSON on
stdin/stdout, one document per line, and never assumes its language.
describe
<exe> describe MUST print one JSON object:
{
"protocol": 1,
"id": "acme-embed",
"version": "0.3.0",
"targets": ["web", "linux"],
"offers": {
"ui.static": {"level": "full"},
"fs.app-data": {"level": "partial", "note": "IndexedDB, capped at 50% of free disk"}
},
"notes": []
}
protocolMUST be1.offerslevels MUST be one offull,partial,none;partialandnoneSHOULD carry anotethe tool surfaces to users.- The executable MUST exit 0; anything else means "not a creator".
requirements
<exe> requirements --target <t> MUST print a JSON array; each item:
{"id": "rust", "title": "Rust toolchain 1.90 or newer", "tool": "cargo", "when": ""}
toolnames the executable the tool probes for onPATH— the creator only describes requirements, the host decides whether they are met.whenSHOULD say when the requirement applies (e.g.--release), or be empty.
create
The tool sends one JSON object on stdin:
{"package": "dist/acme.app-1.0.0.aapkg", "target": "web", "out_dir": "dist/artifacts", "options": {}, "signing": null}
The creator replies with zero or more event objects (one JSON per line,
keys event plus fields), ending in a result object:
{"event": "log", "message": "rendering index.html"}
{"result": {"artifacts": [{"path": "dist/artifacts/acme.app-site", "kind": "site", "target": "web"}], "notes": []}}
- Every artifact MUST have
path,kindandtarget. - Exit code 0 without a
resultline is a protocol error; the tool reports it and fails the operation. - The creator MUST NOT modify anything outside
out_dirand its own cache; it MUST refuse a package whose declared capabilities it does not offer.
Conformance
Third-party creators SHOULD run the sdk.testing contract suite
(CreatorContract) and the creator conformance samples; both are shipped
with the tool. See the how-to.
Rendered from spec/creator-protocol.md on main.