Skip to content

Conversation

@agpituk
Copy link

@agpituk agpituk commented Jan 8, 2026

Add Harbor Plugin System

This PR introduces a plugin architecture that allows separate Firefox extensions to provide tools to Harbor. Plugins communicate via extension-to-extension messaging (browser.runtime.sendMessage) and their tools are exposed to web applications through the existing window.agent API.

Documentation

  • docs/plugins-quickstart.md - Get started with plugins in 5 minutes
  • docs/plugin-protocol.md - Wire protocol specification
  • docs/plugins-dev.md - Full plugin development reference

Summary

  • Plugin system infrastructure - Registration, health checks, and tool routing between Harbor and plugin extensions
  • Consent management - Per-origin permission control for plugin tools (Allow Once/Always/Deny)
  • Two example plugins - harbor-plugin-time and harbor-plugin-decode demonstrating the protocol
  • Full integration - Plugin tools work in both window.agent.tools.call() API and sidebar chat

Architecture

Web Page Harbor Hub Plugin Extension
(window.agent) ←→ (aggregates tools, ←→ (provides tools,
enforces consent) executes them)

Plugins register with Harbor on startup, and Harbor namespaces their tools as pluginId::toolName. Web pages see plugin tools alongside MCP tools with unified consent handling.

New Files

Path Description
extension/src/plugins/ Plugin system (router, registry, consent, types)
plugins/harbor-plugin-time/ Time tools (time.now, time.format)
plugins/harbor-plugin-decode/ Decode tools (decode.base64_encode, decode.base64_decode, decode.json_pretty, decode.jwt_decode_unsafe)
docs/plugin-protocol.md Wire protocol specification
docs/plugins-dev.md Plugin development guide
docs/plugins-quickstart.md Getting started guide

Next Steps

This plugin system lays the groundwork for making the native bridge optional. Since plugins run entirely in the browser and can make HTTP requests, a future "LLM plugin" could communicate directly with Ollama's HTTP API, enabling Harbor to function without the Node.js bridge for users who only need local LLM access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant