Choose a Plugin path
Pick the supported authoring path that matches your Host, language, and Capability.
Lenso has one Plugin product model, not a separate Plugin kind for every runtime. A Plugin Release owns one Contract and may contain one or more exact implementations. You choose an authoring path based on how the code is developed and loaded.
The three supported paths
| Authoring path | Choose it when | Execution | Current boundary |
|---|---|---|---|
| Portable Rust Plugin | You are adding an Agent Tool that should be packaged and installed | Wasm, trusted Process, or both | lenso plugin new currently scaffolds the Agent Tool Provider Capability |
| Linked Rust Plugin | You own the product Host and need a deep, stateful, or multi-Capability provider | linked native Rust | the Host binary must include the generated factory |
| Bun Plugin | You want to implement typed providers in TypeScript | trusted Bun child process | Authoring V2 supports Request, Stream, and Event |
Start with the portable Rust path for an ordinary Agent Tool. Choose linked Rust when the Plugin needs product-owned resources, lifecycle, several Capabilities, or a Capability the CLI does not scaffold. Choose Bun when the target Host includes the Bun Adapter and TypeScript is the implementation language.
Do not confuse three different classifications
Authoring path answers how you write and package the Plugin. The three paths are portable Rust, linked Rust, and Bun.
Interaction shape answers how one Capability operation behaves:
- Request returns one terminal result;
- Stream supports a bounded bidirectional conversation; and
- Event publishes to independently admitted subscribers.
Execution class answers how the Host runs one implementation. Current examples include linked native Rust, Wasm Component, trusted native Process, and Bun child process. Execution class is Host mechanics, not a second Plugin taxonomy.
Decide in order
- Identify the Capability the Plugin provides and any Capabilities it needs.
- Check whether
lenso plugin newalready scaffolds that role. Today its ordinary scaffold is for Agent Tools. - Check which Execution Adapters the target Host actually includes.
- Select one authoring path from the table above.
- Keep the Plugin ID, configuration, provided and required Capabilities, lifecycle, and state semantics identical across every implementation in the same Release.
If step 2 or 3 has no supported answer, the missing SDK, Capability projection, or Host Adapter is a prerequisite. Do not hide it behind Plugin-local protocol glue.
Next, follow Build your first App behavior for a complete installed example, or open the path-specific guide from the table.