@framers/agentos-ext-voice-plivo 0.1.5 → 0.2.0

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 CHANGED
@@ -8,7 +8,7 @@ This pack gives an agent a phone call management tool and registers a voice call
8
8
  npm install @framers/agentos-ext-voice-plivo
9
9
  ```
10
10
 
11
- Peer dependency: `@framers/agentos` (`>=0.10.40`).
11
+ Peer dependency: `@framers/agentos`, at the minimum version declared by this package.
12
12
 
13
13
  ## Usage
14
14
 
@@ -31,7 +31,7 @@ const agentos = await AgentOS.create({
31
31
  });
32
32
  ```
33
33
 
34
- Supply an existing AgentOS `CallManager` through `options.callManager` to enable the tool's call operations. The example registers the provider with the fallback tool handler.
34
+ Supply `options.callManager` to use a host-owned manager. Otherwise the example creates an exposed pack-owned manager.
35
35
 
36
36
  ## Configuration
37
37
 
@@ -46,7 +46,7 @@ Credentials resolve from a nonempty direct option, then `options.secrets`, then
46
46
  | `authTokenEnv` | None | None | No | `PLIVO_AUTH_TOKEN` |
47
47
  | `fromNumberEnv` | None | None | No | `PLIVO_FROM_NUMBER` |
48
48
  | `secrets` | `plivo.authId`, `plivo.authToken`, `plivo.fromNumber` | None | No | Unset |
49
- | `callManager` | None | None | No | Fallback handler |
49
+ | `callManager` | None | None | No | Exposed pack-owned manager |
50
50
  | `priority` | None | None | No | `50` |
51
51
  | `logger` (context field) | None | None | No | Unset |
52
52
  | No option, webhook verification | None | `NODE_ENV`, then `PLIVO_SKIP_SIGNATURE` | No | Unset |
@@ -75,12 +75,20 @@ The schema requires `action`. The tool's validation and execution also require `
75
75
 
76
76
  The package requires Node `>=22`. Plivo authentication credentials and an E.164 caller number are needed. Missing required settings cause the factory to throw an error naming the option, secret and primary environment variable.
77
77
 
78
- Activation initializes the SDK client and registers the `plivo` voice provider with the supplied `CallManager`. Deactivation clears the service's client reference. Without a `CallManager`, call, speech and hangup operations return errors; status reports no matching call and list returns an empty collection.
78
+ Construction registers the provider on the selected manager. Activation initializes the SDK client. Deactivation disposes only the original pack-owned manager and clears the service client reference.
79
79
 
80
80
  The tool has side effects: it places calls, speaks into active calls and terminates calls. Its default call mode is `conversation`. The service's default speech voice is `Polly.Joanna`. Notify XML speaks a message then hangs up. Conversation XML uses speech input, sets `GetInput`'s `executionTimeout` to `30`, and redirects to the webhook URL. The provider generates answer XML during call initiation but does not store or serve it. The hosting application must expose a public answer endpoint that returns the XML. The answer URL appends `callId` and `mode` query parameters and uses POST.
81
81
 
82
82
  Webhook parsing accepts a pre-parsed body, JSON or form-encoded data. A payload without `CallUUID` produces no call events. `Speech` produces a final transcript; call statuses and hangup causes map to call state events. `Digits` is declared but is not emitted as an event. Verification uses HMAC with `sha256` over the request URL plus nonce, authenticated with the resolved token.
83
83
 
84
+ ## Host call manager binding
85
+
86
+ The existing `options.callManager` is now exposed through the returned pack's `binding.manager`. The registered call tool uses that binding. `binding.setManager(next)` registers the provider on the replacement and changes subsequent tool operations; the host must drain or transfer active calls before doing so. Binding replacement does not migrate call state.
87
+
88
+ The voice-provider descriptor remains the raw Plivo provider and carries a read-only `binding` property for registry consumers. With no injected manager, construction creates an accessible pack-owned manager and places no call. Deactivation disposes only that original owned manager. Injected and replacement managers remain host-owned.
89
+
90
+ This binding does not change the pack's legacy answer XML, callback identities or signature behavior. Select the core carrier profile explicitly for durable carrier guarantees. The declared core peer floor is required for the binding API.
91
+
84
92
  ## License
85
93
 
86
94
  Apache-2.0
package/dist/index.d.ts CHANGED
@@ -6,7 +6,9 @@
6
6
  *
7
7
  * @module @framers/agentos-ext-voice-plivo
8
8
  */
