npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-forgespec

v2.1.4

Published

OpenCode integration plugin for ForgeSpec MCP coordination and file reservation

Downloads

587

Readme

OpenCode ForgeSpec Plugin

Official OpenCode integration plugin for ForgeSpec MCP. Install this package as opencode-forgespec. It has one default function export (.) and depends on the pinned compatible forgespec-mcp root package.

Features

The plugin starts the packaged identity broker with private stdio, resolves a bounded session lineage, and injects a signed _identity envelope only into forgespec_* tool calls. Unrelated tools are untouched and broker failures fail closed. Root and enrolled worker handles form the identity threat boundary; tool arguments have no actor fields. The sidecar contains 5 tables, while the domain store contains 16 fs_* tables.

Private child stdio isolates the broker from model-level MCP calls, but it is not protection against arbitrary same-user OS/process compromise. A hostile local process can interfere with the child or its files; use OS-level isolation for that threat.

Installation & Setup

1. Install the Plugin

Install the plugin in your project workspace or global OpenCode configuration:

# Per-project installation
npm install --save-dev opencode-forgespec

# Global installation (for all projects)
npm install -g opencode-forgespec

# Or directly in OpenCode configuration directory on Windows:
npm --prefix "%USERPROFILE%\.config\opencode" install opencode-forgespec

2. Configure opencode.json (or opencode.jsonc)

Add the package to the "plugin" array in your project or global opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    "opencode-forgespec"
  ]
}

[!WARNING] Do not manually configure a "forgespec" entry in the "mcp" section of opencode.json. The plugin automatically initializes the identity broker and registers the MCP server with the appropriate security environment. Manually running npx -y forgespec-mcp without the broker fails closed with TRUST_BOOTSTRAP_INVALID.

3. Restart OpenCode

Use a supported Node command (node must be available; Node 22+), and manually restart OpenCode after installing/enabling the plugin. Do not configure a deep node_modules path. The plugin resolves the stable forgespec-mcp/mcp and forgespec-mcp/broker exports.

Existing unrelated mcp settings are preserved; the dynamically generated entry is equivalent to:

"forgespec": {
  "type": "local",
  "command": ["/path/to/node", "/absolute/path/build/index.js"],
  "enabled": true,
  "environment": {
    "FORGESPEC_IDENTITY_ROOT_PUBLIC_KEY": "...",
    "FORGESPEC_IDENTITY_ISSUER": "...",
    "FORGESPEC_IDENTITY_AUDIENCE": "broker",
    "FORGESPEC_IDENTITY_SIDECAR_PATH": "..."
  }
}

The broker lifecycle is start → ready → request/correlation → dispose. Its child uses shell: false; malformed output or early exit fails closed. Reset warnings apply only to fresh stores, never to an existing store containing data.

For tests only, the plugin accepts explicit nodePath, mcpPath, brokerPath, and broker options; production configuration should use package resolution above.

Exposed Tools in OpenCode

The plugin exposes all 18 ForgeSpec tools prefixed with forgespec_:

| Category | OpenCode Tool Name | Description | |---|---|---| | Boards & Contracts | forgespec_board_createforgespec_contract_commitforgespec_contract_queryforgespec_contract_validate | Project boards, phase progression, schema validation, and immutable SDD specs. | | Tasks & Planning | forgespec_task_defineforgespec_task_queryforgespec_task_transition | DAG dependency definition, state machine transitions (ready, in_progress, in_review, done). | | Execution & Attempts | forgespec_attempt_claimforgespec_attempt_recoverforgespec_attempt_renew | Worker assignment, bounded TTL execution attempts, recovery protocol. | | File Leases | forgespec_lease_reserveforgespec_lease_renewforgespec_lease_release | Scoped optimistic file reservations preventing write collisions across agents. | | Governance & Events | forgespec_authority_manageforgespec_approval_recordforgespec_event_query | Delegated capability grants, human/reviewer sign-offs, HMAC-paginated audit trail. | | Core & Diagnostics | forgespec_forge_healthforgespec_forge_negotiate | Capability handshake, profile negotiation, storage and runtime qualification. |