Extension Architecture
Hone has two extension systems that coexist: V1 built-in extensions for language support that ships with the IDE, and V2 plugins for third-party and community extensions distributed via the marketplace.
V1 Built-in Extensions (hone-extensions/)
Language Packs
11 built-in language extensions ship with the IDE binary:
| Extension | Languages |
|---|---|
| TypeScript | TypeScript, JavaScript, JSX, TSX |
| Python | Python |
| Rust | Rust |
| Go | Go |
| C++ | C, C++, Objective-C |
| HTML/CSS | HTML, CSS, SCSS, Less |
| JSON | JSON, JSONC |
| Markdown | Markdown |
| Docker | Dockerfile, Docker Compose |
| TOML/YAML | TOML, YAML |
| Git | Git commit, Git rebase, .gitignore |
Manifest Format
Each V1 extension declares a hone-extension.json manifest:
{
"name": "typescript",
"displayName": "TypeScript Language",
"version": "1.0.0",
"activationEvents": [
"onLanguage:typescript",
"onLanguage:javascript"
],
"contributes": {
"languages": [
{
"id": "typescript",
"extensions": [".ts", ".tsx"],
"aliases": ["TypeScript"]
}
],
"lspServer": {
"command": "typescript-language-server",
"args": ["--stdio"],
"languages": ["typescript", "javascript"]
},
"commands": [],
"snippets": [
{
"language": "typescript",
"path": "./snippets/typescript.json"
}
]
}
}
Loading
V1 extensions are loaded by ExtensionRegistry in hone-core:
- Scan
hone-extensions/directory forhone-extension.jsonmanifests - Parse manifests and register language contributions
- Activate extensions lazily based on activation events (e.g., when a TypeScript file is opened)
- Start LSP servers as needed
V2 Plugin SDK (hone-extension/)
Overview
V2 plugins are independent packages compiled to native binaries via Perry. They use the @hone/sdk package for the plugin API.
Plugin Structure
import { HonePlugin, HoneHost } from '@hone/sdk';
class MyPlugin extends HonePlugin {
activate(host: HoneHost): void {
host.commands.registerCommand('myPlugin.hello', () => {
host.window.showInformationMessage('Hello from my plugin!');
});
}
deactivate(): void {
// cleanup
}
}
HoneHost Interface
HoneHost provides 80+ types covering:
commands– register and execute commandswindow– show messages, create output channels, status bar itemsworkspace– access files, folders, settingseditor– manipulate the active editor (selections, decorations, edits)languages– register language features (completions, hover, diagnostics)debug– register debug adaptersterminal– create and manage terminal instances
Execution Tiers
Plugins run in one of three tiers based on their declared permissions:
| Tier | Capabilities | Isolation |
|---|---|---|
| InProcess | UI-only (commands, decorations, status bar) | Runs in main process |
| PluginHost | Editor access, file system read | Separate plugin host process |
| IsolatedProcess | Network, file system write, spawn processes | Fully sandboxed process |
The tier is declared in the plugin’s package.json:
{
"hone": {
"tier": "PluginHost",
"permissions": ["fs.read", "editor"]
}
}
Distribution
V2 plugins are distributed via the Hone marketplace (marketplace.hone.codes):
- Build –
hone-buildsubmits the plugin source to perry-hub workers for cross-platform compilation - Publish – compiled binaries are uploaded to the marketplace
- Install – IDE downloads the platform-appropriate binary from the marketplace
- Update – marketplace notifies IDE of available updates
CLI
The hone-extension package includes a CLI for plugin development:
hone ext init– scaffold a new plugin projecthone ext build– compile the pluginhone ext publish– publish to the marketplacehone ext test– run plugin tests
Coexistence
Both systems can:
- Register commands in the command registry
- Contribute UI elements (sidebar views, status bar items, decorations)
- Interact with the editor (read/write documents, manage cursors)
- Respond to lifecycle events
V1 extensions handle core language support and ship bundled with the IDE. V2 plugins extend the IDE with third-party functionality and are installed independently by users. Both register with the same underlying command and contribution systems, so they interoperate seamlessly.