Skip to content

Commit 57d2d70

Browse files
committed
change structure for github install
1 parent d96f0bf commit 57d2d70

82 files changed

Lines changed: 887 additions & 1058 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/plugins/marketplace.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "nodesource",
3+
"interface": {
4+
"displayName": "NodeSource"
5+
},
6+
"plugins": [
7+
{
8+
"name": "nsolid-plugin",
9+
"source": {
10+
"source": "local",
11+
"path": "./"
12+
},
13+
"policy": {
14+
"installation": "AVAILABLE",
15+
"authentication": "ON_USE",
16+
"products": [
17+
"CODEX"
18+
]
19+
},
20+
"category": "Developer Tools"
21+
}
22+
]
23+
}

.claude-mcp.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"mcpServers": {
3+
"nsolid-console": {
4+
"command": "node",
5+
"args": [
6+
"${CLAUDE_PLUGIN_ROOT}/scripts/mcp-wrapper.js",
7+
"nsolid-console"
8+
]
9+
},
10+
"ns-benchmark": {
11+
"command": "node",
12+
"args": [
13+
"${CLAUDE_PLUGIN_ROOT}/scripts/mcp-wrapper.js",
14+
"ns-benchmark"
15+
]
16+
},
17+
"ncm": {
18+
"command": "node",
19+
"args": [
20+
"${CLAUDE_PLUGIN_ROOT}/scripts/mcp-wrapper.js",
21+
"ncm"
22+
]
23+
}
24+
}
25+
}

.claude-plugin/marketplace.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "nodesource",
3+
"owner": {
4+
"name": "NodeSource"
5+
},
6+
"description": "NodeSource agent plugins",
7+
"plugins": [
8+
{
9+
"name": "nsolid-plugin",
10+
"source": "./",
11+
"displayName": "N|Solid Plugin",
12+
"version": "1.0.0",
13+
"description": "N|Solid performance & security skills + MCP servers",
14+
"author": {
15+
"name": "NodeSource"
16+
},
17+
"homepage": "https://nodesource.com",
18+
"repository": "https://github.com/NodeSource/nsolid-plugin",
19+
"license": "MIT",
20+
"category": "developer-tools",
21+
"tags": [
22+
"nodesource",
23+
"nsolid",
24+
"nodejs",
25+
"performance",
26+
"security"
27+
]
28+
}
29+
]
30+
}

.claude-plugin/plugin.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
3+
"name": "nsolid-plugin",
4+
"displayName": "N|Solid Plugin",
5+
"version": "1.0.0",
6+
"description": "N|Solid performance & security skills + MCP servers",
7+
"author": {
8+
"name": "NodeSource"
9+
},
10+
"homepage": "https://nodesource.com",
11+
"repository": "https://github.com/NodeSource/nsolid-plugin",
12+
"license": "MIT",
13+
"skills": [
14+
"./skills/ns-advanced-memory-leak-hunter",
15+
"./skills/ns-analyze-asset",
16+
"./skills/ns-analyze-cpu",
17+
"./skills/ns-analyze-event",
18+
"./skills/ns-analyze-memory",
19+
"./skills/ns-analyze-tracing",
20+
"./skills/ns-analyze-vulnerabilities",
21+
"./skills/ns-audit-dependencies",
22+
"./skills/ns-benchmark-run",
23+
"./skills/ns-benchmark-validate",
24+
"./skills/ns-generate-asset",
25+
"./skills/ns-generate-sbom",
26+
"./skills/ns-node-upgrade",
27+
"./skills/ns-replace-package",
28+
"./skills/ns-upgrade-package"
29+
],
30+
"mcpServers": "./.claude-mcp.json"
31+
}

.codex-plugin/plugin.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "nsolid-plugin",
3+
"version": "1.0.0",
4+
"description": "N|Solid Plugin — AI skills and MCP servers for Codex",
5+
"author": {
6+
"name": "NodeSource",
7+
"url": "https://nodesource.com"
8+
},
9+
"homepage": "https://nodesource.com",
10+
"repository": "https://github.com/NodeSource/nsolid-plugin",
11+
"license": "MIT",
12+
"keywords": [
13+
"nodesource",
14+
"nsolid",
15+
"nodejs",
16+
"performance",
17+
"security"
18+
],
19+
"skills": "./skills/",
20+
"mcpServers": "./.mcp.json",
21+
"interface": {
22+
"displayName": "N|Solid Plugin",
23+
"shortDescription": "N|Solid performance & security",
24+
"category": "Productivity",
25+
"developerName": "NodeSource"
26+
}
27+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dist/
99
test-results.log
1010

