a2acalling 0.6.20 → 0.6.22
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/SKILL.md +19 -3
- package/bin/cli.js +63 -24
- package/package.json +1 -1
- package/src/lib/disclosure.js +22 -6
package/SKILL.md
CHANGED
|
@@ -42,7 +42,20 @@ a2a quickstart # run onboarding
|
|
|
42
42
|
a2a quickstart --force # re-run from scratch
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
After the onboarding walkthrough prints, scan
|
|
45
|
+
After the onboarding walkthrough prints, scan ALL available context to build the disclosure JSON:
|
|
46
|
+
|
|
47
|
+
**Primary sources:**
|
|
48
|
+
- USER.md, SOUL.md — owner identity, interests, values
|
|
49
|
+
- memory/*.md — may contain relevant context
|
|
50
|
+
|
|
51
|
+
**If workspace files are missing/empty, also scan:**
|
|
52
|
+
- ~/.gitconfig — name, email hints
|
|
53
|
+
- Environment: whoami, hostname, $USER
|
|
54
|
+
- ~/.config/ — installed tools reveal work domain
|
|
55
|
+
- Installed CLIs — infer developer/devops/data roles
|
|
56
|
+
- System hostname — may indicate project or role
|
|
57
|
+
|
|
58
|
+
Build disclosure tiers from whatever context exists, then submit:
|
|
46
59
|
|
|
47
60
|
```bash
|
|
48
61
|
a2a quickstart --submit '<json>'
|
|
@@ -101,13 +114,16 @@ a2a quickstart --port 3001 --interactive
|
|
|
101
114
|
|
|
102
115
|
If reverse proxy/ingress is required, Quickstart will stop and ask for explicit confirmation (`--confirm-ingress`).
|
|
103
116
|
|
|
104
|
-
Full disclosure onboarding (manifest editing) remains available below: it generates a disclosure manifest that controls what topics your agent
|
|
117
|
+
Full disclosure onboarding (manifest editing) remains available below: it generates a disclosure manifest that controls what topics your agent discusses or redirects during A2A calls — scoped by access tier (public, friends, family).
|
|
105
118
|
|
|
106
119
|
This onboarding is required before the first `/a2a call`. The owner must approve permissions first.
|
|
107
120
|
|
|
108
121
|
Flow:
|
|
109
122
|
|
|
110
|
-
1. Scan
|
|
123
|
+
1. Scan ALL available context to generate a default manifest:
|
|
124
|
+
- Primary: USER.md, SOUL.md, memory/*.md
|
|
125
|
+
- Fallback: ~/.gitconfig, env vars, hostname, installed tools
|
|
126
|
+
- Infer owner's domain from system state if workspace is empty
|
|
111
127
|
2. Present the manifest as a numbered text list grouped by tier:
|
|
112
128
|
|
|
113
129
|
```
|
package/bin/cli.js
CHANGED
|
@@ -1391,35 +1391,74 @@ https://github.com/onthegonow/a2a_calling`;
|
|
|
1391
1391
|
if (externalIp) {
|
|
1392
1392
|
const verifyUrl = `http://${publicHost}/api/a2a/ping`;
|
|
1393
1393
|
if (serverPort !== 80) {
|
|
1394
|
-
// Check what's using port 80
|
|
1394
|
+
// Check what's using port 80 and detect web servers
|
|
1395
1395
|
const port80Status = await isPortListening(80, '127.0.0.1', { timeoutMs: 250 });
|
|
1396
|
+
const { spawnSync } = require('child_process');
|
|
1397
|
+
const hasNginx = spawnSync('which', ['nginx'], { encoding: 'utf8' }).status === 0;
|
|
1398
|
+
const hasCaddy = spawnSync('which', ['caddy'], { encoding: 'utf8' }).status === 0;
|
|
1399
|
+
const hasSudo = spawnSync('sudo', ['-n', 'true'], { encoding: 'utf8' }).status === 0;
|
|
1400
|
+
|
|
1401
|
+
console.log(`\n ━━━ IMPORTANT: Port Configuration ━━━`);
|
|
1402
|
+
console.log(`\n A2A works best on port 80. Other ports require firewall configuration.`);
|
|
1403
|
+
console.log(` Current: A2A server on port ${serverPort}`);
|
|
1396
1404
|
|
|
1397
|
-
console.log(`\n ━━━ Reverse Proxy Setup ━━━`);
|
|
1398
|
-
console.log(` Server running on port ${serverPort}, but external callers expect port 80/443.`);
|
|
1399
1405
|
if (port80Status.listening) {
|
|
1400
|
-
console.log(` Port 80:
|
|
1406
|
+
console.log(` Port 80: IN USE (likely ${hasNginx ? 'nginx' : hasCaddy ? 'caddy' : 'a web server'})`);
|
|
1407
|
+
console.log(`\n RECOMMENDED: Configure reverse proxy to route /api/a2a/* from port 80 to ${serverPort}`);
|
|
1408
|
+
console.log(` This is the easiest option — no firewall changes needed.\n`);
|
|
1409
|
+
|
|
1410
|
+
if (hasNginx) {
|
|
1411
|
+
console.log(` ── nginx config (add to /etc/nginx/sites-available/default) ──`);
|
|
1412
|
+
console.log(` location /api/a2a/ {`);
|
|
1413
|
+
console.log(` proxy_pass http://127.0.0.1:${serverPort}/api/a2a/;`);
|
|
1414
|
+
console.log(` proxy_http_version 1.1;`);
|
|
1415
|
+
console.log(` proxy_set_header Host $host;`);
|
|
1416
|
+
console.log(` proxy_set_header X-Real-IP $remote_addr;`);
|
|
1417
|
+
console.log(` }`);
|
|
1418
|
+
console.log(` ────────────────────────────────────────────────────────────`);
|
|
1419
|
+
console.log(`\n To apply: sudo nano /etc/nginx/sites-available/default`);
|
|
1420
|
+
console.log(` (add the location block inside your server {})`);
|
|
1421
|
+
console.log(` sudo nginx -t && sudo systemctl reload nginx`);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
if (hasCaddy) {
|
|
1425
|
+
console.log(`\n ── Caddy config ──`);
|
|
1426
|
+
console.log(` handle /api/a2a/* {`);
|
|
1427
|
+
console.log(` reverse_proxy 127.0.0.1:${serverPort}`);
|
|
1428
|
+
console.log(` }`);
|
|
1429
|
+
console.log(` ───────────────────`);
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
console.log(`\n After configuring, your invite hostname should be: ${externalIp}`);
|
|
1433
|
+
console.log(` (port 80 is the default, so no port number needed)`);
|
|
1434
|
+
|
|
1435
|
+
} else {
|
|
1436
|
+
console.log(` Port 80: AVAILABLE`);
|
|
1437
|
+
console.log(`\n RECOMMENDED: Restart A2A on port 80 for easiest setup.`);
|
|
1438
|
+
console.log(` Run: a2a stop && a2a start --port 80`);
|
|
1439
|
+
if (!hasSudo) {
|
|
1440
|
+
console.log(` Note: Port 80 may require sudo. Try: sudo a2a start --port 80`);
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
console.log(`\n ── Alternative: Firewall route (more complex) ──`);
|
|
1445
|
+
console.log(` If you can't use port 80, open port ${serverPort} in your firewall:`);
|
|
1446
|
+
console.log(` sudo ufw allow ${serverPort}/tcp # Ubuntu/Debian`);
|
|
1447
|
+
console.log(` sudo firewall-cmd --add-port=${serverPort}/tcp --permanent && sudo firewall-cmd --reload # RHEL/CentOS`);
|
|
1448
|
+
console.log(` Your invite will then use: ${publicHost}`);
|
|
1449
|
+
|
|
1450
|
+
console.log(`\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
|
|
1451
|
+
console.log(`\n AGENT ACTION: Configure ingress for A2A to receive external calls.`);
|
|
1452
|
+
console.log(` Options (in order of preference):`);
|
|
1453
|
+
if (!port80Status.listening) {
|
|
1454
|
+
console.log(` 1. Restart on port 80: a2a stop && ${hasSudo ? '' : 'sudo '}a2a start --port 80`);
|
|
1455
|
+
console.log(` 2. Configure firewall for port ${serverPort} (see commands above)`);
|
|
1401
1456
|
} else {
|
|
1402
|
-
console.log(`
|
|
1457
|
+
console.log(` 1. Add reverse proxy config to ${hasNginx ? 'nginx' : hasCaddy ? 'Caddy' : 'your web server'} (see above)`);
|
|
1458
|
+
console.log(` 2. Configure firewall for port ${serverPort} (see commands above)`);
|
|
1403
1459
|
}
|
|
1404
|
-
console.log(
|
|
1405
|
-
console.log(
|
|
1406
|
-
console.log(` location /api/a2a/ {`);
|
|
1407
|
-
console.log(` proxy_pass http://127.0.0.1:${serverPort}/api/a2a/;`);
|
|
1408
|
-
console.log(` proxy_http_version 1.1;`);
|
|
1409
|
-
console.log(` proxy_set_header Host $host;`);
|
|
1410
|
-
console.log(` }`);
|
|
1411
|
-
console.log(`\n For Caddy:`);
|
|
1412
|
-
console.log(` handle /api/a2a/* {`);
|
|
1413
|
-
console.log(` reverse_proxy 127.0.0.1:${serverPort}`);
|
|
1414
|
-
console.log(` }`);
|
|
1415
|
-
console.log(`\n After configuring, update the invite hostname to use port 80:`);
|
|
1416
|
-
console.log(` Current: ${publicHost}`);
|
|
1417
|
-
console.log(` Should be: ${externalIp} (without port, defaults to 80)`);
|
|
1418
|
-
console.log(`\n Or open port ${serverPort} directly in your firewall if no proxy is used.`);
|
|
1419
|
-
console.log(` ━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
|
|
1420
|
-
console.log(`\n ACTION REQUIRED: Ask your owner if they want to configure a reverse proxy.`);
|
|
1421
|
-
console.log(` If they say yes, help them add the nginx/caddy config above.`);
|
|
1422
|
-
console.log(` If they say no or skip, the invite will use port ${serverPort} directly.`);
|
|
1460
|
+
console.log(` 3. Skip (local-only testing, external agents won't be able to call)`);
|
|
1461
|
+
console.log(`\n Ask your owner which option to proceed with.`);
|
|
1423
1462
|
}
|
|
1424
1463
|
console.log(`\n Verify: curl -s ${verifyUrl}`);
|
|
1425
1464
|
}
|
package/package.json
CHANGED
package/src/lib/disclosure.js
CHANGED
|
@@ -580,15 +580,31 @@ function buildExtractionPrompt(availableFiles) {
|
|
|
580
580
|
.join('\n') || ' (none detected)';
|
|
581
581
|
fileSection = `### Available workspace files\n${fileList}\n\nRead the available files above and extract disclosure topics.`;
|
|
582
582
|
} else {
|
|
583
|
-
fileSection = `###
|
|
583
|
+
fileSection = `### Context sources to scan
|
|
584
|
+
|
|
585
|
+
**Primary sources (workspace files):**
|
|
584
586
|
- USER.md — owner identity, bio, interests
|
|
585
587
|
- SOUL.md — values, personality, communication style
|
|
586
|
-
- HEARTBEAT.md — skip this (contains agent tasks, not disclosure topics)
|
|
587
|
-
- SKILL.md — skip this (contains agent instructions)
|
|
588
|
-
- CLAUDE.md — skip this (contains agent instructions)
|
|
589
588
|
- memory/*.md — may contain relevant context
|
|
590
|
-
|
|
591
|
-
|
|
589
|
+
- Skip HEARTBEAT.md, SKILL.md, CLAUDE.md (agent instructions, not owner info)
|
|
590
|
+
|
|
591
|
+
**If workspace files are missing or empty, scan these additional sources:**
|
|
592
|
+
- ~/.gitconfig — name, email, identity hints
|
|
593
|
+
- Environment: whoami, hostname, $USER, $HOME
|
|
594
|
+
- ~/.config/ — installed tools hint at owner's work
|
|
595
|
+
- ~/.ssh/config — project/server names may reveal domains
|
|
596
|
+
- Any README.md files in common locations
|
|
597
|
+
- Shell history patterns (languages, tools used)
|
|
598
|
+
- Installed CLIs (what's in PATH)
|
|
599
|
+
|
|
600
|
+
**Inference from system state:**
|
|
601
|
+
- Programming languages installed → likely a developer
|
|
602
|
+
- Cloud CLIs (aws, gcloud, az) → infrastructure/devops
|
|
603
|
+
- Design tools → creative work
|
|
604
|
+
- Data tools (jupyter, pandas) → data science
|
|
605
|
+
- Server hostname → may indicate role or project
|
|
606
|
+
|
|
607
|
+
Use ALL available context to build a reasonable disclosure profile. If truly nothing exists, create a minimal placeholder with "New agent setup - owner details pending" and suggest what info the owner should provide.`;
|
|
592
608
|
}
|
|
593
609
|
|
|
594
610
|
const jsonBlock = `\`\`\`json
|