Reference / Package types

Theme package (.act)

A theme is a data-only Acruz package: neutral semantic colour tokens and nothing else. It carries no executable code, no scripts, no external asset URLs, no brand or status colours and no secrets. The manifest kind is theme, the container extension is .act and the manifest template is templates/theme.yml.

Payload contract

The single entrypoint declared by templates/theme.yml is theme/tokens.json. Theme JSON contains exactly schema_version: 1 and a non-empty colors object whose values are six-digit hexadecimal colours. Only the neutral surface, container, outline, inverse and background tokens listed in the SDK policy are allowed; brand, status, font, icon and unknown keys are rejected. Text pairs must reach 4.5:1 contrast and control outlines against their background 3:1. Assets and external URLs are unsupported in v1.

Each package declares no permissions and exactly one .json entrypoint of at most 64 KiB. Website envelopes are at most 256 KiB compressed and expanded. projects/acruz-one/docs/DATA_PACKAGES.md is the authoritative schema; sdk/core/rust/fixtures/data-v1.json holds the shared acceptance and rejection cases that both the PHP and Rust validators consume.

A theme carries no motion data. The application reads the reduce_motion flag from the settings package (sdk/settings) and decides from it whether to animate a transition, so the same theme behaves correctly for both motion preferences.

Canonicalize the payload

Author the JSON yourself, then let the Rust example sort the keys and enforce the schema. It refuses to overwrite an existing output file. From the repository root:

New-Item -ItemType Directory -Force staging/theme
cargo run --manifest-path sdk/core/rust/Cargo.toml --example build-data -- theme sdk/core/examples/data/theme.json staging/theme/tokens.json

Use sdk/core/examples/data/theme.json as the starting source. Keep the staging directory clean: it must contain only the one entrypoint.

Build and verify

New-Item -ItemType Directory -Force .keys
npm run sdk -- keygen .keys/developer
npm run sdk -- build templates/theme.yml staging .keys/developer.private.pem example.act
npm run sdk -- verify example.act .keys/developer.public.pem

npm run sdk -- <subcommand> is the repository-root alias for node sdk/core/src/cli.ts <subcommand>. The tool never overwrites an existing key or output, and verify also rejects a file whose extension does not match the signed kind. Register only the public key in the developer portal; a public key stored beside an upload is not a trust anchor.

Upload and review

Upload the .act in the developer portal, wait for the private verification queue, complete the listing, image and HTTPS privacy URL, then submit explicitly. An administrator approves and publishes it. Website verification enforces the data schema before submission, so a theme with executable fields never reaches review. In Acruz One, applying a theme requires an explicit preview and import consent; see scripts/test-one-data.ps1 for the exact-byte backend acceptance path.

What was executed here

From this working copy on Linux/Windows developer tooling, the following commands completed successfully: cargo run --manifest-path sdk/core/rust/Cargo.toml --example build-data -- theme sdk/core/examples/data/theme.json <staging>/theme/tokens.json, npm run sdk -- keygen, npm run sdk -- build templates/theme.yml <staging> <private key> example.act and npm run sdk -- verify example.act <public key>. Interactive Windows rendering and export-save acceptance are separate open gates, so nothing in this guide claims them.