1111
# Generated plugin artifacts/materialized package skills
12+
packages/core/skills/
1213
packages/pi-plugin/skills/
1314

1415
# OpenCode

.mcp.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"mcpServers": {
3+
"nsolid-console": {
4+
"command": "node",
5+
"args": [
6+
"-e",
7+
"const fs=require('node:fs');const os=require('node:os');const path=require('node:path');const {pathToFileURL}=require('node:url');const serverName=process.argv[1];const rel=['scripts','mcp-wrapper.js'];const roots=[path.join(os.homedir(),'.codex','plugins','cache'),process.cwd()];const candidates=[];for(const root of roots){try{const stack=[root];while(stack.length){const dir=stack.pop();if(!fs.existsSync(dir))continue;const direct=path.join(dir,...rel);if(fs.existsSync(direct))candidates.push(direct);for(const entry of fs.readdirSync(dir,{withFileTypes:true})){if(entry.isDirectory())stack.push(path.join(dir,entry.name))}}}catch{}}const wrapper=candidates.find((p)=>p.includes(`${path.sep}nsolid-plugin${path.sep}`));if(!wrapper){console.error('[nsolid-plugin] Could not locate Codex MCP wrapper. Reinstall with: codex plugin marketplace add NodeSource/nsolid-plugin && codex plugin add nsolid-plugin@nodesource');process.exit(1)}process.argv=[process.execPath,wrapper,serverName];import(pathToFileURL(wrapper).href)",
8+
"nsolid-console"
9+
]
10+
},
11+
"ns-benchmark": {
12+
"command": "node",
13+
"args": [
14+
"-e",
15+
"const fs=require('node:fs');const os=require('node:os');const path=require('node:path');const {pathToFileURL}=require('node:url');const serverName=process.argv[1];const rel=['scripts','mcp-wrapper.js'];const roots=[path.join(os.homedir(),'.codex','plugins','cache'),process.cwd()];const candidates=[];for(const root of roots){try{const stack=[root];while(stack.length){const dir=stack.pop();if(!fs.existsSync(dir))continue;const direct=path.join(dir,...rel);if(fs.existsSync(direct))candidates.push(direct);for(const entry of fs.readdirSync(dir,{withFileTypes:true})){if(entry.isDirectory())stack.push(path.join(dir,entry.name))}}}catch{}}const wrapper=candidates.find((p)=>p.includes(`${path.sep}nsolid-plugin${path.sep}`));if(!wrapper){console.error('[nsolid-plugin] Could not locate Codex MCP wrapper. Reinstall with: codex plugin marketplace add NodeSource/nsolid-plugin && codex plugin add nsolid-plugin@nodesource');process.exit(1)}process.argv=[process.execPath,wrapper,serverName];import(pathToFileURL(wrapper).href)",
16+
"ns-benchmark"
17+
]
18+
},
19+
"ncm": {
20+
"command": "node",
21+
"args": [
22+
"-e",
23+
"const fs=require('node:fs');const os=require('node:os');const path=require('node:path');const {pathToFileURL}=require('node:url');const serverName=process.argv[1];const rel=['scripts','mcp-wrapper.js'];const roots=[path.join(os.homedir(),'.codex','plugins','cache'),process.cwd()];const candidates=[];for(const root of roots){try{const stack=[root];while(stack.length){const dir=stack.pop();if(!fs.existsSync(dir))continue;const direct=path.join(dir,...rel);if(fs.existsSync(direct))candidates.push(direct);for(const entry of fs.readdirSync(dir,{withFileTypes:true})){if(entry.isDirectory())stack.push(path.join(dir,entry.name))}}}catch{}}const wrapper=candidates.find((p)=>p.includes(`${path.sep}nsolid-plugin${path.sep}`));if(!wrapper){console.error('[nsolid-plugin] Could not locate Codex MCP wrapper. Reinstall with: codex plugin marketplace add NodeSource/nsolid-plugin && codex plugin add nsolid-plugin@nodesource');process.exit(1)}process.argv=[process.execPath,wrapper,serverName];import(pathToFileURL(wrapper).href)",
24+
"ncm"
25+
]
26+
}
27+
}
28+
}

