SDK overview

Build against a stable host. Not app internals.

The plugin SDK is the public contract between your TypeScript package and Zana. After a loud full-trust confirm, plugins load in-process on the server and register UI slots in the app.

The contract

Four layers, each with a clear responsibility.

01

Manifest

Declares identity in package.json → zcc: name, app/server entries, skills, MCP, and engines.zcc.

02

App slots

definePluginApp registers nav panels and other slots. The host React instance is globalThis.__ZCC_HOST_REACT__.

03

Server API

export default function plugin(zcc) receives ZccPluginApi in-process on the server. Host-daemon tokens never reach the plugin.

04

Contributions

Adds skills, MCP servers, settings, and extra metadata declared in the zcc block.

Open the Plugin Guide map →

Trust at install

Full-trust in-process. Confirm it out loud.

Plugins are not sandboxed Electron guests. The control is install/enable, exact version pinning, engines.zcc, and a loud confirm that lists skills, MCP, and extra the grant would add.

  • Official catalogs install offline; community catalogs are npm/git pointers only
  • A failed reload keeps the last good generation running
  • Host-daemon tokens and signing keys never reach a plugin

Read the authoring guide →

Use the host surface

Panels receive what they need from Zana.

App entries register slots instead of importing core modules. That keeps plugins aligned with the host lifecycle and prevents fragile imports of implementation details.

  • Register nav panels, homepage sections, and settings with definePluginApp
  • Use storage, RPC, realtime, and schedules through the SDK
  • Keep renderer input untrusted; the server still confines paths
Go deeper

The reference contains the exact types, events, and lifecycle behavior.

Use it as the source of truth while implementing, and return to these guides when you need to orient a new contributor.