SDK for WebAssembly plugin developers — Chattree 1.x
This documentation covers everything you need to create, package, and distribute a Chattree plugin without reading a single line of the Chattree source code.
A Chattree plugin is a sandboxed WebAssembly (WASM) module that registers one or
more slash-commands (/hello, /translate, /my-tool…) in Chattree's command palette.
When the user types a command, Chattree:
.wasm binary.plugin.json.Developer
↓
plugin.json + plugin.wasm → .chattree-plugin (ZIP)
↓
Chattree (import plugin)
↓
User grants capabilities
↓
User types /command
↓
PluginRuntime (WASM sandbox)
↓
ChattreeHostApi (namespace router)
↓
Native service (Notes, Network, Storage, …)
| Document | Description |
|---|---|
| getting-started.md | Step-by-step guide to create your first plugin |
| plugin-manifest.md | Full reference for plugin.json |
| package-format.md | .chattree-plugin archive specification |
| capabilities.md | Complete capability catalogue |
| host-api.md | ChattreeHostApi reference (operations, inputs, outputs) |
| security.md | Sandbox model and security boundaries |
| errors.md | Error codes and troubleshooting guide |
| versioning.md | Plugin versioning and compatibility |
| marketplace_publishing_guide.md | Publishing to the Chattree Marketplace |
| examples/hello/ | Minimal /hello example plugin |
| examples/notes-demo/ | /notes-demo example using Notes API |
For the built-in chat commands
/noteand/reminder, their natural-language behavior, and the Notes/RAG flow, see the Notes and Reminders guide. Plugin access to Notes and Reminders remains governed by the Host API and capability contracts below; it is independent of those chat interactions.
| Capability | Status |
|---|---|
storage.private | ✅ Available |
network.http | ✅ Available |
network.local | ✅ Available |
notifications.send | ✅ Available |
files.pick / files.read / files.write | ✅ Available |
location.current | ✅ Available |
camera.capture | ✅ Available |
contacts.read / contacts.create / contacts.update | ✅ Available |
calendar.read / calendar.create / calendar.update / calendar.delete | ✅ Available |
share.text / share.file | ✅ Available |
open.url / open.app | ✅ Available |
email.read / email.send | ✅ Available |
clipboard.read / clipboard.write | ✅ Available |
network.webhook_inbound | ✅ Available |
chattree.notes.* | ✅ Available (Phase 3G) |
chattree.reminders.* | ✅ Available (Phase 3G) |
chattree.context.read | ✅ Available (Phase 3G) |
chat.history.read | ✅ Available |
ai.context / ai.embeddings | ✅ Available |
network.websocket | ✅ Available (Phase 1 — WebSockets) |
ui.components / ui.render | ✅ Available (Phase 2 — Visual Components) |
scheduler.task / scheduler.cron | ✅ Available (Phase 3 — Scheduled Tasks) |
database.sql / storage.database | ✅ Available (Phase 4 — Relational Database) |
notifications.read | ✅ Available (Notification Hub — Real-time listener & events) |
notifications.query | ✅ Available (Notification Hub — Query active notifications) |
notifications.reply | ✅ Available (Notification Hub — Direct RemoteInput reply) |
notifications.action | ✅ Available (Notification Hub — Dismiss/cancel active alerts) |
See capabilities.md for full details.
Chattree plugins are designed to be open and auditable.
A developer can distribute:
plugin.wasmplugin.json — manifest, always human-readableplugin.wasm — compiled binary.chattree-plugin — complete importable package (ZIP of the above)Users can inspect plugin.json before granting any permissions.
Marketplace: Community packages can be submitted through the web portal or API described in the publishing guide. Submission validates package structure and records a listing; it does not cryptographically sign the publisher or independently audit source code.
| Requirement | Value |
|---|---|
| WASM spec | WebAssembly 1.0 MVP + memory.copy (bulk-memory proposal) |
| Memory (default) | 32 MB max (maxMemoryPages × 64 KB, up to 64 MB / 1024 pages) |
| Module cache | Bounded LRU cache (maxCachedModules = 8), isolated linear memory per call |
| Fuel limit | 50 000 000 instructions |
| Execution timeout | 5 seconds by default; manifest values are accepted up to 60 seconds by current validators |
| Async iterations | 50 max (for Host API round-trips) |
Supported schemaVersion | 1 or 2 |
Min runtimeApiVersion | 1.0.0 |