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.
- package/bin/cli.js +41 -21
- 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
|
-
//
|
|
540
|
-
const
|
|
541
|
-
const
|
|
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
|
-
: '
|
|
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
|
-
|
|
561
|
-
|
|
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
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
582
|
+
3. Add this contact to your agent's address book:
|
|
583
|
+
\`\`\`
|
|
584
|
+
a2a add "${inviteUrl}" "${ownerText || 'friend'}"
|
|
585
|
+
\`\`\`
|
|
567
586
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
a2a
|
|
571
|
-
|
|
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
|
-
|
|
575
|
-
|
|
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)}`);
|