a2acalling 0.6.29 → 0.6.30

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 (2) hide show
  1. package/bin/cli.js +41 -21
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -536,18 +536,15 @@ const commands = {
536
536
  console.log(`šŸ“‹ SHAREABLE INVITE (copy everything below):`);
537
537
  console.log(`${'─'.repeat(50)}\n`);
538
538
 
539
- // Generate shareable invite block
540
- const ownerText = record.owner || 'the owner';
541
- const agentName = record.name;
542
- const tierName = record.tier || 'public';
543
- const tierConfig = config.getAll().tiers?.[tierName] || {};
544
- const tierDesc = tierConfig.description || `${tierName} access`;
539
+ // Get agent name from config (reuse configAgent from earlier)
540
+ const myAgentName = configAgent.name || 'my agent';
541
+ const ownerText = record.owner;
545
542
 
546
543
  // Format topics as bullet list
547
544
  const topicsArray = record.allowed_topics || [];
548
545
  const topicsList = topicsArray.length > 0
549
546
  ? topicsArray.map(t => ` • ${t}`).join('\n')
550
- : ' • General discussion';
547
+ : '';
551
548
 
552
549
  // Format objectives as bullet list
553
550
  const goalsArray = record.allowed_goals || [];
@@ -555,26 +552,49 @@ const commands = {
555
552
  ? goalsArray.map(g => ` • ${g}`).join('\n')
556
553
  : '';
557
554
 
555
+ // Build invite header
556
+ const inviteHeader = ownerText
557
+ ? `**${ownerText}** invites you to connect with their agent **${myAgentName}**`
558
+ : `You're invited to connect with **${myAgentName}**`;
559
+
558
560
  const invite = `šŸ“žšŸ—£ļø **Agent-to-Agent Call Invite**
559
561
 
560
- šŸ‘¤ **${ownerText}**'s agent **${agentName}** invites your agent to connect.
561
- šŸ“Š Access tier: **${tierName}** (${tierDesc})
562
+ ${inviteHeader}
563
+
564
+ \`\`\`
565
+ ${inviteUrl}
566
+ \`\`\`
567
+ ${topicsList ? `\n**Topics:**\n${topicsList}\n` : ''}${goalsList ? `\n**Goals:**\n${goalsList}\n` : ''}${expiresText !== 'never' ? `\nā° Expires: ${expiresText}\n` : ''}
568
+ ────────────────────────────────────────────────
569
+
570
+ **Setup Instructions**
571
+
572
+ 1. Install the A2A package:
573
+ \`\`\`
574
+ npm install -g a2acalling
575
+ \`\`\`
576
+
577
+ 2. Run first-time setup (configures your agent's port, hostname, and disclosure topics):
578
+ \`\`\`
579
+ a2a quickstart
580
+ \`\`\`
562
581
 
563
- šŸ’¬ **Topics to discuss:**
564
- ${topicsList}
565
- ${goalsList ? `\nšŸŽÆ **Objectives:**\n${goalsList}\n` : ''}
566
- šŸ”— ${inviteUrl}${expiresText === 'never' ? '' : `\nā° Expires: ${expiresText}`}
582
+ 3. Add this contact to your agent's address book:
583
+ \`\`\`
584
+ a2a add "${inviteUrl}" "${ownerText || 'friend'}"
585
+ \`\`\`
567
586
 
568
- ── For agents new to A2A ──
569
- npm i -g a2acalling
570
- a2a quickstart # First-time setup
571
- a2a add "${inviteUrl}" "${agentName}" # Save contact
572
- a2a call "${agentName}" "Hello!" # Start call
587
+ 4. Start a conversation:
588
+ \`\`\`
589
+ a2a call "${ownerText || 'friend'}" "Hello! My owner asked me to reach out."
590
+ \`\`\`
573
591
 
574
- ── For agents already onboarded ──
575
- a2a add "${inviteUrl}" "${agentName}" && a2a call "${agentName}" "Hello from my owner!"
592
+ **Quick one-liner (if already set up):**
593
+ \`\`\`
594
+ a2a add "${inviteUrl}" "${ownerText || 'friend'}" && a2a call "${ownerText || 'friend'}" "Hello!"
595
+ \`\`\`
576
596
 
577
- šŸ“– https://github.com/onthegonow/a2a_calling`;
597
+ šŸ“– Protocol docs: https://github.com/onthegonow/a2a_calling`;
578
598
 
579
599
  console.log(invite);
580
600
  console.log(`\n${'─'.repeat(50)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "a2acalling",
3
- "version": "0.6.29",
3
+ "version": "0.6.30",
4
4
  "description": "Agent-to-agent calling for OpenClaw - A2A agent communication",
5
5
  "main": "src/index.js",
6
6
  "bin": {