a2acalling 0.6.0 → 0.6.2
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 +33 -9
- package/SKILL.md +67 -5
- package/bin/cli.js +468 -151
- package/docs/protocol.md +24 -14
- package/package.json +1 -1
- package/scripts/install-openclaw.js +64 -68
- package/src/dashboard/public/app.js +765 -28
- package/src/dashboard/public/index.html +57 -13
- package/src/dashboard/public/style.css +16 -0
- package/src/lib/callbook.js +358 -0
- package/src/lib/client.js +1 -2
- package/src/lib/config.js +67 -15
- package/src/lib/external-ip.js +18 -7
- package/src/lib/invite-host.js +26 -41
- package/src/lib/logger.js +26 -14
- package/src/lib/tokens.js +314 -113
- package/src/routes/a2a.js +11 -2
- package/src/routes/callbook.js +142 -0
- package/src/routes/dashboard.js +557 -25
- package/src/server.js +6 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Your AI agent can now call other AI agents — across instances, with scoped per
|
|
|
11
11
|
|
|
12
12
|
## ✨ Features
|
|
13
13
|
|
|
14
|
-
- 🔐 **Tiered permissions** — public
|
|
14
|
+
- 🔐 **Tiered permissions** — public / friends / family
|
|
15
15
|
- 📇 **Contact management** — save agents, track trust, link permissions
|
|
16
16
|
- 🧠 **Strategic summaries** — track what you got vs. gave, find mutual wins
|
|
17
17
|
- 🔔 **Owner notifications** — know when your agent gets called
|
|
@@ -28,7 +28,7 @@ Your AI agent can now call other AI agents — across instances, with scoped per
|
|
|
28
28
|
### Create an invite for others to call your agent
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
a2a create --name "My Agent" --owner "Your Name" --
|
|
31
|
+
a2a create --name "My Agent" --owner "Your Name" --permissions friends
|
|
32
32
|
|
|
33
33
|
# Output:
|
|
34
34
|
# 🤝 Your Name is inviting you to connect agents!
|
|
@@ -79,19 +79,29 @@ Setup behavior:
|
|
|
79
79
|
- Setup inspects port 80 and prints reverse proxy guidance for stable internet-facing ingress.
|
|
80
80
|
- Setup prints the exact dashboard URL at the end.
|
|
81
81
|
|
|
82
|
-
Before the first `a2a call`, the owner must
|
|
82
|
+
Before the first `a2a call`, the owner must complete onboarding (install location, permission tiers, and server ingress verification). Run:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
85
|
/a2a quickstart
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
CLI equivalents:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Local machine (local-only invites)
|
|
92
|
+
a2a quickstart --port 3001
|
|
93
|
+
|
|
94
|
+
# Server / public hostname (recommended: terminate at 443 via reverse proxy)
|
|
95
|
+
a2a quickstart --hostname YOUR_DOMAIN:443 --port 3001
|
|
96
|
+
```
|
|
97
|
+
|
|
88
98
|
## 🎯 Permission Tiers
|
|
89
99
|
|
|
90
|
-
| Tier |
|
|
91
|
-
|
|
92
|
-
| `public` |
|
|
93
|
-
| `friends` |
|
|
94
|
-
| `family` |
|
|
100
|
+
| Tier | What They Can Access |
|
|
101
|
+
|------|---------------------|
|
|
102
|
+
| `public` | Conversation only |
|
|
103
|
+
| `friends` | Most read-only tools (calendar/email/search) |
|
|
104
|
+
| `family` | Full tool access (careful!) |
|
|
95
105
|
|
|
96
106
|
Customize tiers in `~/.config/openclaw/a2a-config.json`:
|
|
97
107
|
|
|
@@ -171,7 +181,7 @@ a2a create [options] # Create an invite token
|
|
|
171
181
|
|
|
172
182
|
a2a list # List your tokens
|
|
173
183
|
a2a revoke <id> # Revoke a token
|
|
174
|
-
a2a quickstart #
|
|
184
|
+
a2a quickstart # Deterministic onboarding
|
|
175
185
|
```
|
|
176
186
|
|
|
177
187
|
### Calling
|
|
@@ -196,6 +206,20 @@ Dashboard paths:
|
|
|
196
206
|
- Standalone A2A server: `http://<host>:<port>/dashboard`
|
|
197
207
|
- OpenClaw gateway mode: `http://<gateway>/a2a`
|
|
198
208
|
|
|
209
|
+
### Remote Callbook (Mac / Remote Browser)
|
|
210
|
+
|
|
211
|
+
If the owner wants to manage A2A from a different machine (ex: their MacBook), you can pair a browser session using a one-time install link:
|
|
212
|
+
|
|
213
|
+
1. Open the dashboard on the server (local): `http://127.0.0.1:<port>/dashboard/`
|
|
214
|
+
2. Go to `Settings` -> `Remote Callbook`
|
|
215
|
+
3. Click `Create Install Link (24h)` and copy the URL
|
|
216
|
+
4. Open that link on the Mac. It exchanges the code for a long-lived session cookie and then redirects to the dashboard.
|
|
217
|
+
|
|
218
|
+
Notes:
|
|
219
|
+
- The install link expires after 24 hours and is one-time use.
|
|
220
|
+
- The session cookie is long-lived (effectively "never expires") until you revoke that device in `Settings` -> `Remote Callbook`.
|
|
221
|
+
- Callbook session storage DB: `~/.config/openclaw/a2a-callbook.db` (or `$A2A_CONFIG_DIR/a2a-callbook.db`).
|
|
222
|
+
|
|
199
223
|
### Traceability and Logs
|
|
200
224
|
|
|
201
225
|
All runtime logs are persisted in SQLite and also emitted to stdout:
|
package/SKILL.md
CHANGED
|
@@ -32,16 +32,34 @@ Enable agent-to-agent communication across OpenClaw instances.
|
|
|
32
32
|
Before processing ANY /a2a command, check onboarding status:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
|
|
35
|
+
node - <<'NODE'
|
|
36
|
+
const fs = require('fs');
|
|
37
|
+
const path = require('path');
|
|
38
|
+
|
|
39
|
+
const dir = process.env.A2A_CONFIG_DIR ||
|
|
40
|
+
process.env.OPENCLAW_CONFIG_DIR ||
|
|
41
|
+
path.join(process.env.HOME || '/tmp', '.config', 'openclaw');
|
|
42
|
+
const file = path.join(dir, 'a2a-config.json');
|
|
43
|
+
|
|
44
|
+
let ok = false;
|
|
45
|
+
try {
|
|
46
|
+
const cfg = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
47
|
+
ok = cfg.onboarding &&
|
|
48
|
+
cfg.onboarding.version === 2 &&
|
|
49
|
+
cfg.onboarding.step === 'complete';
|
|
50
|
+
} catch (e) {}
|
|
51
|
+
|
|
52
|
+
process.stdout.write(ok ? 'onboarded\n' : 'not_onboarded\n');
|
|
53
|
+
NODE
|
|
36
54
|
```
|
|
37
55
|
|
|
38
|
-
**If
|
|
56
|
+
**If it prints `not_onboarded`:**
|
|
39
57
|
- DO NOT process the requested command yet
|
|
40
58
|
- Tell the user: "A2A needs initial setup. Let me configure your agent's disclosure topics first."
|
|
41
|
-
- Run the Quickstart flow below to completion
|
|
59
|
+
- Run the deterministic Quickstart flow below to completion (flags-based, step-by-step)
|
|
42
60
|
- Only THEN proceed with the user's original command
|
|
43
61
|
|
|
44
|
-
**If
|
|
62
|
+
**If it prints `onboarded`:** proceed normally.
|
|
45
63
|
|
|
46
64
|
**Context gathering for onboarding:** Read ALL available context to generate personalized tier topics:
|
|
47
65
|
- **Primary:** USER.md, HEARTBEAT.md, SOUL.md
|
|
@@ -58,13 +76,51 @@ Extract: professional context, interests, goals, skills, sensitive areas. Group
|
|
|
58
76
|
- Recommended: run the A2A backend on an internal port and expose it via a reverse proxy on `:443` (HTTPS) or `:80` (HTTP), routing `/api/a2a/*` to the backend.
|
|
59
77
|
- `npx a2acalling setup` inspects port 80 and prints reverse proxy guidance + an external reachability check.
|
|
60
78
|
|
|
79
|
+
## Publishing (Maintainers)
|
|
80
|
+
|
|
81
|
+
This repo ships as:
|
|
82
|
+
- GitHub repo: `onthegonow/a2a_calling`
|
|
83
|
+
- npm package: `a2acalling`
|
|
84
|
+
|
|
85
|
+
Maintainer credentials are local-only and must never be committed:
|
|
86
|
+
- `.env` (gitignored) must contain `GH_TOKEN` and `NPM_TOKEN`
|
|
87
|
+
- GitHub Actions repo secrets should also include `GH_TOKEN` and `NPM_TOKEN` for automated releases
|
|
88
|
+
|
|
61
89
|
## Commands
|
|
62
90
|
|
|
63
91
|
### Quickstart
|
|
64
92
|
|
|
65
93
|
User says: `/a2a quickstart`, `/a2a start`, "set up A2A", "get started with A2A", "configure what my agent shares"
|
|
66
94
|
|
|
67
|
-
|
|
95
|
+
Deterministic onboarding flow (sequential, flags-based):
|
|
96
|
+
|
|
97
|
+
1. Background bootstrap (config + disclosure)
|
|
98
|
+
2. Owner dashboard access (local URL + optional Callbook Remote install link)
|
|
99
|
+
3. Set permission tiers: populate and confirm tier `topics` + `goals`
|
|
100
|
+
4. Port scan + reverse proxy guidance (if needed for public hostname)
|
|
101
|
+
5. External IP confirmation and public reachability check (public hostname only)
|
|
102
|
+
|
|
103
|
+
Run it like:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Local machine (local-only invites)
|
|
107
|
+
a2a quickstart --port 3001
|
|
108
|
+
|
|
109
|
+
# Server / public hostname
|
|
110
|
+
a2a quickstart --hostname YOUR_DOMAIN:443 --port 3001
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Quickstart will print a proposed tier configuration. After the user reviews it, re-run with:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
a2a quickstart --port 3001 --confirm-tiers
|
|
117
|
+
# or (public hostname)
|
|
118
|
+
a2a quickstart --hostname YOUR_DOMAIN:443 --port 3001 --confirm-tiers
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If reverse proxy/ingress is required, Quickstart will stop and ask for explicit confirmation (`--confirm-ingress`).
|
|
122
|
+
|
|
123
|
+
Full disclosure onboarding (manifest editing) remains available below: it generates a disclosure manifest that controls what topics your agent leads with, discusses, or deflects during A2A calls — scoped by access tier (public, friends, family).
|
|
68
124
|
|
|
69
125
|
This onboarding is required before the first `/a2a call`. The owner must approve permissions first.
|
|
70
126
|
|
|
@@ -117,6 +173,12 @@ Notes:
|
|
|
117
173
|
- This command is safe and **does not require onboarding**.
|
|
118
174
|
- Optional: open a specific tab via `--tab`.
|
|
119
175
|
|
|
176
|
+
Remote dashboard access (Callbook Remote):
|
|
177
|
+
- If the owner wants to use the dashboard from a different machine (ex: MacBook), have them open the dashboard locally on the server at `http://127.0.0.1:<port>/dashboard/`.
|
|
178
|
+
- In `Settings` -> `Remote Callbook`, click `Create Install Link (24h)` and copy the URL to the remote machine.
|
|
179
|
+
- The install link is one-time use and exchanges for a long-lived session cookie in the remote browser.
|
|
180
|
+
- To revoke access, use `Settings` -> `Remote Callbook` -> `Paired Devices` -> `Revoke`.
|
|
181
|
+
|
|
120
182
|
Examples:
|
|
121
183
|
|
|
122
184
|
```bash
|