README.md

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Cross-harness plugin distribution for NodeSource AI skills and MCP servers. The
66

77
| Harness | Plugin model | Trigger |
88
|---|---|---|
9-
| **Claude Code** | Generated marketplace/local artifact + `.claude-plugin/plugin.json` | Native plugin install, then explicit setup |
10-
| **Codex CLI** | Generated marketplace/local artifact + `.codex-plugin/plugin.json` | Native plugin install, then explicit setup |
9+
| **Claude Code** | Root GitHub marketplace/plugin + `.claude-plugin/plugin.json` | Native plugin install, then explicit setup |
10+
| **Codex CLI** | Root GitHub marketplace/plugin + `.codex-plugin/plugin.json` | Native plugin install, then explicit setup |
1111
| **OpenCode** | CLI-only (user-level skills + MCP config) | `nsolid-plugin setup --harness opencode` (auth + direct install) |
12-
| **Antigravity CLI** | Generated local artifact + `plugin.json` | `agy plugin install <target>`, then `nsolid-plugin setup --harness antigravity` |
13-
| **Pi Agent** | npm package + `pi.skills` | `pi install npm:@nodesource/pi-plugin`, `nsolid-plugin setup --harness pi`, then `pi install npm:pi-mcp-adapter` |
12+
| **Antigravity CLI** | Root GitHub plugin + `plugin.json` | `agy plugin install <repo-url>`, then explicit setup |
13+
| **Pi Agent** | npm package + `pi.skills` | `pi install npm:nsolid-pi-plugin`, `nsolid-plugin setup --harness pi`, then `pi install npm:pi-mcp-adapter` |
1414

1515
No harness relies on npm `postinstall` hooks. See `openspec/changes/cross-harness-plugin-installer/design.md` and `openspec/changes/cross-harness-plugin-installer/specs/installation-and-auth.md` for the full design rationale.
1616

