@genclass/mcp 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,88 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.0 (unreleased)
3
+ ## 0.2.1 (2026-10-27)
4
+
5
+ - **The plugin has an icon** (`plugin/.claude-plugin/icon.png`, the genclass.dev mark, 512 by 512), which the Anthropic directory reads on the first save.
6
+ - **The instructions carry the "when", the skill the "how"** ([docs/runtime/AGENT.md](../../docs/runtime/AGENT.md)
7
+ section 4.2). The server's `instructions` now open with the symptom words ("sometimes", "randomly", "only in
8
+ production", "on slow connections", a value that "flips back", stale or old results, lost edits, double submits,
9
+ sideways scrolling), all within the first 500 characters, keep one line per trigger saying what to call first, and
10
+ name the `genclass` skill so a client that has it loads it (2,712 characters, under the 4,096 ceiling). The skill
11
+ (`plugin/skills/genclass/SKILL.md`) no longer restates the triggers in its body: its frontmatter description is the
12
+ trigger, with the same words early, and the body is the procedure (the explore arguments, the Playwright pairing,
13
+ how to read "Compared: 6 of 6" against "No verdict" and "0 compared", that "Internal state only" and "Along the way
14
+ only" are not races, witness against explore race against model detection, the reporting rule) plus a new section
15
+ for when the `genclass_*` tools are missing (the pinned one-line install, or `npx @genclass/runtime@beta scan <url>
16
+ --json` for the visual checks alone; GenClass needs Claude Code or another MCP client on the developer's machine,
17
+ the chat app cannot run it).
18
+ - **`init` writes the skill without the plugin.** `genclass-mcp init` now also writes `.claude/skills/genclass/SKILL.md`
19
+ into the project (the package's copy, resolved next to the built command, with a `genclass:init` marker line after
20
+ the frontmatter), so Claude Code loads the procedure on a project set up with `init` or `claude mcp add` alone. A
21
+ rerun replaces a file that carries the marker and leaves one that does not (yours, or edited), and says which;
22
+ `--no-skill` leaves the skill out; a `CLAUDE.md` without a `.claude/` folder still gets it under `.claude/skills/`.
23
+ - **A repository-root copy for skill directories.** `skills/genclass/SKILL.md` is a byte-identical copy of the
24
+ plugin's skill, so `npx skills add genclass-dev/GenClass-lib` (skills.sh and directories that read a repository's
25
+ root `skills/` folder) finds it; `npm run sync -w @genclass/mcp` refreshes the copy and pins the install line in
26
+ both.
27
+ - Tests: `test/manifests.test.ts` checks the skill's frontmatter (name, a one-line description of at most 1,024
28
+ characters with the symptom words early), that every `genclass_*` name in its body is a tool the server registers,
29
+ that the body has the procedure and the fallback and no em-dash, that the root copy is identical, and that the
30
+ instructions stay under 4,096 characters, put the symptom words in the first 500 and name the skill;
31
+ `test/cli.test.ts` covers the skill written by `init`, the rerun on a marked and an unmarked file, and `--no-skill`.
32
+
33
+ ## 0.2.0 (2026-10-25)
34
+
35
+ The `0.1.0` on npm (published 2026-10-25) is an earlier build: eight tools, no `genclass_scan`, no `GENCLASS_REPORT`.
36
+ Everything below ships first in `0.2.0`.
37
+
38
+ - **`genclass_setup` installs the newest runtime line.** It prints `npm install @genclass/runtime@beta` (the agent
39
+ entry and interaction analytics need 0.3.0-beta.1 or later) for a project on 0.2.x, on a range without a version
40
+ (`*`, `latest`: npm's `latest` is still 0.2.x) or with an older copy in `node_modules`, and says what the project
41
+ has. The README's connect step names `@beta` first.
42
+ - **`genclass_scan {url, phone?, hosted?}`: audit any page in one step** ([docs/runtime/AGENT.md](../../docs/runtime/AGENT.md)
43
+ section 4.2). It runs `@genclass/runtime`'s `scan --json` (the project's own runtime when it has the command, else
44
+ `npx -y @genclass/runtime@beta`) in the project's folder: headless Chromium at desktop and phone sizes with the 23
45
+ measured visual checks, and returns a score and each problem with its element, selector and suggested CSS fix (page
46
+ text cleaned and labelled as data), plus the report as JSON (a second text block and `structuredContent`). It passes
47
+ `--local` unless the agent sets `hosted: true`, so without Playwright's Chromium it says how to install it instead
48
+ of sending the URL anywhere; `hosted: true` uses the genclass.dev page check (public pages only). The server's
49
+ instructions and the plugin skill say to scan a page before calling a UI change done. Nine tools.
50
+
51
+ - **Fixed: a race replay counts page lines.** Explore compares page text as counts, so a product name the page
52
+ always shows once and a stale result showed a second time was "only in the failing run"; the replay verdict then
53
+ checked presence only, and the card alone made every replay "reproduced", including after the fix. The finding's
54
+ evidence now keeps the counts (`textCounts`) and the verdict needs the line as many times as the failing run showed
55
+ it. Found by the end-to-end walkthrough, covered by a test.
56
+ - **Fixed: with `GENCLASS_REPORT` set, the tools' own calls are mirrored too.** The server's in-process API (what
57
+ `genclass_explain`, `genclass_replay`, `genclass_explore` and `genclass_clear` call when this session owns the
58
+ bridge) bypassed the reporting wrapper, so a dashboard only ever received the findings; the evidence read, the test,
59
+ replays armed and their verdicts, explore reports and clears reached it only through the bridge's HTTP path. Found
60
+ by the end-to-end walkthrough (`docs/evidence/e2e-walkthrough`), covered by a test.
61
+ - **Opt-in reporting to the app's dashboard** (`GENCLASS_REPORT`; [docs/runtime/AGENT.md](../../docs/runtime/AGENT.md)
62
+ section 4.5). Set to `on` (with `GENCLASS_DASHBOARD`) or to a dashboard link, the server mirrors its log of the loop
63
+ to that dashboard: each finding the bridge makes, each time the agent reads its evidence (`genclass_explain`), each
64
+ replay armed and each replay verdict, each regression test written, each explore report (page loads compared, races
65
+ found) and each clear: `POST /api/projects/<secret>/agent`, batched, best effort, ids, kinds, page paths, verdicts,
66
+ counts and times only, never page text. The dashboard's Closed-loop development view then draws every issue's path
67
+ (found, reproduced, fix proven, closed, or round again when a replay after a fix still reproduces it) with the
68
+ period's counts, lists the log newest first, and shows per production problem what the agent reproduced, tested and
69
+ proved fixed. Off unless set; nothing sent feeds a decision, a finding or a tool result.
70
+
71
+ - **Explore stops reporting order-dependent bookkeeping as races** ([docs/runtime/AGENT.md](../../docs/runtime/AGENT.md)
72
+ section 5.1, [RESULTS.md](../../docs/runtime/RESULTS.md) section 20). A reordered run is a race only when what the
73
+ page shows, its form values, the requests it sent or its errors differ from the request-order baseline; store values
74
+ that differ while the page is the same are listed as "Internal state only", and an overwrite a later response
75
+ repaired as "Along the way only", neither with a finding. A `[redacted]` value equals any value. Scenarios are
76
+ grouped with digits blanked, parenthesised counts dropped and a typing burst split by a label change joined again,
77
+ falling back to action kinds and element roles, then kinds, when names changed with the order; the report says how
78
+ many reordered runs it compared and says "0 compared" (no verdict) rather than "No race found" when none was. Race
79
+ finding titles, keys, replays and generated tests lead with what the page showed (store values only for a finding
80
+ with nothing else). Snapshots may carry up to 1,200 store fields and say how many the page left out. The explore
81
+ tool's description and the plugin skill say the same. On the Strapi admin's 21 interaction sessions the race-like
82
+ verdicts went from 16 to 0 (reordered runs reported as races: 62, all false, to 0; sessions without a usable verdict:
83
+ 5 to 0), and the real 403 race is still found at 300, 600 and 900 ms (6 of 6 runs, 0 false); on a correct Redux
84
+ Toolkit Query page the false reports went from 18 of 18 reordered runs to 0; the e2e page still finds its race in 5
85
+ of 6 reordered runs and none on the fixed page.
4
86
 
