Reference / Package types

Plugin package (.acp)

A plugin is a host-scoped WebAssembly module. The manifest kind is plugin, the container extension is .acp and the ready-made example manifest is sdk/core/examples/plugin/acruz.yml (the neutral template is templates/plugin.yml). A signed .acp is only a valid container: it becomes runnable after host policy approves its capabilities and ABI.

Module contract

One implements Wasm ABI v1 in a separate supervised worker with bounded JSON input and output, fuel, memory, time and cancellation limits. Exports cover memory, ABI version 1, an input allocator and the JSON run function; the only import is acruz.locale, guarded by explicit consent to the plugin.locale.read capability. Native DLLs and uploaded JavaScript are prohibited. projects/acruz-one/docs/PLUGIN_ABI.md is the authoritative ABI and isolation-boundary document.

The repository-owned example module is sdk/core/rust/fixtures/plugin-locale.wat, with its compiled public fixture beside it as sdk/core/rust/fixtures/plugin-locale.wasm. The example returns the granted host locale for the input {}.

Assemble the staging directory

The manifest entrypoint is plugin/main.wasm, so the payload directory must contain exactly that relative path. Create it from the compiled fixture, or rebuild the fixture from its WAT source with the Rust example (this example writes the output path and replaces an existing file there):

New-Item -ItemType Directory -Force staging/plugin
cargo run --manifest-path sdk/core/rust/Cargo.toml --example build-plugin -- staging/plugin/main.wasm

Build and verify

New-Item -ItemType Directory -Force .keys
npm run sdk -- keygen .keys/developer
npm run sdk -- build sdk/core/examples/plugin/acruz.yml staging .keys/developer.private.pem locale.acp
npm run sdk -- verify locale.acp .keys/developer.public.pem
npm run sdk -- validate sdk/core/examples/plugin/acruz.yml

npm run sdk -- <subcommand> is the repository-root alias for node sdk/core/src/cli.ts <subcommand>. The CLI never overwrites an existing key or package, and verify rejects a package whose extension does not match its signed kind. Targets must name the real host package and its inclusive version range; capabilities in the manifest are declarations, not grants.

Runtime authorization

A plugin installs disabled. Running it requires the device license for the plugin package plus a distinct store-signed runtime authorization with purpose acruz.plugin-run.v1, requested through GET /api/v1/releases/{id}/plugin-authorization and valid for at most 72 hours. Revoking the developer key removes the release from the catalog and invalidates newly issued authorizations.

What was executed here

cargo run --manifest-path sdk/core/rust/Cargo.toml --example build-plugin -- staging/plugin/main.wasm, npm run sdk -- keygen, npm run sdk -- build sdk/core/examples/plugin/acruz.yml staging .keys/developer.private.pem locale.acp, npm run sdk -- verify locale.acp .keys/developer.public.pem and npm run sdk -- validate sdk/core/examples/plugin/acruz.yml completed successfully in this working copy. The plugin was not executed inside One's worker here, and interactive UI acceptance remains separate.