agent-pager 0.1.0
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 +169 -0
- package/dist/src/cli.js +1110 -0
- package/dist/src/crypto.js +45 -0
- package/dist/src/delivery.js +51 -0
- package/dist/src/hosted-http.js +849 -0
- package/dist/src/hosted-service.js +1038 -0
- package/dist/src/hosted-vercel.js +51 -0
- package/dist/src/http-client.js +28 -0
- package/dist/src/local-config.js +29 -0
- package/dist/src/mcp.js +341 -0
- package/dist/src/render.js +34 -0
- package/dist/src/server.js +441 -0
- package/dist/src/session-adapters.js +23 -0
- package/dist/src/setup.js +90 -0
- package/dist/src/store.js +52 -0
- package/dist/src/supabase.js +32 -0
- package/dist/src/supabase.types.js +13 -0
- package/dist/src/types.js +1 -0
- package/package.json +82 -0
- package/web/app.js +676 -0
- package/web/index.html +199 -0
- package/web/pager-terminal.png +0 -0
- package/web/styles.css +421 -0
package/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Agent Pager
|
|
2
|
+
|
|
3
|
+
**Because people ignore their messages, but not their agents.**
|
|
4
|
+
|
|
5
|
+
Agent Pager is a secure friend network for paging trusted friends through their active coding agent sessions. The current repo contains the local prototype plus the hosted V1 foundation: Supabase schema/auth/realtime setup, typed database client helpers, safe Vercel config, MCP tools, Codex/Claude skills, and a retro Authorized Human Contact Service web app.
|
|
6
|
+
|
|
7
|
+
Production V1 is deployed at:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
https://agent-pager.vercel.app
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Current launch status: GitHub, Supabase, Vercel production, and the npm CLI package are live.
|
|
14
|
+
|
|
15
|
+
## Quickstart
|
|
16
|
+
|
|
17
|
+
Install the CLI:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g agent-pager
|
|
21
|
+
agent-pager login
|
|
22
|
+
agent-pager start
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Local prototype:
|
|
26
|
+
|
|
27
|
+
Terminal 1:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install
|
|
31
|
+
npm run build
|
|
32
|
+
npm start
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Terminal 2:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node dist/src/cli.js login --username bryson --local-dev
|
|
39
|
+
node dist/src/cli.js start
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Terminal 3, pretending to be a friend:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
AGENT_PAGER_HOME=/tmp/agent-pager-sarah node dist/src/cli.js login --username sarah --local-dev
|
|
46
|
+
node dist/src/cli.js friends invite
|
|
47
|
+
AGENT_PAGER_HOME=/tmp/agent-pager-sarah node dist/src/cli.js friends add <bryson-invite-url>
|
|
48
|
+
AGENT_PAGER_HOME=/tmp/agent-pager-sarah node dist/src/cli.js page bryson "Can you check the PR?"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Open the web app:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
http://127.0.0.1:8787
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Hosted V1 foundation:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm run db:start
|
|
61
|
+
npm run db:types:local
|
|
62
|
+
npm run check
|
|
63
|
+
npm run test:doctor
|
|
64
|
+
npm run test:config
|
|
65
|
+
npm run build
|
|
66
|
+
npm run test:web
|
|
67
|
+
npm run test:mcp
|
|
68
|
+
npm run test:smoke
|
|
69
|
+
npm run test:package
|
|
70
|
+
npm run test:hosted
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The hosted foundation includes Vercel-compatible API handlers under `/api` for public config, profiles, public profile links, friend requests, secure device pairing, devices, invites, friends, pages, deliveries, abuse reports, audit events, presence, and health. The retro web app uses Supabase Auth plus those hosted APIs for profile setup, `Page my agent` request-access links, friend invites, page compose/history, report filing, device approvals, and security logs. The tests are local-only and do not push to Supabase cloud or deploy to Vercel.
|
|
74
|
+
|
|
75
|
+
`agent-pager doctor` is a local-only readiness check for the hosted V1. It verifies the npm package manifest, Vercel Git deployment guard, required environment variables, server signing keypair, local pairing state, Git remote/status, Docker runtime, and cloud-smoke gate without linking Supabase, pushing Git, publishing npm, or deploying Vercel.
|
|
76
|
+
|
|
77
|
+
`agent-pager launch-check` is the live hosted preflight. It reads GitHub, Supabase, and Vercel state to confirm repo, schema, project, and env readiness before a manual preview deployment.
|
|
78
|
+
|
|
79
|
+
`agent-pager login` now uses secure hosted device pairing by default. The old local prototype login is still available with `--username` / `--local-dev`.
|
|
80
|
+
|
|
81
|
+
`agent-pager start` uses Supabase Realtime as the fast path and a signed HTTP polling fallback while it is running. `agent-pager check-pages` remains available for manual recovery or debugging.
|
|
82
|
+
|
|
83
|
+
The npm package ships the built CLI plus bundled retro web assets. `npm run test:package` dry-runs `npm pack` and verifies the package contents.
|
|
84
|
+
|
|
85
|
+
After an approved Vercel/Supabase deployment, `npm run cloud-smoke:run -- <vercel-url>` can verify the real hosted flow. The underlying cloud test skips by default and only touches hosted resources when `AGENT_PAGER_CLOUD_SMOKE=1` plus the smoke user credentials are set.
|
|
86
|
+
|
|
87
|
+
## Commands
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
agent-pager server
|
|
91
|
+
agent-pager login
|
|
92
|
+
agent-pager login --username bryson --local-dev
|
|
93
|
+
agent-pager start
|
|
94
|
+
agent-pager status
|
|
95
|
+
agent-pager share
|
|
96
|
+
agent-pager doctor
|
|
97
|
+
agent-pager launch-check
|
|
98
|
+
agent-pager settings quiet-hours on --start 22:00 --end 08:00 --timezone America/Denver
|
|
99
|
+
agent-pager settings quiet-hours off
|
|
100
|
+
agent-pager settings rate-limit 8
|
|
101
|
+
agent-pager devices list
|
|
102
|
+
agent-pager devices revoke <device-id>
|
|
103
|
+
agent-pager logout
|
|
104
|
+
agent-pager page sarah "Can you review this?"
|
|
105
|
+
agent-pager mute sarah --for 1h
|
|
106
|
+
agent-pager unmute sarah
|
|
107
|
+
agent-pager mutes list
|
|
108
|
+
agent-pager block sarah
|
|
109
|
+
agent-pager unblock sarah
|
|
110
|
+
agent-pager blocks list
|
|
111
|
+
agent-pager report sarah --reason spam
|
|
112
|
+
agent-pager report --page-id <page-id> --reason spam
|
|
113
|
+
agent-pager reports list
|
|
114
|
+
agent-pager friends invite
|
|
115
|
+
agent-pager friends invites
|
|
116
|
+
agent-pager friends revoke-invite <invite-url-or-code>
|
|
117
|
+
agent-pager friends add <invite-url-or-code>
|
|
118
|
+
agent-pager friends request sarah "Page my agent?"
|
|
119
|
+
agent-pager friends requests
|
|
120
|
+
agent-pager friends approve <request-id>
|
|
121
|
+
agent-pager friends deny <request-id>
|
|
122
|
+
agent-pager friends cancel <request-id>
|
|
123
|
+
agent-pager friends list
|
|
124
|
+
agent-pager friends remove <username>
|
|
125
|
+
agent-pager check-pages
|
|
126
|
+
agent-pager setup codex
|
|
127
|
+
agent-pager setup claude
|
|
128
|
+
agent-pager mcp
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Security Model
|
|
132
|
+
|
|
133
|
+
- Devices generate local Ed25519 keypairs.
|
|
134
|
+
- The service stores public keys only.
|
|
135
|
+
- Device requests are signed with timestamped canonical request signatures.
|
|
136
|
+
- Devices can be revoked from the web dashboard or CLI; revoked devices cannot sign future requests.
|
|
137
|
+
- Page delivery envelopes are signed by the server and verified locally.
|
|
138
|
+
- Pages deliver only between approved friends.
|
|
139
|
+
- Approved friendships can be removed without blocking; removed friends cannot page unless friendship is approved again.
|
|
140
|
+
- Public profiles do not allow arbitrary pages.
|
|
141
|
+
- Pending friend requests can be approved, denied, or canceled before they grant access.
|
|
142
|
+
- Messages are text-only; Agent Pager never lets a remote friend run commands.
|
|
143
|
+
- Per-friend mutes block delivery before a page reaches a local session and can be listed or removed.
|
|
144
|
+
- Blocks prevent friend requests, invite acceptance, approvals, and pages in either direction.
|
|
145
|
+
- Abuse reports can target a username or a page the reporter participated in.
|
|
146
|
+
- Quiet hours block delivery before page rows are created.
|
|
147
|
+
- Invite links expire and can be revoked before use.
|
|
148
|
+
- Rate limits and message length limits protect against spam.
|
|
149
|
+
- Hosted V1 uses Supabase RLS policies and realtime delivery rows instead of exposing raw session lists.
|
|
150
|
+
|
|
151
|
+
## Agent Integration
|
|
152
|
+
|
|
153
|
+
`agent-pager setup codex` installs:
|
|
154
|
+
|
|
155
|
+
- a Codex skill at `~/.codex/skills/agent-pager/SKILL.md`
|
|
156
|
+
- an MCP config block for `agent-pager mcp`
|
|
157
|
+
|
|
158
|
+
`agent-pager setup claude` installs:
|
|
159
|
+
|
|
160
|
+
- a Claude skill at `~/.claude/skills/agent-pager/SKILL.md`
|
|
161
|
+
- setup instructions for `claude mcp add agent-pager -- agent-pager mcp`
|
|
162
|
+
|
|
163
|
+
The MCP server exposes paging, replies, presence, Page my agent sharing, friend-request review, muting, blocking, removal, and abuse-report tools with explicit human-intent wording for access-changing actions.
|
|
164
|
+
|
|
165
|
+
Claude Code channels are the best future path for true push into an already-running Claude session. The current local listener already receives signed pages, persists them, and sends desktop notifications.
|
|
166
|
+
|
|
167
|
+
## Design
|
|
168
|
+
|
|
169
|
+
The web app is inspired by retro authorized-service computing artwork: warm paper, chunky panels, rainbow service stripe, compact operator-console layout, and original Agent Pager branding. It intentionally avoids Apple logos or trademarks.
|