5
87
  - First version: the GenClass MCP server for coding agents ([docs/runtime/AGENT.md](../../docs/runtime/AGENT.md)).
6
88
  A bridge on 127.0.0.1:47357 that pages connect to through `@genclass/runtime/agent`; eight tools
@@ -15,3 +97,17 @@
15
97
  agent and strips invisible characters. A Claude Code plugin (`plugin/`: the server, the prompt hook and a skill) and
16
98
  an MCP Registry entry (`server.json`) ship with it. Needs `@genclass/runtime` 0.3.0-beta.1 or later in the app
17
99
  (`@genclass/runtime/agent`). Released by `.github/workflows/release-mcp.yml` from a `mcp-v<version>` tag.
100
+ - Ready for registries and directories: a `server.json` description of at most 100 characters (the official MCP
101
+ Registry's limit; checked against its 2025-12-11 schema and accepted by `mcp-publisher validate`), a `title` and
102
+ `websiteUrl`; the release workflow publishes it to the registry with GitHub OIDC (pinned, checksummed
103
+ `mcp-publisher`) after npm, and uploads an MCP Bundle (`npm run bundle`: `genclass-<version>.mcpb`, for Claude
104
+ Desktop and Smithery) as an artifact. Every launcher is pinned to the release (`npx -y @genclass/mcp@<version>`):
105
+ the plugin's server and hook, `init`, and the install blocks; `npm run sync` rewrites the pins from
106
+ `package.json` and the tests fail when one differs. Install blocks for Claude Code, Claude Desktop, Cursor (with an
107
+ install link), VS Code (`code --add-mcp` and an install link), Codex CLI, Gemini CLI, Windsurf, Cline, Goose, Zed,
108
+ JetBrains IDEs and OpenCode, printed by `genclass-mcp config [client]` and in the README; `genclass_setup` adds the
109
+ block for the client it runs in (from `clientInfo` at initialize). Every tool's annotations carry `title`,
110
+ `readOnlyHint`, `destructiveHint` and `openWorldHint`. The plugin has a README (what it installs, what the hook
111
+ sends where, how to turn it off), directory links in `plugin.json`, and an [Agent Plugins](https://agent-plugins.org)
112
+ `plugin.json` and `mcp.json` for Cursor and Codex; the repository root has `glama.json`, `gemini-extension.json`,
113
+ `llms-install.md` and `.cursor-plugin/marketplace.json`. Listing drafts: `docs/adoption/listings/mcp.md`.
package/README.md CHANGED
@@ -15,28 +15,282 @@ An MCP server for Claude Code and other coding agents. It connects to the pages
15
15
  - **Proof.** `genclass_replay` delivers the exact order that produced a bug again, before your fix (reproduced) and
16
16
  after it (not reproduced), and `genclass_explain` writes a Playwright test that fails while the bug is there.
17
17
 
18
- Everything stays on your machine. No dependencies.
18
+ Everything stays on your machine. No dependencies. The server is free. For developers who want the loop run for
19
+ them, GenClass runs it as a service under Enterprise: the MCP server, collector and dashboard hosted by GenClass or
20
+ inside your network ([genclass.dev/enterprise](https://genclass.dev/enterprise)).
19
21
 
20
22
  ## Install
21
23
 
22
- As a Claude Code plugin (the server, a prompt hook that brings new findings to each prompt, and a skill that tells
23
- Claude when to use it):
24
+ Pick your client. Every block pins this release, so the client starts exactly this version;
25
+ `npx -y @genclass/mcp@0.2.1 config <client>` prints the same lines, and `genclass_setup` prints the block for the
26
+ client it runs in.
27
+
28
+ <!-- install:start (generated from src/clients.ts by `npm run sync -w @genclass/mcp`; edit it there) -->
29
+
30
+ ### Claude Code
31
+
32
+ As a plugin (the server, a prompt hook that brings new findings to each prompt, and the `genclass` skill with the procedure):
24
33
 
25
34
  ```
26
35
  /plugin marketplace add genclass-dev/GenClass-lib
27
36
  /plugin install genclass@genclass
28
37
  ```
29
38
 
30
- Or the server alone:
39
+ Or the server alone (`--scope project` writes `.mcp.json` for everyone on the project; `--scope user` for all your projects). `init` also writes the skill to `.claude/skills/genclass/SKILL.md` (`--no-skill` leaves it out):
40
+
41
+ ```bash
42
+ claude mcp add --scope project genclass -- npx -y @genclass/mcp@0.2.1
43
+ # or: npx -y @genclass/mcp@0.2.1 init --hook (.mcp.json and the skill, plus the prompt hook in .claude/settings.json)
44
+ ```
45
+
46
+ Or just the skill (no server; `skills/genclass/SKILL.md` at the repository root, for skill directories): `npx skills add genclass-dev/GenClass-lib`
47
+
48
+ ### Claude Desktop
49
+
50
+ Settings, Developer, Edit Config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows):
51
+
52
+ ```json
53
+ {
54
+ "mcpServers": {
55
+ "genclass": {
56
+ "command": "npx",
57
+ "args": [
58
+ "-y",
59
+ "@genclass/mcp@0.2.1"
60
+ ]
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ ### Cursor
67
+
68
+ [![Add genclass MCP server to Cursor](https://cursor.com/deeplink/mcp-install-dark.png)](https://cursor.com/link/mcp/install?name=genclass&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBnZW5jbGFzcy9tY3BAMC4yLjEiXX0%3D) or `cursor://anysphere.cursor-deeplink/mcp/install?name=genclass&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBnZW5jbGFzcy9tY3BAMC4yLjEiXX0%3D`
69
+
70
+ Or `.cursor/mcp.json` in the project (`~/.cursor/mcp.json` for all projects):
71
+
72
+ ```json
73
+ {
74
+ "mcpServers": {
75
+ "genclass": {
76
+ "command": "npx",
77
+ "args": [
78
+ "-y",
79
+ "@genclass/mcp@0.2.1"
80
+ ]
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ ### VS Code
87
+
88
+ [![Install in VS Code](https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF)](https://vscode.dev/redirect/mcp/install?name=genclass&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40genclass%2Fmcp%400.2.1%22%5D%7D) or from a terminal:
89
+
90
+ ```bash
91
+ code --add-mcp '{"name":"genclass","command":"npx","args":["-y","@genclass/mcp@0.2.1"]}'
92
+ ```
93
+
94
+ Or `.mcp.json` at the workspace root (the portable format; `.vscode/mcp.json` takes the same entry under `servers`):
95
+
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "genclass": {
100
+ "command": "npx",
101
+ "args": [
102
+ "-y",
103
+ "@genclass/mcp@0.2.1"
104
+ ]
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ ### Codex CLI
111
+
112
+ ```bash
113
+ codex mcp add genclass -- npx -y @genclass/mcp@0.2.1
114
+ ```
115
+
116
+ Or `~/.codex/config.toml` (`.codex/config.toml` in a trusted project). The first start downloads the package, so allow more than the default 10 seconds:
117
+
118
+ ```toml
119
+ [mcp_servers.genclass]
120
+ command = "npx"
121
+ args = ["-y", "@genclass/mcp@0.2.1"]
122
+ startup_timeout_sec = 30
123
+ ```
124
+
125
+ ### Gemini CLI
126
+
127
+ ```bash
128
+ gemini mcp add genclass npx -- -y @genclass/mcp@0.2.1 # -s user: for all projects
129
+ ```
130
+
131
+ Or `.gemini/settings.json` in the project (`~/.gemini/settings.json` for all projects):
132
+
133
+ ```json
134
+ {
135
+ "mcpServers": {
136
+ "genclass": {
137
+ "command": "npx",
138
+ "args": [
139
+ "-y",
140
+ "@genclass/mcp@0.2.1"
141
+ ]
142
+ }
143
+ }
144
+ }
145
+ ```
146
+
147
+ ### Windsurf (Devin Desktop)
148
+
149
+ `~/.codeium/windsurf/mcp_config.json` (Windsurf), `~/.config/devin/mcp_config.json` (Devin Desktop's Cascade agent; `%APPDATA%\devin\mcp_config.json` on Windows):
150
+
151
+ ```json
152
+ {
153
+ "mcpServers": {
154
+ "genclass": {
155
+ "command": "npx",
156
+ "args": [
157
+ "-y",
158
+ "@genclass/mcp@0.2.1"
159
+ ]
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ Devin CLI and Devin Desktop's Devin Local agent:
166
+
167
+ ```bash
168
+ devin mcp add -s user genclass -- npx -y @genclass/mcp@0.2.1
169
+ ```
170
+
171
+ ### Cline
31
172
 
32
173
  ```bash
33
- claude mcp add genclass -- npx -y @genclass/mcp
34
- # or, in the project: npx @genclass/mcp init (adds it to .mcp.json)
35
- # npx @genclass/mcp init --hook (also a prompt hook that brings new findings to the agent)
174
+ cline mcp add genclass --yes -- npx -y @genclass/mcp@0.2.1
36
175
  ```
37
176
 
38
- Then connect the app's development build (once). The agent link needs `@genclass/runtime` 0.3.0-beta.1 or later
39
- (`npm install @genclass/runtime@beta` until 0.3.0 is `latest`):
177
+ Or MCP Servers, Configure, Configure MCP Servers (`~/.cline/data/settings/cline_mcp_settings.json`):
178
+
179
+ ```json
180
+ {
181
+ "mcpServers": {
182
+ "genclass": {
183
+ "command": "npx",
184
+ "args": [
185
+ "-y",
186
+ "@genclass/mcp@0.2.1"
187
+ ]
188
+ }
189
+ }
190
+ }
191
+ ```
192
+
193
+ ### Goose
194
+
195
+ `goose://extension?cmd=npx&arg=-y&arg=%40genclass%2Fmcp%400.2.1&id=genclass&name=genclass&description=Find%20race%20conditions%20by%20reordering%20responses%2C%20replay%20one%2C%20prove%20the%20fix` (open it to install), or `goose configure` (Add Extension, Command-line Extension, command `npx -y @genclass/mcp@0.2.1`), or `~/.config/goose/config.yaml`:
196
+
197
+ ```yaml
198
+ extensions:
199
+ genclass:
200
+ type: stdio
201
+ name: genclass
202
+ enabled: true
203
+ cmd: npx
204
+ args: ["-y", "@genclass/mcp@0.2.1"]
205
+ env_keys: []
206
+ envs: {}
207
+ timeout: 300
208
+ ```
209
+
210
+ ### Zed
211
+
212
+ `~/.config/zed/settings.json` (`.zed/settings.json` in the project), or Settings, AI, MCP Servers, Add Server:
213
+
214
+ ```json
215
+ {
216
+ "context_servers": {
217
+ "genclass": {
218
+ "command": "npx",
219
+ "args": [
220
+ "-y",
221
+ "@genclass/mcp@0.2.1"
222
+ ]
223
+ }
224
+ }
225
+ }
226
+ ```
227
+
228
+ ### JetBrains IDEs
229
+
230
+ AI Assistant: Settings, Tools, AI Assistant, Model Context Protocol (MCP), Add, then this JSON. Junie: `.junie/mcp/mcp.json` in the project (`~/.junie/mcp/mcp.json` for all projects), same JSON:
231
+
232
+ ```json
233
+ {
234
+ "mcpServers": {
235
+ "genclass": {
236
+ "command": "npx",
237
+ "args": [
238
+ "-y",
239
+ "@genclass/mcp@0.2.1"
240
+ ]
241
+ }
242
+ }
243
+ }
244
+ ```
245
+
246
+ ### OpenCode
247
+
248
+ `opencode.json` in the project (`~/.config/opencode/opencode.json` for all projects), or `opencode mcp add`:
249
+
250
+ ```json
251
+ {
252
+ "$schema": "https://opencode.ai/config.json",
253
+ "mcp": {
254
+ "genclass": {
255
+ "type": "local",
256
+ "command": [
257
+ "npx",
258
+ "-y",
259
+ "@genclass/mcp@0.2.1"
260
+ ],
261
+ "enabled": true
262
+ }
263
+ }
264
+ }
265
+ ```
266
+
267
+ <!-- install:end -->
268
+
269
+ Any other MCP client: a stdio server, command `npx`, arguments `-y @genclass/mcp@0.2.1`, no environment variables
270
+ required.
271
+
272
+ ### The `genclass` skill
273
+
274
+ The server's instructions (sent when it connects) tell the agent when to reach for GenClass: the symptom words
275
+ ("sometimes", "randomly", "only in production", "on slow connections", a value that "flips back", stale or old
276
+ results, lost edits, double submits, sideways scrolling), the code changes that call for an explore, the scan before a
277
+ UI change is done, and the first call for each. The procedure (the explore arguments, the Playwright pairing, how to
278
+ read a report, what to say when done, what to do when the tools are missing) is the `genclass` skill,
279
+ [`plugin/skills/genclass/SKILL.md`](plugin/skills/genclass/SKILL.md). Three ways to get it:
280
+
281
+ - the plugin installs it with the server and the hook;
282
+ - `npx -y @genclass/mcp@0.2.1 init` writes it to `.claude/skills/genclass/SKILL.md` in the project (`--no-skill`
283
+ leaves it out). The written file carries a `genclass:init` marker line: a rerun replaces a file with the marker and
284
+ leaves one without it (yours, or edited), and says which;
285
+ - `npx skills add genclass-dev/GenClass-lib` installs the repository-root copy, `skills/genclass/SKILL.md`, through a
286
+ skill directory, with no server (the skill then says how to add one).
287
+
288
+ To remove it: delete `.claude/skills/genclass/` (or the directory the skill tool wrote to); with the plugin,
289
+ `/plugin uninstall genclass@genclass`.
290
+
291
+ Then connect the app's development build (once). The agent link needs the newest runtime line, `@genclass/runtime`
292
+ 0.3.0-beta.1 or later: `npm install @genclass/runtime@beta` (a bare `npm install @genclass/runtime` gets npm's
293
+ `latest`, the older 0.2.x, which has no agent entry):
40
294
 
41
295
  ```ts
42
296
  import { GenClass } from "@genclass/runtime";
@@ -76,7 +330,8 @@ on the fixed one, and explore on the fixed page reported nothing. Details: [docs
76
330
  | `genclass_explore` | `start` / `report` / `stop`: find what depends on response order |
77
331
  | `genclass_replay` | `arm` / `result`: reproduce one finding exactly |
78
332
  | `genclass_analytics` | per-endpoint latency, error rates and request counts, learned relations and flows; production numbers from your GenClass dashboard |
79
- | `genclass_setup` | the lines to add for your framework |
333
+ | `genclass_setup` | the lines to add for your framework, and the config lines for the client it runs in |
334
+ | `genclass_scan` | `{url, phone?, hosted?}`: audit any page (the dev server or a site you do not own) with the 23 measured visual checks in headless Chromium: a score and each problem with its element, selector and a suggested CSS fix, plus the JSON report. Runs `npx @genclass/runtime@beta scan --json --local` (or the project's own runtime); needs Playwright's Chromium (`npx playwright install chromium`), or `hosted: true` for the genclass.dev page check (public pages only) |
80
335
  | `genclass_clear` | forget recorded runs and findings |
81
336
 
82
337
  ## New findings without asking
@@ -84,8 +339,8 @@ on the fixed one, and explore on the fixed page reported nothing. Details: [docs
84
339
  - **Channels** (Claude Code research preview): start Claude Code with
85
340
  `claude --dangerously-load-development-channels server:genclass` and new findings arrive in the session as they
86
341
  happen (`notifications/claude/channel`).
87
- - **Prompt hook**: `npx @genclass/mcp init --hook` adds a `UserPromptSubmit` hook; each prompt then carries the findings
88
- that changed since the last one.
342
+ - **Prompt hook** (part of the Claude Code plugin): `npx -y @genclass/mcp@0.2.1 init --hook` adds a `UserPromptSubmit`
343
+ hook to `.claude/settings.json`; each prompt then carries the findings that changed since the last one.
89
344
 
90
345
  ## Environment
91
346
 
@@ -94,6 +349,7 @@ on the fixed one, and explore on the fixed page reported nothing. Details: [docs
94
349
  | `GENCLASS_AGENT_PORT` | `47357` | the bridge's port (the page then needs `connectAgent(rt, { url })`) |
95
350
  | `GENCLASS_STATE_DIR` | `.genclass/agent` | where findings persist between sessions; `none` keeps them in memory |
96
351
  | `GENCLASS_DASHBOARD` | | your dashboard's private link, for `genclass_analytics` `production` (`sample` reads the public sample) |
352
+ | `GENCLASS_REPORT` | | `on` (with `GENCLASS_DASHBOARD`), or a dashboard link or secret: mirror this server's log of the loop to that dashboard's Closed-loop development view (each finding, each time its evidence is read, each replay armed and its verdict, each regression test written, each explore report, each clear), which draws every issue's path (found, reproduced, fix proven, closed, or round again) with counts and lists the log. Ids, kinds, page paths, verdicts, counts and times only, never page text; off unless set ([AGENT.md section 4.5](https://github.com/genclass-dev/GenClass-lib/blob/main/docs/runtime/AGENT.md)) |
97
353
  | `GENCLASS_AGENT_ORIGINS` | | exact page origins allowed besides this machine's, e.g. `http://192.168.1.20:5173` (the page then needs `connectAgent(rt, { anyHost: true })`) |
98
354
  | `GENCLASS_TOKEN_DIR` | `~/.genclass` | where the bridge keeps its API token (mode 0600) for the hook and other sessions |
99
355
 
@@ -104,9 +360,26 @@ The bridge listens on 127.0.0.1 only and checks the `Host` header. Pages may tal
104
360
  website, a router page or a captive portal you visit cannot plant findings, and a page can only add to its own run.
105
361
  The agent API refuses browsers and needs a token only your user can read. Everything a page sends is validated,
106
362
  capped, stripped of invisible characters and shown to the agent as quoted data, never as instructions. Nothing leaves
107
- your machine. See section 6 of
363
+ your machine (the exceptions are under Privacy). See section 6 of
108
364
  [AGENT.md](https://github.com/genclass-dev/GenClass-lib/blob/main/docs/runtime/AGENT.md).
109
365
 
366
+ ## Privacy
367
+
368
+ The server collects nothing and sends nothing to GenClass or anyone else. Findings stay on your machine, in
369
+ `.genclass/agent/` in the server's working directory (the project, for clients that start servers there; set
370
+ `GENCLASS_STATE_DIR` for clients that do not, such as Claude Desktop), which the server gitignores, and in the bridge's memory; the bridge's token is in
371
+ `~/.genclass`. The one request that leaves the machine is `genclass_analytics` `{source: "production"}`, which reads
372
+ your own GenClass dashboard when you set `GENCLASS_DASHBOARD` to its private link. `genclass_scan` loads the page the
373
+ agent names (that is the page's own traffic) in a local browser; only with `hosted: true` is the URL sent to the
374
+ genclass.dev page check, and when the project has no `@genclass/runtime` with `scan`, npx downloads it from npm. With `GENCLASS_REPORT` set (off by
375
+ default) the server also mirrors its log of the loop to that dashboard, in small batches: the id, kind and page path of
376
+ each finding, when its evidence was read, each replay armed and its verdict, when a regression test was written, each
377
+ explore report (page loads compared, races found) and each clear, so the dashboard's Closed-loop development view
378
+ draws every issue's path (found, reproduced, fix proven, closed, or round again) and lists what the agent did; never a
379
+ title, an evidence line, a snapshot or any page text, and nothing it sends feeds a decision. The runtime in your app has its
380
+ own disclosed diagnostics ([PRIVACY.md](https://github.com/genclass-dev/GenClass-lib/blob/main/PRIVACY.md)), which
381
+ `GenClass.init({ telemetry: false })` turns off; the agent link is not part of them.
382
+
110
383
  ## License
111
384
 
112
385
  Apache-2.0
package/dist/cli.d.ts CHANGED
@@ -4,16 +4,24 @@ interface CliIo {
4
4
  out: (s: string) => void;
5
5
  err: (s: string) => void;
6
6
  }
7
- declare function init(io: CliIo, hook: boolean): number;
7
+ /** The marker line init puts in the skill it writes: a rerun replaces a file that carries it and leaves one that does not. */
8
+ declare const SKILL_MARK = "genclass:init";
9
+ /** Where init writes the skill in a project (Claude Code reads a project's skills from .claude/skills/<name>/SKILL.md). */
10
+ declare const SKILL_PATH: string;
11
+ /** The skill as init writes it: the package's copy with the marker line right after the frontmatter. */
12
+ declare function skillText(version: string, source?: string): string;
13
+ declare function init(io: CliIo, hook: boolean, skill?: boolean): number;
8
14
  /**
9
15
  * The prompt hook: findings changed since the cursor stored in hook-cursor (state directory), tied to the bridge's
10
16
  * epoch (a restarted bridge counts from 0 again). Silent when there is nothing new or no bridge.
11
17
  */
12
18
  declare function hookCmd(io: CliIo): Promise<number>;
19
+ /** `config [client]`: one client's install block, or every client's. */
20
+ declare function configCmd(io: CliIo, id: string | undefined): number;
13
21
  declare function runCli(argv: string[], io: CliIo & {
14
22
  stdin: NodeJS.ReadableStream;
15
23
  stdout: NodeJS.WritableStream;
16
24
  stderr: NodeJS.WritableStream;
17
25
  }): Promise<number>;
18
26
 
19
- export { type CliIo, hookCmd, init, runCli };
27
+ export { type CliIo, SKILL_MARK, SKILL_PATH, configCmd, hookCmd, init, runCli, skillText };