hone-api
Package: @honeide/api — pure TypeScript declarations, zero runtime code. Defines the public extension API surface that all Hone extensions program against.
Namespaces
Each namespace corresponds to a separate source file:
| Namespace | Source | Purpose |
|---|---|---|
commands | commands.ts | Command registry and execution |
workspace | workspace.ts | Workspace, folders, and file operations |
window | ui.ts (exported as window) | UI components and window management |
editor | editor.ts | Editor state, selections, viewport |
languages | languages.ts | Language registration and configuration |
debug | debug.ts | Debugger protocol and control |
terminal | terminal.ts | Terminal emulator and PTY |
ai | ai.ts | AI chat/completion APIs |
ui | ui.ts | UI component APIs (panels, status bar, notifications) |
sync | sync.ts | Cross-device sync types |
Core Types
Defined in types.ts:
Disposable
Cleanup interface returned by registrations and subscriptions.
ExtensionContext
Passed to the extension’s activate function. Provides:
subscriptions— array ofDisposableobjects; disposed when the extension deactivatesextensionPath— absolute path to the extension’s install directorystoragePath— per-workspace storage pathglobalStoragePath— global (cross-workspace) storage path
ActivateFunction
(context: ExtensionContext) => void | Promise<void>
DeactivateFunction
() => void | Promise<void>
Testing
cd hone-api && npm test
Type-check only via tsc --noEmit. No runtime tests — the package contains no executable code.