Build a plugin

In this repository

Choose the owning family under plugins/. Each plugin's package.ts exports a PackageDeclaration; JavaScript entries point to local modules built from matching .ts files. Native entries use sdk.nativeImplementations so identifiers, contracts and configuration schemas come from the Rust definition.

From the repository root, build an existing leaf as a reference:

node scripts/plugins/build.mjs   --plugin plugins/workspace/workspace-web --output /tmp/maka-web-bundle
maka application inspect-package --package /tmp/maka-web-bundle/packages/workspace-web

The builder replaces the output directory. It builds the selected package, without assembling the product or recompiling Rust.

For a product feature, add the plugin to products/maka/bundle/package-inputs.json and bind its instances in src/composition.ts. Use just product to rebuild the development bundle, or just run to build and launch. Existing installations keep their saved source; commit an explicit source update to change one.

Standalone starter

Copy the three files from this skill's assets/starter/ directory together: create.mjs, host.mjs and tui.mjs. Then run:

node create.mjs --output /tmp/my-plugin --target tui --maka /path/to/maka

The output directory must be new. --target host creates an Echo service graph; --target tui creates a native terminal counter graph. The helper reads the executable's schemas, computes exact package references and checks the composition. It does not initialize a Root or start execution. Use the emitted input and package paths for later commands.

The generated maka.extension.json uses schemaVersion: 1 and application.entries. A JavaScript entry declares its bundled module and realm; component entries also declare the target's scene language. The composition selects pinned package references, instance UUIDs, entry names and bindings.

Keep the composition outside the package so its digest cannot refer to itself. Recompute references after changing package bytes, and retain instance identities when updating saved data. See Testing and shipping to check and install the result.