9
- import type { ExtensionContext, ExtensionPack, CallManager } from '@framers/agentos';
9
+ import { CallManager, type ExtensionContext, type ExtensionPack } from '@framers/agentos';
10
+ import { type VoiceProviderBinding } from '@framers/agentos/io/channels/telephony/CallManager';
11
+ import { PlivoVoiceProvider } from './PlivoVoiceProvider';
10
12
  export interface PlivoVoiceOptions {
11
13
  /** Plivo Auth ID (overrides secrets/env). */
12
14
  authId?: string;
@@ -20,19 +22,30 @@ export interface PlivoVoiceOptions {
20
22
  authTokenEnv?: string;
21
23
  /** Environment variable name for From Number (default: PLIVO_FROM_NUMBER). */
22
24
  fromNumberEnv?: string;
23
- /** Optional CallManager instance for the tool handler. */
25
+ /** Host-owned manager. Omission creates an exposed pack-owned manager; injected managers are never disposed here. */
24
26
  callManager?: CallManager;
25
27
  /** Extension priority (default: 50). */
26
28
  priority?: number;
27
29
  }
30
+ /** Raw Plivo provider with the same manager binding as its registered call tool. */
31
+ export type BoundPlivoVoiceProvider = PlivoVoiceProvider & {
32
+ readonly binding: VoiceProviderBinding;
33
+ };
34
+ /** Plivo extension pack with an accessible and replaceable call manager binding. */
35
+ export interface PlivoVoicePack extends ExtensionPack {
36
+ /** Binding shared by the voice-provider descriptor and call tool. */
37
+ readonly binding: VoiceProviderBinding;
38
+ }
28
39
  /**
29
40
  * Create the Plivo Voice Provider extension pack.
30
41
  *
31
42
  * Resolves credentials from options, secrets map, or environment variables,
32
43
  * then creates the PlivoVoiceService, PlivoVoiceProvider, and PlivoVoiceCallTool.
44
+ * The provider is registered on `options.callManager`, or on a pack-owned manager when
45
+ * none is given, and the call tool reaches that manager through the returned `binding`.
33
46
  *
34
47
  * @param context - Extension context with options, logger, and secrets.
35
- * @returns An ExtensionPack with tool and voice-provider descriptors.
48
+ * @returns An ExtensionPack with tool and voice-provider descriptors and the manager `binding`.
36
49
  *
37
50
  * @example
38
51
  * ```typescript
@@ -48,7 +61,7 @@ export interface PlivoVoiceOptions {
48
61
  * });
49
62
  * ```
50
63
  */
51
- export declare function createExtensionPack(context: ExtensionContext): ExtensionPack;
64
+ export declare function createExtensionPack(context: ExtensionContext): PlivoVoicePack;
52
65
  export { PlivoVoiceService, type PlivoServiceConfig } from './PlivoVoiceService';
53
66
  export { PlivoVoiceProvider, createPlivoVoiceProvider } from './PlivoVoiceProvider';
54
67
  export { PlivoVoiceCallTool, type VoiceCallToolHandler } from './tools/voiceCall';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AASrF,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAoFD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,CAqE5E;AAGD,OAAO,EAAE,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAClF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAElH,OAAO,EAA4B,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAOpF,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qHAAqH;IACrH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oFAAoF;AACpF,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAC;AACtG,oFAAoF;AACpF,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;CACxC;AAqCD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,cAAc,CAmE7E;AAGD,OAAO,EAAE,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAClF,eAAe,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -11,6 +11,8 @@
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PlivoVoiceCallTool = exports.createPlivoVoiceProvider = exports.PlivoVoiceProvider = exports.PlivoVoiceService = void 0;
13
13
  exports.createExtensionPack = createExtensionPack;
14
+ const agentos_1 = require("@framers/agentos");
15
+ const CallManager_1 = require("@framers/agentos/io/channels/telephony/CallManager");
14
16
  const PlivoVoiceService_1 = require("./PlivoVoiceService");
15
17
  const PlivoVoiceProvider_1 = require("./PlivoVoiceProvider");
16
18
  const voiceCall_1 = require("./tools/voiceCall");
@@ -35,48 +37,6 @@ function resolveSecret(key, optionsValue, secrets, secretKey, envName, ...envFal
35
37
  throw new Error(`Plivo ${key} not found. Provide via options.${key}, secrets["${secretKey}"], or ${envName} env var.`);
36
38
  }
37
39
  // ============================================================================
38
- // CallManager Tool Handler Adapter
39
- // ============================================================================
40
- /**
41
- * Adapts a CallManager instance into the VoiceCallToolHandler interface
42
- * expected by the PlivoVoiceCallTool.
43
- */
44
- function createCallManagerHandler(callManager) {
45
- return {
46
- async initiateCall(toNumber, message, mode) {
47
- return callManager.initiateCall({ toNumber, message, mode });
48
- },
49
- speakText(callId, text) {
50
- callManager.speakText(callId, text);
51
- },
52
- async hangupCall(callId) {
53
- await callManager.hangupCall(callId);
54
- },
55
- getCallStatus(callId) {
56
- return callManager.getCall(callId);
57
- },
58
- getActiveCalls() {
59
- return callManager.getActiveCalls();
60
- },
61
- };
62
- }
63
- /**
64
- * Stub handler used when no CallManager is provided.
65
- * The tool will return errors explaining that a CallManager is required.
66
- */
67
- function createStubHandler() {
68
- const err = () => {
69
- throw new Error('No CallManager configured. Provide options.callManager to enable voice call operations.');
70
- };
71
- return {
72
- initiateCall: err,
73
- speakText: err,
74
- hangupCall: err,
75
- getCallStatus: () => undefined,
76
- getActiveCalls: () => [],
77
- };
78
- }
79
- // ============================================================================
80
40
  // Extension Pack Factory
81
41
  // ============================================================================
82
42
  /**
@@ -84,9 +44,11 @@ function createStubHandler() {
84
44
  *
85
45
  * Resolves credentials from options, secrets map, or environment variables,
86
46
  * then creates the PlivoVoiceService, PlivoVoiceProvider, and PlivoVoiceCallTool.
47
+ * The provider is registered on `options.callManager`, or on a pack-owned manager when
48
+ * none is given, and the call tool reaches that manager through the returned `binding`.
87
49
  *
88
50
  * @param context - Extension context with options, logger, and secrets.
89
- * @returns An ExtensionPack with tool and voice-provider descriptors.
51
+ * @returns An ExtensionPack with tool and voice-provider descriptors and the manager `binding`.
90
52
  *
91
53
  * @example
92
54
  * ```typescript
@@ -112,13 +74,16 @@ function createExtensionPack(context) {
112
74
  const serviceConfig = { authId, authToken, fromNumber };
113
75
  const service = new PlivoVoiceService_1.PlivoVoiceService(serviceConfig);
114
76
  const provider = (0, PlivoVoiceProvider_1.createPlivoVoiceProvider)(service, authToken);
115
- // Create tool with CallManager handler or stub
116
- const handler = options.callManager
117
- ? createCallManagerHandler(options.callManager)
118
- : createStubHandler();
119
- const voiceCallTool = new voiceCall_1.PlivoVoiceCallTool(handler);
77
+ const ownedManager = options.callManager ? undefined : new agentos_1.CallManager({
78
+ provider: { provider: 'plivo', config: { authId, authToken, fromNumber } },
79
+ defaultMode: 'conversation',
80
+ });
81
+ const binding = (0, CallManager_1.bindVoiceProvider)(provider, options.callManager ?? ownedManager);
82
+ Object.defineProperty(provider, 'binding', { value: binding, enumerable: false, writable: false });
83
+ const voiceCallTool = new voiceCall_1.PlivoVoiceCallTool(binding.toolHandler);
120
84
  const priority = options.priority ?? 50;
121
85
  return {
86
+ binding,
122
87
  name: '@framers/agentos-ext-voice-plivo',
123
88
  version: '0.1.0',
124
89
  descriptors: [
@@ -127,13 +92,10 @@ function createExtensionPack(context) {
127
92
  ],
128
93
  onActivate: async () => {
129
94
  await service.initialize();
130
- // If a CallManager was provided, register the provider
131
- if (options.callManager) {
132
- options.callManager.registerProvider(provider);
133
- }
134
95
  context.logger?.info('[PlivoVoice] Extension activated');
135
96
  },
136
97
  onDeactivate: async () => {
98
+ ownedManager?.dispose();
137
99
  await service.shutdown();
138
100
  context.logger?.info('[PlivoVoice] Extension deactivated');
139
101
  },
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"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entos.sh/schemas/extension-manifest-v1.json",
3
3
  "id": "com.framers.voice.plivo",
4
4
  "name": "Plivo Voice Provider Extension",
5
- "version": "0.1.5",
5
+ "version": "0.2.0",
6
6
  "description": "Plivo telephony provider for voice calls — supports outbound/inbound calls, XML response generation, notify and conversation modes.",
7
7
  "categories": ["voice", "telephony"],
8
8
  "platforms": ["plivo"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos-ext-voice-plivo",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "description": "Plivo voice call provider for AgentOS — outbound/inbound calls via Plivo Voice API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "manifest.json"
22
22
  ],
23
23
  "peerDependencies": {
24
- "@framers/agentos": ">=0.10.40"
24
+ "@framers/agentos": ">=0.13.104"
25
25
  },
26
26
  "dependencies": {
27
27
  "plivo": "^4.0.0"
@@ -30,7 +30,7 @@
30
30
  "@types/node": "^20.0.0",
31
31
  "typescript": "^5.0.0",
32
32
  "vitest": "^3.2.7",
33
- "@framers/agentos": "^0.13.47"
33
+ "@framers/agentos": "^0.13.134"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=22"