Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

feat!: Extensible addon system for third-party integrations - #41

Draft
jraylan wants to merge 22 commits into
mainfrom
extendable-extension
Draft

feat!: Extensible addon system for third-party integrations#41
jraylan wants to merge 22 commits into
mainfrom
extendable-extension

Conversation

@jraylan

@jraylan jraylan commented Dec 31, 2025

Copy link
Copy Markdown
Owner

Summary

This PR transforms Seamless Agent into an extensible extension, allowing third-party extensions (addons) to extend its functionality without modifying the core extension's primary purpose - the ask_user tool.

Motivation

Users have different needs for AI agent tools. Rather than bloating the core extension with every possible feature, this architecture allows:

  • Modularity: Users install only the tools they need
  • Ecosystem Growth: Third-party developers can create specialized addons
  • Maintainability: Core extension stays focused on its primary goal

Changes

Architecture

Component Description
src/api/ Public API contract (ISeamlessAgentAPI) for addon integration
src/addons/ Addon registry and lifecycle management
src/core/ Shared core types and utilities
src/agent/ Agent context and utilities

Public API (ISeamlessAgentAPI)

Addons can integrate with Seamless Agent through:

  • api.registerAddon(addon) - Register addon with capabilities
  • api.ui - UI integration (tabs, history, settings)
  • api.tools - LLM tools integration
  • api.events - Event subscription system
  • api.storage - Namespaced data persistence

Addon Capabilities

Capability Description
Custom Tabs Register new tabs in Seamless Agent webview
History Providers Add custom item types to session history
Settings Sections Add configuration UI for addon settings
LLM Tools Register tools executable by AI agents
Events Subscribe to extension events
Storage Persist addon-specific data

Types-Only NPM Package

A separate npm package (seamless-agent-addon-api) is generated containing only TypeScript definitions for addon authors:

  • Build:
    npm run build:addon-typedefs
  • Output: dist-addon-api/
  • Published via release-please workflow

New Files

src/
 addon-typedefs/index.ts    # Types-only entrypoint
 addons/
    index.ts               # Addon system exports
    registry.ts            # AddonRegistry implementation
    types.ts               # Internal type aliases
    README.md              # Contributor documentation
 api/
    index.ts               # API exports
    SeamlessAgentAPI.ts    # API implementation
    events.ts              # Event emitter system
    types.ts               # Public interface definitions
    README.md              # Addon author documentation
 core/
    index.ts               # Core utilities
    types.ts               # Shared types
 agent/
     index.ts               # Agent context utilities

build-addon-typedefs.js        # Types package generator
tsconfig.addon-typedefs.json   # TypeScript config for types generation

CI/CD Updates

  • Updated .github/workflows/release-please.yml to build and publish `seamless-agent-addon-api´ to npm on release

Usage Example (Addon Author)

import * as vscode from 'vscode';
import type { ISeamlessAgentAPI, IAddon } from 'seamless-agent-addon-api';

export async function activate(context: vscode.ExtensionContext) {
    const seamlessExt = vscode.extensions.getExtension('jraylan.seamless-agent');
    if (!seamlessExt) return;

    const api: ISeamlessAgentAPI = await seamlessExt.activate();

    const addon: IAddon = {
        id: 'my-extension.my-addon',
        name: 'My Addon',
        version: '1.0.0',
        ai: {
            tools: [
                {
                    name: 'my_tool',
                    description: 'My custom tool',
                    inputSchema: { type: 'object', properties: {} },
                    execute: async (input, context) => {
                        return { success: true };
                    }
                }
            ]
        }
    };

    const registration = api.registerAddon(addon);
    context.subscriptions.push(registration);
}

Breaking Changes

  • Extension architecture refactored; internal imports may have changed
  • Extension entry points consolidated into modular structure

Testing

  • Extension activates correctly
  • Core tools (ask_user, plan_review, walkthrough_review) work as expected
  • Addon registration and unregistration works
  • Types package builds correctly (npm run build:addon-typedefs)
  • Webview renders addon tabs correctly

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a comprehensive addon system that transforms Seamless Agent into an extensible platform, allowing third-party extensions to integrate with its core functionality without modifying the main extension.

Key Changes

  • New extensible architecture with a public API contract for addon integration
  • Modular addon registry for lifecycle management of third-party addons
  • Types-only NPM package (seamless-agent-addon-api) for addon authors
  • Settings tab in the webview for managing addon configurations

Reviewed changes

Copilot reviewed 37 out of 41 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/api/* Public API contract defining interfaces for addon integration including UI, tools, events, and storage
src/addons/* Addon registry and lifecycle management system
src/core/* Refactored core extension initialization and types
src/extension.ts Simplified to return public API for addon access
src/webview/* Added settings tab and UI integration for addon management
build-addon-typedefs.js Script to generate types-only package for NPM distribution
tsconfig.addon-typedefs.json TypeScript configuration for generating type definitions
package.json Added types field, extension capabilities, and build script for addon types
media/* HTML and CSS for new settings tab UI
Localization files Translations for settings tab strings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/webview/webviewProvider.ts Outdated
Comment thread TODO Outdated
Comment thread .hintrc
Comment thread src/agent/index.ts Outdated
Comment thread src/extension.antigravity.ts Outdated
Comment thread src/webview/main.ts Outdated
Comment thread src/webview/webviewProvider.ts
Comment thread src/api/SeamlessAgentAPI.ts
Comment thread .github/workflows/release-please.yml
Comment thread package.json Outdated
jraylan and others added 9 commits December 31, 2025 16:15
BREAKING CHANGE: Extension architecture refactored to support addons

- Add public API (ISeamlessAgentAPI) for addon extensions
- Add addon registry system with lifecycle management
- Add UI integration: custom tabs, history providers, settings sections
- Add AI tools integration: addons can register LLM tools
- Add event system for addon communication
- Add storage integration for addon data persistence
- Add types-only npm package generation (seamless-agent-addon-api)
- Refactor extension entry points for modular architecture
- Update CI/CD workflow to publish addon typedefs to npm
Move build scripts to a separated folder
Upgrade vunerable dependency
Implement relevant Copilot review sugestions
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Change storage namespace sepparator from `.` to `::`
Make call to `this.core.getContext()` null safe
Format code on `main.ts` file
@jraylan
jraylan force-pushed the extendable-extension branch from b585845 to f2fb8ac Compare December 31, 2025 19:20
Since package:vsce and package:ovsx respectively calls build:vscode and build:antigravity, it's not necessary to build the project before packing

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 46 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/webview/webviewProvider.ts Outdated
Comment thread src/agent/index.ts Outdated
Comment thread scripts/build-addon-typedefs.js
Comment thread package.json Outdated
Comment thread .github/workflows/release-please.yml Outdated

Copilot AI commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

@jraylan I've opened a new pull request, #55, to work on those changes. Once the pull request is ready, I'll request review from you.

jraylan and others added 6 commits January 4, 2026 18:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jraylan <23512861+jraylan@users.noreply.github.com>
Co-authored-by: jraylan <23512861+jraylan@users.noreply.github.com>
Fix error message interpolation to use err.message instead of String(err)
@jraylan
jraylan marked this pull request as draft February 10, 2026 11:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants