Skip to content

Commit a28b008

Browse files
Ship committed GitHub-installable artifacts and simplify installation docs (#16)
* chore(deps): update dependency typescript to v7 * build: commit installable Agent Bundle artifacts with npm bot CLI instructions * build: derive root marketplace from generated Agent Bundle * ci: restrict artifact publication to main --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent f7ab02c commit a28b008

24 files changed

Lines changed: 10357 additions & 96 deletions

‎.cursor-plugin/marketplace.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "plugin-library-marketplace",
3+
"owner": {
4+
"name": "plugin-library"
5+
},
6+
"plugins": [
7+
{
8+
"description": "Browse installed and marketplace plugins, read every skill in full, and hand one to a Grok Bot.",
9+
"name": "plugin-library",
10+
"source": "./artifact"
11+
}
12+
]
13+
}

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
node-version: "24"
2727
cache: npm
2828

29+
- name: Verify committed plugin installs without a build
30+
run: node --test test/install.test.js
31+
2932
- name: Install dependencies
3033
run: npm ci
3134

‎.github/workflows/publish-agent-bundle.yml‎

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414

1515
jobs:
1616
publish:
17+
if: github.ref == 'refs/heads/main'
1718
runs-on: ubuntu-latest
1819
timeout-minutes: 15
1920
steps:
@@ -32,14 +33,22 @@ jobs:
3233
- name: Build and verify artifact
3334
run: npm run check
3435

35-
- name: Publish generated root
36-
env:
37-
GH_TOKEN: ${{ github.token }}
36+
- name: Generate repository marketplace from artifact
3837
run: |
39-
git -C artifact init --initial-branch agent-bundle-artifact
40-
git -C artifact config user.name github-actions[bot]
41-
git -C artifact config user.email 41898282+github-actions[bot]@users.noreply.github.com
42-
git -C artifact add --all
43-
git -C artifact commit -m "Publish Agent Bundle from ${GITHUB_SHA}"
44-
git -C artifact remote add origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
45-
git -C artifact push --force origin HEAD:agent-bundle-artifact
38+
node --input-type=module <<'JS'
39+
import { readFileSync, writeFileSync } from 'node:fs';
40+
const marketplace = JSON.parse(readFileSync('artifact/.cursor-plugin/marketplace.json', 'utf8'));
41+
for (const plugin of marketplace.plugins) plugin.source = './artifact';
42+
writeFileSync('.cursor-plugin/marketplace.json', JSON.stringify(marketplace, null, 2) + '\n');
43+
JS
44+
45+
- name: Commit generated artifact on main
46+
run: |
47+
git config user.name github-actions[bot]
48+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
49+
git add --force --all artifact .cursor-plugin/marketplace.json
50+
if git diff --cached --quiet; then
51+
exit 0
52+
fi
53+
git commit -m "build: refresh committed Agent Bundle from ${GITHUB_SHA}"
54+
git push origin HEAD:main

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
2+
# Exclude generated files from build source discovery; CI force-adds this tree.
23
artifact/
34
dist/
45
.agent-bundle/

‎README.md‎

Lines changed: 28 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,55 @@
11
# Plugin Library
22

3-
A local explorer for your agent plugins. Three panes: the plugins on this machine and in the marketplace → a plugin's skills, agents and rules → the full `SKILL.md` rendered in a reading pane, straight from disk. "Send to a bot" picks a target from the live [`gbot`](https://github.com/ScriptedAlchemy/grok-bot-cli) roster and asks before anything is sent.
3+
## Install
44

5-
Ships as a Cursor / Grok Bot plugin: `/plugin-library` starts the server and opens it.
5+
Requires Node 22.19+ and npm. Generated Agent Bundle artifacts are committed in `artifact/` on `main`; no project dependency installation or local build is needed.
66

7-
## Tour
7+
Install the bot picker CLI from npm before installing the plugin:
88

9-
Installed plugins, sorted by how much they ship. Search covers plugin names, descriptions and skill ids.
10-
11-
![Library](screens/01-library.png)
12-
13-
pstack's 47 skills, grouped the way the Catalog suggests (Workflows, Bot+style, Principles, Language), with agents and rules below.
14-
15-
![pstack](screens/02-pstack.png)
16-
17-
Click a skill and the full `SKILL.md` opens in the reading pane. Front matter becomes chips, sibling reference files become tabs, and relative links between them switch tabs instead of leaving the page. `#/p/9717366/s/why` is a shareable deep link.
18-
19-
![Reading a skill](screens/03-read-skill.png)
20-
21-
![A reference file](screens/04-reference-tab.png)
22-
23-
"Send to a bot" pulls the live roster from `gbot` (bots and groups) and ends in one sentence you confirm. Nothing is sent until you click Send.
24-
25-
![Pick a bot](screens/05-pick-a-bot.png)
26-
27-
![Confirm](screens/06-confirm.png)
28-
29-
Every installed plugin gets the same treatment, not only pstack.
30-
31-
![Cursor Team Kit](screens/07-cursor-team-kit.png)
32-
33-
Marketplace listings show catalog copy and can be sent to a bot too.
34-
35-
![Marketplace](screens/08-marketplace.png)
36-
37-
## Run from a checkout
38-
39-
Node 22.19+. The explorer reads `~/.cursor/plugins/cache` and `~/.cursor/plugins/local`; the bot picker needs `gbot` on `PATH` (without it the explorer still works and the picker says the roster is unavailable).
40-
41-
```bash
42-
git clone https://github.com/ScriptedAlchemy/plugin-library.git
43-
cd plugin-library
44-
npm start # http://127.0.0.1:8787/
45-
```
46-
47-
Or let the launcher manage the process:
48-
49-
```bash
50-
node bin/plugin-library.mjs open [query] [--json] [--browser] # start if needed, print or open a deep link
51-
node bin/plugin-library.mjs status --json
52-
node bin/plugin-library.mjs stop
9+
```sh
10+
npm install --global grok-bot-cli
5311
```
5412

55-
`open pstack` resolves to `#/p/9717366`; `open why` to the skill inside it. `open` is idempotent: it reuses a running server or starts one detached (pid in `logs/server.pid`, output in `logs/server.out`).
56-
57-
Default port **8787** (`PORT`). Binds `127.0.0.1` because it shells out to `gbot` and serves cache files without auth; set `HOST=0.0.0.0` only on a network you trust. `CURSOR_PLUGIN_CACHE`, `CURSOR_PLUGIN_LOCAL` and `GBOT_BIN` override the two plugin directories and the CLI.
13+
### Cursor: install from GitHub
5814

59-
## Install as a plugin
15+
Dashboard → Plugins → Team Marketplaces → Add Marketplace:
6016

61-
The `agent-bundle-artifact` branch is the generated, validated plugin root (built by CI on every push to `main`).
17+
```text
18+
https://github.com/ScriptedAlchemy/plugin-library
19+
```
6220

63-
**Cursor, from GitHub.** Dashboard → Plugins → Team Marketplaces → Add Marketplace, import `https://github.com/ScriptedAlchemy/plugin-library`, pick the `agent-bundle-artifact` branch, then install **Plugin Library**. (Team Marketplaces need a Teams or Enterprise plan.)
21+
Use the default `main` branch and install **Plugin Library**. Team Marketplaces require a Teams or Enterprise plan.
6422

65-
**Cursor, without a team marketplace.**
23+
### Cursor: install from a clone
6624

6725
```sh
68-
git clone --branch agent-bundle-artifact --depth 1 https://github.com/ScriptedAlchemy/plugin-library.git
69-
cd plugin-library && node ./install.mjs
26+
git clone --depth 1 https://github.com/ScriptedAlchemy/plugin-library.git
27+
cd plugin-library
28+
node artifact/install.mjs
7029
```
7130

72-
Reload Cursor (`Developer: Reload Window`). `npx --no-install agent-bundle doctor --from . --host cursor` verifies the install.
73-
74-
**Grok Bot.** The same generated root is an Agent Plugins 1.0.0 package: `plugin.json` plus `skills/`. Hand it to the host's plugin flow; the `plugin-library` skill teaches the bot to answer skill questions from the read-only API of an already-running explorer. The `/plugin-library` slash command is Cursor-only.
75-
76-
**From a source checkout**, for a local proof:
31+
Reload Cursor with **Developer: Reload Window**, then run `/plugin-library` in an agent session to open the explorer.
7732

78-
```bash
79-
npm ci && npm run build
80-
node artifact/install.mjs
81-
```
33+
The npm package provides `gbot` on `PATH`. Sign in to Grok Bot before using the bot picker.
8234

83-
In the installed plugin the launcher lives at `scripts/plugin-library.mjs` (the command file uses `${CURSOR_PLUGIN_ROOT}/scripts/plugin-library.mjs`); in this repo it is `bin/plugin-library.mjs`.
35+
### Other Agent Plugins hosts
8436

85-
Then in an agent session:
37+
Use the committed `artifact/` directory with your host's plugin installer. It contains `plugin.json`, skills, bundled executables, and assets. The `/plugin-library` slash command is Cursor-only.
8638

87-
- `/plugin-library` opens the explorer (embedded browser when the session has one, OS browser otherwise).
88-
- `/plugin-library pstack` or `/plugin-library why` deep-links to that plugin or skill.
39+
## Screenshots
8940

90-
Agents never call `POST /api/send`; the bundled command and skill both say so. Sending to a bot is a click you make.
41+
![Plugin library](screens/01-library.png)
9142

92-
## API
43+
![pstack skills](screens/02-pstack.png)
9344

94-
| Route | Returns |
95-
|-------|---------|
96-
| `GET /api/library` | `{ installed, marketplace, groups }`. *Installed* means present in this machine's plugin cache or local plugin directory; catalog rows supply copy, category and ids. Plugins with no catalog row get `local:<name>`-style ids. |
97-
| `GET /api/local/<marketplace>/<slug>/doc/<path>` | `{ meta, markdown }` for any `.md`/`.mdc` inside that plugin |
98-
| `GET /api/local/<marketplace>/<slug>/file/<path>` | any other file inside that plugin (logos, scripts). Symlinks and `..` that leave the plugin root are 404 |
99-
| `GET /api/bots` | live bots + groups from `gbot bots list` / `gbot groups list` (20s cache; `?refresh=1` bypasses) |
100-
| `POST /api/send` | `{ plugin_id, bot_ref, skill_id? }`, same-origin JSON only. Verifies the plugin, skill and target, then runs `gbot send <target> <message>`. Used by the UI after you confirm. |
45+
![Reading a skill](screens/03-read-skill.png)
10146

102-
## Data
47+
![Reference file](screens/04-reference-tab.png)
10348

104-
`data/unified-catalog.json` is a snapshot of the Cursor marketplace (names, descriptions, categories, ids); `data/pstack.json` is the Catalog's suggested grouping for pstack's skills. Both are read server-side only and copied into the built plugin. Everything else (skills, agents, rules, logos) is read live from disk. When a plugin is cached twice (numeric id and slug), the copy Cursor marked `<hash>.installed` wins, then the highest version.
49+
![Bot picker](screens/05-pick-a-bot.png)
10550

106-
## Develop
51+
![Send confirmation](screens/06-confirm.png)
10752

108-
```bash
109-
npm ci
110-
npm run check # agent-bundle validate, tsc, build, node --test, artifact validate, packed-install smoke
111-
```
53+
![Cursor Team Kit](screens/07-cursor-team-kit.png)
11254

113-
Screenshots in `screens/` are 1600×1000 @2x from a headless-Chrome tour with a stub `gbot` roster.
55+
![Marketplace](screens/08-marketplace.png)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"plugin-library-marketplace","owner":{"name":"plugin-library"},"plugins":[{"description":"Browse installed and marketplace plugins, read every skill in full, and hand one to a Grok Bot.","name":"plugin-library","source":"./"}]}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"commands":"./commands/","description":"Browse installed and marketplace plugins, read every skill in full, and hand one to a Grok Bot.","displayName":"plugin-library","homepage":"https://github.com/ScriptedAlchemy/plugin-library#readme","license":"MIT","logo":"./assets/assets/logo.svg","name":"plugin-library","repository":"https://github.com/ScriptedAlchemy/plugin-library","skills":"./skills/","version":"0.4.0"}

0 commit comments

Comments
 (0)