Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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:

NamespaceSourcePurpose
commandscommands.tsCommand registry and execution
workspaceworkspace.tsWorkspace, folders, and file operations
windowui.ts (exported as window)UI components and window management
editoreditor.tsEditor state, selections, viewport
languageslanguages.tsLanguage registration and configuration
debugdebug.tsDebugger protocol and control
terminalterminal.tsTerminal emulator and PTY
aiai.tsAI chat/completion APIs
uiui.tsUI component APIs (panels, status bar, notifications)
syncsync.tsCross-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 of Disposable objects; disposed when the extension deactivates
  • extensionPath — absolute path to the extension’s install directory
  • storagePath — per-workspace storage path
  • globalStoragePath — 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.