@particle-academy/agent-integrations 0.9.0 → 0.9.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/README.md +8 -0
- package/docs/agent-hookable-demos.md +7 -2
- package/docs/relay-server.md +21 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @particle-academy/agent-integrations
|
|
2
2
|
|
|
3
|
+
[](https://particle.academy)
|
|
4
|
+
|
|
3
5
|
MCP-driven agent presence in collab sessions. Each open session gets a **micro-MCP server** running in-page; agents (in-browser or external via relay) connect to it and act as participants — adding sticky notes, drawing, moving items, leaving cursor trails.
|
|
4
6
|
|
|
5
7
|
Also ships the **agent UX surface**: a chat-and-tool-log panel, an on-canvas presence cursor, and a brief activity highlight for items the agent just touched.
|
|
@@ -173,6 +175,12 @@ shuttles JSON-RPC frames — it doesn't run tools or hold state.
|
|
|
173
175
|
- **`docs/relay-protocol.md`** — the on-the-wire JSON envelope, with notes on
|
|
174
176
|
the three transports the protocol supports (Reverb, WebRTC, SSE+POST).
|
|
175
177
|
|
|
178
|
+
The agent at the far end needs an MCP client. Beyond pasting the session URL
|
|
179
|
+
into an existing one (Claude Code, Cursor, …), there's
|
|
180
|
+
**[`mcp-relay-client`](https://github.com/Particle-Academy/mcp-relay-client)** —
|
|
181
|
+
a single-file, zero-dependency client (bash / Python / TS / Go) built for these
|
|
182
|
+
relay sessions: `curl -O …/connect.sh && bash connect.sh "<session-url>" tools`.
|
|
183
|
+
|
|
176
184
|
Pattern (Reverb):
|
|
177
185
|
|
|
178
186
|
```ts
|
|
@@ -41,7 +41,10 @@ Three pieces. You write zero of them yourself if you follow this guide:
|
|
|
41
41
|
complete Laravel controller).
|
|
42
42
|
|
|
43
43
|
3. **The agent's client.** Out of your control — visitors paste your session
|
|
44
|
-
URL into whatever MCP client they already use.
|
|
44
|
+
URL into whatever MCP client they already use. If they don't have one, point
|
|
45
|
+
them at [`mcp-relay-client`](https://github.com/Particle-Academy/mcp-relay-client):
|
|
46
|
+
a single-file, zero-dependency client (bash / Python / TS / Go) they download
|
|
47
|
+
and aim at the session URL.
|
|
45
48
|
|
|
46
49
|
## End-user UX
|
|
47
50
|
|
|
@@ -54,7 +57,9 @@ This is what visitors actually experience. Every demo follows the same shape:
|
|
|
54
57
|
4. The page mints a per-session token, registers it with the relay, and shows
|
|
55
58
|
a copyable share URL.
|
|
56
59
|
5. Visitor pastes the URL into their MCP client (`.mcp.json` for Claude Code,
|
|
57
|
-
Cursor's MCP settings, etc.)
|
|
60
|
+
Cursor's MCP settings, etc.), or downloads
|
|
61
|
+
[`mcp-relay-client`](https://github.com/Particle-Academy/mcp-relay-client)
|
|
62
|
+
and aims it at the URL. The client connects to the relay.
|
|
58
63
|
6. Agent calls tools → tools mutate the host page's React state → visitor
|
|
59
64
|
watches the surface change in real time. Optional: agent cursor + tool-call
|
|
60
65
|
feed render alongside.
|
package/docs/relay-server.md
CHANGED
|
@@ -18,6 +18,27 @@ across restarts.
|
|
|
18
18
|
Code → the relay is hosted somewhere reachable from both the browser and the
|
|
19
19
|
agent's machine.
|
|
20
20
|
|
|
21
|
+
## Connecting a client to a session
|
|
22
|
+
|
|
23
|
+
This doc covers running the **broker**. The agent connects from the other end
|
|
24
|
+
with an MCP **client** pointed at a session URL. Two options:
|
|
25
|
+
|
|
26
|
+
- **A generic MCP client you already have** — paste the session URL into Claude
|
|
27
|
+
Code's `.mcp.json`, Cursor's MCP settings, Claude Desktop, etc.
|
|
28
|
+
- **[`mcp-relay-client`](https://github.com/Particle-Academy/mcp-relay-client)** —
|
|
29
|
+
a super-lite, **single-file, zero-dependency** client in bash / Python / TS /
|
|
30
|
+
Go, purpose-built for these relay sessions. Grab the one you have a runtime for
|
|
31
|
+
and point it at the session URL:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
curl -O https://raw.githubusercontent.com/Particle-Academy/mcp-relay-client/main/connect.sh
|
|
35
|
+
bash connect.sh "https://host/agent-playground?session=ABC&token=XYZ" tools
|
|
36
|
+
bash connect.sh "<session-url>" call whiteboard_add_sticky '{"x":300,"y":200,"text":"hi"}'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
It derives the relay endpoints, session id, and token from the URL and runs the
|
|
40
|
+
full `initialize` → `tools/list` → `tools/call` handshake for you.
|
|
41
|
+
|
|
21
42
|
## Three ways to run it
|
|
22
43
|
|
|
23
44
|
### 1. `npx` — local dev / one-off prod
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/agent-integrations",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "MCP-driven agent presence in collab sessions: per-session micro-MCP server, pluggable bridges to fancy-* packages, and agent UX components (panel + on-canvas cursor).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -221,11 +221,11 @@
|
|
|
221
221
|
"fancy"
|
|
222
222
|
],
|
|
223
223
|
"peerDependencies": {
|
|
224
|
-
"@particle-academy/fancy-artboard": "
|
|
225
|
-
"@particle-academy/fancy-flow": "
|
|
226
|
-
"@particle-academy/fancy-sheets": "
|
|
227
|
-
"@particle-academy/fancy-slides": "
|
|
228
|
-
"@particle-academy/fancy-whiteboard": "
|
|
224
|
+
"@particle-academy/fancy-artboard": ">=0.1.0",
|
|
225
|
+
"@particle-academy/fancy-flow": ">=0.2.0",
|
|
226
|
+
"@particle-academy/fancy-sheets": ">=0.1.0",
|
|
227
|
+
"@particle-academy/fancy-slides": ">=0.1.4",
|
|
228
|
+
"@particle-academy/fancy-whiteboard": ">=0.1.0",
|
|
229
229
|
"react": "^18.0.0 || ^19.0.0",
|
|
230
230
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
231
231
|
},
|
|
@@ -247,8 +247,8 @@
|
|
|
247
247
|
}
|
|
248
248
|
},
|
|
249
249
|
"devDependencies": {
|
|
250
|
-
"@particle-academy/fancy-slides": "^0.
|
|
251
|
-
"@particle-academy/fancy-whiteboard": "^0.
|
|
250
|
+
"@particle-academy/fancy-slides": "^0.12.0",
|
|
251
|
+
"@particle-academy/fancy-whiteboard": "^0.2.0",
|
|
252
252
|
"@types/node": "^22.0.0",
|
|
253
253
|
"@types/react": "^19.0.0",
|
|
254
254
|
"@types/react-dom": "^19.0.0",
|