docs / build with the engine

Model packs

Installed pack format, schema 1.

Cleanup Engine is a public beta. These guides are generated from the SDK repository at v0.2.0-beta.1; file links open it on GitHub.

A pack is a flat, immutable directory containing pack.json and seven artifact files. See the baseline manifest for a complete machine-readable instance.

AreaFields
IdentityschemaVersion, id, semantic version, publisher
Licenselicense, licenseURL
ModelmodelID, exact 40-character modelRevision, quantization
Behaviorprompt, capabilities, rules, languages
Compatibilityexact runtime identifier
Artifactspath, exact bytes, SHA-256 for each file
Evidenceevidence, limitations

The Swift PackManifest Codable type and PackLoader are the schema implementation. Unknown top-level or artifact fields, schema/runtime mismatches, unsupported rules/capabilities, duplicate or unexpected paths, extra files/directories, symlinks, oversized files, and checksum mismatches fail validation. The weight index may reference only the verified model.safetensors. Custom tokenizer code is unsupported. No executable pack plugins or model fallback exist.

The manifest digest is SHA-256 over the exact manifest bytes. It transitively identifies the weights, tokenizer, chat template, model config and frozen prompt. Hash verification proves consistency, not publisher authenticity. Only caller-trusted developer installations are supported; signed installation and distribution are a later milestone.

Schema 2: capabilities

Schema 2 is schema 1 plus one required top-level object, capabilitiesDetail. Schema 1 is unchanged and still accepted, so existing installations keep validating with the same manifest digest. A capabilitiesDetail key in a schema 1 manifest fails validation.

FieldMeaningRule in this runtime
stylesStyle names a request may selectMust be empty (frozen prompt)
speculativeSwitchWhether a host may toggle speculative decodingMust be false
auxiliaryGenerationWhether the pack offers auxiliary generationMust be false
minResidentMemoryBytesMinimum resident memory, bytesnull (not measured) or 1 B to 1 TiB
vocabularymaxTerms, maxTermBytes, maxTotalBytesEach positive and no looser than the request limits (64, 128, 2,048)

Unknown or missing keys at either level fail validation. A pack declaring a style, a speculative switch or auxiliary generation is refused as incompatible, because this runtime cannot honor them. A pack may declare stricter vocabulary limits; Cleaner then refuses a request over them before the model runs.

Hosts read the answer as ValidatedPack.capabilities before open and Cleaner.capabilities after. A schema 1 pack reports PackCapabilities.frozenBaseline: no styles, no speculative switch, no auxiliary generation, memory not measured, and the request vocabulary limits. simplewords-v3 is schema 1; its manifest is unchanged.

Diarizer packs

A diarizer pack is a second, independent pack format for the optional diarization runtime: pack.json (schema 1, fields schemaVersion, id, version, publisher, license, licenseURL, modelID, modelRevision, runtime, pipeline, attribution, artifacts, limitations, evidence) plus exactly the 23 files DiarizerPackLoader.artifactPaths names under speaker-diarization/: the Segmentation, FBank, Embedding and PldaRho compiled Core ML bundles (five files each), plda-parameters.json, and the upstream LICENSE and NOTICE.md. Paths are nested, unlike the flat cleanup pack; symlinks, extra files or directories, unknown manifest fields, a runtime other than fluidaudio-0.15.5 or a pipeline other than pyannote-community-1-offline fail validation. The manifest digest is SHA-256 over the exact manifest bytes.

The pinned instance is packs/pyannote-community1-coreml/pack.json: FluidInference/speaker-diarization-coreml at revision df2625ac79a7ac6b65ad868fee6d80f320da4232, CC-BY-4.0, about 21 MB installed. scripts/prepare-diarizer-pack.py <snapshot> <destination> installs it from a snapshot already on disk with the same copy-verify-publish discipline as the cleanup installer. See speaker transcripts and notes.

Baseline

SupportedBaseline.swift pins the seven artifact hashes admitted by the optimized MLX runtime. A third-party artifact set requires a new validated runtime compatibility entry; changing a manifest alone does not enable speculative decoding on untested weights.

The upstream model page labels the model Apache-2.0. During this implementation the old URL redirected there and displayed an access gate. The manifest pins the already installed August snapshot; it does not claim current remote main has identical weights or that anonymous acquisition works. On 2026-09-24 the public model metadata API resolved the pinned revision under ReFyneLabs/simplewords-dictation-cleanup-v3 and still reported gated: auto and Apache-2.0 metadata. Obtain access from that upstream and request this exact revision; do not substitute current main. Anonymous acquisition and an archived license/notice record remain stable-release gates. No access conditions were accepted and no model files were downloaded during implementation.

To prepare an installation, scripts/prepare-local-pack.py reads and hashes already obtained files, while copying only the seven named artifacts into staging before publishing a new destination. It follows source-cache symlinks while copying, so the resulting installation contains regular files. It refuses a mismatched snapshot or existing destination. Checksums cover the bytes actually copied. It reserves the destination with an exclusive directory creation and publishes pack.json after all artifacts; another installer cannot overwrite it. Failures remove only this invocation’s staging/owned destination. An abrupt process or machine failure can leave an incomplete directory, which Cleaner.open rejects; inspect and remove it explicitly before retrying.

Metadata and compatibility are intentionally narrow in this preview. Memory guidance, signatures, richer support metadata, crash-recovery tooling, portable backend variants and enterprise licensing are not implemented.

Validation uses nonblocking, no-follow file opens and checks the opened descriptor is a bounded regular file. It hashes in cancellation-aware chunks, detects size/metadata changes during reads, and parses captured verified metadata rather than reopening those paths. These defenses do not replace the requirement to keep the installed directory and its parents trusted and immutable while loading.