Skip to content

Sidecar authoring: independently owned capabilities ​

Choose this route when you are implementing a separately supervised native Sidecar using the launcher’s binary protocol. For an installable Wasm plugin hosted by PluginSidecar, start with the Plugin SDK tutorial instead.

Version scope: these source-level examples target v2.0.0.alpha.14. Use the Plugin SDK for current Wasm plugin authoring.

A Sidecar executes independently. Host owns trust, sessions, registries, mirrors, permissions, and finite presentation; the peer owns business code, private state, and dependencies. The model is “register once → execute numeric contracts → observe state → render locally.”

Decide whether a process is needed ​

Use themes for appearance. For new behavior/data, read goal-first XSR design and choose an exposed target. A color change does not need a process; new behavior does not authorize bypassing Host policy.

OutcomeA14 route
Independent operation/resultCommand/Query with argument/result codecs
Continuously visible factState, complete snapshot, then deltas
Occurrence/continuous outputEvent or credit-based Stream
Shared UI, standalone pages and onboardingNXML schema 3 with Nxml / Pages
Automatic function targetsTarget-build catalog, AutomaticFunctions and NFP3
Finite resource-page formGranted extension-card slot, schema 2
Caption/search signal/display patchExact finite target/ABI, not arbitrary injection

What this guide covers ​

The baseline is v2.0.0.alpha.14 Host and portable Protocol/Transport. Protocol version is 1, still evolving before the independent SDK freeze; source examples do not promise a published stable SDK package.

The independent executor, Plugin SDK, and package/UI-IR freeze belong to another project. We teach verified protocol integration, business ownership, and Host cooperation without inventing attributes, NuGet packages, manifest fields, or installation controls.

Reading route ​

  1. First Sidecar: real child-process echo.
  2. Protocol/lifecycle: features, registration, snapshots, IDs, budgets, retirement.
  3. Commands/queries/codecs: primitive/DTO values, correlation, cancellation, errors, idempotency.
  4. State/events/streams: facts, occurrences, credit, bounded consumption.
  5. UI/extensions: every node/reference, images, drafts, exposure.
  6. Signals/patches: exact targets and finite binary ABIs.
  7. Host API: all 14 composition routes and direct-method semantics.
  8. Packaging/discovery: native .nsc, bootstrap, trust, supervision.
  9. Testing/distribution: self-tests, AOT, production admission, evidence.
  10. Cookbook/troubleshooting: goals to contracts and failure phases.

Evidence boundaries ​

examples/sidecar --self-test uses a real child, pipe/socket, and 32-byte proof to exercise registration, query, and shutdown. --recipes runs DTO/State/Event/Stream/UI codecs and rejection cases.

Codec success is not a target grant; local IPC is not production installation; Linux AOT is not Windows/macOS execution. Each chapter identifies which side owns a snippet and its prerequisites.

Implementation references ​

New: shared NXML/pages, automatic NFP3 functions, platform/runtime.

Check your result ​

Build the first Sidecar and run its real-process self-test before adding UI or business contracts. Passing this test establishes protocol behavior, not production publisher approval.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.