Skip to content

feat(opencode): add unified marketplace - #40108

Closed
dobord wants to merge 15 commits into
anomalyco:devfrom
dobord:marketplace-upstream
Closed

dobord wants to merge 15 commits into
anomalyco:devfrom
dobord:marketplace-upstream

Conversation

@dobord

@dobord dobord commented Aug 2, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #28696

Related: #33698 explored CLI installation for skills and agents. This PR keeps that useful direction, but implements a broader package model and one shared runtime for Desktop, embedded Web, TUI, CLI, and API clients.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a unified Marketplace for plugins, skills, agents, commands, MCP servers, instructions, and bundles.

Marketplace state is stored in SQLite rather than opencode.json. Installed plans are projected into effective configuration in memory, so user-authored configuration stays user-owned and disabling one provider reveals the next provider cleanly.

Installation, aggregate updates, and profile imports use a two-step plan/apply flow. Planning materializes and hashes executable bytes; apply consumes that exact one-time plan in a revision-checked transaction without refetching it. The content-addressed cache rejects traversal, unsafe redirects, stale authorization/not-found responses, oversized artifacts, and corrupted digests.

The PR also adds:

  • Desktop and TUI catalog, installed, update, source, package, skill, and MCP controls;
  • a dedicated Marketplace HttpApi and regenerated clients;
  • CLI list/install/update/import/export/lock/verify commands;
  • authenticated private catalog sources in Desktop, API, and CLI, using header-to-environment bindings (including repeatable --header-env NAME=ENV) so secret values are resolved only at request time and are never stored;
  • private GitLab repository discovery through REST file and tree endpoints, including repository URLs without .git, SSO-safe catalog fetching, and complete skill-tree materialization;
  • SSH Git repository sources backed by the shared repository cache, with refresh support and preservation of the original SSH reference;
  • automatic repair of legacy GitHub source records that stored an obsolete raw catalog candidate;
  • compatibility checks, deterministic profiles, artifact locks, pagination, and audit history;
  • adapters for the maintained OpenAI Plugins, GitHub Copilot Plugins, and Claude Code Plugins catalogs;
  • discovery of .agents/plugins/marketplace.json, .github/plugin/marketplace.json, .plugin/marketplace.json, and .claude-plugin/marketplace.json, plus the native OpenCode paths;
  • materialization of repository skill directories as individually named and independently toggleable skills;
  • English documentation for users and source authors, including supported source/manifest forms and compatibility limits.

Private GitLab and SSH repositories

Private GitLab repository URLs are resolved through GitLab REST file and repository-tree endpoints. This avoids HTML SSO redirects returned by raw web routes while retaining the user-entered repository URL as the source reference. Source creation validates the catalog before persisting it.

Credentials are configured as header-to-environment bindings, for example PRIVATE-TOKEN=GITLAB_TOKEN. The environment variable is resolved only for the request; its secret value is not stored in SQLite or returned to clients. Desktop exposes separate header-name and environment-variable fields, and the CLI accepts repeatable --header-env NAME=ENV options.

Git repositories may also use SSH URLs. OpenCode clones and refreshes them through its shared repository cache and reads the catalog from the local checkout.

Unsupported foreign-runtime features such as hooks, LSP servers, commands, agents, and registered apps remain visible as compatibility requirements instead of being silently dropped. Listings with no installable OpenCode components are marked incompatible.

The implementation is split into twelve focused conventional commits on the current upstream dev. It intentionally excludes the unrelated reliability changes that appeared in the first draft branch.

How did you verify your code works?

  • Full repository pre-push typecheck passed for all 36 workspace packages.
  • Private GitLab regression coverage verifies raw-to-REST API translation, PRIVATE-TOKEN forwarding, catalog loading, and complete skill-tree materialization.
  • Private GitLab E2E verified with PRIVATE-TOKEN=GITLAB_TOKEN: CLI and Desktop UI both loaded all 10 catalog entries.
  • Core: typecheck and 30 Marketplace/catalog-adapter tests passed.
  • OpenCode: typecheck and the complete 21-test Marketplace registry/cache/service/API/runtime suite passed.
  • App, TUI, and Desktop package typechecks passed.
  • Desktop production build passed.
  • Native Linux CLI/TUI build and version smoke test passed (0.0.0-marketplace-upstream-202608020158).
  • Documentation production build passed and generated all localized Marketplace routes.
  • git diff --check passed.

Manual production-build click-through covered:

  • adding and displaying all three maintained sources;
  • installing and inspecting a GitHub Copilot plugin with one materialized skill;
  • installing and inspecting a Claude Code plugin with four materialized skills;
  • inspecting the OpenAI Cloudflare plugin as 9 skills plus 1 MCP server;
  • toggling individual skills and the Cloudflare MCP server in both Desktop and TUI, including persistence after reload;
  • the expected authentication prompt when enabling the Cloudflare MCP server;
  • source, plugin, component, MCP, and command-palette views in Desktop and TUI.

The full App unit suite currently reports 689 passing tests and one unrelated pre-existing i18n parity failure: five general English keys are absent from the Arabic dictionary. Marketplace-specific tests and all affected-package typechecks pass.

Screenshots

Desktop: configured sources

OpenAI Plugins, GitHub Copilot, and Claude Code are connected as independent maintained sources.

Desktop Marketplace sources

Desktop: compatible GitHub Copilot and Claude Code plugins

The Copilot plugin exposes its materialized skill individually:

GitHub Copilot plugin with one skill

The Claude Code plugin exposes four independently manageable skills:

Claude Code plugin with four skills

Desktop: Cloudflare skills and MCP controls

The OpenAI Cloudflare package resolves to 9 skills and 1 MCP server instead of one aggregate skill directory:

Cloudflare package with nine skills and one MCP server

Individual skill and MCP switches retain their state:

Cloudflare component switches

TUI: the same materialized plan

The TUI reports the same 9-skill, 1-MCP plan:

Cloudflare plan in the TUI Marketplace

Skills remain independently manageable:

Cloudflare skill components in the TUI

The MCP server has its own persisted toggle:

Cloudflare MCP toggle in the TUI

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Related PR Found

PR #33698 - feat:Introducing skills and agents marketplace for opencode CLI
#33698

Why it's related: This PR is explicitly mentioned in the description as related work. PR #33698 explored CLI installation for skills and agents, while the current PR #40108 builds upon that foundation with a broader unified marketplace model that extends to desktop, TUI, CLI, and API clients with a shared runtime (and moves state from opencode.json to SQLite).

This is not a duplicate—it's a predecessor that the current PR builds upon with expanded scope and architecture.

@dobord
dobord marked this pull request as ready for review August 2, 2026 02:09
@dobord
dobord force-pushed the marketplace-upstream branch 3 times, most recently from a1a11dc to d56bfe8 Compare August 3, 2026 05:21
@HomiGrotas

Copy link
Copy Markdown

looks good! Would like to see this PR also merged.

@john-carrington

john-carrington commented Aug 26, 2026 •

Copy link
Copy Markdown

+1 It's amazing. That’s just what we need

@dobord
dobord force-pushed the marketplace-upstream branch from 7152462 to 0bb6a8b Compare August 27, 2026 12:42
@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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.

[FEATURE]: Plugin/Agent/Skills/etc marketplace

4 participants