@signalwire/sdk 3.5.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.
- package/CHANGELOG.md +71 -0
- package/dist/AgentBase.d.ts +101 -0
- package/dist/AgentBase.js +209 -22
- package/dist/AgentBase.js.map +1 -1
- package/dist/DataMap.d.ts +28 -0
- package/dist/DataMap.js +43 -0
- package/dist/DataMap.js.map +1 -1
- package/dist/FunctionResult.d.ts +32 -0
- package/dist/FunctionResult.js +39 -0
- package/dist/FunctionResult.js.map +1 -1
- package/dist/SWMLService.d.ts +11 -1
- package/dist/SWMLService.js +21 -2
- package/dist/SWMLService.js.map +1 -1
- package/dist/SemanticGate.d.ts +197 -0
- package/dist/SemanticGate.js +554 -0
- package/dist/SemanticGate.js.map +1 -0
- package/dist/SwaigFunction.d.ts +29 -3
- package/dist/SwaigFunction.js +19 -3
- package/dist/SwaigFunction.js.map +1 -1
- package/dist/cli/tsdocs/api-index.json +1 -1
- package/dist/cli/tsdocs/topics.js +21 -0
- package/dist/cli/tsdocs/topics.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/skills/SkillBase.d.ts +14 -1
- package/dist/skills/SkillBase.js.map +1 -1
- package/docs/agent-guide.md +122 -2
- package/docs/api-reference.md +142 -4
- package/docs/architecture.md +2 -1
- package/docs/datamap-guide.md +51 -4
- package/docs/swaig-reference.md +48 -0
- package/package.json +1 -1
|
@@ -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
|
};
|
|
@@ -216,6 +227,15 @@ agent.defineTool({
|
|
|
216
227
|
call's SWML.
|
|
217
228
|
- A tool call is a request from the model, not an authorization. Check
|
|
218
229
|
identity, state and business rules in the handler.
|
|
230
|
+
- \`gates: [new SemanticGate(...)]\` adds semantic gates: yes/no questions a
|
|
231
|
+
decision model answers about the call before the platform runs the tool.
|
|
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\`.
|
|
219
239
|
`,
|
|
220
240
|
docs: [
|
|
221
241
|
['docs/swaig-reference.md', 'Every FunctionResult method and action'],
|
|
@@ -238,6 +258,7 @@ agent.defineTool({
|
|
|
238
258
|
'FunctionResult.swmlChangeStep',
|
|
239
259
|
'FunctionResult.setPostProcess',
|
|
240
260
|
'SwaigRequest',
|
|
261
|
+
'SemanticGate',
|
|
241
262
|
],
|
|
242
263
|
related: ['datamap', 'contexts', 'skills', 'security', 'pgi'],
|
|
243
264
|
};
|
|
@@ -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;IAC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MAAM,CAAC,MAAM,UAAU,GAAsD;IAC3E,CAAC,+BAA+B,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC3D,CAAC,gDAAgD,EAAE,CAAC,KAAK,CAAC,CAAC;IAC3D,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,6 +72,8 @@ 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, MAX_VISUAL_INPUT, RESERVED_FUNCTION_NAMES, } from './SemanticGate.js';
|
|
76
|
+
export type { SemanticGateOptions, FillerPhrases } from './SemanticGate.js';
|
|
75
77
|
export type { SwaigHandler, SwaigFunctionOptions } from './SwaigFunction.js';
|
|
76
78
|
export { ParameterSchema, paramSchema, RECORD_FORMATS, RECORD_DIRECTIONS, TAP_DIRECTIONS, TAP_CODECS, } from './ParameterSchema.js';
|
|
77
79
|
export type { ParameterType, ParameterProperty, ParameterSchemaObject, RecordFormat, RecordDirection, TapDirection, TapCodec, } from './ParameterSchema.js';
|
package/dist/index.js
CHANGED
|
@@ -71,6 +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, MAX_VISUAL_INPUT, RESERVED_FUNCTION_NAMES, } from './SemanticGate.js';
|
|
74
75
|
// Typed SWAIG tool-parameter builder (Tier-2 flagship affordance for the
|
|
75
76
|
// explicit-params path; byte-identical to the untyped `parameters` blob).
|
|
76
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,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cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* They define tools, prompt sections, hints, and global data.
|
|
6
6
|
*/
|
|
7
7
|
import type { SwaigHandler } from '../SwaigFunction.js';
|
|
8
|
+
import type { FillerPhrases, SemanticGate } from '../SemanticGate.js';
|
|
8
9
|
import type { SwaigRequest } from '../SwaigContracts.js';
|
|
9
10
|
import type { FunctionResult } from '../FunctionResult.js';
|
|
10
11
|
import type { AgentBase } from '../AgentBase.js';
|
|
@@ -26,7 +27,11 @@ export interface SkillToolDefinition {
|
|
|
26
27
|
handler: SwaigHandler;
|
|
27
28
|
/** Whether the tool requires secure (authenticated) invocation. */
|
|
28
29
|
secure?: boolean;
|
|
29
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Phrases the AI says while the tool runs, keyed by language code, `"auto"`
|
|
32
|
+
* or `"default"`; an entry may also be a list of phrases, a wait script
|
|
33
|
+
* (the type predates wait scripts, so one needs a cast).
|
|
34
|
+
*/
|
|
30
35
|
fillers?: Record<string, string[]>;
|
|
31
36
|
/** List of parameter names that are required. */
|
|
32
37
|
required?: string[];
|
|
@@ -41,6 +46,14 @@ export interface SkillToolDefinition {
|
|
|
41
46
|
* The flag is serialised as `"is_hangup_hook": true` in the SWAIG JSON.
|
|
42
47
|
*/
|
|
43
48
|
isHangupHook?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Semantic gates on the tool: yes/no preconditions a decision model checks
|
|
51
|
+
* right before the platform runs it (see {@link SemanticGate}). They win
|
|
52
|
+
* over gates in the skill's `swaig_fields`.
|
|
53
|
+
*/
|
|
54
|
+
gates?: ReadonlyArray<SemanticGate | Record<string, unknown>>;
|
|
55
|
+
/** Phrases the AI says while the gates are checked, shaped like `fillers`. */
|
|
56
|
+
gate_fillers?: FillerPhrases;
|
|
44
57
|
}
|
|
45
58
|
/**
|
|
46
59
|
* Build a {@link SkillToolDefinition} whose `handler` args are *inferred* from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillBase.js","sourceRoot":"","sources":["../../src/skills/SkillBase.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SkillBase.js","sourceRoot":"","sources":["../../src/skills/SkillBase.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,EAAE,SAAS,EAAe,MAAM,cAAc,CAAC;AAiDtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,UAAU,eAAe,CAI7B,OAYC;IAED,OAAO;QACL,GAAG,OAAO;QACV,UAAU,EAAE,OAAO,CAAC,UAAiD;QACrE,QAAQ,EAAE,OAAO,CAAC,QAAgC;QAClD,uEAAuE;QACvE,0EAA0E;QAC1E,8DAA8D;QAC9D,OAAO,EAAE,OAAO,CAAC,OAAuB;KACzC,CAAC;AACJ,CAAC;AAsCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,OAAgB,SAAS;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,GAAW,EAAE,CAAC;IAE/B;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,GAAW,EAAE,CAAC;IAEtC;;;;OAIG;IACH,MAAM,CAAC,aAAa,GAAW,OAAO,CAAC;IAEvC;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,GAAsB,EAAE,CAAC;IAEjD;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,GAAsB,EAAE,CAAC;IAEjD;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,GAAG,KAAK,CAAC;IAE3C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,kBAAkB;QACvB,MAAM,MAAM,GAAyC;YACnD,YAAY,EAAE;gBACZ,IAAI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G;IACH,QAAQ,CAAC,KAAgB;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACH,aAAa;QACX,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,gBAAgB;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,WAA+B,CAAC;QACnD,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC1C,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC;YACpB,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxE,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc;QAClB,OAAO,CAAC,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACtD,CAAC"}
|
package/docs/agent-guide.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
package/docs/api-reference.md
CHANGED
|
@@ -364,7 +364,7 @@ When `parameters` is a flat map of property definitions written inline, TypeScri
|
|
|
364
364
|
| `parameters` | `Record<string, unknown>` | `{}` | Property definitions, or a full JSON Schema object |
|
|
365
365
|
| `handler` | function | (required) | Called with `(args, rawData, agent)` |
|
|
366
366
|
| `secure` | `boolean` | `true` | Require a per-call token. The rendered SWML gives the tool its own `web_hook_url` with a `__token` for that function and call. Pass `false` to let the tool run without a token. |
|
|
367
|
-
| `fillers` | `Record<string, string[]>` | none |
|
|
367
|
+
| `fillers` | `Record<string, string[]>` | none | Phrases the AI says while the function runs, keyed by language code, `auto` or `default`, emitted as the function's `fillers`. The current language's own key is used; without one, the `auto` phrases are translated into that language on first use; without either, `default`. An entry may also be a list of phrases, a wait script, spoken one at a time while the call waits; the type predates wait scripts, so one needs a cast |
|
|
368
368
|
| `waitFile` | `string` | none | Audio URL, emitted as `wait_file` |
|
|
369
369
|
| `waitFileLoops` | `number` | none | Emitted as `wait_file_loops` |
|
|
370
370
|
| `required` | `string[]` | `[]` | Required parameter names, used when `parameters` is a flat map |
|
|
@@ -373,6 +373,10 @@ When `parameters` is a flat map of property definitions written inline, TypeScri
|
|
|
373
373
|
| `onError` | `SwaigErrorHandler` | none | Called when the handler throws; may return a `FunctionResult` to use as the response |
|
|
374
374
|
| `errorMessage` | `string` | A generic apology | Response used when the handler throws and no error hook returns one |
|
|
375
375
|
| `isTypedHandler` | `boolean` | `false` | Marks a handler that takes named parameters; `defineTypedTool()` sets it |
|
|
376
|
+
| `gates` | `(SemanticGate \| Record<string, unknown>)[]` | none | Semantic gates, 1 to 8. See [Semantic gates](#semantic-gates) |
|
|
377
|
+
| `gateFillers` | `FillerPhrases` | none | What the AI says while the gates are checked, shaped like `fillers`. Only with `gates` |
|
|
378
|
+
|
|
379
|
+
**Throws:** `Error` for a gate the platform would refuse, or `gateFillers` without `gates`.
|
|
376
380
|
|
|
377
381
|
The handler's third argument is the agent the request was configured on. With a dynamic config callback or `addPerCallConfig()`, that's the per-request copy. The handler's return value is the tool's response: context for the model, which decides what to say. See [SwaigHandler](#swaighandler) for how each return type is serialized.
|
|
378
382
|
|
|
@@ -393,6 +397,63 @@ agent.defineTool({
|
|
|
393
397
|
});
|
|
394
398
|
```
|
|
395
399
|
|
|
400
|
+
#### Semantic gates
|
|
401
|
+
|
|
402
|
+
A semantic gate is a yes/no question a decision model answers about the call right before the platform dispatches the function. Every gate on the function must pass for it to run. When one doesn't, the function isn't dispatched, and the model gets that gate's `on_fail` output instead, as if a data_map had returned it. The function's `fillers` and `wait_file` start only once its gates pass, so a blocked call never sounds as if the action were under way.
|
|
403
|
+
|
|
404
|
+
Semantic gates need a platform release that supports them. One that doesn't runs the function ungated, and may or may not log a warning about the unknown key, so don't rely on a gate to protect a function until your platform supports them.
|
|
405
|
+
|
|
406
|
+
The decision model sees three things, under these names: `conversation`, the recent dialogue; `semantic_state`, the call's `global_data.semantic_state`, which [`FunctionResult.setSemanticState()`](#data-actions) sets; and `proposed_function`, the function's name, description and arguments. Write each question as one proposition, and name what it's about with those names in backticks. The model reads literally: it doesn't do arithmetic or compare dates, so put a computed result in `semantic_state` instead of asking for it.
|
|
407
|
+
|
|
408
|
+
This tool runs only when the caller has explicitly asked to cancel:
|
|
409
|
+
|
|
410
|
+
```ts
|
|
411
|
+
import { FunctionResult, SemanticGate } from '@signalwire/sdk';
|
|
412
|
+
|
|
413
|
+
agent.defineTool({
|
|
414
|
+
name: 'cancel_account',
|
|
415
|
+
description: "Cancel the caller's account.",
|
|
416
|
+
handler: () => new FunctionResult('The account is cancelled.'),
|
|
417
|
+
gates: [
|
|
418
|
+
new SemanticGate(
|
|
419
|
+
'Has the caller explicitly asked to cancel their account in `conversation`?',
|
|
420
|
+
0.95,
|
|
421
|
+
new FunctionResult()
|
|
422
|
+
.setToolResponse(
|
|
423
|
+
'cancel_account was not run.',
|
|
424
|
+
'Ask the caller to confirm that they want to cancel.',
|
|
425
|
+
)
|
|
426
|
+
.updateGlobalData({ cancel_attempted: true }),
|
|
427
|
+
{
|
|
428
|
+
id: 'explicit_request',
|
|
429
|
+
trueMeans: 'The caller says they want to cancel.',
|
|
430
|
+
falseMeans: 'The caller asked about cancelling, or said something else.',
|
|
431
|
+
},
|
|
432
|
+
),
|
|
433
|
+
],
|
|
434
|
+
gateFillers: { default: ['Let me verify that.'] },
|
|
435
|
+
});
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
`new SemanticGate(question, threshold, onFail, opts?)` takes:
|
|
439
|
+
|
|
440
|
+
| Argument | Type | Description |
|
|
441
|
+
|----------|------|-------------|
|
|
442
|
+
| `question` | `string` | The yes/no question, at most 8 KB. Its `${...}` variables are expanded from the call's global data when the gate is checked |
|
|
443
|
+
| `threshold` | `number` | The probability of yes, above 0 and at most 1, at or above which the gate passes |
|
|
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
|
+
| `opts.id` | `string` | 1 to 64 letters, digits or underscores, unique within the function. Default `gate_<n>`, 1-based |
|
|
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` |
|
|
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.
|
|
450
|
+
|
|
451
|
+
The SDK is stricter than the platform in two ways: it refuses `gateFillers` without `gates`, which the platform would ignore, and it refuses a NUL character or an unpaired surrogate in a gate, which the platform would read differently.
|
|
452
|
+
|
|
453
|
+
When a gate check can't be completed, because the decision model timed out or failed, the call is blocked too, and the model is told the action couldn't be completed right now. [`setSemanticGates()`](#setsemanticgatesopts) sets the time a check may take.
|
|
454
|
+
|
|
455
|
+
The SDK checks the functions it renders. Functions it doesn't build, such as those a `onSwmlRequest` hook writes into the SWML, remote function includes, and functions an MCP server provides, aren't checked.
|
|
456
|
+
|
|
396
457
|
#### `defineTypedTool(opts)`
|
|
397
458
|
|
|
398
459
|
Register a tool whose handler takes the arguments as named positional parameters instead of an `args` object. When `parameters` is omitted, the SDK infers a schema from the handler's parameter names and default values.
|
|
@@ -409,9 +470,13 @@ defineTypedTool(opts: {
|
|
|
409
470
|
waitFile?: string;
|
|
410
471
|
waitFileLoops?: number;
|
|
411
472
|
required?: string[];
|
|
473
|
+
gates?: ReadonlyArray<SemanticGate | Record<string, unknown>>;
|
|
474
|
+
gateFillers?: FillerPhrases;
|
|
412
475
|
}): this
|
|
413
476
|
```
|
|
414
477
|
|
|
478
|
+
`gates` and `gateFillers` work as they do on [`defineTool()`](#semantic-gates).
|
|
479
|
+
|
|
415
480
|
#### `getTools()`
|
|
416
481
|
|
|
417
482
|
Get every registered `SwaigFunction`. DataMap and other raw function definitions aren't included. Calls `defineTools()` first if it hasn't run.
|
|
@@ -441,7 +506,7 @@ getTool(name: string): SwaigFunction | undefined
|
|
|
441
506
|
|
|
442
507
|
#### `registerSwaigFunction(fn)`
|
|
443
508
|
|
|
444
|
-
Register a `SwaigFunction`, or a raw function definition such as the output of `DataMap.toSwaigFunction()`. A raw definition is registered under its `function` key and rendered as is.
|
|
509
|
+
Register a `SwaigFunction`, or a raw function definition such as the output of `DataMap.toSwaigFunction()`. A raw definition is registered under its `function` key and rendered as is. A raw definition with `gates` or `gate_fillers` is checked by the platform's rules (see [Semantic gates](#semantic-gates)), and a normalized copy is registered; the object you pass is left as it was.
|
|
445
510
|
|
|
446
511
|
<!-- snippet: no-compile API signature / type reference, not runnable code -->
|
|
447
512
|
```ts
|
|
@@ -600,6 +665,27 @@ Merge entries into `params`.
|
|
|
600
665
|
setParams(params: Record<string, unknown>): this
|
|
601
666
|
```
|
|
602
667
|
|
|
668
|
+
#### `setSemanticGates(opts?)`
|
|
669
|
+
|
|
670
|
+
Set how the call checks its functions' [semantic gates](#semantic-gates). Each option left out leaves its current setting as it is; the platform's default applies to a setting that was never set.
|
|
671
|
+
|
|
672
|
+
<!-- snippet: no-compile API signature / type reference, not runnable code -->
|
|
673
|
+
```ts
|
|
674
|
+
setSemanticGates(opts?: { enabled?: boolean; timeoutMs?: number; history?: number }): this
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
| Option | Type | Default | Description |
|
|
678
|
+
|--------|------|---------|-------------|
|
|
679
|
+
| `enabled` | `boolean` | `true` | `false` dispatches gated functions without checking their gates. Sent as `semantic_gates_enabled` |
|
|
680
|
+
| `timeoutMs` | `number` | `2500` | The time one check may take, 500 to 10000 milliseconds. A check that runs out blocks the call. Sent as `semantic_gate_timeout_ms` |
|
|
681
|
+
| `history` | `number` | `20` | How many recent dialogue entries the decision model sees, 0 to 100. Sent as `semantic_gate_history` |
|
|
682
|
+
|
|
683
|
+
**Throws:** `Error` for a value of the wrong type or out of range; a refused call changes nothing.
|
|
684
|
+
|
|
685
|
+
```ts
|
|
686
|
+
agent.setSemanticGates({ timeoutMs: 4000, history: 30 });
|
|
687
|
+
```
|
|
688
|
+
|
|
603
689
|
#### `setGlobalData(data)`
|
|
604
690
|
|
|
605
691
|
Merge entries into `global_data`. Existing keys, including those a skill added, are kept unless `data` has the same key. To clear the object first, use `replaceGlobalData()`.
|
|
@@ -872,6 +958,8 @@ setDynamicConfigCallback(cb: DynamicConfigCallback): this
|
|
|
872
958
|
|
|
873
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.
|
|
874
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
|
+
|
|
875
963
|
<!-- snippet: no-compile API signature / type reference, not runnable code -->
|
|
876
964
|
```ts
|
|
877
965
|
addPerCallConfig(cb: DynamicConfigCallback): this
|
|
@@ -895,9 +983,37 @@ support.addPerCallConfig((query, body, headers, copy) => {
|
|
|
895
983
|
});
|
|
896
984
|
```
|
|
897
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
|
+
|
|
898
1014
|
#### `onCallEnd(handler)`
|
|
899
1015
|
|
|
900
|
-
Register a handler that runs when the call ends, and return it. The first registration defines a tool named `hangup_hook
|
|
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.
|
|
901
1017
|
|
|
902
1018
|
<!-- snippet: no-compile API signature / type reference, not runnable code -->
|
|
903
1019
|
```ts
|
|
@@ -1443,6 +1559,7 @@ console.log(JSON.stringify(result.toDict()));
|
|
|
1443
1559
|
| `say` | `(text: string): this` | `{ say: text }` |
|
|
1444
1560
|
| `playBackgroundFile` | `(filename: string, wait?: boolean): this` | `{ playback_bg: filename }`, or `{ playback_bg: { file, wait: true } }` when `wait` is `true` |
|
|
1445
1561
|
| `stopBackgroundFile` | `(): this` | `{ stop_playback_bg: true }` |
|
|
1562
|
+
| `changeVoice` | `(voice: string): this` | `{ change_voice: voice }`. Changes the AI's voice for the rest of the call, from the next batch of speech on; `voice` is in the `engine.voice:model` form a language's voice takes. Throws on an empty voice |
|
|
1446
1563
|
|
|
1447
1564
|
### Speech Actions
|
|
1448
1565
|
|
|
@@ -1459,6 +1576,7 @@ console.log(JSON.stringify(result.toDict()));
|
|
|
1459
1576
|
|--------|-----------|-------|
|
|
1460
1577
|
| `updateGlobalData` | `(data: Record<string, unknown>): this` | `{ set_global_data: data }` |
|
|
1461
1578
|
| `removeGlobalData` | `(keys: string \| string[]): this` | `{ unset_global_data: keys }` |
|
|
1579
|
+
| `setSemanticState` | `(state: Record<string, unknown>): this` | `{ set_global_data: { semantic_state: state } }`. Replaces the state [semantic gates](#semantic-gates) judge, as a whole; send `{}` to reset it |
|
|
1462
1580
|
| `setMetadata` | `(data: Record<string, unknown>): this` | `{ set_meta_data: data }` |
|
|
1463
1581
|
| `removeMetadata` | `(keys: string \| string[]): this` | `{ unset_meta_data: keys }` |
|
|
1464
1582
|
|
|
@@ -1791,6 +1909,24 @@ Set `error_keys` on the `data_map`. The platform reads `error_keys` only on a we
|
|
|
1791
1909
|
globalErrorKeys(keys: string[]): this
|
|
1792
1910
|
```
|
|
1793
1911
|
|
|
1912
|
+
#### `gate(gate)`
|
|
1913
|
+
|
|
1914
|
+
Add a [semantic gate](#semantic-gates), a yes/no precondition a decision model checks right before the platform runs the function. Call once per gate, up to 8. When a gate fails, the data_map doesn't run, and the model gets that gate's `on_fail` output. `toSwaigFunction()` throws for a gate the platform would refuse, checking it after environment variables are expanded.
|
|
1915
|
+
|
|
1916
|
+
<!-- snippet: no-compile API signature / type reference, not runnable code -->
|
|
1917
|
+
```ts
|
|
1918
|
+
gate(gate: SemanticGate | Record<string, unknown>): this
|
|
1919
|
+
```
|
|
1920
|
+
|
|
1921
|
+
#### `gateFillers(fillers)`
|
|
1922
|
+
|
|
1923
|
+
Set what the AI says while the function's gates are checked, shaped like a function's fillers. Only for a function with gates.
|
|
1924
|
+
|
|
1925
|
+
<!-- snippet: no-compile API signature / type reference, not runnable code -->
|
|
1926
|
+
```ts
|
|
1927
|
+
gateFillers(fillers: FillerPhrases): this
|
|
1928
|
+
```
|
|
1929
|
+
|
|
1794
1930
|
### DataMap Registration and Serialization
|
|
1795
1931
|
|
|
1796
1932
|
#### `registerWithAgent(agent)`
|
|
@@ -3323,7 +3459,7 @@ interface SwaigFunctionOptions
|
|
|
3323
3459
|
| `description` | `string` | (required) | Description the model reads |
|
|
3324
3460
|
| `parameters` | `Record<string, unknown>` | `{}` | Property definitions or a full JSON Schema object |
|
|
3325
3461
|
| `secure` | `boolean` | `true` | Require a per-call token; `false` lets the tool run without one |
|
|
3326
|
-
| `fillers` | `Record<string, string[]>` | none |
|
|
3462
|
+
| `fillers` | `Record<string, string[]>` | none | Phrases said while the function runs, keyed by language code, `auto` or `default`; an entry may also be a wait script, with a cast |
|
|
3327
3463
|
| `waitFile` | `string` | none | Wait audio URL |
|
|
3328
3464
|
| `waitFileLoops` | `number` | none | Wait audio loop count |
|
|
3329
3465
|
| `webhookUrl` | `string` | none | External URL that runs the tool |
|
|
@@ -3332,6 +3468,8 @@ interface SwaigFunctionOptions
|
|
|
3332
3468
|
| `isTypedHandler` | `boolean` | `false` | Whether the handler takes named parameters |
|
|
3333
3469
|
| `onError` | `SwaigErrorHandler` | none | Per-tool error hook |
|
|
3334
3470
|
| `errorMessage` | `string` | A generic apology | Response when the handler throws and no hook returns one |
|
|
3471
|
+
| `gates` | `(SemanticGate \| Record<string, unknown>)[]` | none | [Semantic gates](#semantic-gates), 1 to 8 |
|
|
3472
|
+
| `gateFillers` | `FillerPhrases` | none | Phrases said while the gates are checked. Only with `gates` |
|
|
3335
3473
|
|
|
3336
3474
|
### AuthConfig
|
|
3337
3475
|
|