a2acalling 0.3.0 → 0.3.1
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/package.json +1 -1
- package/src/routes/dashboard.js +16 -4
package/package.json
CHANGED
package/src/routes/dashboard.js
CHANGED
|
@@ -84,11 +84,22 @@ function parseTopicObjects(values) {
|
|
|
84
84
|
return cleaned;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
function formatInviteMessage({ owner, agentName, inviteUrl, topics, expiresText }) {
|
|
87
|
+
function formatInviteMessage({ owner, agentName, inviteUrl, topics, goals, expiresText }) {
|
|
88
88
|
const ownerText = owner || 'Someone';
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
|
|
89
|
+
const topicsList = topics.length > 0 ? topics.join(' · ') : 'chat';
|
|
90
|
+
const goalsList = (goals || []).join(' · ');
|
|
91
|
+
const expirationLine = expiresText === 'never' ? '' : `\n⏰ ${expiresText}`;
|
|
92
|
+
return `📞🗣️ **Agent-to-Agent Call Invite**
|
|
93
|
+
|
|
94
|
+
👤 **${ownerText}** would like your agent to call **${agentName}** and explore where our owners might collaborate.
|
|
95
|
+
|
|
96
|
+
💬 ${topicsList}${goalsList ? `\n🎯 ${goalsList}` : ''}
|
|
97
|
+
|
|
98
|
+
${inviteUrl}${expirationLine}
|
|
99
|
+
|
|
100
|
+
── setup ──
|
|
101
|
+
npm i -g a2acalling && a2a add "${inviteUrl}" "${agentName}" && a2a call "${agentName}" "Hello from my owner!"
|
|
102
|
+
https://github.com/onthegonow/a2a_calling`;
|
|
92
103
|
}
|
|
93
104
|
|
|
94
105
|
function buildContext(options = {}) {
|
|
@@ -499,6 +510,7 @@ function createDashboardApiRouter(options = {}) {
|
|
|
499
510
|
agentName: name,
|
|
500
511
|
inviteUrl,
|
|
501
512
|
topics: record.allowed_topics || [],
|
|
513
|
+
goals: record.allowed_goals || [],
|
|
502
514
|
expiresText
|
|
503
515
|
});
|
|
504
516
|
|