@signalwire/sdk 3.6.0 → 3.7.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.
@@ -94,6 +94,14 @@ Per-call configuration: \`setDynamicConfigCallback()\` configures a copy of the
94
94
  agent for each request, from its query parameters, body and headers, for
95
95
  per-tenant prompts, voices and tools. Handlers for different calls interleave
96
96
  at every \`await\`: don't keep per-caller state on the shared agent instance.
97
+ To turn a call away, build the agent with \`play\` and \`hangup\` post-answer
98
+ verbs and no tools, and have the callback add the tools and call
99
+ \`clearPostAnswerVerbs()\` only for a call it accepts.
100
+
101
+ Call start and end: \`onCallStart()\` runs handlers before the AI's first
102
+ turn, and their \`FunctionResult\` actions and text reach the call (OpenAI
103
+ Realtime agents don't add the text);
104
+ \`onCallEnd()\` runs handlers with the transcript when the call ends.
97
105
  `,
98
106
  docs: [
99
107
  ['docs/agent-guide.md', 'The main guide: prompts, tools, skills, contexts, serving'],
@@ -120,6 +128,9 @@ at every \`await\`: don't keep per-caller state on the shared agent instance.
120
128
  'AgentBase.setDynamicConfigCallback',
121
129
  'AgentBase.getApp',
122
130
  'AgentBase.onSummary',
131
+ 'AgentBase.onCallStart',
132
+ 'AgentBase.onCallEnd',
133
+ 'AgentBase.addPerCallConfig',
123
134
  ],
124
135
  related: ['prompts', 'tools', 'contexts', 'skills', 'pgi', 'deploy'],
125
136
  };
@@ -219,6 +230,12 @@ agent.defineTool({
219
230
  - \`gates: [new SemanticGate(...)]\` adds semantic gates: yes/no questions a
220
231
  decision model answers about the call before the platform runs the tool.
221
232
  A platform release without semantic gates runs the tool ungated.
233
+ - Answer within a few seconds: the caller hears nothing while a tool runs.
234
+ SignalWire waits up to 120 seconds for a tool's webhook, and sends the
235
+ request again after a timeout, a failed connection or a 5xx, so a slow tool
236
+ can run more than once. Start long work without awaiting it, return at once, and
237
+ send the result into the call with \`calling.aiMessage()\` on a
238
+ \`RestClient\`.
222
239
  `,
223
240
  docs: [
224
241
  ['docs/swaig-reference.md', 'Every FunctionResult method and action'],
@@ -1 +1 @@
1
- {"version":3,"file":"topics.js","sourceRoot":"","sources":["../../../src/cli/tsdocs/topics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA2BH,MAAM,UAAU,GAAU;IACxB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,yCAAyC;IAChD,OAAO,EAAE,yDAAyD;IAClE,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCP;IACC,IAAI,EAAE;QACJ,CAAC,WAAW,EAAE,+DAA+D,CAAC;QAC9E,CAAC,qBAAqB,EAAE,mCAAmC,CAAC;KAC7D;IACD,QAAQ,EAAE;QACR,8BAA8B;QAC9B,8BAA8B;QAC9B,6BAA6B;KAC9B;IACD,GAAG,EAAE,CAAC,WAAW,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrD,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,GAAU;IACpB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,uBAAuB;IAC9B,OAAO,EAAE,+DAA+D;IACxE,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BP;IACC,IAAI,EAAE;QACJ,CAAC,qBAAqB,EAAE,2DAA2D,CAAC;QACpF,CAAC,sBAAsB,EAAE,mEAAmE,CAAC;QAC7F,CAAC,uBAAuB,EAAE,sDAAsD,CAAC;QACjF,CAAC,sBAAsB,EAAE,6CAA6C,CAAC;QACvE,CAAC,uBAAuB,EAAE,wCAAwC,CAAC;QACnE,CAAC,yBAAyB,EAAE,mDAAmD,CAAC;KACjF;IACD,QAAQ,EAAE;QACR,0BAA0B;QAC1B,2BAA2B;QAC3B,yBAAyB;QACzB,4BAA4B;QAC5B,mCAAmC;QACnC,yBAAyB;QACzB,yBAAyB;QACzB,4BAA4B;KAC7B;IACD,GAAG,EAAE;QACH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,CAAC,oCAAoC,EAAE,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC,qBAAqB,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACvD,CAAC,6BAA6B,EAAE,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC,8BAA8B,EAAE,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC,8BAA8B,EAAE,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC,wBAAwB,EAAE,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC,oCAAoC,EAAE,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAClC,CAAC,2BAA2B,EAAE,CAAC,SAAS,CAAC,CAAC;CAC3C,CAAC;AAEF,6EAA6E;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,6EAA6E;QAC3E,oGAAoG;IACtG,yEAAyE;QACvE,oDAAoD;IACtD,qEAAqE;QACnE,0DAA0D;IAC5D,8EAA8E;QAC5E,+BAA+B;IACjC,+EAA+E;QAC7E,yDAAyD;IAC3D,oFAAoF;CACrF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -72,7 +72,7 @@ export { FunctionResult } from './FunctionResult.js';
72
72
  export { FunctionResult as SwaigFunctionResult } from './FunctionResult.js';
73
73
  export type { PaymentPrompt, PaymentAction, PaymentParameter } from './FunctionResult.js';
74
74
  export { SwaigFunction } from './SwaigFunction.js';
75
- export { SemanticGate, gateDefinitions, applyGateFields, MAX_GATES, MAX_QUESTION_BYTES, MAX_CRITERIA_BYTES, MAX_ON_FAIL_BYTES, RESERVED_FUNCTION_NAMES, } from './SemanticGate.js';
75
+ export { SemanticGate, gateDefinitions, applyGateFields, MAX_GATES, MAX_QUESTION_BYTES, MAX_CRITERIA_BYTES, MAX_ON_FAIL_BYTES, MAX_VISUAL_INPUT, RESERVED_FUNCTION_NAMES, } from './SemanticGate.js';
76
76
  export type { SemanticGateOptions, FillerPhrases } from './SemanticGate.js';
77
77
  export type { SwaigHandler, SwaigFunctionOptions } from './SwaigFunction.js';
78
78
  export { ParameterSchema, paramSchema, RECORD_FORMATS, RECORD_DIRECTIONS, TAP_DIRECTIONS, TAP_CODECS, } from './ParameterSchema.js';
package/dist/index.js CHANGED
@@ -71,7 +71,7 @@ export { FunctionResult } from './FunctionResult.js';
71
71
  /** @deprecated Use {@link FunctionResult} instead. */
72
72
  export { FunctionResult as SwaigFunctionResult } from './FunctionResult.js';
73
73
  export { SwaigFunction } from './SwaigFunction.js';
74
- export { SemanticGate, gateDefinitions, applyGateFields, MAX_GATES, MAX_QUESTION_BYTES, MAX_CRITERIA_BYTES, MAX_ON_FAIL_BYTES, RESERVED_FUNCTION_NAMES, } from './SemanticGate.js';
74
+ export { SemanticGate, gateDefinitions, applyGateFields, MAX_GATES, MAX_QUESTION_BYTES, MAX_CRITERIA_BYTES, MAX_ON_FAIL_BYTES, MAX_VISUAL_INPUT, RESERVED_FUNCTION_NAMES, } from './SemanticGate.js';
75
75
  // Typed SWAIG tool-parameter builder (Tier-2 flagship affordance for the
76
76
  // explicit-params path; byte-identical to the untyped `parameters` blob).
77
77
  export { ParameterSchema, paramSchema, RECORD_FORMATS, RECORD_DIRECTIONS, TAP_DIRECTIONS, TAP_CODECS, } from './ParameterSchema.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,aAAa;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,mCAAmC;AACnC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAG/D,oCAAoC;AACpC,O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,IAAI,CAAC,CAAC;AACnD,CAAC;AAED,oDAAoD;AACpD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,GACf,MAAM,iBAAiB,CAAC"}
@@ -10,6 +10,7 @@
10
10
  - [Declarative PROMPT_SECTIONS](#declarative-prompt_sections)
11
11
  - [Tools (SWAIG Functions)](#tools-swaig-functions)
12
12
  - [Defining Tools](#defining-tools)
13
+ - [Slow tools and the webhook timeout](#slow-tools-and-the-webhook-timeout)
13
14
  - [Tool Parameters](#tool-parameters)
14
15
  - [Secure Tools](#secure-tools)
15
16
  - [FunctionResult](#functionresult)
@@ -23,7 +24,7 @@
23
24
  - [Call Flow (5 Phases)](#call-flow-5-phases)
24
25
  - [Dynamic Configuration](#dynamic-configuration)
25
26
  - [Post-Prompt and Summaries](#post-prompt-and-summaries)
26
- - [Call End Hook](#call-end-hook)
27
+ - [Call Start and End Hooks](#call-start-and-end-hooks)
27
28
  - [Mounting Extra Routes](#mounting-extra-routes)
28
29
  - [Multi-Agent Server](#multi-agent-server)
29
30
  - [Subclassing AgentBase](#subclassing-agentbase)
@@ -370,6 +371,51 @@ The handler can return any of these:
370
371
 
371
372
  A handler runs on Node's event loop. Synchronous or CPU-heavy work in a handler blocks every other request the process is serving, so await asynchronous calls instead.
372
373
 
374
+ ### Slow tools and the webhook timeout
375
+
376
+ SignalWire waits up to 30 seconds to connect to a SWAIG function's webhook and up to 120 seconds for its reply. When a request fails, times out or gets an error response (5xx), it sends the same request again, up to 3 more times, a second apart. So a slow or failing tool can run more than once, and the caller hears nothing from it in the meantime.
377
+
378
+ Answer within a few seconds. When the work takes longer, start it without awaiting it, return at once with a reply that tells the model the result is on its way, and send the result into the call when it's ready with the REST API's `calling.ai_message` (`calling.aiMessage()` on a `RestClient`):
379
+
380
+ <!-- snippet: no-run illustrative fragment (`slowOrderLookup` is your own helper; sends a live REST request) -->
381
+ ```typescript
382
+ import { AgentBase, FunctionResult, RestClient } from '@signalwire/sdk';
383
+
384
+ declare function slowOrderLookup(orderId: string): Promise<string>;
385
+
386
+ const rest = new RestClient(); // SIGNALWIRE_PROJECT_ID, SIGNALWIRE_API_TOKEN, SIGNALWIRE_SPACE
387
+ const agent = new AgentBase({ name: 'orders' });
388
+
389
+ agent.defineTool({
390
+ name: 'check_order',
391
+ description: "Look up an order's shipping status",
392
+ parameters: { order_id: { type: 'string', description: 'The order number' } },
393
+ handler: (args, rawData) => {
394
+ const callId = rawData.call_id as string;
395
+ const orderId = args['order_id'] as string;
396
+
397
+ // Not awaited: the handler returns before the lookup finishes
398
+ void (async () => {
399
+ try {
400
+ const status = await slowOrderLookup(orderId); // may take 30 seconds
401
+ await rest.calling.aiMessage(callId, {
402
+ role: 'system',
403
+ message_text: `Order ${orderId} status: ${status}. Tell the caller.`,
404
+ });
405
+ } catch (err) {
406
+ console.error('check_order failed', err);
407
+ }
408
+ })();
409
+
410
+ return new FunctionResult(
411
+ "The lookup has started. Tell the caller you're checking and will have it shortly.",
412
+ );
413
+ },
414
+ });
415
+ ```
416
+
417
+ The message goes into the AI session as the given role (`system`, `user` or `assistant`); `system` keeps the result from reading as something the caller said. Catch errors in the work you don't await: the SDK can't catch them once the handler has returned, and an unhandled rejection can stop the Node process. This pattern is for asynchronous I/O: leaving out `await` doesn't move synchronous or CPU-heavy work off Node's event loop. Because a request can arrive twice, make tools safe to run twice: for example, key work that's already running by `call_id` and arguments, and join it instead of starting it again.
418
+
373
419
  ### Tool Parameters
374
420
 
375
421
  Parameters follow JSON Schema. You can pass the properties alone, or a full object schema:
@@ -762,6 +808,54 @@ agent.addPerCallConfig((_query, _body, headers, copy) => {
762
808
 
763
809
  `setDynamicConfigCallback()` replaces every callback registered so far, including those from `addPerCallConfig()`.
764
810
 
811
+ ### Rejecting a Call
812
+
813
+ The callback can't refuse the request, but it can decide what the call does. To turn away a call the agent shouldn't take, such as one whose caller can't be verified, build the agent so that by default the call hears a message and hangs up, and have the callback undo that only for a call it accepts:
814
+
815
+ 1. When you build the agent, add `play` and `hangup` with `addPostAnswerVerb()`. They run after the call is answered and before the `ai` verb, so a call that keeps them hangs up before the AI starts. Define no tools on the agent itself.
816
+ 2. In the callback, for an accepted call, add the tools and other configuration to the request's copy, then call `clearPostAnswerVerbs()` last.
817
+
818
+ This fails closed. The callback changes only the request's copy, so the next call starts from the goodbye again. If the callback throws, the SDK logs the error and renders the copy as it stands, and since clearing the verbs is the last step, a failure before it leaves the goodbye in place. With several callbacks, finish every check before the one call to `clearPostAnswerVerbs()`, and make it the last callback registered: a callback that throws stops the ones after it, but doesn't restore verbs an earlier one cleared.
819
+
820
+ The callback runs for every request the call makes: the SWML fetch, and again for each tool call and the post-prompt summary. Only the SWML fetch carries the caller's data, such as the `userVariables` a browser or app client sends with `dial()`; a tool call carries the `call_id` and `global_data`, and `global_data` comes from the call, so it proves nothing. Verify on the SWML fetch, remember the `call_id` (`body.call.call_id` there, `body.call_id` on later requests), and check that on later requests, so a tool call from a call you didn't verify finds no tool to run.
821
+
822
+ <!-- snippet: no-run illustrative fragment (`signatureIsValid` is your own check) -->
823
+ ```typescript
824
+ import { AgentBase, FunctionResult, userVariables } from '@signalwire/sdk';
825
+
826
+ declare function signatureIsValid(vars: Record<string, unknown>): boolean;
827
+
828
+ // With more than one process, keep this in a shared store instead.
829
+ const verified = new Set<string>();
830
+
831
+ const agent = new AgentBase({ name: 'gated', route: '/' });
832
+ agent.promptAddSection('Role', { body: 'You are a helpful assistant.' });
833
+ // Fail closed: every call gets this unless the callback accepts it.
834
+ agent.addPostAnswerVerb('play', { url: "say:Sorry, this call can't be verified. Goodbye." });
835
+ agent.addPostAnswerVerb('hangup', {});
836
+
837
+ agent.addPerCallConfig((_query, body, _headers, copy) => {
838
+ let callId: string | undefined;
839
+ if (body.call && typeof body.call === 'object') {
840
+ // The SWML fetch that starts the call
841
+ callId = body.call.call_id;
842
+ if (callId && signatureIsValid(userVariables(body))) verified.add(callId);
843
+ } else {
844
+ // A tool call or the summary
845
+ callId = body.call_id as string | undefined;
846
+ }
847
+ if (!callId || !verified.has(callId)) return; // stays a goodbye with no tools
848
+ copy.defineTool({
849
+ name: 'lookup',
850
+ description: 'Look up an account',
851
+ handler: () => new FunctionResult('...'),
852
+ });
853
+ copy.clearPostAnswerVerbs(); // last: a failure above leaves the goodbye
854
+ });
855
+ ```
856
+
857
+ Since the call never reaches the `ai` verb, no tool, `onCallStart()` or `onCallEnd()` handler runs for a rejected call. Forget a verified `call_id` when the call ends (in `onCallEnd()`, for example) or after a time limit.
858
+
765
859
  ### SWAIG Query Parameters
766
860
 
767
861
  `addSwaigQueryParams()` appends query parameters to the SWAIG webhook URLs:
@@ -823,7 +917,31 @@ agent.setPostPromptLlmParams({
823
917
 
824
918
  ---
825
919
 
826
- ## Call End Hook
920
+ ## Call Start and End Hooks
921
+
922
+ `onCallStart()` and `onCallEnd()` register handlers for the platform's two reserved hooks, `startup_hook` and `hangup_hook`. Each takes any number of handlers, which run in registration order, and logs an error a handler throws instead of raising it, so one failing handler doesn't stop the others.
923
+
924
+ ### onCallStart()
925
+
926
+ `onCallStart()` registers a handler that runs when the call starts. The handler receives the SWAIG request (`call_id`, `global_data`, `caller_id_num` and the rest) and may return a `FunctionResult` or nothing:
927
+
928
+ ```typescript
929
+ agent.onCallStart(async (rawData) => {
930
+ const customer = await lookupCustomer(rawData.caller_id_num as string);
931
+ return new FunctionResult(`The caller is ${customer.name}.`).updateGlobalData({
932
+ customer_name: customer.name,
933
+ });
934
+ });
935
+ ```
936
+
937
+ The first registration adds the reserved `startup_hook` function, which the platform runs once, after the call is answered and before the AI's first turn, and doesn't offer to the model. The platform uses its reply:
938
+
939
+ - The actions run at once, such as `updateGlobalData()` to give the call data before the conversation starts. Several handlers' actions run in registration order. `postProcess` isn't used.
940
+ - The response text is added to the conversation as a system message, so the model reads it before it speaks. Several handlers' texts are joined, one per line. Only a plain string response is used; the SDK logs a warning for a structured `tool_result`/`tool_prompt` response, and for a return value that isn't a `FunctionResult`, and ignores it. OpenAI Realtime agents run the hook's actions but don't add its text. `updateGlobalData()` stores data on the call, but doesn't put it in front of the model, so for something a Realtime agent's first greeting needs, add it to the prompt from a per-call configuration callback (see [Dynamic Configuration](#dynamic-configuration)) before the SWML is returned.
941
+
942
+ The platform waits for the hook before the AI starts, so a slow handler delays the greeting; keep it short (see [Slow tools and the webhook timeout](#slow-tools-and-the-webhook-timeout)). Like any function request, the hook's request can be sent again after a timeout or an error, so make the handlers safe to run twice.
943
+
944
+ ### onCallEnd()
827
945
 
828
946
  `onCallEnd()` registers a handler that runs when the call ends, with the transcript. Handlers run in registration order with `(callLog, rawData)`:
829
947
 
@@ -837,6 +955,8 @@ The first registration adds the platform's reserved `hangup_hook` function, whic
837
955
 
838
956
  The SDK ignores a handler's return value. It logs an error a handler throws, and runs the remaining handlers.
839
957
 
958
+ To write a hook yourself instead, define a tool with the reserved name. Use one or the other for each hook: `onCallStart()` and `onCallEnd()` define `startup_hook` and `hangup_hook` themselves.
959
+
840
960
  ---
841
961
 
842
962
  ## Mounting Extra Routes
@@ -444,6 +444,7 @@ agent.defineTool({
444
444
  | `onFail` | `string \| FunctionResult \| Record<string, unknown>` | What the model gets when this is the first gate that fails: the tool result text, a `FunctionResult`, whose response and actions are used, or a data_map output object. It needs a response, and in the `tool_result`/`tool_prompt` form a `tool_result`: a blocked call must never read as a success. The `tool_prompt` becomes a system message after the tool result; OpenAI Realtime agents don't use it, so put what they need in the `tool_result`. The actions run as written, without template expansion |
445
445
  | `opts.id` | `string` | 1 to 64 letters, digits or underscores, unique within the function. Default `gate_<n>`, 1-based |
446
446
  | `opts.trueMeans`, `opts.falseMeans` | `string` | What yes and no mean, at most 2 KB each |
447
+ | `opts.visualInput` | `boolean \| number` | How many of the caller's newest video frames the decision model sees with this gate, as `visual_input`: `true` is 1, `false` or 0 none, or a whole number up to 5 (`MAX_VISUAL_INPUT`). Name it in the question, as in "Is the caller holding a photo ID up to the camera in `visual_input`?". All of a function's gates share one request, so each sees as many frames as the gate asking for the most. The gate provider must take images; one that doesn't makes the check a configuration error, which blocks the call. Left out by default. A function's own `visual_input`, frames sent to its webhook, is a separate field of the function, set through `extraFields` |
447
448
 
448
449
  Gates are checked by the platform's rules when the tool is defined, and once more when the SWML is rendered. The platform refuses the whole function for an invalid gate, so the SDK throws instead. Gates aren't allowed on the hook names `startup_hook`, `hangup_hook` and `check_for_input`, on `end_call`, or on a built-in function's name. A gated function also needs a description, and a `web_hook_url` or `data_map`; tools the SDK builds always have them. A `gates` given as `null` is refused rather than dropped, since the platform refuses that function too.
449
450
 
@@ -957,6 +958,8 @@ setDynamicConfigCallback(cb: DynamicConfigCallback): this
957
958
 
958
959
  Add a per-request configuration callback, keeping the ones already registered. The callbacks run in registration order on the same copy, so a later one sees what an earlier one set. When a callback throws, the error is logged, the later callbacks are skipped, and the request continues with the copy as configured so far.
959
960
 
961
+ To turn a call away, build the agent with `play` and `hangup` post-answer verbs and no tools, and have the callback add the tools and call `clearPostAnswerVerbs()` last, only for a call it accepts. A callback that throws before that step leaves the call rejected; with several callbacks, the one that clears the verbs must run last. See [Rejecting a Call](agent-guide.md#rejecting-a-call) in the agent guide.
962
+
960
963
  <!-- snippet: no-compile API signature / type reference, not runnable code -->
961
964
  ```ts
962
965
  addPerCallConfig(cb: DynamicConfigCallback): this
@@ -980,9 +983,37 @@ support.addPerCallConfig((query, body, headers, copy) => {
980
983
  });
981
984
  ```
982
985
 
986
+ #### `onCallStart(handler)`
987
+
988
+ Register a handler that runs when the call starts, before the AI's first turn, and return it. The first registration defines a tool named `startup_hook`, the platform's reserved hook, which it runs once after the call is answered and doesn't offer to the model. Handlers run in registration order with the whole SWAIG request (`call_id`, `global_data`, `caller_id_num` and the rest), and may return a `FunctionResult` or nothing. The hook replies with the handlers' results combined:
989
+
990
+ - The actions, in registration order, which the platform runs at once. `postProcess` isn't used.
991
+ - The response texts, joined one per line, which the platform adds to the conversation as a system message the model reads before it speaks. Only a plain string response is used: a structured `tool_result`/`tool_prompt` response, and a return value that isn't a `FunctionResult`, are ignored with a warning. OpenAI Realtime agents run the actions but don't add the text; for something their first greeting needs, add it to the prompt from a per-call configuration callback instead.
992
+
993
+ An exception is logged, not raised, and that handler's result is dropped. The platform waits for the hook before the AI starts, so keep handlers short, and it can send the request again after a timeout or an error, so make them safe to run twice. Registering a handler doesn't change `swaig_post_conversation`.
994
+
995
+ <!-- snippet: no-compile API signature / type reference, not runnable code -->
996
+ ```ts
997
+ onCallStart(
998
+ handler: (rawData: SwaigRequest) => FunctionResult | null | undefined | void | Promise<FunctionResult | null | undefined | void>,
999
+ ): (rawData: SwaigRequest) => FunctionResult | null | undefined | void | Promise<FunctionResult | null | undefined | void>
1000
+ ```
1001
+
1002
+ **Example:**
1003
+
1004
+ ```ts
1005
+ import { AgentBase, FunctionResult } from '@signalwire/sdk';
1006
+
1007
+ const greeter = new AgentBase({ name: 'greeter' });
1008
+ greeter.onCallStart((rawData) => {
1009
+ const name = (rawData['caller_id_name'] as string | undefined) || 'the caller';
1010
+ return new FunctionResult(`The caller's name is ${name}.`);
1011
+ });
1012
+ ```
1013
+
983
1014
  #### `onCallEnd(handler)`
984
1015
 
985
- Register a handler that runs when the call ends, and return it. The first registration defines a tool named `hangup_hook` and sets the `swaig_post_conversation` param to `true`, unless that param is explicitly `false`, which logs a warning. Handlers run in registration order with the call log (`call_log`, or `raw_call_log` when that's empty) and the whole SWAIG request. Return values are ignored, and an exception is logged without stopping the other handlers.
1016
+ Register a handler that runs when the call ends, and return it. The first registration defines a tool named `hangup_hook`, the platform's reserved hook, and sets the `swaig_post_conversation` param to `true`, unless that param is explicitly `false`, which logs a warning. Handlers run in registration order with the call log (`call_log`, or `raw_call_log` when that's empty) and the whole SWAIG request. Return values are ignored, and an exception is logged without stopping the other handlers.
986
1017
 
987
1018
  <!-- snippet: no-compile API signature / type reference, not runnable code -->
988
1019
  ```ts
@@ -135,7 +135,7 @@ SignalWire requests the SWML with a `POST` whose body describes the call. The ag
135
135
  - **Tool dispatch**: running the handler for a SWAIG request, after checking its per-call token.
136
136
  - **Proxy detection**: finding the external URL for the webhook URLs in the SWML.
137
137
  - **Per-request configuration**: making a per-request copy of the agent for a dynamic config callback.
138
- - **Lifecycle hooks**: `onSummary`, `onFunctionCall`, `onSwmlRequest`, `onDebugEvent`, `onCallEnd` and `onError`.
138
+ - **Lifecycle hooks**: `onSummary`, `onFunctionCall`, `onSwmlRequest`, `onDebugEvent`, `onCallStart`, `onCallEnd` and `onError`.
139
139
 
140
140
  `SWMLService` supplies the `SwmlBuilder`, the tool registry, basic-auth resolution, routing callbacks and `handleRequest()`, the framework-free request handler that the agent's SWML routes call.
141
141
 
@@ -777,6 +777,7 @@ A subclass can override these methods:
777
777
  These methods register handlers instead of being overridden:
778
778
 
779
779
  - `onError(handler)`: called when a tool handler throws, after the tool's own `onError`. A `FunctionResult` it returns is sent as the response.
780
+ - `onCallStart(handler)`: registers the reserved `startup_hook` tool, so the handler runs before the AI's first turn; the actions and response text of the `FunctionResult` it returns reach the call.
780
781
  - `onCallEnd(handler)`: registers the reserved `hangup_hook` tool and turns on `swaig_post_conversation`, so the handler gets the call log when the call ends.
781
782
 
782
783
  ### Dynamic Configuration Callback
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalwire/sdk",
3
- "version": "3.6.0",
3
+ "version": "3.7.1",
4
4
  "description": "SignalWire AI Agents SDK for TypeScript/Node.js",
5
5
  "keywords": [
6
6
  "signalwire",