supafone-labs 0.4.0 → 0.4.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/README.md +37 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -297,6 +297,43 @@ const reports = await supafone.optimizer.reports("builder");
|
|
|
297
297
|
All errors throw `SupafoneLabsError` (with `.status` and `.body`); catch it to
|
|
298
298
|
inspect gateway responses.
|
|
299
299
|
|
|
300
|
+
## Campaigns & real calls (account-scoped)
|
|
301
|
+
|
|
302
|
+
The outbound campaign engine behind app.supafone.ai, packaged. Authenticate
|
|
303
|
+
with your account (not an API key) — pass `accountToken`, or
|
|
304
|
+
`accountEmail` + `accountPassword` and the client logs in lazily (and
|
|
305
|
+
re-logs-in transparently when the token expires):
|
|
306
|
+
|
|
307
|
+
```ts
|
|
308
|
+
const sf = new Supafone({ accountEmail: "you@company.com", accountPassword: "..." });
|
|
309
|
+
|
|
310
|
+
const { agents } = await sf.listVoiceAgents();
|
|
311
|
+
const { campaign } = await sf.campaigns.create({ name: "Q3 win-back", goal: "reengage", agentId: agents[0].id });
|
|
312
|
+
await sf.campaigns.applyPreset(campaign.id, "win_back"); // or your custom_… preset
|
|
313
|
+
await sf.campaigns.addRecipients(campaign.id, [
|
|
314
|
+
{ name: "Jane Doe", phone: "+15551234567", outreach_consent: "yes" },
|
|
315
|
+
]);
|
|
316
|
+
await sf.campaigns.launch(campaign.id); // real calls + emails begin
|
|
317
|
+
|
|
318
|
+
const live = await sf.campaigns.live(campaign.id); // in-flight calls + listen links
|
|
319
|
+
await sf.placeCall({ agentId: agents[0].id, toNumber: "+15551234567" }); // ring a phone right now
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
`campaigns.live()` returns a portal link (`app.supafone.ai/app/developer`) and
|
|
323
|
+
a listen link per in-flight call; poll `campaigns.getCall(id)` to follow the
|
|
324
|
+
live transcript while a call is in progress.
|
|
325
|
+
|
|
326
|
+
## Prefer natural language? Use the MCP server
|
|
327
|
+
|
|
328
|
+
The repo ships an MCP stdio server (`services/supafone-labs/mcp/supafone_mcp.py`)
|
|
329
|
+
exposing this same surface — plus hosted-agent provisioning — as tools for
|
|
330
|
+
Claude Desktop / Claude Code. Configure it with `SUPAFONE_EMAIL` +
|
|
331
|
+
`SUPAFONE_PASSWORD` (campaigns/calls) and/or `SUPAFONE_API_KEY` (hosted
|
|
332
|
+
agents), then just ask: *"create a win-back campaign, add these leads, launch
|
|
333
|
+
it, and show me the calls as they happen"* — Claude replies with developer-
|
|
334
|
+
portal links to watch the calls live. Full tool reference lives in the repo's
|
|
335
|
+
`gitbook/mcp-server.md`.
|
|
336
|
+
|
|
300
337
|
## Module format
|
|
301
338
|
|
|
302
339
|
Ships **both ESM and CommonJS**. `import { Supafone } from "supafone-labs"`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supafone-labs",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "The Supafone agent framework: create hosted voice/web/campaign agents with managed numbers, stages, tools, artifacts, and Supafone Pro watcher built in.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|