@framers/agentos-ext-voice-twilio 0.1.0 → 0.1.2
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/LICENSE +98 -0
- package/dist/TwilioVoiceProvider.d.ts +64 -0
- package/dist/TwilioVoiceProvider.d.ts.map +1 -0
- package/dist/TwilioVoiceProvider.js +210 -0
- package/dist/TwilioVoiceProvider.js.map +1 -0
- package/dist/TwilioVoiceService.d.ts +107 -0
- package/dist/TwilioVoiceService.d.ts.map +1 -0
- package/dist/TwilioVoiceService.js +233 -0
- package/dist/TwilioVoiceService.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +126 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/voiceCall.d.ts +131 -0
- package/dist/tools/voiceCall.d.ts.map +1 -0
- package/dist/tools/voiceCall.js +222 -0
- package/dist/tools/voiceCall.js.map +1 -0
- package/manifest.json +1 -1
- package/package.json +39 -15
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview ITool implementation for making and managing phone calls via Twilio.
|
|
5
|
+
*
|
|
6
|
+
* Provides agents with the ability to initiate calls, speak text, end calls,
|
|
7
|
+
* and query call status through a unified tool interface.
|
|
8
|
+
*
|
|
9
|
+
* @module @framers/agentos-ext-voice-twilio/tools/voiceCall
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.VoiceCallTool = void 0;
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Tool
|
|
15
|
+
// ============================================================================
|
|
16
|
+
class VoiceCallTool {
|
|
17
|
+
constructor(handler) {
|
|
18
|
+
this.handler = handler;
|
|
19
|
+
this.id = 'twilioVoiceCall';
|
|
20
|
+
this.name = 'twilioVoiceCall';
|
|
21
|
+
this.displayName = 'Twilio Voice Call';
|
|
22
|
+
this.description = 'Make or manage phone calls via Twilio. Supports initiating outbound calls ' +
|
|
23
|
+
'(notify mode for one-way messages, conversation mode for bidirectional audio), ' +
|
|
24
|
+
'speaking text into active calls, ending calls, and querying call status.';
|
|
25
|
+
this.category = 'communication';
|
|
26
|
+
this.version = '0.1.0';
|
|
27
|
+
this.hasSideEffects = true;
|
|
28
|
+
this.inputSchema = {
|
|
29
|
+
type: 'object',
|
|
30
|
+
required: ['action'],
|
|
31
|
+
properties: {
|
|
32
|
+
action: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
enum: ['initiate_call', 'speak', 'end_call', 'get_status'],
|
|
35
|
+
description: 'The action to perform',
|
|
36
|
+
},
|
|
37
|
+
toNumber: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'E.164 phone number to call (e.g., +15551234567). Required for initiate_call.',
|
|
40
|
+
},
|
|
41
|
+
message: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'Text to speak. Used for initiate_call (notify mode) and speak action.',
|
|
44
|
+
},
|
|
45
|
+
callId: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
description: 'Call ID. Required for speak, end_call, and get_status actions.',
|
|
48
|
+
},
|
|
49
|
+
mode: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
enum: ['notify', 'conversation'],
|
|
52
|
+
description: 'Call mode. "notify" speaks a message and hangs up; "conversation" enables bidirectional audio. Defaults to "conversation".',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
this.outputSchema = {
|
|
57
|
+
type: 'object',
|
|
58
|
+
properties: {
|
|
59
|
+
callId: { type: 'string', description: 'Internal call ID' },
|
|
60
|
+
state: { type: 'string', description: 'Current call state' },
|
|
61
|
+
provider: { type: 'string', description: 'Telephony provider name' },
|
|
62
|
+
providerCallId: { type: 'string', description: 'Provider-assigned call ID (Twilio CallSid)' },
|
|
63
|
+
direction: { type: 'string', description: 'Call direction (outbound/inbound)' },
|
|
64
|
+
mode: { type: 'string', description: 'Call mode (notify/conversation)' },
|
|
65
|
+
fromNumber: { type: 'string', description: 'Caller phone number' },
|
|
66
|
+
toNumber: { type: 'string', description: 'Callee phone number' },
|
|
67
|
+
activeCalls: {
|
|
68
|
+
type: 'array',
|
|
69
|
+
items: { type: 'object' },
|
|
70
|
+
description: 'List of active calls (for get_status without callId)',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
async execute(args, _context) {
|
|
76
|
+
try {
|
|
77
|
+
switch (args.action) {
|
|
78
|
+
case 'initiate_call':
|
|
79
|
+
return await this.handleInitiateCall(args);
|
|
80
|
+
case 'speak':
|
|
81
|
+
return this.handleSpeak(args);
|
|
82
|
+
case 'end_call':
|
|
83
|
+
return await this.handleEndCall(args);
|
|
84
|
+
case 'get_status':
|
|
85
|
+
return this.handleGetStatus(args);
|
|
86
|
+
default:
|
|
87
|
+
return {
|
|
88
|
+
success: false,
|
|
89
|
+
error: `Unknown action: ${args.action}. Supported actions: initiate_call, speak, end_call, get_status`,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
return {
|
|
95
|
+
success: false,
|
|
96
|
+
error: error.message || String(error),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
validateArgs(args) {
|
|
101
|
+
const errors = [];
|
|
102
|
+
if (!args.action) {
|
|
103
|
+
errors.push('action is required');
|
|
104
|
+
}
|
|
105
|
+
else if (!['initiate_call', 'speak', 'end_call', 'get_status'].includes(args.action)) {
|
|
106
|
+
errors.push('action must be one of: initiate_call, speak, end_call, get_status');
|
|
107
|
+
}
|
|
108
|
+
if (args.action === 'initiate_call') {
|
|
109
|
+
if (!args.toNumber) {
|
|
110
|
+
errors.push('toNumber is required for initiate_call');
|
|
111
|
+
}
|
|
112
|
+
else if (typeof args.toNumber !== 'string' || !args.toNumber.startsWith('+')) {
|
|
113
|
+
errors.push('toNumber must be an E.164 formatted phone number (e.g., +15551234567)');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (args.action === 'speak') {
|
|
117
|
+
if (!args.callId)
|
|
118
|
+
errors.push('callId is required for speak');
|
|
119
|
+
if (!args.message)
|
|
120
|
+
errors.push('message is required for speak');
|
|
121
|
+
}
|
|
122
|
+
if (args.action === 'end_call' && !args.callId) {
|
|
123
|
+
errors.push('callId is required for end_call');
|
|
124
|
+
}
|
|
125
|
+
if (args.mode && !['notify', 'conversation'].includes(args.mode)) {
|
|
126
|
+
errors.push('mode must be "notify" or "conversation"');
|
|
127
|
+
}
|
|
128
|
+
return { isValid: errors.length === 0, errors: errors.length > 0 ? errors : undefined };
|
|
129
|
+
}
|
|
130
|
+
// ── Action Handlers ──
|
|
131
|
+
async handleInitiateCall(args) {
|
|
132
|
+
if (!args.toNumber) {
|
|
133
|
+
return { success: false, error: 'toNumber is required for initiate_call' };
|
|
134
|
+
}
|
|
135
|
+
const call = await this.handler.initiateCall(args.toNumber, args.message, args.mode);
|
|
136
|
+
return {
|
|
137
|
+
success: true,
|
|
138
|
+
output: {
|
|
139
|
+
callId: call.callId,
|
|
140
|
+
state: call.state,
|
|
141
|
+
provider: call.provider,
|
|
142
|
+
providerCallId: call.providerCallId,
|
|
143
|
+
direction: call.direction,
|
|
144
|
+
mode: call.mode,
|
|
145
|
+
fromNumber: call.fromNumber,
|
|
146
|
+
toNumber: call.toNumber,
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
handleSpeak(args) {
|
|
151
|
+
if (!args.callId) {
|
|
152
|
+
return { success: false, error: 'callId is required for speak' };
|
|
153
|
+
}
|
|
154
|
+
if (!args.message) {
|
|
155
|
+
return { success: false, error: 'message is required for speak' };
|
|
156
|
+
}
|
|
157
|
+
this.handler.speakText(args.callId, args.message);
|
|
158
|
+
const call = this.handler.getCallStatus(args.callId);
|
|
159
|
+
return {
|
|
160
|
+
success: true,
|
|
161
|
+
output: {
|
|
162
|
+
callId: args.callId,
|
|
163
|
+
state: call?.state ?? 'unknown',
|
|
164
|
+
message: 'Text queued for speech',
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
async handleEndCall(args) {
|
|
169
|
+
if (!args.callId) {
|
|
170
|
+
return { success: false, error: 'callId is required for end_call' };
|
|
171
|
+
}
|
|
172
|
+
await this.handler.hangupCall(args.callId);
|
|
173
|
+
const call = this.handler.getCallStatus(args.callId);
|
|
174
|
+
return {
|
|
175
|
+
success: true,
|
|
176
|
+
output: {
|
|
177
|
+
callId: args.callId,
|
|
178
|
+
state: call?.state ?? 'hangup-bot',
|
|
179
|
+
message: 'Call ended',
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
handleGetStatus(args) {
|
|
184
|
+
if (args.callId) {
|
|
185
|
+
const call = this.handler.getCallStatus(args.callId);
|
|
186
|
+
if (!call) {
|
|
187
|
+
return { success: false, error: `No call found with ID: ${args.callId}` };
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
success: true,
|
|
191
|
+
output: {
|
|
192
|
+
callId: call.callId,
|
|
193
|
+
state: call.state,
|
|
194
|
+
provider: call.provider,
|
|
195
|
+
providerCallId: call.providerCallId,
|
|
196
|
+
direction: call.direction,
|
|
197
|
+
mode: call.mode,
|
|
198
|
+
fromNumber: call.fromNumber,
|
|
199
|
+
toNumber: call.toNumber,
|
|
200
|
+
transcriptLength: call.transcript.length,
|
|
201
|
+
createdAt: call.createdAt,
|
|
202
|
+
endedAt: call.endedAt,
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
// No callId — return all active calls
|
|
207
|
+
const activeCalls = this.handler.getActiveCalls().map((c) => ({
|
|
208
|
+
callId: c.callId,
|
|
209
|
+
state: c.state,
|
|
210
|
+
direction: c.direction,
|
|
211
|
+
mode: c.mode,
|
|
212
|
+
fromNumber: c.fromNumber,
|
|
213
|
+
toNumber: c.toNumber,
|
|
214
|
+
}));
|
|
215
|
+
return {
|
|
216
|
+
success: true,
|
|
217
|
+
output: { activeCalls, count: activeCalls.length },
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
exports.VoiceCallTool = VoiceCallTool;
|
|
222
|
+
//# sourceMappingURL=voiceCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voiceCall.js","sourceRoot":"","sources":["../../src/tools/voiceCall.ts"],"names":[],"mappings":";AAAA,cAAc;AACd;;;;;;;GAOG;;;AAgDH,+EAA+E;AAC/E,OAAO;AACP,+EAA+E;AAE/E,MAAa,aAAa;IA4DxB,YAA6B,OAA6B;QAA7B,YAAO,GAAP,OAAO,CAAsB;QA3D1C,OAAE,GAAG,iBAAiB,CAAC;QACvB,SAAI,GAAG,iBAAiB,CAAC;QACzB,gBAAW,GAAG,mBAAmB,CAAC;QAClC,gBAAW,GACzB,4EAA4E;YAC5E,iFAAiF;YACjF,0EAA0E,CAAC;QAC7D,aAAQ,GAAG,eAAe,CAAC;QAC3B,YAAO,GAAG,OAAO,CAAC;QAClB,mBAAc,GAAG,IAAI,CAAC;QAEtB,gBAAW,GAAG;YAC5B,IAAI,EAAE,QAAiB;YACvB,QAAQ,EAAE,CAAC,QAAQ,CAAU;YAC7B,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC;oBAC1D,WAAW,EAAE,uBAAuB;iBACrC;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8EAA8E;iBAC5F;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uEAAuE;iBACrF;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,gEAAgE;iBAC9E;gBACD,IAAI,EAAE;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YACtB,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,UAAU,EAAE,CAAC,CAAC,UAAU;YACxB,QAAQ,EAAE,CAAC,CAAC,QAAQ;SACrB,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE;SACnD,CAAC;IACJ,CAAC;CACF;AA1OD,sCA0OC"}
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
3
|
"id": "com.framers.voice.twilio",
|
|
4
4
|
"name": "Twilio Voice Call Extension",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.2",
|
|
6
6
|
"description": "Twilio telephony provider for voice calls — supports outbound/inbound calls, TwiML, media streams, and bidirectional audio.",
|
|
7
7
|
"categories": ["voice", "telephony"],
|
|
8
8
|
"platforms": ["twilio"],
|
package/package.json
CHANGED
|
@@ -1,31 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-voice-twilio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Twilio voice call provider for AgentOS — outbound/inbound calls via Twilio REST API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
7
|
+
"keywords": [
|
|
8
|
+
"agentos",
|
|
9
|
+
"extension",
|
|
10
|
+
"voice",
|
|
11
|
+
"twilio",
|
|
12
|
+
"telephony",
|
|
13
|
+
"phone-calls"
|
|
14
|
+
],
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Framers AI",
|
|
17
|
+
"url": "https://frame.dev"
|
|
13
18
|
},
|
|
14
|
-
"keywords": ["agentos", "extension", "voice", "twilio", "telephony", "phone-calls"],
|
|
15
|
-
"author": { "name": "Framers AI", "url": "https://frame.dev" },
|
|
16
19
|
"license": "MIT",
|
|
17
|
-
"files": [
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"manifest.json"
|
|
23
|
+
],
|
|
18
24
|
"peerDependencies": {
|
|
19
|
-
"@framers/agentos": "^0.
|
|
25
|
+
"@framers/agentos": "^0.10.34"
|
|
20
26
|
},
|
|
21
27
|
"dependencies": {
|
|
22
28
|
"twilio": "^5.0.0"
|
|
23
29
|
},
|
|
24
30
|
"devDependencies": {
|
|
25
|
-
"@framers/agentos": "workspace:*",
|
|
26
31
|
"@types/node": "^20.0.0",
|
|
27
32
|
"typescript": "^5.0.0",
|
|
28
|
-
"vitest": "^1.0.0"
|
|
33
|
+
"vitest": "^1.0.0",
|
|
34
|
+
"@framers/agentos": "^0.10.34"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=22"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/framerslab/agentos-extensions.git",
|
|
42
|
+
"directory": "registry/curated/voice/twilio"
|
|
29
43
|
},
|
|
30
|
-
"
|
|
31
|
-
|
|
44
|
+
"homepage": "https://github.com/framerslab/agentos-extensions/tree/master/registry/curated/voice/twilio#readme",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/framerslab/agentos-extensions/issues"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsc",
|
|
50
|
+
"dev": "tsc --watch",
|
|
51
|
+
"test": "vitest run --passWithNoTests",
|
|
52
|
+
"test:watch": "vitest watch",
|
|
53
|
+
"clean": "rm -rf dist"
|
|
54
|
+
}
|
|
55
|
+
}
|