parleyd 0.0.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 +60 -0
- package/package.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# parleyd
|
|
2
|
+
|
|
3
|
+
> A minimal, standalone, **live agent↔human canvas**. Agents and humans (and agents and other agents) co-think on one shared board in real time.
|
|
4
|
+
|
|
5
|
+
`parleyd` is the third in the SandRise coordination family — **muster**d (gather a team), **baton**d (hand work off), **parley**d (think together). A *parley* is a structured talk between parties to reach understanding; parleyd is where that happens on a shared canvas.
|
|
6
|
+
|
|
7
|
+
It exists because the alternatives are over-built and fragile: a 2026 attempt to drive a heavyweight whiteboard from an agent failed at the content layer (`addShape` "succeeded" but the canvas read back empty). parleyd's #1 rule is the fix.
|
|
8
|
+
|
|
9
|
+
## Design rules
|
|
10
|
+
|
|
11
|
+
1. **One canvas document.** An agent's writes go *into the same store* the human's canvas reads and renders — never a parallel "shapes" table. This is the rule that makes `add → read → render → export` round-trip.
|
|
12
|
+
2. **Content layer proven first.** The headless `add → read → snapshot` loop has a passing test before any UI polish (see `packages/server/test`).
|
|
13
|
+
3. **Canvas-neutral agent API.** Agents speak generic nodes (`addShape {type,text,x,y,color}`), not canvas-library types. tldraw is the rendering impl behind it — swappable later.
|
|
14
|
+
4. **Engine / host seam.** The HTTP API is the engine boundary; a `@sandrise/agent-canvas` library is a later *extraction*, not a rewrite.
|
|
15
|
+
5. **No login wall on localhost.** Open a URL and it works. Hosted/multi-tenant auth is a deferred, separate concern.
|
|
16
|
+
|
|
17
|
+
## Architecture
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
agent (any harness)
|
|
21
|
+
│ HTTP (canvas-neutral) ┌─ packages/server ──────────────┐
|
|
22
|
+
├─ POST /api/boards │ store.ts SQLite, the ONE doc │
|
|
23
|
+
├─ POST /api/boards/:id/shapes │ api.ts HTTP agent API │
|
|
24
|
+
├─ GET /api/boards/:id/canvas │ sync.ts WS broadcast hub │
|
|
25
|
+
└─ (or via thin MCP wrapper) │ mcp.ts MCP → HTTP │
|
|
26
|
+
└────────────┬───────────────────┘
|
|
27
|
+
human browser ── WS /ws/:id ──────────────────┘ live updates
|
|
28
|
+
└─ packages/web (tldraw renders the nodes)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- **Server** owns the store (SQLite), the HTTP agent API, and a dead-simple WS broadcast for live updates (we own the sync — no dependency on a fragile external sync layer). `@tldraw/sync` full multiplayer/CRDT is a future upgrade.
|
|
32
|
+
- **Web** is a tldraw canvas that loads a board's nodes and applies live `shape_added` events.
|
|
33
|
+
- **MCP** is a thin stdio wrapper over the HTTP API, so MCP harnesses (Claude Code, Cursor) get ergonomic tools while any non-MCP agent uses HTTP directly.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm install
|
|
39
|
+
pnpm test # proves the content loop headlessly (add → read → snapshot)
|
|
40
|
+
pnpm dev # server on :8787, web on http://localhost:5190
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Then, from an agent (HTTP):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# open a board
|
|
47
|
+
curl -s -XPOST localhost:8787/api/boards -d '{"title":"demo"}'
|
|
48
|
+
# add a shape (agent write → same doc the canvas renders)
|
|
49
|
+
curl -s -XPOST localhost:8787/api/boards/<id>/shapes -d '{"text":"hello parleyd","x":40,"y":40}'
|
|
50
|
+
# read it back
|
|
51
|
+
curl -s localhost:8787/api/boards/<id>/canvas
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Open `http://localhost:5190/#<id>` in a browser and watch agent writes appear live.
|
|
55
|
+
|
|
56
|
+
## Status
|
|
57
|
+
|
|
58
|
+
Early scaffold (`0.0.1`). The headless content loop is tested and green; the browser render + live sync are wired and verified by opening the web app. Roadmap: full tldraw multiplayer sync, snapshot export (PNG/SVG), auth for hosted use, the `@sandrise/agent-canvas` library extraction.
|
|
59
|
+
|
|
60
|
+
MIT.
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "parleyd",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "A minimal, standalone, live agent↔human canvas — agents and humans co-think on one shared board in real time.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"packageManager": "pnpm@10.28.2",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/SandRiseStudio/parleyd.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": ["agent", "whiteboard", "canvas", "tldraw", "mcp", "collaboration", "brainstorm"],
|
|
14
|
+
"files": ["README.md"],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"dev": "bash scripts/dev.sh",
|
|
17
|
+
"test": "pnpm --filter @parleyd/server test"
|
|
18
|
+
},
|
|
19
|
+
"pnpm": {
|
|
20
|
+
"onlyBuiltDependencies": ["better-sqlite3", "esbuild"]
|
|
21
|
+
}
|
|
22
|
+
}
|