vibeshare-live 0.1.1 → 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/README.md +53 -67
- package/dist/chunk-RY2ANOPC.js +1018 -0
- package/dist/cli.d.ts +33 -35
- package/dist/cli.js +393 -239
- package/dist/index.d.ts +106 -47
- package/dist/index.js +53 -22
- package/dist/manager-uhMBJXtu.d.ts +259 -0
- package/dist/mcp.d.ts +27 -38
- package/dist/mcp.js +199 -14616
- package/docs/launch-video-16x9.html +673 -0
- package/docs/launch-video-9x16.html +673 -0
- package/docs/launch-video.html +490 -0
- package/docs/prototype.html +964 -0
- package/docs/spec.md +61 -0
- package/package.json +28 -36
- package/dist/chunk-SBAGPPGC.js +0 -233
- package/dist/share-t_zYXkQB.d.ts +0 -188
package/README.md
CHANGED
|
@@ -1,104 +1,90 @@
|
|
|
1
1
|
# vibeshare
|
|
2
2
|
|
|
3
|
-
Share your live agent coding session by URL — traces.com-style, open source, CLI-first.
|
|
3
|
+
Share your live agent coding session by URL — traces.com-style, open source, CLI-first. Spectators watch read-only; invite links let viewers request to join as collaborators (host approves, live).
|
|
4
4
|
|
|
5
|
-
Part of the **Vibe Suite** — companion tools for agentic coding CLIs (Claude Code, Codex, Gemini, Grok/pi, Kimi). Ships as **CLI + npm package + MCP server
|
|
5
|
+
Part of the **Vibe Suite** — companion tools for agentic coding CLIs (Claude Code, Codex, Gemini, Grok/pi, Kimi). Ships as **CLI + npm package + MCP server**, built on [`@pooriaarab/vibe-core`](https://www.npmjs.com/package/@pooriaarab/vibe-core) (consent ledger, hooks bus, badges).
|
|
6
6
|
|
|
7
|
-
**Local-first: runs on your
|
|
7
|
+
**Local-first: the share runs on your machine.** The consent ledger gates every share (`share:session` scope), the stream is served straight from your host, and nothing is stored on a server.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Install & build
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
npm
|
|
15
|
-
#
|
|
16
|
-
npx vibeshare-live -- claude
|
|
11
|
+
```sh
|
|
12
|
+
npm install
|
|
13
|
+
npm run build # tsup → dist/ (cli.js, index.js, mcp.js + types)
|
|
14
|
+
npm run typecheck # tsc --noEmit
|
|
15
|
+
npm test # vitest
|
|
17
16
|
```
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Quick start
|
|
18
|
+
## CLI
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
```sh
|
|
21
|
+
vibeshare # share your shell, spectate read-only
|
|
22
|
+
vibeshare --invite --expire 1h # viewers may request to join; auto-expires
|
|
23
|
+
vibeshare --pass hunter2 # passphrase second factor
|
|
24
|
+
vibeshare -- npm test # share a specific command
|
|
25
|
+
vibeshare --host 0.0.0.0 # share on your LAN (default: loopback only)
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
vibeshare
|
|
27
|
+
vibeshare viewers # who's watching, pending join requests
|
|
28
|
+
vibeshare viewers --approve <id> # promote a viewer to collaborator
|
|
29
|
+
vibeshare viewers --kick <id> # remove a viewer, live
|
|
30
|
+
vibeshare stop # end the share (works from another terminal)
|
|
27
31
|
```
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
Running `vibeshare` prints the link:
|
|
30
34
|
|
|
31
35
|
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
● local · no data out
|
|
37
|
+
sharing: npm test
|
|
38
|
+
url: http://127.0.0.1:50613/s/KKxzdjLpr_km
|
|
39
|
+
access: spectate (read-only)
|
|
40
|
+
expires: until you stop
|
|
41
|
+
manage: vibeshare viewers · vibeshare stop
|
|
37
42
|
```
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| Flag | Meaning |
|
|
42
|
-
| --- | --- |
|
|
43
|
-
| `--spectate` | link holders get read-only access (default) |
|
|
44
|
-
| `--invite` | link holders may request to join; you approve to let them drive |
|
|
45
|
-
| `--expire 1h\|24h` | auto-revoke the share after this duration |
|
|
46
|
-
| `--pass <p>` | require a passphrase on top of the share URL |
|
|
47
|
-
|
|
48
|
-
`vibeshare --version` · `vibeshare --help` · `vibeshare mcp`
|
|
49
|
-
|
|
50
|
-
## Share links
|
|
51
|
-
|
|
52
|
-
The share URL reads like `your-host/s/<id>`. The link is a capability URL: the id is the only thing that grants access (122 bits of entropy), so it's unguessable. Optional `--pass` adds a second factor.
|
|
53
|
-
|
|
54
|
-
The actual live stream runs over the local/LAN WebSocket relay that vibelive starts on your machine. The `vibeshare.stream` URL is the identity layer; the bytes flow over a self-hostable relay.
|
|
44
|
+
Opening the URL shows a self-contained spectator page (no install for viewers) streaming the session live over SSE, with a "Request to join" button on invite links. First run asks for consent (`--yes` to skip); the grant is recorded locally in `~/.vibeshare/consent.json` and can be revoked any time.
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
Read-only is real: there is no route that lets a viewer write — the host is the server of record, and promotion to collaborator goes only through a host-approved request (`ViewerRegistry.canWrite()` is the single gate).
|
|
57
47
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## As a library
|
|
48
|
+
## npm library
|
|
61
49
|
|
|
62
50
|
```ts
|
|
63
|
-
import {
|
|
64
|
-
import { createShare } from 'vibeshare-live';
|
|
65
|
-
|
|
66
|
-
const host = createHost({ command: ['claude'] });
|
|
67
|
-
const relay = await createRelay({ port: 0, hostHandle: host, initialDriver: 'host' });
|
|
51
|
+
import { createShare, grantConsent } from 'vibeshare';
|
|
68
52
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
53
|
+
grantConsent('share from my tool'); // once; local ledger
|
|
54
|
+
const { url, feed, viewers, revoke } = await createShare({
|
|
55
|
+
session: 'npm test',
|
|
56
|
+
access: 'spectate', // or 'invite'
|
|
57
|
+
expiry: '1h', // or 'stop'
|
|
74
58
|
});
|
|
75
59
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
await
|
|
60
|
+
feed.publish('tests starting…');
|
|
61
|
+
viewers.on('request', (v) => viewers.approve(v.id));
|
|
62
|
+
await revoke();
|
|
79
63
|
```
|
|
80
64
|
|
|
81
|
-
|
|
65
|
+
`createShare` throws `ConsentRequiredError` without a `share:session` grant. Bring your own plumbing with `ShareManager`, `LocalHttpTransport`, and `FileConsentStore`.
|
|
82
66
|
|
|
83
|
-
##
|
|
67
|
+
## MCP server
|
|
84
68
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
```jsonc
|
|
88
|
-
// .mcp.json or your client's MCP config
|
|
69
|
+
```json
|
|
89
70
|
{
|
|
90
71
|
"mcpServers": {
|
|
91
|
-
"vibeshare": { "command": "vibeshare
|
|
72
|
+
"vibeshare": { "command": "vibeshare-mcp" }
|
|
92
73
|
}
|
|
93
74
|
}
|
|
94
75
|
```
|
|
95
76
|
|
|
96
|
-
Tools: `
|
|
77
|
+
Tools: `vibeshare_create`, `vibeshare_viewers`, `vibeshare_stop` — so an agent can offer "share this session?". Your MCP client's tool-approval prompt is the consent act (recorded with that note). Approving *join requests* stays human-only, via the CLI.
|
|
97
78
|
|
|
98
|
-
##
|
|
79
|
+
## Architecture & the vibelive seam
|
|
99
80
|
|
|
100
|
-
|
|
81
|
+
vibeshare owns the **link + gate**; session content is an ordered feed served to spectators. The one deliberate seam is transport (`src/transport.ts`):
|
|
101
82
|
|
|
102
|
-
|
|
83
|
+
- **`LocalHttpTransport`** (implemented, default): spectator page + SSE stream + loopback host-control API, served from your machine. Nothing stored on a server.
|
|
84
|
+
- **`RelayTransport`** (lands with vibelive): a dumb e2e relay / p2p mesh handing out public `vibeshare.io` URLs — same `ShareTransport` interface, swap-in only. Collaborator input routing is part of that seam and must pass `ViewerRegistry.canWrite()`.
|
|
85
|
+
|
|
86
|
+
Everything else — consent, access policy, passphrase gate, expiry teardown, viewer registry, revocation — is fully implemented and tested.
|
|
87
|
+
|
|
88
|
+
## Prototype
|
|
103
89
|
|
|
104
|
-
|
|
90
|
+
The original UX prototype (no build, no network): open [`docs/prototype.html`](docs/prototype.html). Spec: [`docs/spec.md`](docs/spec.md).
|