@@ -19,28 +19,30 @@ No harness relies on npm `postinstall` hooks. See `openspec/changes/cross-harnes
1919
```text
2020
nsolid-plugin/
2121
├── packages/
22-
│ ├── core/ # Shared CLI/setup/fallback logic + canonical skills
22+
│ ├── core/ # Shared CLI/setup/fallback logic + npm CLI package
2323
│ └── pi-plugin/ # Pi Agent package
24-
├── plugins/templates/ # Source templates for generated native artifacts
25-
├── dist/plugins/ # Generated plugin directories (not committed)
26-
├── dist/artifacts/ # Generated .tgz artifacts (not committed)
24+
├── .claude-plugin/ # Claude marketplace + plugin manifest
25+
├── .agents/plugins/ # Codex marketplace manifest
26+
├── .codex-plugin/ # Codex plugin manifest
27+
├── skills/ # Canonical N|Solid skills and root plugin payload
28+
├── skill-assets/ # Shared helper sources copied into skills/package artifacts
2729
├── bundle.json # Canonical skill + MCP server descriptor
30+
├── plugin.json # Antigravity root plugin manifest
2831
└── pnpm-workspace.yaml
2932
```
3033

3134
## Skill distribution model
3235

33-
Skills are canonical in `packages/core/skills/`. Claude, Codex, and Antigravity receive materialized skill copies only when `pnpm plugin:artifacts` generates self-contained release/local-install artifacts under `dist/`. Pi receives materialized skills only during package `prepack`.
36+
Skills are canonical in the repository-root `skills/` directory. The repo root is also the GitHub-installable plugin payload for Claude, Codex, and Antigravity. Pi and the npm CLI package receive materialized skills during package `prepack`.
3437

3538
| Harness | Skill owner | Installer responsibility |
3639
|---|---|---|
37-
| **Claude** | Generated artifact | Native plugin artifact; `setup` for auth |
38-
| **Codex** | Generated artifact | Native plugin artifact; `setup` for auth |
39-
| **Antigravity** | Generated artifact | Native install script stages artifact assets; `setup` for auth |
40+
| **Claude** | Root plugin | Native marketplace/plugin install; `setup` for auth |
41+
| **Codex** | Root plugin | Native marketplace/plugin install; `setup` for auth |
42+
| **Antigravity** | Root plugin | `agy plugin install <repo-url>`; `setup` for auth |
4043
| **Pi** | Pi npm package (`pi.skills`) | Pi package owns skills; `setup` writes auth/MCP config |
4144
| **OpenCode** | CLI-only harness copy | `setup` authenticates and copies skills/MCP config locally; `install` is no-browser fallback |
4245

43-
Codex artifacts currently include both a root `.codex-plugin/plugin.json` local marketplace container and a nested `plugins/nsolid-plugin/` plugin package. Both declare `skills: './skills/'` and both get materialized skill copies.
4446

4547
## Quick start
4648

@@ -85,35 +87,39 @@ On setup:
8587

8688
## Per-harness install
8789

88-
The commands below use local pre-release artifact directories generated by `pnpm plugin:artifacts`. Released native artifacts are `.tgz` files; extract an archive to a plugin-root directory before passing it to a harness CLI:
90+
The GitHub marketplace flow installs from the repository root.
91+
92+
The setup step requires the `nsolid-plugin` CLI on your PATH:
8993

9094
```bash
91-
mkdir -p ./nsolid-claude-plugin
92-
tar -xzf nsolid-claude-plugin.tgz -C ./nsolid-claude-plugin --strip-components=1
93-
claude plugin marketplace add ./nsolid-claude-plugin
95+
npm i -g nsolid-plugin # stable release
96+
# during pre-release:
97+
npm i -g nsolid-plugin@next
9498
```
9599

100+
Or invoke it once-off with `npx -y nsolid-plugin setup --harness <harness>` (`npx -y nsolid-plugin@next ...` during pre-release).
101+
96102
### Claude Code
97103

98104
```bash
99-
pnpm plugin:artifacts
100-
claude plugin marketplace add ./dist/plugins/claude/nsolid-plugin
101-
claude plugin install nsolid-plugin@nodesource-local
105+
claude plugin marketplace add NodeSource/nsolid-plugin
106+
claude plugin install nsolid-plugin@nodesource
102107
nsolid-plugin setup --harness claude
103108
```
104109

105-
Claude installs plugins through marketplaces, including local marketplace directories. The generated artifact root includes `.claude-plugin/marketplace.json`, so a downloaded/unpacked artifact can be added as a local marketplace before installing `nsolid-plugin@nodesource-local`. If marketplace/local plugin install is unavailable, `nsolid-plugin install --harness claude` is the fallback direct installer and does not open a browser.
110+
Claude installs plugins through marketplaces. The repository root includes `.claude-plugin/marketplace.json`, so GitHub install works directly. If marketplace/local plugin install is unavailable, `nsolid-plugin install --harness claude` is the fallback direct installer and does not open a browser.
111+
112+
> `nsolid-plugin` must be available on your PATH. Once published, install it globally (`npm i -g nsolid-plugin`) or invoke it via npx (`npx -y nsolid-plugin setup --harness claude`). During the pre-release window, use the prerelease tag (`npx -y nsolid-plugin@next ...` or `npm i -g nsolid-plugin@next`).
106113
107114
### Codex CLI
108115

109116
```bash
110-
pnpm plugin:artifacts
111-
codex plugin marketplace add ./dist/plugins/codex/nsolid-plugin
112-
codex plugin add nsolid-plugin@codex-plugin
117+
codex plugin marketplace add NodeSource/nsolid-plugin
118+
codex plugin add nsolid-plugin@nodesource
113119
nsolid-plugin setup --harness codex
114120
```
115121

116-
Codex is marketplace/artifact-owned. A NodeSource-owned Git/local marketplace can be used as fallback if OpenAI curation is unavailable. Authentication remains explicit through `nsolid-plugin setup --harness codex`.
122+
Codex is marketplace-owned. A NodeSource-owned Git/local marketplace can be used as fallback if OpenAI curation is unavailable. Authentication remains explicit through `nsolid-plugin setup --harness codex` (or `npx -y nsolid-plugin setup --harness codex`).
117123

118124
### OpenCode
119125

@@ -128,18 +134,17 @@ Use `nsolid-plugin install --harness opencode` only as a no-browser fallback/rep
128134
### Antigravity CLI
129135

130136
```bash
131-
pnpm plugin:artifacts
132-
agy plugin install ./dist/plugins/antigravity/nsolid-plugin
137+
agy plugin install https://github.com/NodeSource/nsolid-plugin.git
133138
nsolid-plugin setup --harness antigravity
134139
```
135140

136-
Antigravity uses artifact-owned skills and MCP wrappers from `~/.gemini/antigravity-cli/plugins/nsolid-plugin/`. The generated native install script stages the artifact bundle and prints the explicit setup command; it does not start auth.
141+
Antigravity installs the repository root as a native plugin and stages skills/MCP wrappers under `~/.gemini/antigravity-cli/plugins/nsolid-plugin/`. Install does not start auth.
137142

138143
### Pi Agent
139144

140145
```bash
141146
# 1. Install the Pi package (skills are package-owned)
142-
pi install npm:@nodesource/pi-plugin
147+
pi install npm:nsolid-pi-plugin
143148

