Skip to content

API

Plugin APIs are grouped by hc namespace. Each page starts with conceptual notes (when present) and then the full method reference.

  • UI — All hc.ui.register* methods require the ui permission, return a Disposable that unregisters the contribution wh…
  • Actions — Use hc.actions.register for lightweight commands discoverable from the Action menu (type #). Requires the ui pe…
  • Themes — Theme packages are plugins. Ship the same .hcp layout, require the ui permission, declare slots in `contributes.t…
  • Commands — Command handlers tie together menus, toolbar actions, and context menu items.
  • Storage — Plugin-scoped persistent storage. Keys are namespaced by plugin id in the main process. Requires the storage perm…
  • Database — Plugin-scoped SQLite database. Each plugin id gets its own file under HarborClient userData (`plugin-databases/{plugi…
  • FS — Plugin-scoped filesystem access backed by main-process permission checks and a per-plugin path allowlist. Requires `f…
  • HTTP — HTTP lifecycle events are available in both the renderer and main entries. Requires the http permission. Registrati…
  • IPC — Renderer ↔ main RPC for the plugin. Requires the ipc permission.
  • Host — Typed wrappers for built-in request editor commands and library APIs.
  • Imports — Register handlers for File → Import so plugins can participate in the unified import flow instead of adding separ…
  • MCP — Register remote MCP client servers so Harbor's chat agent can discover and call tools from external MCP endpoints ove…
  • Live servers — Create, start, stop, and inspect Harbor Live Servers (loopback static file servers with optional CORS, path aliases,…
  • Live pages — Create, update, and delete saved Live Pages (website registry rows with URL, home URL, injection scripts, pre/post re…
  • Live page — Read-only handle for the active live page tab when the plugin UI is hosted in that context. Prefer hc.livePages
  • AI — Chat pointers, append-only agent instructions, turn hooks, and copy-to-chat for the AI sidebar.
  • ServerRequires the server permission.
  • Scripts — Programmatic request-script execution from the main entry via hc.scripts.createContext(). Requires appropriate scri…
  • pluginId — Stable plugin id from the manifest. Use when namespacing storage keys, CSS theme attributes, or diagnostics.
  • React — Plugins must share the host React instance. HarborClient installs hc.react before activate(hc) runs. `@harborclie…

Not extensible

These built-in surfaces are not open to plugin contributions:

  • Open request tab strip — tabs for unsaved/saved requests in the editor workspace.
  • Native window chrome — title bar and window controls (menu contributions use the application menu only).