a2acalling 0.6.16 → 0.6.18

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.
Files changed (3) hide show
  1. package/SKILL.md +12 -39
  2. package/bin/cli.js +30 -3
  3. package/package.json +1 -1
package/SKILL.md CHANGED
@@ -27,53 +27,26 @@ metadata:
27
27
 
28
28
  Enable agent-to-agent communication across OpenClaw instances.
29
29
 
30
- ## FIRST RUN GATE (Check Before EVERY /a2a Command)
30
+ ## Install & Onboarding
31
31
 
32
- Before processing any `/a2a` command that depends on tiers/disclosure (tokens, invites, calls), check onboarding status.
32
+ ```bash
33
+ npm install -g a2acalling
34
+ ```
33
35
 
34
- Exceptions (do not gate):
35
- - `/a2a gui` / `/a2a dashboard`
36
- - `/a2a uninstall`
36
+ Onboarding is automatic. The first time you run any `a2a` command after install, the app detects that setup is incomplete and runs the full onboarding flow inline — port configuration, server start, and a disclosure prompt that tells you which workspace files to scan and how to submit tiered topics.
37
37
 
38
- Onboarding check:
38
+ To manually trigger onboarding (or re-run it):
39
39
 
40
40
  ```bash
41
- node - <<'NODE'
42
- const fs = require('fs');
43
- const path = require('path');
44
-
45
- const dir = process.env.A2A_CONFIG_DIR ||
46
- process.env.OPENCLAW_CONFIG_DIR ||
47
- path.join(process.env.HOME || '/tmp', '.config', 'openclaw');
48
- const file = path.join(dir, 'a2a-config.json');
49
-
50
- let ok = false;
51
- try {
52
- const cfg = JSON.parse(fs.readFileSync(file, 'utf8'));
53
- ok = cfg.onboarding &&
54
- cfg.onboarding.version === 2 &&
55
- cfg.onboarding.step === 'complete';
56
- } catch (e) {}
57
-
58
- process.stdout.write(ok ? 'onboarded\n' : 'not_onboarded\n');
59
- NODE
41
+ a2a quickstart # run onboarding
42
+ a2a quickstart --force # re-run from scratch
60
43
  ```
61
44
 
62
- **If it prints `not_onboarded`:**
63
- - DO NOT process the requested command yet
64
- - Tell the user: "A2A needs initial setup. Let me configure your agent's disclosure topics first."
65
- - Run the deterministic Quickstart flow below to completion (flags-based, step-by-step)
66
- - Only THEN proceed with the user's original command
67
-
68
- **If it prints `onboarded`:** proceed normally.
45
+ After the onboarding walkthrough prints, scan your workspace files (USER.md, SOUL.md, etc.), build the disclosure JSON, and submit:
69
46
 
70
- **Context gathering for onboarding:** Read ALL available context to generate personalized tier topics:
71
- - **Primary:** USER.md, HEARTBEAT.md, SOUL.md
72
- - **Skills:** SKILL.md files (workspace + ~/.openclaw/skills/*)
73
- - **Memory:** memory/*.md files
74
- - **Project:** CLAUDE.md
75
-
76
- Extract: professional context, interests, goals, skills, sensitive areas. Group them into Public/Friends/Family tiers based on sensitivity.
47
+ ```bash
48
+ a2a quickstart --submit '<json>'
49
+ ```
77
50
 
78
51
  ## Network Ingress (Internet-Facing Invites)
79
52
 
package/bin/cli.js CHANGED
@@ -1402,10 +1402,37 @@ https://github.com/onthegonow/a2a_calling`;
1402
1402
  if (externalIp) {
1403
1403
  const verifyUrl = `http://${publicHost}/api/a2a/ping`;
1404
1404
  if (serverPort !== 80) {
1405
- console.log(`\n Note: Port ${serverPort} must be reachable externally.`);
1406
- console.log(` Reverse-proxy /api/a2a/* to localhost:${serverPort}, or open the port in your firewall.`);
1405
+ // Check what's using port 80
1406
+ const port80Status = await isPortListening(80, '127.0.0.1', { timeoutMs: 250 });
1407
+
1408
+ console.log(`\n ━━━ Reverse Proxy Setup ━━━`);
1409
+ console.log(` Server running on port ${serverPort}, but external callers expect port 80/443.`);
1410
+ if (port80Status.listening) {
1411
+ console.log(` Port 80: in use (likely nginx, caddy, or another web server)`);
1412
+ } else {
1413
+ console.log(` Port 80: available (but A2A is on ${serverPort})`);
1414
+ }
1415
+ console.log(`\n RECOMMENDED: Configure your web server to proxy A2A requests:\n`);
1416
+ console.log(` For nginx, add to your server block:`);
1417
+ console.log(` location /api/a2a/ {`);
1418
+ console.log(` proxy_pass http://127.0.0.1:${serverPort}/api/a2a/;`);
1419
+ console.log(` proxy_http_version 1.1;`);
1420
+ console.log(` proxy_set_header Host $host;`);
1421
+ console.log(` }`);
1422
+ console.log(`\n For Caddy:`);
1423
+ console.log(` handle /api/a2a/* {`);
1424
+ console.log(` reverse_proxy 127.0.0.1:${serverPort}`);
1425
+ console.log(` }`);
1426
+ console.log(`\n After configuring, update the invite hostname to use port 80:`);
1427
+ console.log(` Current: ${publicHost}`);
1428
+ console.log(` Should be: ${externalIp} (without port, defaults to 80)`);
1429
+ console.log(`\n Or open port ${serverPort} directly in your firewall if no proxy is used.`);
1430
+ console.log(` ━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
1431
+ console.log(`\n ACTION REQUIRED: Ask your owner if they want to configure a reverse proxy.`);
1432
+ console.log(` If they say yes, help them add the nginx/caddy config above.`);
1433
+ console.log(` If they say no or skip, the invite will use port ${serverPort} directly.`);
1407
1434
  }
1408
- console.log(` Verify: curl -s ${verifyUrl}`);
1435
+ console.log(`\n Verify: curl -s ${verifyUrl}`);
1409
1436
  }
1410
1437
 
1411
1438
  // Save server config and advance onboarding state to awaiting_disclosure.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "a2acalling",
3
- "version": "0.6.16",
3
+ "version": "0.6.18",
4
4
  "description": "Agent-to-agent calling for OpenClaw - A2A agent communication",
5
5
  "main": "src/index.js",
6
6
  "bin": {