144149
# 2. Authenticate and write Pi MCP config
145150
nsolid-plugin setup --harness pi
@@ -190,16 +195,16 @@ pnpm lint # Lint all packages
190195
### Bundle and plugin asset sync checks
191196

192197
```bash
193-
pnpm --filter @nodesource/plugin-core bundle:check # Check if core bundle.json is in sync
194-
pnpm --filter @nodesource/plugin-core bundle:sync # Copy root bundle.json into core
198+
pnpm --filter nsolid-plugin bundle:check # Check if core bundle.json is in sync
199+
pnpm --filter nsolid-plugin bundle:sync # Copy root bundle.json into core
195200
pnpm plugin:check # Check generated manifests/configs and verify no package skill copies are committed
196201
pnpm plugin:sync # Regenerate manifests/configs and remove materialized package skill copies
197-
pnpm plugin:materialize # Copy core skills into plugin packages for pack/release artifacts
198-
pnpm plugin:artifacts # Generate Claude/Codex/Antigravity plugin dirs and .tgz archives
199-
pnpm plugin:artifacts:check # Verify generated plugin artifacts are current
202+
pnpm plugin:materialize # Copy root skills into the Pi package for pack/release
203+
pnpm plugin:root # Refresh root marketplace/plugin manifests from bundle.json
204+
pnpm plugin:root:check # Fail if committed root manifests drift from bundle.json
200205
```
201206

202-
Run `pnpm plugin:check` in CI and before release. The source tree keeps one canonical skill copy under `packages/core/skills/`; package-local `skills/` directories are materialized only for pack/release artifacts and cleaned afterward by package `postpack` scripts.
207+
Run `pnpm plugin:check` in CI and before release. The source tree keeps one canonical skill copy under root `skills/`; package-local `skills/` directories are materialized only for npm package release and cleaned afterward by package sync scripts.
203208

204209
## Troubleshooting
205210

@@ -257,7 +262,7 @@ nsolid-plugin restore --harness <harness> --backup ~/.agents/.config-backup/<har
257262

258263
### Install vs setup
259264

260-
`nsolid-plugin install --harness <harness>` is a no-browser fallback/direct installer. Claude, Codex, and Antigravity should normally use their generated native artifacts. OpenCode uses `nsolid-plugin setup --harness opencode` as its primary onboarding command because it authenticates and then performs the direct install; `install --harness opencode` is for repair/offline staging. Pi is package-owned: `pi install npm:@nodesource/pi-plugin` installs skills, while `nsolid-plugin install/setup --harness pi` only writes Pi MCP config.
265+
`nsolid-plugin install --harness <harness>` is a no-browser fallback/direct installer. Claude, Codex, and Antigravity should normally use native GitHub plugin install from the repository root. OpenCode uses `nsolid-plugin setup --harness opencode` as its primary onboarding command because it authenticates and then performs the direct install; `install --harness opencode` is for repair/offline staging. Pi is package-owned: `pi install npm:nsolid-pi-plugin` installs skills, while `nsolid-plugin install/setup --harness pi` only writes Pi MCP config.
261266

262267
### Verbose logging
263268

docs/antigravity-research.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Antigravity CLI — Plugin Research (Task 38)
22

3+
> **Amendment (2026-06-24):** The shared core was renamed `@nodesource/plugin-core``nsolid-plugin`. The `scripts/install.js` approach described here was superseded — Antigravity now installs directly from the GitHub repository root. See `docs/qa-guide.md` §9.
4+
35
**Status:** Complete (June 2026).
46
**Verdict:** Antigravity has no install-time/session-start hook, so the plugin must ship a one-time `scripts/install.js` that the user runs manually. That script copies the plugin directory for discovery and invokes the shared core installer so auth, MCP config, and skills work consistently with the other harnesses.
57

0 commit comments

Comments
 (0)