@signalwire/sdk 2.0.5 → 3.6.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/CHANGELOG.md +821 -0
- package/LICENSE +21 -0
- package/README.md +163 -68
- package/dist/AGENTS.md +13 -0
- package/dist/AgentBase.d.ts +510 -126
- package/dist/AgentBase.js +1581 -455
- package/dist/AgentBase.js.map +1 -1
- package/dist/AgentServer.d.ts +21 -0
- package/dist/AgentServer.js +154 -47
- package/dist/AgentServer.js.map +1 -1
- package/dist/AuthHandler.d.ts +14 -2
- package/dist/AuthHandler.js +7 -2
- package/dist/AuthHandler.js.map +1 -1
- package/dist/ConfigLoader.d.ts +5 -13
- package/dist/ConfigLoader.js +15 -29
- package/dist/ConfigLoader.js.map +1 -1
- package/dist/ContextBuilder.d.ts +202 -9
- package/dist/ContextBuilder.js +219 -36
- package/dist/ContextBuilder.js.map +1 -1
- package/dist/DataMap.d.ts +186 -45
- package/dist/DataMap.js +210 -52
- package/dist/DataMap.js.map +1 -1
- package/dist/FunctionResult.d.ts +309 -83
- package/dist/FunctionResult.js +483 -116
- package/dist/FunctionResult.js.map +1 -1
- package/dist/Logger.d.ts +30 -5
- package/dist/Logger.js +77 -19
- package/dist/Logger.js.map +1 -1
- package/dist/POM/PromptObjectModel.d.ts +12 -1
- package/dist/POM/PromptObjectModel.js +25 -9
- package/dist/POM/PromptObjectModel.js.map +1 -1
- package/dist/ParameterSchema.d.ts +306 -0
- package/dist/ParameterSchema.js +251 -0
- package/dist/ParameterSchema.js.map +1 -0
- package/dist/PlatformContracts.d.ts +21 -0
- package/dist/PlatformContracts.generated.d.ts +109 -0
- package/dist/PlatformContracts.generated.js +8 -0
- package/dist/PlatformContracts.generated.js.map +1 -0
- package/dist/PlatformContracts.js +2 -0
- package/dist/PlatformContracts.js.map +1 -0
- package/dist/PomBuilder.d.ts +18 -0
- package/dist/PomBuilder.js +53 -3
- package/dist/PomBuilder.js.map +1 -1
- package/dist/PostPrompt.d.ts +110 -0
- package/dist/PostPrompt.js +204 -0
- package/dist/PostPrompt.js.map +1 -0
- package/dist/PromptManager.d.ts +22 -1
- package/dist/PromptManager.js +28 -1
- package/dist/PromptManager.js.map +1 -1
- package/dist/PublicFetch.d.ts +132 -0
- package/dist/PublicFetch.js +311 -0
- package/dist/PublicFetch.js.map +1 -0
- package/dist/RobotsTxt.d.ts +41 -0
- package/dist/RobotsTxt.js +152 -0
- package/dist/RobotsTxt.js.map +1 -0
- package/dist/SWMLHandler.js.map +1 -1
- package/dist/SWMLService.d.ts +169 -59
- package/dist/SWMLService.js +456 -129
- package/dist/SWMLService.js.map +1 -1
- package/dist/SchemaUtils.d.ts +115 -2
- package/dist/SchemaUtils.js +444 -12
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/SecurityUtils.d.ts +49 -9
- package/dist/SecurityUtils.js +153 -51
- package/dist/SecurityUtils.js.map +1 -1
- package/dist/SemanticGate.d.ts +183 -0
- package/dist/SemanticGate.js +533 -0
- package/dist/SemanticGate.js.map +1 -0
- package/dist/ServerlessAdapter.d.ts +156 -7
- package/dist/ServerlessAdapter.js +399 -42
- package/dist/ServerlessAdapter.js.map +1 -1
- package/dist/SessionManager.d.ts +11 -2
- package/dist/SessionManager.js +50 -18
- package/dist/SessionManager.js.map +1 -1
- package/dist/SslConfig.d.ts +2 -1
- package/dist/SslConfig.js +4 -1
- package/dist/SslConfig.js.map +1 -1
- package/dist/SwaigActions.generated.d.ts +23 -0
- package/dist/SwaigActions.generated.js +8 -0
- package/dist/SwaigActions.generated.js.map +1 -0
- package/dist/SwaigContracts.d.ts +15 -0
- package/dist/SwaigContracts.generated.d.ts +264 -0
- package/dist/SwaigContracts.generated.js +12 -0
- package/dist/SwaigContracts.generated.js.map +1 -0
- package/dist/SwaigContracts.js +2 -0
- package/dist/SwaigContracts.js.map +1 -0
- package/dist/SwaigFunction.d.ts +139 -7
- package/dist/SwaigFunction.js +170 -22
- package/dist/SwaigFunction.js.map +1 -1
- package/dist/SwmlBuilder.d.ts +68 -19
- package/dist/SwmlBuilder.js +74 -38
- package/dist/SwmlBuilder.js.map +1 -1
- package/dist/SwmlVerbMethods.generated.d.ts +41 -4
- package/dist/SwmlVerbMethods.generated.js +1 -1
- package/dist/TypeInference.d.ts +39 -3
- package/dist/TypeInference.js +256 -16
- package/dist/TypeInference.js.map +1 -1
- package/dist/WebService.d.ts +79 -11
- package/dist/WebService.js +320 -109
- package/dist/WebService.js.map +1 -1
- package/dist/WebhookMiddleware.d.ts +119 -0
- package/dist/WebhookMiddleware.js +271 -0
- package/dist/WebhookMiddleware.js.map +1 -0
- package/dist/WebhookValidator.d.ts +92 -0
- package/dist/WebhookValidator.js +409 -0
- package/dist/WebhookValidator.js.map +1 -0
- package/dist/agents/BedrockAgent.d.ts +162 -0
- package/dist/agents/BedrockAgent.js +323 -0
- package/dist/agents/BedrockAgent.js.map +1 -0
- package/dist/ai-chat/AIChatClient.d.ts +316 -0
- package/dist/ai-chat/AIChatClient.js +535 -0
- package/dist/ai-chat/AIChatClient.js.map +1 -0
- package/dist/ai-chat/ChatGateway.d.ts +408 -0
- package/dist/ai-chat/ChatGateway.js +747 -0
- package/dist/ai-chat/ChatGateway.js.map +1 -0
- package/dist/ai-chat/HandoffRouter.d.ts +282 -0
- package/dist/ai-chat/HandoffRouter.js +518 -0
- package/dist/ai-chat/HandoffRouter.js.map +1 -0
- package/dist/ai-chat/index.d.ts +12 -0
- package/dist/ai-chat/index.js +10 -0
- package/dist/ai-chat/index.js.map +1 -0
- package/dist/capabilities.d.ts +64 -0
- package/dist/capabilities.js +95 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/cli/agent-loader.d.ts +32 -6
- package/dist/cli/agent-loader.js +92 -33
- package/dist/cli/agent-loader.js.map +1 -1
- package/dist/cli/datamap-exec.d.ts +175 -0
- package/dist/cli/datamap-exec.js +1284 -0
- package/dist/cli/datamap-exec.js.map +1 -0
- package/dist/cli/function-args.d.ts +40 -0
- package/dist/cli/function-args.js +146 -0
- package/dist/cli/function-args.js.map +1 -0
- package/dist/cli/simulation.d.ts +99 -0
- package/dist/cli/simulation.js +490 -0
- package/dist/cli/simulation.js.map +1 -0
- package/dist/cli/swaig-test.d.ts +12 -25
- package/dist/cli/swaig-test.js +935 -371
- package/dist/cli/swaig-test.js.map +1 -1
- package/dist/cli/tsdocs/agentsNote.d.ts +30 -0
- package/dist/cli/tsdocs/agentsNote.js +92 -0
- package/dist/cli/tsdocs/agentsNote.js.map +1 -0
- package/dist/cli/tsdocs/api-index.json +1 -0
- package/dist/cli/tsdocs/api.d.ts +91 -0
- package/dist/cli/tsdocs/api.js +372 -0
- package/dist/cli/tsdocs/api.js.map +1 -0
- package/dist/cli/tsdocs/apiTypes.d.ts +64 -0
- package/dist/cli/tsdocs/apiTypes.js +7 -0
- package/dist/cli/tsdocs/apiTypes.js.map +1 -0
- package/dist/cli/tsdocs/bin.d.ts +6 -0
- package/dist/cli/tsdocs/bin.js +23 -0
- package/dist/cli/tsdocs/bin.js.map +1 -0
- package/dist/cli/tsdocs/files.d.ts +108 -0
- package/dist/cli/tsdocs/files.js +287 -0
- package/dist/cli/tsdocs/files.js.map +1 -0
- package/dist/cli/tsdocs/index.d.ts +28 -0
- package/dist/cli/tsdocs/index.js +307 -0
- package/dist/cli/tsdocs/index.js.map +1 -0
- package/dist/cli/tsdocs/live.d.ts +41 -0
- package/dist/cli/tsdocs/live.js +202 -0
- package/dist/cli/tsdocs/live.js.map +1 -0
- package/dist/cli/tsdocs/locate.d.ts +51 -0
- package/dist/cli/tsdocs/locate.js +75 -0
- package/dist/cli/tsdocs/locate.js.map +1 -0
- package/dist/cli/tsdocs/render.d.ts +75 -0
- package/dist/cli/tsdocs/render.js +323 -0
- package/dist/cli/tsdocs/render.js.map +1 -0
- package/dist/cli/tsdocs/topics.d.ts +43 -0
- package/dist/cli/tsdocs/topics.js +920 -0
- package/dist/cli/tsdocs/topics.js.map +1 -0
- package/dist/index.d.ts +49 -68
- package/dist/index.js +45 -73
- package/dist/index.js.map +1 -1
- package/dist/livewire/index.d.ts +229 -155
- package/dist/livewire/index.js +298 -195
- package/dist/livewire/index.js.map +1 -1
- package/dist/llms.txt +65 -0
- package/dist/prefabs/CallSessionStore.d.ts +52 -0
- package/dist/prefabs/CallSessionStore.js +72 -0
- package/dist/prefabs/CallSessionStore.js.map +1 -0
- package/dist/prefabs/ConciergeAgent.d.ts +13 -1
- package/dist/prefabs/ConciergeAgent.js +36 -31
- package/dist/prefabs/ConciergeAgent.js.map +1 -1
- package/dist/prefabs/FAQBotAgent.d.ts +9 -1
- package/dist/prefabs/FAQBotAgent.js +113 -47
- package/dist/prefabs/FAQBotAgent.js.map +1 -1
- package/dist/prefabs/InfoGathererAgent.d.ts +22 -3
- package/dist/prefabs/InfoGathererAgent.js +67 -58
- package/dist/prefabs/InfoGathererAgent.js.map +1 -1
- package/dist/prefabs/ReceptionistAgent.d.ts +16 -5
- package/dist/prefabs/ReceptionistAgent.js +39 -31
- package/dist/prefabs/ReceptionistAgent.js.map +1 -1
- package/dist/prefabs/SurveyAgent.d.ts +22 -4
- package/dist/prefabs/SurveyAgent.js +84 -68
- package/dist/prefabs/SurveyAgent.js.map +1 -1
- package/dist/relay/Action.d.ts +44 -21
- package/dist/relay/Action.js +75 -17
- package/dist/relay/Action.js.map +1 -1
- package/dist/relay/Call.d.ts +312 -47
- package/dist/relay/Call.js +369 -18
- package/dist/relay/Call.js.map +1 -1
- package/dist/relay/Deferred.js.map +1 -1
- package/dist/relay/Message.d.ts +26 -5
- package/dist/relay/Message.js +36 -6
- package/dist/relay/Message.js.map +1 -1
- package/dist/relay/RelayClient.d.ts +44 -17
- package/dist/relay/RelayClient.js +175 -65
- package/dist/relay/RelayClient.js.map +1 -1
- package/dist/relay/RelayError.d.ts +14 -0
- package/dist/relay/RelayError.js +15 -0
- package/dist/relay/RelayError.js.map +1 -1
- package/dist/relay/RelayEvent.d.ts +96 -65
- package/dist/relay/RelayEvent.js +85 -56
- package/dist/relay/RelayEvent.js.map +1 -1
- package/dist/relay/closedSets.d.ts +111 -0
- package/dist/relay/closedSets.js +83 -0
- package/dist/relay/closedSets.js.map +1 -0
- package/dist/relay/index.d.ts +3 -1
- package/dist/relay/index.js +1 -0
- package/dist/relay/index.js.map +1 -1
- package/dist/relay/normalize.js.map +1 -1
- package/dist/relay/protocol.types.generated.d.ts +1195 -0
- package/dist/relay/protocol.types.generated.js +8 -0
- package/dist/relay/protocol.types.generated.js.map +1 -0
- package/dist/relay/types.d.ts +73 -42
- package/dist/rest/HttpClient.d.ts +36 -8
- package/dist/rest/HttpClient.js +233 -40
- package/dist/rest/HttpClient.js.map +1 -1
- package/dist/rest/RequestOptions.d.ts +110 -0
- package/dist/rest/RequestOptions.js +113 -0
- package/dist/rest/RequestOptions.js.map +1 -0
- package/dist/rest/RestError.d.ts +52 -6
- package/dist/rest/RestError.js +89 -5
- package/dist/rest/RestError.js.map +1 -1
- package/dist/rest/base/CrudResource.d.ts +16 -26
- package/dist/rest/base/CrudResource.js +19 -33
- package/dist/rest/base/CrudResource.js.map +1 -1
- package/dist/rest/base/CrudWithAddresses.d.ts +3 -2
- package/dist/rest/base/CrudWithAddresses.js +2 -2
- package/dist/rest/base/CrudWithAddresses.js.map +1 -1
- package/dist/rest/base/FabricResource.d.ts +15 -0
- package/dist/rest/base/FabricResource.js +16 -0
- package/dist/rest/base/FabricResource.js.map +1 -0
- package/dist/rest/base/ReadResource.d.ts +62 -0
- package/dist/rest/base/ReadResource.js +69 -0
- package/dist/rest/base/ReadResource.js.map +1 -0
- package/dist/rest/callHandler.d.ts +5 -2
- package/dist/rest/callHandler.js +4 -1
- package/dist/rest/callHandler.js.map +1 -1
- package/dist/rest/index.d.ts +18 -77
- package/dist/rest/index.js +47 -120
- package/dist/rest/index.js.map +1 -1
- package/dist/rest/namespaces/_client_tree_generated.d.ts +103 -0
- package/dist/rest/namespaces/_client_tree_generated.js +171 -0
- package/dist/rest/namespaces/_client_tree_generated.js.map +1 -0
- package/dist/rest/namespaces/addresses.d.ts +3 -42
- package/dist/rest/namespaces/addresses.js +3 -50
- package/dist/rest/namespaces/addresses.js.map +1 -1
- package/dist/rest/namespaces/calling.d.ts +6 -378
- package/dist/rest/namespaces/calling.js +6 -473
- package/dist/rest/namespaces/calling.js.map +1 -1
- package/dist/rest/namespaces/calling.resources.generated.d.ts +165 -0
- package/dist/rest/namespaces/calling.resources.generated.js +477 -0
- package/dist/rest/namespaces/calling.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/calling.types.generated.d.ts +2917 -0
- package/dist/rest/namespaces/calling.types.generated.js +8 -0
- package/dist/rest/namespaces/calling.types.generated.js.map +1 -0
- package/dist/rest/namespaces/chat.d.ts +4 -18
- package/dist/rest/namespaces/chat.js +4 -21
- package/dist/rest/namespaces/chat.js.map +1 -1
- package/dist/rest/namespaces/chat.resources.generated.d.ts +12 -0
- package/dist/rest/namespaces/chat.resources.generated.js +29 -0
- package/dist/rest/namespaces/chat.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/chat.types.generated.d.ts +56 -0
- package/dist/rest/namespaces/chat.types.generated.js +8 -0
- package/dist/rest/namespaces/chat.types.generated.js.map +1 -0
- package/dist/rest/namespaces/datasphere.d.ts +6 -62
- package/dist/rest/namespaces/datasphere.js +6 -72
- package/dist/rest/namespaces/datasphere.js.map +1 -1
- package/dist/rest/namespaces/datasphere.resources.generated.d.ts +25 -0
- package/dist/rest/namespaces/datasphere.resources.generated.js +50 -0
- package/dist/rest/namespaces/datasphere.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/datasphere.types.generated.d.ts +180 -0
- package/dist/rest/namespaces/datasphere.types.generated.js +8 -0
- package/dist/rest/namespaces/datasphere.types.generated.js.map +1 -0
- package/dist/rest/namespaces/fabric.d.ts +11 -327
- package/dist/rest/namespaces/fabric.js +14 -439
- package/dist/rest/namespaces/fabric.js.map +1 -1
- package/dist/rest/namespaces/fabric.resources.generated.d.ts +195 -0
- package/dist/rest/namespaces/fabric.resources.generated.js +399 -0
- package/dist/rest/namespaces/fabric.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/fabric.types.generated.d.ts +4557 -0
- package/dist/rest/namespaces/fabric.types.generated.js +8 -0
- package/dist/rest/namespaces/fabric.types.generated.js.map +1 -0
- package/dist/rest/namespaces/fax.resources.generated.d.ts +6 -0
- package/dist/rest/namespaces/fax.resources.generated.js +14 -0
- package/dist/rest/namespaces/fax.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/fax.types.generated.d.ts +131 -0
- package/dist/rest/namespaces/fax.types.generated.js +8 -0
- package/dist/rest/namespaces/fax.types.generated.js.map +1 -0
- package/dist/rest/namespaces/imported-numbers.d.ts +3 -18
- package/dist/rest/namespaces/imported-numbers.js +3 -21
- package/dist/rest/namespaces/imported-numbers.js.map +1 -1
- package/dist/rest/namespaces/logs.d.ts +10 -101
- package/dist/rest/namespaces/logs.js +10 -128
- package/dist/rest/namespaces/logs.js.map +1 -1
- package/dist/rest/namespaces/logs.resources.generated.d.ts +9 -0
- package/dist/rest/namespaces/logs.resources.generated.js +17 -0
- package/dist/rest/namespaces/logs.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/logs.types.generated.d.ts +131 -0
- package/dist/rest/namespaces/logs.types.generated.js +8 -0
- package/dist/rest/namespaces/logs.types.generated.js.map +1 -0
- package/dist/rest/namespaces/lookup.d.ts +3 -25
- package/dist/rest/namespaces/lookup.js +3 -27
- package/dist/rest/namespaces/lookup.js.map +1 -1
- package/dist/rest/namespaces/message.resources.generated.d.ts +6 -0
- package/dist/rest/namespaces/message.resources.generated.js +14 -0
- package/dist/rest/namespaces/message.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/message.types.generated.d.ts +122 -0
- package/dist/rest/namespaces/message.types.generated.js +8 -0
- package/dist/rest/namespaces/message.types.generated.js.map +1 -0
- package/dist/rest/namespaces/messages.resources.generated.d.ts +18 -0
- package/dist/rest/namespaces/messages.resources.generated.js +44 -0
- package/dist/rest/namespaces/messages.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/messages.types.generated.d.ts +99 -0
- package/dist/rest/namespaces/messages.types.generated.js +8 -0
- package/dist/rest/namespaces/messages.types.generated.js.map +1 -0
- package/dist/rest/namespaces/mfa.d.ts +3 -42
- package/dist/rest/namespaces/mfa.js +3 -49
- package/dist/rest/namespaces/mfa.js.map +1 -1
- package/dist/rest/namespaces/number-groups.d.ts +3 -45
- package/dist/rest/namespaces/number-groups.js +3 -53
- package/dist/rest/namespaces/number-groups.js.map +1 -1
- package/dist/rest/namespaces/phone-numbers.d.ts +8 -196
- package/dist/rest/namespaces/phone-numbers.js +8 -230
- package/dist/rest/namespaces/phone-numbers.js.map +1 -1
- package/dist/rest/namespaces/project.d.ts +6 -42
- package/dist/rest/namespaces/project.js +6 -51
- package/dist/rest/namespaces/project.js.map +1 -1
- package/dist/rest/namespaces/project.resources.generated.d.ts +17 -0
- package/dist/rest/namespaces/project.resources.generated.js +44 -0
- package/dist/rest/namespaces/project.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/project.types.generated.d.ts +58 -0
- package/dist/rest/namespaces/project.types.generated.js +8 -0
- package/dist/rest/namespaces/project.types.generated.js.map +1 -0
- package/dist/rest/namespaces/projects.resources.generated.d.ts +12 -0
- package/dist/rest/namespaces/projects.resources.generated.js +25 -0
- package/dist/rest/namespaces/projects.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/projects.types.generated.d.ts +77 -0
- package/dist/rest/namespaces/projects.types.generated.js +8 -0
- package/dist/rest/namespaces/projects.types.generated.js.map +1 -0
- package/dist/rest/namespaces/pubsub.d.ts +4 -18
- package/dist/rest/namespaces/pubsub.js +4 -21
- package/dist/rest/namespaces/pubsub.js.map +1 -1
- package/dist/rest/namespaces/pubsub.resources.generated.d.ts +12 -0
- package/dist/rest/namespaces/pubsub.resources.generated.js +29 -0
- package/dist/rest/namespaces/pubsub.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/pubsub.types.generated.d.ts +60 -0
- package/dist/rest/namespaces/pubsub.types.generated.js +8 -0
- package/dist/rest/namespaces/pubsub.types.generated.js.map +1 -0
- package/dist/rest/namespaces/queues.d.ts +3 -38
- package/dist/rest/namespaces/queues.js +3 -44
- package/dist/rest/namespaces/queues.js.map +1 -1
- package/dist/rest/namespaces/recordings.d.ts +3 -34
- package/dist/rest/namespaces/recordings.js +3 -40
- package/dist/rest/namespaces/recordings.js.map +1 -1
- package/dist/rest/namespaces/registry.d.ts +6 -137
- package/dist/rest/namespaces/registry.js +6 -173
- package/dist/rest/namespaces/registry.js.map +1 -1
- package/dist/rest/namespaces/relay-rest.resources.generated.d.ts +168 -0
- package/dist/rest/namespaces/relay-rest.resources.generated.js +430 -0
- package/dist/rest/namespaces/relay-rest.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/relay-rest.types.generated.d.ts +1906 -0
- package/dist/rest/namespaces/relay-rest.types.generated.js +8 -0
- package/dist/rest/namespaces/relay-rest.types.generated.js.map +1 -0
- package/dist/rest/namespaces/short-codes.d.ts +3 -35
- package/dist/rest/namespaces/short-codes.js +3 -41
- package/dist/rest/namespaces/short-codes.js.map +1 -1
- package/dist/rest/namespaces/sip-profile.d.ts +3 -24
- package/dist/rest/namespaces/sip-profile.js +3 -29
- package/dist/rest/namespaces/sip-profile.js.map +1 -1
- package/dist/rest/namespaces/verified-callers.d.ts +3 -29
- package/dist/rest/namespaces/verified-callers.js +3 -34
- package/dist/rest/namespaces/verified-callers.js.map +1 -1
- package/dist/rest/namespaces/video.d.ts +10 -227
- package/dist/rest/namespaces/video.js +10 -288
- package/dist/rest/namespaces/video.js.map +1 -1
- package/dist/rest/namespaces/video.resources.generated.d.ts +81 -0
- package/dist/rest/namespaces/video.resources.generated.js +171 -0
- package/dist/rest/namespaces/video.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/video.types.generated.d.ts +771 -0
- package/dist/rest/namespaces/video.types.generated.js +8 -0
- package/dist/rest/namespaces/video.types.generated.js.map +1 -0
- package/dist/rest/namespaces/voice.resources.generated.d.ts +9 -0
- package/dist/rest/namespaces/voice.resources.generated.js +17 -0
- package/dist/rest/namespaces/voice.resources.generated.js.map +1 -0
- package/dist/rest/namespaces/voice.types.generated.d.ts +214 -0
- package/dist/rest/namespaces/voice.types.generated.js +8 -0
- package/dist/rest/namespaces/voice.types.generated.js.map +1 -0
- package/dist/rest/pagination.d.ts +5 -1
- package/dist/rest/pagination.js +40 -20
- package/dist/rest/pagination.js.map +1 -1
- package/dist/rest/types.d.ts +21 -3
- package/dist/schema.json +299 -98
- package/dist/skills/SkillBase.d.ts +111 -21
- package/dist/skills/SkillBase.js +100 -17
- package/dist/skills/SkillBase.js.map +1 -1
- package/dist/skills/SkillManager.d.ts +66 -13
- package/dist/skills/SkillManager.js +101 -20
- package/dist/skills/SkillManager.js.map +1 -1
- package/dist/skills/SkillName.d.ts +44 -0
- package/dist/skills/SkillName.js +2 -0
- package/dist/skills/SkillName.js.map +1 -0
- package/dist/skills/SkillRegistry.d.ts +22 -11
- package/dist/skills/SkillRegistry.js +47 -17
- package/dist/skills/SkillRegistry.js.map +1 -1
- package/dist/skills/builtin/api_ninjas_trivia.d.ts +3 -1
- package/dist/skills/builtin/api_ninjas_trivia.js +18 -6
- package/dist/skills/builtin/api_ninjas_trivia.js.map +1 -1
- package/dist/skills/builtin/ask_claude.d.ts +14 -4
- package/dist/skills/builtin/ask_claude.js +36 -14
- package/dist/skills/builtin/ask_claude.js.map +1 -1
- package/dist/skills/builtin/claude_skills.d.ts +3 -1
- package/dist/skills/builtin/claude_skills.js +19 -15
- package/dist/skills/builtin/claude_skills.js.map +1 -1
- package/dist/skills/builtin/custom_skills.d.ts +10 -3
- package/dist/skills/builtin/custom_skills.js +26 -9
- package/dist/skills/builtin/custom_skills.js.map +1 -1
- package/dist/skills/builtin/datasphere.d.ts +5 -3
- package/dist/skills/builtin/datasphere.js +21 -22
- package/dist/skills/builtin/datasphere.js.map +1 -1
- package/dist/skills/builtin/datasphere_serverless.d.ts +12 -1
- package/dist/skills/builtin/datasphere_serverless.js +17 -6
- package/dist/skills/builtin/datasphere_serverless.js.map +1 -1
- package/dist/skills/builtin/datetime.d.ts +3 -1
- package/dist/skills/builtin/datetime.js +11 -7
- package/dist/skills/builtin/datetime.js.map +1 -1
- package/dist/skills/builtin/google_maps.d.ts +29 -14
- package/dist/skills/builtin/google_maps.js +89 -269
- package/dist/skills/builtin/google_maps.js.map +1 -1
- package/dist/skills/builtin/index.d.ts +8 -6
- package/dist/skills/builtin/index.js +8 -6
- package/dist/skills/builtin/index.js.map +1 -1
- package/dist/skills/builtin/info_gatherer.d.ts +4 -2
- package/dist/skills/builtin/info_gatherer.js +20 -12
- package/dist/skills/builtin/info_gatherer.js.map +1 -1
- package/dist/skills/builtin/joke.d.ts +16 -6
- package/dist/skills/builtin/joke.js +54 -37
- package/dist/skills/builtin/joke.js.map +1 -1
- package/dist/skills/builtin/math.d.ts +3 -1
- package/dist/skills/builtin/math.js +14 -9
- package/dist/skills/builtin/math.js.map +1 -1
- package/dist/skills/builtin/mcp_gateway.d.ts +34 -5
- package/dist/skills/builtin/mcp_gateway.js +77 -46
- package/dist/skills/builtin/mcp_gateway.js.map +1 -1
- package/dist/skills/builtin/native_vector_search.d.ts +19 -5
- package/dist/skills/builtin/native_vector_search.js +179 -61
- package/dist/skills/builtin/native_vector_search.js.map +1 -1
- package/dist/skills/builtin/play_background_file.d.ts +21 -15
- package/dist/skills/builtin/play_background_file.js +43 -122
- package/dist/skills/builtin/play_background_file.js.map +1 -1
- package/dist/skills/builtin/spider.d.ts +42 -4
- package/dist/skills/builtin/spider.js +277 -104
- package/dist/skills/builtin/spider.js.map +1 -1
- package/dist/skills/builtin/swml_transfer.d.ts +14 -3
- package/dist/skills/builtin/swml_transfer.js +45 -24
- package/dist/skills/builtin/swml_transfer.js.map +1 -1
- package/dist/skills/builtin/weather_api.d.ts +24 -13
- package/dist/skills/builtin/weather_api.js +38 -30
- package/dist/skills/builtin/weather_api.js.map +1 -1
- package/dist/skills/builtin/web_search.d.ts +48 -10
- package/dist/skills/builtin/web_search.js +294 -100
- package/dist/skills/builtin/web_search.js.map +1 -1
- package/dist/skills/builtin/wikipedia_search.d.ts +4 -2
- package/dist/skills/builtin/wikipedia_search.js +14 -13
- package/dist/skills/builtin/wikipedia_search.js.map +1 -1
- package/dist/skills/index.d.ts +3 -2
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/swml_verbs_generated.d.ts +2824 -0
- package/dist/swml_verbs_generated.js +12 -0
- package/dist/swml_verbs_generated.js.map +1 -0
- package/dist/types.d.ts +59 -6
- package/dist/web.d.ts +27 -0
- package/dist/web.js +20 -0
- package/dist/web.js.map +1 -0
- package/docs/agent-guide.md +1034 -0
- package/docs/ai_chat.md +560 -0
- package/docs/api-reference.md +3641 -0
- package/docs/architecture.md +846 -0
- package/docs/bedrock_agent.md +411 -0
- package/docs/cli-guide.md +403 -0
- package/docs/cloud_functions_guide.md +399 -0
- package/docs/configuration.md +548 -0
- package/docs/contexts-guide.md +884 -0
- package/docs/datamap-guide.md +1207 -0
- package/docs/developer_pain_points.md +548 -0
- package/docs/llm_parameters.md +298 -0
- package/docs/mcp_gateway_reference.md +354 -0
- package/docs/mcp_integration.md +162 -0
- package/docs/pgi_agent_guide.md +1820 -0
- package/docs/prefabs-guide.md +815 -0
- package/docs/programmatically_governed_inference.md +301 -0
- package/docs/sdk_features.md +501 -0
- package/docs/security.md +559 -0
- package/docs/serverless-guide.md +520 -0
- package/docs/skills-guide.md +1223 -0
- package/docs/skills-system.md +405 -0
- package/docs/skills_parameter_schema.md +417 -0
- package/docs/swaig-reference.md +1986 -0
- package/docs/swml_service_guide.md +573 -0
- package/docs/third_party_skills.md +410 -0
- package/docs/web_service.md +666 -0
- package/examples/README.md +202 -0
- package/examples/advanced-datamap.ts +108 -0
- package/examples/advanced-dynamic-config.ts +70 -0
- package/examples/auto-vivified.ts +95 -0
- package/examples/call-flow.ts +65 -0
- package/examples/comprehensive-dynamic.ts +125 -0
- package/examples/contexts-steps.ts +65 -0
- package/examples/custom-path.ts +45 -0
- package/examples/datamap-tools.ts +51 -0
- package/examples/datasphere-multi-instance.ts +66 -0
- package/examples/datasphere-serverless-env.ts +87 -0
- package/examples/datasphere-webhook-env.ts +65 -0
- package/examples/datasphere.ts +56 -0
- package/examples/declarative.ts +100 -0
- package/examples/dynamic-config.ts +54 -0
- package/examples/dynamic-info-gatherer.ts +69 -0
- package/examples/dynamic-swml-service.ts +67 -0
- package/examples/gather-info.ts +95 -0
- package/examples/gather-per-question-functions-demo.ts +139 -0
- package/examples/joke-agent.ts +34 -0
- package/examples/kubernetes-agent.ts +45 -0
- package/examples/llm-params.ts +75 -0
- package/examples/mcp-agent.ts +89 -0
- package/examples/mcp-gateway.ts +81 -0
- package/examples/multi-agent.ts +80 -0
- package/examples/multi-endpoint.ts +79 -0
- package/examples/pgi/case-domain.ts +114 -0
- package/examples/pgi/serve.ts +16 -0
- package/examples/pgi/support-agent.ts +265 -0
- package/examples/pom-prompt.ts +70 -0
- package/examples/prefab-concierge.ts +42 -0
- package/examples/prefab-faq.ts +58 -0
- package/examples/prefab-info-gatherer.ts +33 -0
- package/examples/prefab-receptionist.ts +36 -0
- package/examples/prefab-survey.ts +69 -0
- package/examples/quickstart-agent.ts +29 -0
- package/examples/quickstart-relay.ts +25 -0
- package/examples/quickstart-rest.ts +25 -0
- package/examples/record-call.ts +65 -0
- package/examples/relay-demo.ts +33 -0
- package/examples/room-and-sip.ts +93 -0
- package/examples/serverless-lambda.ts +43 -0
- package/examples/session-state.ts +83 -0
- package/examples/simple-agent.ts +36 -0
- package/examples/simple-static.ts +29 -0
- package/examples/skills-demo.ts +41 -0
- package/examples/step-function-inheritance-demo.ts +124 -0
- package/examples/swaig-features.ts +193 -0
- package/examples/swml-service-routing.ts +66 -0
- package/examples/swml-service.ts +38 -0
- package/examples/swmlservice_ai_sidecar.ts +104 -0
- package/examples/swmlservice_swaig_standalone.ts +79 -0
- package/examples/tap.ts +67 -0
- package/examples/typed-tools.ts +68 -0
- package/examples/verb-methods.ts +45 -0
- package/examples/web-search-multi-instance.ts +75 -0
- package/examples/web-search.ts +38 -0
- package/examples/wikipedia.ts +36 -0
- package/livewire/README.md +164 -0
- package/livewire/docs/migration-guide.md +251 -0
- package/livewire/examples/livewire-basic-agent.ts +74 -0
- package/livewire/examples/livewire-handoff.ts +196 -0
- package/livewire/examples/livewire-multi-tool.ts +121 -0
- package/package.json +85 -13
- package/relay/README.md +101 -0
- package/relay/docs/call-methods.md +622 -0
- package/relay/docs/client-reference.md +281 -0
- package/relay/docs/events.md +193 -0
- package/relay/docs/getting-started.md +221 -0
- package/relay/docs/guide.md +386 -0
- package/relay/docs/messaging.md +246 -0
- package/relay/examples/relay-inbound.ts +66 -0
- package/relay/examples/relay-messaging.ts +74 -0
- package/relay/examples/relay-outbound.ts +76 -0
- package/rest/README.md +141 -0
- package/rest/docs/calling.md +313 -0
- package/rest/docs/client-reference.md +149 -0
- package/rest/docs/fabric.md +192 -0
- package/rest/docs/getting-started.md +138 -0
- package/rest/docs/guide.md +421 -0
- package/rest/docs/namespaces.md +367 -0
- package/rest/docs/phone-binding.md +116 -0
- package/rest/examples/rest-10dlc-registration.ts +177 -0
- package/rest/examples/rest-bind-phone-to-swml-webhook.ts +66 -0
- package/rest/examples/rest-calling-ivr-and-ai.ts +136 -0
- package/rest/examples/rest-calling-play-and-record.ts +98 -0
- package/rest/examples/rest-client.ts +59 -0
- package/rest/examples/rest-datasphere-search.ts +81 -0
- package/rest/examples/rest-fabric-conferences-and-routing.ts +147 -0
- package/rest/examples/rest-fabric-subscribers-and-sip.ts +106 -0
- package/rest/examples/rest-fabric-swml-and-callflows.ts +101 -0
- package/rest/examples/rest-manage-resources.ts +64 -0
- package/rest/examples/rest-phone-number-management.ts +200 -0
- package/rest/examples/rest-queues-mfa-and-recordings.ts +143 -0
- package/rest/examples/rest-video-rooms.ts +186 -0
- package/tutorial/fred/fred.ts +218 -0
- package/tutorial/fred/tutorial/01-introduction.md +141 -0
- package/tutorial/fred/tutorial/02-setup.md +304 -0
- package/tutorial/fred/tutorial/03-basic-agent.md +284 -0
- package/tutorial/fred/tutorial/04-wikipedia-skill.md +298 -0
- package/tutorial/fred/tutorial/05-custom-functions.md +347 -0
- package/tutorial/fred/tutorial/06-running-testing.md +642 -0
- package/tutorial/fred/tutorial/README.md +56 -0
- package/tutorial/fred/tutorial/appendix-complete-code.md +632 -0
- package/tutorial/fred/tutorial/appendix-docker-deployment.md +504 -0
- package/tutorial/full-guardrails-agent/handlers.ts +436 -0
- package/tutorial/full-guardrails-agent/penny.ts +305 -0
- package/tutorial/full-guardrails-agent/reservations.ts +1109 -0
- package/tutorial/full-guardrails-agent/tutorial/01-why-guardrails.md +149 -0
- package/tutorial/full-guardrails-agent/tutorial/02-design-first.md +139 -0
- package/tutorial/full-guardrails-agent/tutorial/03-rules-first.md +422 -0
- package/tutorial/full-guardrails-agent/tutorial/04-the-shell.md +238 -0
- package/tutorial/full-guardrails-agent/tutorial/05-steps-and-scoping.md +247 -0
- package/tutorial/full-guardrails-agent/tutorial/06-tools-that-decide.md +467 -0
- package/tutorial/full-guardrails-agent/tutorial/07-gather-and-projection.md +160 -0
- package/tutorial/full-guardrails-agent/tutorial/08-the-verification-gate.md +333 -0
- package/tutorial/full-guardrails-agent/tutorial/09-people-and-endings.md +313 -0
- package/tutorial/full-guardrails-agent/tutorial/10-testing-and-running.md +387 -0
- package/tutorial/full-guardrails-agent/tutorial/README.md +106 -0
- package/tutorial/full-guardrails-agent/tutorial/appendix-complete-code.md +2207 -0
- package/tutorial/full-guardrails-agent/tutorial/appendix-deployment.md +191 -0
- package/tutorial/full-guardrails-agent/tutorial/appendix-technique-map.md +117 -0
- package/tutorial/full-guardrails-agent/workflow.ts +219 -0
- package/tutorial/multi_agents/README.md +175 -0
- package/tutorial/multi_agents/advanced_agent.ts +395 -0
- package/tutorial/multi_agents/extending_agents.ts +641 -0
- package/tutorial/multi_agents/knowledge.ts +59 -0
- package/tutorial/multi_agents/lesson1_first_agent.md +368 -0
- package/tutorial/multi_agents/lesson2_knowledge_bases.md +404 -0
- package/tutorial/multi_agents/lesson3_multi_agent_systems.md +621 -0
- package/tutorial/multi_agents/lesson4_advanced_features.md +805 -0
- package/tutorial/multi_agents/lesson5_extending_agents.md +856 -0
- package/tutorial/multi_agents/pc_builder.ts +529 -0
- package/tutorial/multi_agents/sales_agent.ts +88 -0
- package/tutorial/multi_agents/sales_agent_with_search.ts +116 -0
- package/tutorial/multi_agents/sales_knowledge.md +139 -0
- package/tutorial/multi_agents/support_knowledge.md +256 -0
- package/dist/cli/mock-data.d.ts +0 -37
- package/dist/cli/mock-data.js +0 -80
- package/dist/cli/mock-data.js.map +0 -1
- package/dist/generateVerbTypes.d.ts +0 -11
- package/dist/generateVerbTypes.js +0 -265
- package/dist/generateVerbTypes.js.map +0 -1
- package/dist/rest/namespaces/compat.d.ts +0 -585
- package/dist/rest/namespaces/compat.js +0 -735
- package/dist/rest/namespaces/compat.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,821 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@signalwire/sdk` are documented here. This project
|
|
4
|
+
follows [Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## 3.6.0 (2026-10-05)
|
|
7
|
+
|
|
8
|
+
Parity with signalwire-python 3.6.0: semantic gates, `changeVoice()`, and
|
|
9
|
+
the settings and state they use.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Semantic gates: `SemanticGate`, and `gates` and `gateFillers` on
|
|
14
|
+
`defineTool()`, `defineTypedTool()`, `SwaigFunction`, a skill's tools and
|
|
15
|
+
raw function definitions, and `gate()` and `gateFillers()` on DataMap. A
|
|
16
|
+
gate is a yes/no question a decision model answers about the call before
|
|
17
|
+
the platform runs the function; when one fails, the function doesn't run
|
|
18
|
+
and the model gets the gate's `on_fail` output. Gates are checked by the
|
|
19
|
+
platform's rules when the tool is defined and again when the SWML is
|
|
20
|
+
rendered, since the platform refuses a function with an invalid gate. They
|
|
21
|
+
need a platform release with semantic gates: one without them runs the
|
|
22
|
+
function ungated.
|
|
23
|
+
- `AgentBase.setSemanticGates()` sets `semantic_gates_enabled`,
|
|
24
|
+
`semantic_gate_timeout_ms` and `semantic_gate_history`, and
|
|
25
|
+
`FunctionResult.setSemanticState()` sets the state gates judge.
|
|
26
|
+
- `FunctionResult.changeVoice()` changes the AI's voice for the rest of the
|
|
27
|
+
call (`change_voice`), from the next batch of speech on. It throws on an
|
|
28
|
+
empty or whitespace-only voice, which the platform would ignore.
|
|
29
|
+
- Function fillers are documented with the `auto` key, translated into the
|
|
30
|
+
call's language on first use, and wait scripts, lists of phrases spoken one
|
|
31
|
+
at a time while the call waits. `gateFillers` is typed for both (the
|
|
32
|
+
exported `FillerPhrases`); `fillers` keeps its type, so a wait script there
|
|
33
|
+
needs a cast.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- `addSkill()` merges a skill's `swaig_fields` and each tool's own fields
|
|
38
|
+
before it builds the tool, so the merged definition is what gets checked;
|
|
39
|
+
a tool's own fields still win. It used to copy `swaig_fields` onto the
|
|
40
|
+
tool afterwards.
|
|
41
|
+
|
|
42
|
+
## 3.5.0 (2026-09-29)
|
|
43
|
+
|
|
44
|
+
Brings the TypeScript SDK to parity with signalwire-python 3.5.1: the
|
|
45
|
+
security fixes, the per-call configuration and tool-response API, the
|
|
46
|
+
AI Chat gateway and handoff router, swaig-test's DataMap simulator, the
|
|
47
|
+
packaged documentation (`sw-tsdocs`) and the tutorials. It also adopts the
|
|
48
|
+
reference SDK's per-request transport envelope across the REST surface. Some
|
|
49
|
+
changes break existing code; see Changed (breaking) and Notes for upgraders.
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- `sw-tsdocs`: the SDK's documentation for the installed version, for people
|
|
54
|
+
and coding agents. With no arguments it prints an index; `sw-tsdocs <topic>`
|
|
55
|
+
covers an area, with the installed docs to read, examples and API names;
|
|
56
|
+
`sw-tsdocs api <name>` prints a signature, JSDoc, source location and members
|
|
57
|
+
from the package's declarations; `examples`, `grep`, `show` and `path` find
|
|
58
|
+
the installed files; and `sw-tsdocs init` adds a section to a project's
|
|
59
|
+
`AGENTS.md` that tells coding agents to use it. `swaig-test --help` points
|
|
60
|
+
to it, and the package's `dist/llms.txt` and `dist/AGENTS.md` list the docs.
|
|
61
|
+
- The package ships its docs and examples: `docs/`, `examples/` (without the
|
|
62
|
+
audit harnesses), the RELAY, REST and LiveWire READMEs, docs and examples,
|
|
63
|
+
and `CHANGELOG.md`, in their repository layout. The examples import
|
|
64
|
+
`'@signalwire/sdk'`, so a copy runs as it is. The tarball grows from about
|
|
65
|
+
1.0 MB to 1.9 MB.
|
|
66
|
+
- Three tutorials, shipped in the package under `tutorial/` and listed by
|
|
67
|
+
`sw-tsdocs tutorials`: Fred, a voice agent that answers from Wikipedia;
|
|
68
|
+
Penny, a restaurant reservation line built with Programmatically Governed
|
|
69
|
+
Inference; and a multi-agent tutorial (a sales agent with knowledge-base
|
|
70
|
+
search, then specialists behind one `AgentServer`). Their lessons quote
|
|
71
|
+
the code with include markers, and their tests run in the SDK's suite.
|
|
72
|
+
- `AgentBase` option `swaigSecret` (or `SIGNALWIRE_SWAIG_SECRET`): the
|
|
73
|
+
secret that signs SWAIG function tokens, so a token minted by one replica,
|
|
74
|
+
or before a restart, still validates. Without it each process generates
|
|
75
|
+
its own.
|
|
76
|
+
- `AgentBase.addPerCallConfig(cb)`: per-request configuration callbacks that
|
|
77
|
+
accumulate and run in order on the same copy, so separate pieces of code
|
|
78
|
+
can each configure what they own. `setDynamicConfigCallback` replaces the
|
|
79
|
+
whole chain.
|
|
80
|
+
- `AgentBase.onCallEnd(handler)`: run handlers with the transcript when the
|
|
81
|
+
call ends. It registers the platform's reserved `hangup_hook` function and
|
|
82
|
+
turns on `swaig_post_conversation`, without which the hook carries no
|
|
83
|
+
transcript.
|
|
84
|
+
- `AgentBase.mount(appOrRouter, { prefix })`: serve another Hono app or a
|
|
85
|
+
fetch handler alongside the agent's routes. The mount survives the agent
|
|
86
|
+
rebuilding its app, answers its own CORS preflights and sets its own
|
|
87
|
+
headers, and isn't behind the agent's basic auth.
|
|
88
|
+
- `FunctionResult` can separate what a tool did from what the model should
|
|
89
|
+
say: `setToolResponse(toolResult, toolPrompt)` (or the constructor's third
|
|
90
|
+
and fourth arguments) sends `response` as
|
|
91
|
+
`{ tool_result, tool_prompt }`, so a status line isn't read aloud and an
|
|
92
|
+
instruction isn't taken for data. The plain string form is unchanged.
|
|
93
|
+
- `FunctionResult.hold(prompt, timeout, step, timeoutStep)`: a prompt is
|
|
94
|
+
delivered before the hold lands (it sets the structured response and
|
|
95
|
+
`postProcess`), and `step`/`timeoutStep` move the call to a step when it's
|
|
96
|
+
taken off hold or the hold times out. `hold()` and `hold(120)` are
|
|
97
|
+
unchanged.
|
|
98
|
+
- `FunctionResult.rpcAiMessage()` takes `globalData`, merged into the other
|
|
99
|
+
call's global data, and its message text is optional;
|
|
100
|
+
`rpcAiGlobalData(callId, data)` sends data only.
|
|
101
|
+
- `userVariables`, `declaredCapabilities` and `hasCapability` read the
|
|
102
|
+
capabilities a browser client declares in its user variables, such as
|
|
103
|
+
`display_content`. A capability counts only when declared truthy; a missing
|
|
104
|
+
or malformed declaration means not declared. They're hints about what the
|
|
105
|
+
client can render, not permissions, since the caller sets them.
|
|
106
|
+
- `normalizePostPrompt(body)` returns one `NormalizedPostPrompt` for a
|
|
107
|
+
post-prompt from either the voice or the chat engine: the medium, the
|
|
108
|
+
conversation and call IDs, the parsed summary, and the user and assistant
|
|
109
|
+
turns with tool calls and the chat engine's summary echo removed.
|
|
110
|
+
`parsePostPromptData`, `dialogueTurns` and `stripJsonFence` are exported for
|
|
111
|
+
the individual steps. None of them throws on malformed input.
|
|
112
|
+
- `ChatGateway`: lets a browser chat widget use the AI Chat service
|
|
113
|
+
through your app without holding an API token. The widget presents a
|
|
114
|
+
publishable key; the gateway checks it and the page's origin, keeps the
|
|
115
|
+
conversation id in a signed handle, sends its own `config_url`, and caps
|
|
116
|
+
new conversations per window and turns per conversation. `router()` is a
|
|
117
|
+
Hono app for `agent.mount(gateway.router(), { prefix: '/chat' })`; a chat
|
|
118
|
+
reply is streamed through, keepalive padding included. `start` opens a
|
|
119
|
+
conversation so the agent speaks first, and `log` returns only the user
|
|
120
|
+
and assistant turns. The browser's `user_meta_data` is forwarded, limited
|
|
121
|
+
to 8 KiB. `SIGNALWIRE_CHAT_GATEWAY_KEY` and
|
|
122
|
+
`SIGNALWIRE_CHAT_GATEWAY_SECRET` supply the key and handle secret.
|
|
123
|
+
- `HandoffRouter`: the `/handoff`, `/escalate` and `/say` routes the
|
|
124
|
+
SignalWire address widget calls beside a gateway, to move a conversation
|
|
125
|
+
between a call and chat and to type into a live call. The browser proves
|
|
126
|
+
which call it's on with a single-use nonce the application registers from
|
|
127
|
+
the dial. The next medium starts after the application's callback
|
|
128
|
+
captures the previous leg, or after `captureTimeout` if the capture fails
|
|
129
|
+
or takes too long. Typing is capped per call; a `sendMessage` that
|
|
130
|
+
throws or returns `false` doesn't count. The routes answer their own
|
|
131
|
+
CORS preflights for origins the gateway allows.
|
|
132
|
+
- `AIChatClient.rawPost(method, params)` returns the response with its body
|
|
133
|
+
unread, for a proxy that streams it through.
|
|
134
|
+
- `AIChatClient` reads a service URL from `RAILS_DEV_MODE` (a boolean value
|
|
135
|
+
is ignored), accepts a space hostname (`example.signalwire.com`) in
|
|
136
|
+
`space`/`SIGNALWIRE_SPACE` as the REST client does (#186), sends the SDK's
|
|
137
|
+
User-Agent, and warns when a conversation id holds characters the service
|
|
138
|
+
will strip.
|
|
139
|
+
- `swaig-test` sends its requests through the agent's own HTTP app, as
|
|
140
|
+
SignalWire would: the SWML is fetched with a simulated call (so basic
|
|
141
|
+
auth, signatures, the dynamic config callback and webhook tokens run as on
|
|
142
|
+
a server, and the callback runs once for `--dump-swml`), and `--exec`
|
|
143
|
+
calls a function at the `web_hook_url` its SWML gives it. It gains the
|
|
144
|
+
Python SDK's options:
|
|
145
|
+
- Function arguments after `--exec <function>` as `--name value`, typed by
|
|
146
|
+
the function's schema, with a warning for an argument the function
|
|
147
|
+
doesn't declare (`--arg name=value` still works).
|
|
148
|
+
- A DataMap simulator, so `--exec` runs a DataMap function; external
|
|
149
|
+
webhook functions are called at their URL.
|
|
150
|
+
- `--query-params`, `--header`, `--body`, `--method`, `--user-vars`,
|
|
151
|
+
`--custom-data`, `--minimal`, `--fake-full-data`, `--override-json`,
|
|
152
|
+
`--project-id`, `--space-id`, `--help-platforms` and `--help-examples`.
|
|
153
|
+
- Serverless simulation that runs any action with the platform's
|
|
154
|
+
environment, with `--aws-*`, `--cgi-*`, `--gcp-*` and `--azure-*`
|
|
155
|
+
options (`--aws-api-gateway-id` and `--aws-stage` give an API Gateway
|
|
156
|
+
URL), and the Python platform names `cloud_function` and
|
|
157
|
+
`azure_function`.
|
|
158
|
+
- `--list-tools` lists DataMap and external functions with their
|
|
159
|
+
parameters.
|
|
160
|
+
- It finds an agent the file constructs without exporting (the
|
|
161
|
+
quickstart's), and `--route` picks a service in a file with several.
|
|
162
|
+
- The simulated call is the same when `--exec` finds the function and
|
|
163
|
+
when it calls it, so `--override`, `--override-json` and the call flags
|
|
164
|
+
reach a dynamic config callback both times. A plain `SWMLService`'s
|
|
165
|
+
function is called through its `/swaig` route.
|
|
166
|
+
- Requests are signed over `SWML_PROXY_URL_BASE` when it's set, as the
|
|
167
|
+
platform signs them. Credentials in an external webhook URL are sent as
|
|
168
|
+
basic auth.
|
|
169
|
+
- `--exec` exits `0` when every webhook of a DataMap function fails and
|
|
170
|
+
it has no fallback output, printing the platform's generic error. A webhook's timeout covers its body.
|
|
171
|
+
- A simulated platform's environment replaces other platforms' variables
|
|
172
|
+
the shell had set, and they're restored afterwards.
|
|
173
|
+
- **`requestOptions` on every REST resource verb** — each `list` / `paginate` /
|
|
174
|
+
`get` / `create` / `update` / `delete` / `list_addresses` and every generated
|
|
175
|
+
operation / command-dispatch / set-method now accepts a trailing optional
|
|
176
|
+
`requestOptions?: RequestOptionsInit` (timeout / retries / backoff /
|
|
177
|
+
`abortSignal`), threaded to the transport and forwarded to every page fetch by
|
|
178
|
+
`paginate()`. Mirrors the Python reference's keyword-only `request_options`.
|
|
179
|
+
- Custom-CA env vars for outbound TLS documented: `SIGNALWIRE_REST_CA_FILE`
|
|
180
|
+
(REST) and `SIGNALWIRE_RELAY_CA_FILE` (RELAY) — opt-in trust-adding, never
|
|
181
|
+
disables verification.
|
|
182
|
+
|
|
183
|
+
### Changed (breaking)
|
|
184
|
+
|
|
185
|
+
- Generated REST resource verb signatures gained the trailing `requestOptions`
|
|
186
|
+
parameter (inserted before the `**kwargs`/`**params` variadic tail). Existing
|
|
187
|
+
call sites keep working — the parameter is optional and the variadic tail is
|
|
188
|
+
preserved — but the declared signatures changed, hence the MAJOR bump.
|
|
189
|
+
- `mcp_gateway` TLS verification is a two-key opt-in: disabling it now requires
|
|
190
|
+
BOTH `verify_ssl=false` AND `allow_insecure_tls=true`; the secure default
|
|
191
|
+
(verification ON) is preserved and a lone `verify_ssl=false` is ignored.
|
|
192
|
+
|
|
193
|
+
### Security
|
|
194
|
+
|
|
195
|
+
- With a dynamic config callback set, only SWML rendering used the
|
|
196
|
+
callback's per-request copy of the agent; SWAIG function calls and summary
|
|
197
|
+
deliveries ran on the agent itself. A tool the callback made `secure` ran
|
|
198
|
+
the agent's own unsecured tool with no token, and a tool the callback
|
|
199
|
+
registered was advertised in the SWML but answered `404`. A function call
|
|
200
|
+
and a summary now run on a copy the callback configured from that request,
|
|
201
|
+
so the tool that runs, and whose token is checked, is the one the SWML
|
|
202
|
+
advertised.
|
|
203
|
+
- The agent's `/mcp` endpoint (`enableMcpServer()`) had no authentication, so
|
|
204
|
+
anyone who could reach the server could run the agent's tools, secure ones
|
|
205
|
+
included. It now requires the agent's basic auth credentials, and lists and
|
|
206
|
+
calls only the tools the agent runs itself, not external webhook tools. An
|
|
207
|
+
MCP client must now send an `Authorization` header.
|
|
208
|
+
- A secure SWAIG function ran when the request carried no token at all;
|
|
209
|
+
only a wrong token was refused. Now a secure function runs only with a valid
|
|
210
|
+
token for that function and call, and a request with no token or no
|
|
211
|
+
`call_id` is refused like a wrong one.
|
|
212
|
+
- Tokens for a call whose id contains a dot (composed conversation ids such as
|
|
213
|
+
`root.2`) never validated, so that call's secure functions were refused.
|
|
214
|
+
- `GET /?call_id=<id>` now mints the SWML's function tokens for that call. It
|
|
215
|
+
used to ignore the query and mint them for a random session.
|
|
216
|
+
- A `POST` to the post-prompt endpoint delivered a summary to `onSummary`
|
|
217
|
+
with no token; the token minted into the post-prompt URL was never checked.
|
|
218
|
+
It now needs that token for the call (`403` otherwise), and a request whose
|
|
219
|
+
URL and body name different calls gets `400`, so one call's token can't
|
|
220
|
+
deliver another call's summary.
|
|
221
|
+
- A `GET` to the post-prompt endpoint called `onSummary` with an empty
|
|
222
|
+
summary. It now returns the SWML document, like the agent's root.
|
|
223
|
+
- Routing-callback paths (`registerRoutingCallback`) render SWML like the
|
|
224
|
+
root, but a `POST` to one skipped the webhook signature check. With a
|
|
225
|
+
signing key set, it now needs a valid signature like the root; a `GET`
|
|
226
|
+
stays unsigned.
|
|
227
|
+
- The spider and web_search skills checked a URL before fetching it, then
|
|
228
|
+
followed redirects, so a public page that redirected to an internal
|
|
229
|
+
address, such as a cloud metadata service, was fetched and returned. A
|
|
230
|
+
hostname whose DNS answer changed between the check and the connection had
|
|
231
|
+
the same effect. They now check every request, redirects included (up to
|
|
232
|
+
10), and refuse a connection to a private or internal address. A redirect
|
|
233
|
+
to another origin drops the `Authorization` and `Cookie` headers.
|
|
234
|
+
- `isPrivateIp()`, `validateUrl()` and `resolveAndValidateUrl()` let through
|
|
235
|
+
every IPv6 literal written in URL brackets (`http://[::1]/`), IPv4-mapped
|
|
236
|
+
addresses such as `::ffff:169.254.169.254`, the unspecified address `::`,
|
|
237
|
+
and `0.0.0.0/8`. They now block all of them. `validateUrl()` also refuses
|
|
238
|
+
a URL that isn't http or https, and a hostname that doesn't resolve (it
|
|
239
|
+
used to allow a DNS failure), and checks every address a hostname resolves
|
|
240
|
+
to, not only the first.
|
|
241
|
+
- The per-request copy of an agent that a dynamic config callback configures
|
|
242
|
+
shared many fields with the agent itself, so what one call's callback
|
|
243
|
+
changed reached every later call. A query param added with
|
|
244
|
+
`addSwaigQueryParams()` (a tenant id, say) appeared in the next caller's
|
|
245
|
+
webhook URLs; `addMcpServer()`, `addFunctionInclude()` and
|
|
246
|
+
`addInternalFiller()` accumulated on the agent; `setPromptLlmParams()`
|
|
247
|
+
changed the agent's own settings; and `resetContexts()` cleared the agent's
|
|
248
|
+
contexts. The copy now has its own copies of all of these, and of the SIP
|
|
249
|
+
usernames, routing callbacks, verbs, params and global data. Plain data,
|
|
250
|
+
arrays, Maps, Sets, Dates and contexts are copied; other objects in them
|
|
251
|
+
(a `URL`, a `RegExp`, a class instance) are shared with the agent, so
|
|
252
|
+
don't mutate one of those in place from a callback.
|
|
253
|
+
- Webhook signature validation accepts the stronger
|
|
254
|
+
`X-SignalWire-Sha256-Signature` header (hex HMAC-SHA256 of the URL and raw
|
|
255
|
+
body), preferred over the SHA-1 `X-SignalWire-Signature` when present, and
|
|
256
|
+
falls back to the SHA-1 header so existing deployments keep working. New
|
|
257
|
+
exports: `validateWebhookSignatureSha256()` and
|
|
258
|
+
`SIGNALWIRE_SHA256_SIGNATURE_HEADER`.
|
|
259
|
+
- `redactUrl()` left the password in a URL with an empty user
|
|
260
|
+
(`http://:secret@host`), and masked only the first URL in a string. It now
|
|
261
|
+
masks both.
|
|
262
|
+
- native_vector_search: a `remote_url` with only a user or only a password
|
|
263
|
+
kept its credentials in the URL, so the request failed and the error, which
|
|
264
|
+
quoted the whole URL, was logged at ERROR. Either one is now sent as basic
|
|
265
|
+
auth and removed from the URL. ERROR logs record only an error's type; its
|
|
266
|
+
message, which can echo the caller's query, a remote error or a URL, is
|
|
267
|
+
logged at DEBUG with URLs redacted.
|
|
268
|
+
- Serverless signature checks now use the URL SignalWire signed: the URL the
|
|
269
|
+
platform was called on, with its query, and the raw body. They used the URL
|
|
270
|
+
the adapter built for routing, so with a signing key set, signed requests
|
|
271
|
+
got `403` behind an API Gateway stage, a CGI script path or an Azure
|
|
272
|
+
function app, on Google Cloud Functions (the query was dropped and the
|
|
273
|
+
parsed body re-serialized), and on API Gateway REST (its `Host` header was
|
|
274
|
+
missed). API Gateway REST events, which lose the query's original encoding,
|
|
275
|
+
are checked with both the `+` and `%20` forms. Behind a trusted forwarded
|
|
276
|
+
host, the platform's path prefix is kept.
|
|
277
|
+
- Azure Functions requests, whose URL is absolute, are routed by the path
|
|
278
|
+
below `/api/<function>`; they got `404`.
|
|
279
|
+
- `run()` and `runServerless()` in CGI mode read the request body from stdin
|
|
280
|
+
and write the CGI response to stdout. They read no body and wrote nothing.
|
|
281
|
+
- A per-request copy shared the agent's tool objects, so a dynamic config
|
|
282
|
+
callback that changed a tool (turning `secure` off for one tenant, say)
|
|
283
|
+
changed it for every later call. The copy now has its own tools.
|
|
284
|
+
- A Google Cloud Function on `cloudfunctions.net` refused SignalWire's
|
|
285
|
+
signed requests with `403`: the signature was checked over the request's
|
|
286
|
+
URL, without the function name the webhook URL carries. It's checked over
|
|
287
|
+
the webhook URL only, so a signature made for another function on the
|
|
288
|
+
same host doesn't pass.
|
|
289
|
+
- `SWML_RATE_LIMIT` counted every client in one bucket unless
|
|
290
|
+
`SWML_TRUST_PROXY_HEADERS` was set, so one client over the limit got every
|
|
291
|
+
other client refused, SignalWire included. Each client is keyed by its
|
|
292
|
+
connection address, or on a serverless platform by the address the
|
|
293
|
+
platform reports (Lambda's source IP, a Cloud Function request's `ip`,
|
|
294
|
+
CGI's `REMOTE_ADDR`).
|
|
295
|
+
- Overriding `validateBasicAuth()` on an agent had no effect: the routes
|
|
296
|
+
compared credentials themselves, and not in constant time. Every
|
|
297
|
+
protected route now checks through `validateBasicAuth()`, whose default
|
|
298
|
+
compares in constant time.
|
|
299
|
+
- `WebService` served files through symbolic links that pointed outside a
|
|
300
|
+
mounted directory. It resolves the real path and refuses anything outside
|
|
301
|
+
the mount.
|
|
302
|
+
- `HandoffRouter.register()` reset a nonce when it was registered again, so
|
|
303
|
+
re-sending a call's SWML request reset the `/say` message cap, revived a
|
|
304
|
+
nonce `/handoff` had redeemed, and could move a live nonce to another
|
|
305
|
+
call. The first registration now stands, and a redeemed nonce stays used.
|
|
306
|
+
- The mcp_gateway skill and native_vector_search in remote mode checked
|
|
307
|
+
their URL only at setup; every request, redirects included, is now
|
|
308
|
+
checked for private and internal addresses. This holds for mcp_gateway
|
|
309
|
+
with `verify_ssl: false` and `allow_insecure_tls: true` too, which went
|
|
310
|
+
through its own TLS dispatcher unchecked and now skips only the
|
|
311
|
+
certificate check (and no longer needs the `undici` package).
|
|
312
|
+
- `WebService` checked `blockedExtensions` and `allowedExtensions` against
|
|
313
|
+
the requested name only, so a symbolic link inside a mount (`alias.txt`
|
|
314
|
+
pointing to `.env`) served a blocked file, and a dot entry such as `.git`
|
|
315
|
+
didn't block files under a `.git` directory. The checks now apply to the
|
|
316
|
+
file actually read, including the `index.html` fallback and listings,
|
|
317
|
+
and a dot entry matches a directory on the path.
|
|
318
|
+
- `SkillRegistry.unregister()` and `clear()` removed locked skills, so a
|
|
319
|
+
built-in could be removed and replaced by another class. Locked names
|
|
320
|
+
stay.
|
|
321
|
+
- The `swml_transfer` skill wrote each destination, and each pattern as the
|
|
322
|
+
regular expression source, into the prompt, so a destination URL with
|
|
323
|
+
credentials (`https://user:pass@host/swml`) was shown to the model. The
|
|
324
|
+
prompt and the tool description now name the destination without its
|
|
325
|
+
credentials and the pattern without its regular expression syntax. The
|
|
326
|
+
transfer still uses the full URL.
|
|
327
|
+
|
|
328
|
+
- `WebService` served files whose path below a mount had a dot-named
|
|
329
|
+
component, such as `.env.production`, `.ssh/id_rsa` or `.aws/credentials`,
|
|
330
|
+
including through symbolic links into such directories. Any such path is
|
|
331
|
+
now refused with 403, except under `.well-known`.
|
|
332
|
+
- `WebService` served every mounted file, and `/`, without authentication
|
|
333
|
+
when no password was configured. It now requires basic-auth credentials:
|
|
334
|
+
`start()` throws without them, and every route but `/health` answers 401.
|
|
335
|
+
`/health` no longer requires credentials.
|
|
336
|
+
- `ChatGateway` and `HandoffRouter` parsed request bodies of any size, and
|
|
337
|
+
passed on a chat message or `/say` text of any size as a turn. They now
|
|
338
|
+
answer 413 for a body over `MAX_REQUEST_BODY_BYTES` (64 KiB), refusing an
|
|
339
|
+
oversized declared `Content-Length` before reading, and for a message or
|
|
340
|
+
`/say` text over `MAX_MESSAGE_BYTES` (8 KiB of UTF-8), checked before a
|
|
341
|
+
conversation is created, a turn is counted or a nonce is looked up. Both
|
|
342
|
+
constants are exported. A body the application's own middleware already
|
|
343
|
+
read is read from Hono's cache, within the same limit.
|
|
344
|
+
- `HandoffRouter.say()` didn't write its typing-slot count back to the
|
|
345
|
+
`registry`, so a registry that returns copies recorded neither the slot
|
|
346
|
+
nor the refund for a failed delivery, and `maxMessagesPerCall` could be
|
|
347
|
+
passed. It now writes the entry back and refunds against the stored entry,
|
|
348
|
+
matched by conversation, call and registration time.
|
|
349
|
+
- `swml_transfer` stopped at the first `@` when it removed a destination's
|
|
350
|
+
credentials from the prompt, so a password containing an unencoded `@`
|
|
351
|
+
showed its tail to the model. It now removes the whole authority up to its
|
|
352
|
+
last `@`.
|
|
353
|
+
|
|
354
|
+
### Fixed
|
|
355
|
+
|
|
356
|
+
- Agents: `AgentBase.serve()` and `AgentServer.run()` serve HTTPS from
|
|
357
|
+
`SWML_SSL_ENABLED`, `SWML_SSL_CERT_PATH` and `SWML_SSL_KEY_PATH`, as the
|
|
358
|
+
Python SDK does; they served plain HTTP. The webhook URLs then use
|
|
359
|
+
`https`, on `SWML_SSL_DOMAIN` when it's set. `SWML_SSL_ENABLED` accepts
|
|
360
|
+
`true`, `1` or `yes`, and `stop()` closes the server `serve()` started.
|
|
361
|
+
When the certificate or key file is missing, it warns and serves HTTP,
|
|
362
|
+
and the webhook URLs stay `http`.
|
|
363
|
+
- The `native_vector_search` skill's `search_stats` in global data reported
|
|
364
|
+
the configured `backend` option (by default `sqlite`, a mode this port
|
|
365
|
+
doesn't have) when it searched in memory; it reports `memory`.
|
|
366
|
+
- `run()` on Cloud Run, which sets `K_SERVICE` but not `FUNCTION_TARGET`,
|
|
367
|
+
handled one empty request instead of starting the server.
|
|
368
|
+
- `*` in `SWML_ALLOWED_HOSTS` refused every host, and in
|
|
369
|
+
`SWML_CORS_ORIGINS` allowed no origin; it now allows all, as in Python.
|
|
370
|
+
- `schemaValidation: false` and `schemaPath` now apply to the verbs an
|
|
371
|
+
agent renders; only `SWML_SKIP_SCHEMA_VALIDATION` worked.
|
|
372
|
+
- `addLanguage()` emitted fillers as objects the schema doesn't define.
|
|
373
|
+
`LanguageConfig` gains `speechFillers`, and fillers are emitted as string
|
|
374
|
+
arrays, as the Python SDK emits them; the object forms are flattened with
|
|
375
|
+
a warning.
|
|
376
|
+
- `defineContexts()` given a plain object ignored it; it renders it as the
|
|
377
|
+
contexts and returns the agent, as the Python SDK does with a dict.
|
|
378
|
+
- Tool arguments that don't match the tool's schema log a warning before
|
|
379
|
+
the handler runs, as in the Python SDK; `validateArgs()` was never called.
|
|
380
|
+
Each schema's validator is compiled once and cached.
|
|
381
|
+
- A skill's `swaig_fields: { secure: false }` now lets its tools run
|
|
382
|
+
without a per-call token; it only changed the rendered definition.
|
|
383
|
+
- `getRegisteredTools()` returned an empty description and no parameters
|
|
384
|
+
for DataMap tools.
|
|
385
|
+
- `suppressLogs: true` didn't silence the warnings the constructor logged
|
|
386
|
+
first.
|
|
387
|
+
- `SWMLService` routing callbacks: an async callback was redirected to
|
|
388
|
+
`[object Promise]`, and a throwing one failed the request. The route
|
|
389
|
+
awaits the callback and otherwise serves the request's SWML.
|
|
390
|
+
- `AgentServer.setupSipRouting()` and `registerGlobalRoutingCallback()`
|
|
391
|
+
called after `register()` served the callback at a doubled path
|
|
392
|
+
(`/sales/sales/sip`) or not at all, and threw once the server had served
|
|
393
|
+
a request. The server's app is rebuilt when its routes change, and
|
|
394
|
+
`unregister()` removes the agent's routes too (they stayed served).
|
|
395
|
+
- `SWMLService.serve()` warns when the service serves without basic auth
|
|
396
|
+
because its credentials were generated (the Python SDK enforces them;
|
|
397
|
+
see PORT_BEHAVIORAL_NOTES.md).
|
|
398
|
+
- DataMap: a webhook's output reads the tool's arguments as
|
|
399
|
+
`${input.args.x}`; `${args.x}` expands to nothing there on the platform.
|
|
400
|
+
The datasphere_serverless skill's result and the DataMap examples read
|
|
401
|
+
them that way now.
|
|
402
|
+
- swaig-test's DataMap simulator follows the platform: the template data
|
|
403
|
+
each stage reads, `nomatch-output`, webhook `expressions`, foreach with
|
|
404
|
+
the webhook's data, `params` as the body whenever set, the first webhook
|
|
405
|
+
requested deciding the result, `error_keys` failing by presence,
|
|
406
|
+
case-insensitive patterns, and headers sent as written. Its template
|
|
407
|
+
helpers are the platform's `lc:`, `enc:` and `fmt_ph:`, applied in the
|
|
408
|
+
platform's fixed order (so `${enc:url:x}` reads the missing path
|
|
409
|
+
`url:x`, as on the platform); `enc:` encodes what the platform encodes;
|
|
410
|
+
and a single expression or webhook object is read as the platform reads
|
|
411
|
+
it.
|
|
412
|
+
- swaig-test: `--help` shows `--call-direction inbound|outbound` and
|
|
413
|
+
lists `--project-id` and `--space-id`; the Lambda and Cloud Functions
|
|
414
|
+
simulations honor the function name, region and project options; the
|
|
415
|
+
Azure simulation names the function.
|
|
416
|
+
- RELAY: a sent message with an `on()` listener stayed tracked after it
|
|
417
|
+
finished; `DialOptions` and `SendMessageOptions` are the types `dial()`
|
|
418
|
+
and `sendMessage()` take; the `stream()` track values are the protocol's.
|
|
419
|
+
- LiveWire: `runApp()` serves the agent of the session its entry function
|
|
420
|
+
starts (it served nothing, so the quick start and examples started no
|
|
421
|
+
server); an LLM plugin object sets the model (it rendered
|
|
422
|
+
`[object Object]`); `tools` may be an object keyed by name, as LiveKit
|
|
423
|
+
agents-js takes it.
|
|
424
|
+
- Bedrock: `BedrockAgent` warns when a render leaves hints, languages,
|
|
425
|
+
pronunciation, multilingual or debug settings out of the verb, and when
|
|
426
|
+
`setPromptLlmParams()` gets a non-number.
|
|
427
|
+
- `WebService` takes credentials from `SWML_BASIC_AUTH_USER` and
|
|
428
|
+
`SWML_BASIC_AUTH_PASSWORD` and the config file; `addDirectory()` and
|
|
429
|
+
`removeDirectory()` work on a running service, and a `/` mount serves; an
|
|
430
|
+
invalid `web_service.json` is skipped with a warning.
|
|
431
|
+
- Prefabs: `InfoGathererAgent` passes the request's query parameters and
|
|
432
|
+
headers to its callback (it passed `{}`); `SurveyAgent` and
|
|
433
|
+
`ReceptionistAgent` drop a call's state when its summary arrives, after
|
|
434
|
+
an hour idle, or beyond 10,000 calls.
|
|
435
|
+
- Skills: importing the SDK no longer fails without optional packages
|
|
436
|
+
(mcp_gateway imported undici, which isn't a dependency); weather_api
|
|
437
|
+
loads with `api_key` alone and defaults to Fahrenheit, as its schema says;
|
|
438
|
+
google_maps and ask_claude read their `api_key` parameter;
|
|
439
|
+
`agent.skillManager.loadSkill()` registers the skill on the agent;
|
|
440
|
+
discovery scans `addSkillDirectory()` directories and finds compiled
|
|
441
|
+
`skill.js`; custom_skills honors a parameter's `required`; schema
|
|
442
|
+
defaults and descriptions match the code.
|
|
443
|
+
- Examples: `llm-params.ts`, `advanced-datamap.ts`, `gather-info.ts`,
|
|
444
|
+
`mcp-gateway.ts`, the DataSphere examples and `serverless-lambda.ts` did
|
|
445
|
+
what their headers said only in part, or threw on load; they're fixed.
|
|
446
|
+
- `defineContexts()` called with no argument replaced the agent's contexts
|
|
447
|
+
with a new, empty builder. It returns the existing builder, creating one
|
|
448
|
+
on first use, as the Python SDK's `define_contexts()` does; pass a
|
|
449
|
+
`ContextBuilder` to replace the workflow.
|
|
450
|
+
- RELAY `Call.userEvent()` sent only `event` and dropped the other fields
|
|
451
|
+
its options accept. It sends them all, as the Python SDK does.
|
|
452
|
+
- RELAY `sendMessage()` sent an empty `context` when the client had no
|
|
453
|
+
relay protocol yet, instead of `'default'`.
|
|
454
|
+
- The RELAY outbound and messaging examples passed milliseconds to
|
|
455
|
+
`wait()`, which takes seconds.
|
|
456
|
+
- Contexts and steps rendered as `ai.contexts`, beside the prompt. The
|
|
457
|
+
platform reads them inside the prompt, as `ai.prompt.contexts`, which is
|
|
458
|
+
where the Python SDK renders them; they now render there.
|
|
459
|
+
- `swaig-test --exec` ignored `--call-state`, and an `--override` key
|
|
460
|
+
nothing read was accepted silently (#188). The call data flags now apply
|
|
461
|
+
to every action, `--override` takes a dotted path (`call.state=answered`),
|
|
462
|
+
and an override whose path isn't in the simulated request gets a warning.
|
|
463
|
+
- The `DataMap` class's doc example passed `true` as `parameter()`'s fourth
|
|
464
|
+
argument, which drops `required`; it takes `{ required: true }`.
|
|
465
|
+
- On a serverless platform, the SWML's webhook URLs pointed at
|
|
466
|
+
`http://localhost:3000` unless `SWML_PROXY_URL_BASE` was set. They now use
|
|
467
|
+
the URL the platform serves the function on, as the Python SDK does: a
|
|
468
|
+
Lambda function URL (`AWS_LAMBDA_FUNCTION_URL`), the CGI script's URL, a
|
|
469
|
+
Google Cloud Function's URL (`FUNCTION_URL`, or built from the project,
|
|
470
|
+
region and service), or an Azure Function's (`AZURE_FUNCTION_URL`, or
|
|
471
|
+
built from `WEBSITE_SITE_NAME` and `AZURE_FUNCTION_NAME`). Behind Azure
|
|
472
|
+
and Google Cloud Functions handlers, the URL the request arrived on is
|
|
473
|
+
used. `SWML_PROXY_URL_BASE` still takes precedence. An agent running its
|
|
474
|
+
own server with `serve()` keeps its host and port, and a Google Cloud
|
|
475
|
+
Function is recognized by `FUNCTION_TARGET` (or `FUNCTION_URL`), so a
|
|
476
|
+
server on Cloud Run, which sets `K_SERVICE`, isn't taken for one.
|
|
477
|
+
- Schema validation of `amazon_bedrock`, `cond`, `connect`, `execute`,
|
|
478
|
+
`ai_sidecar`, `join_conference` and `switch` checked only their required
|
|
479
|
+
properties: their schemas refer back to the document schema, the
|
|
480
|
+
per-verb validator couldn't compile, and validation silently fell back.
|
|
481
|
+
They're now fully validated, like the other verbs and as the Python SDK
|
|
482
|
+
validates them. A failed choice among allowed values names them
|
|
483
|
+
(`voice_id must be one of: tiffany, matthew, ...`).
|
|
484
|
+
- The joke skill's result now tells the model to tell the joke
|
|
485
|
+
(`Tell this joke to the user: ...`). Given only the joke, the model
|
|
486
|
+
answered it instead of relaying it. The tool description is `Get a joke
|
|
487
|
+
to tell the caller`.
|
|
488
|
+
- `native_vector_search`: `keyword_weight` is described as what it does
|
|
489
|
+
here, in-memory ranking only, and setting it with `remote_url` logs a
|
|
490
|
+
warning, since the server ranks remote results. `model_name` is
|
|
491
|
+
described as having no effect in this SDK. (The Python SDK deprecated
|
|
492
|
+
`keyword_weight` because its engine ignores it; this SDK's in-memory
|
|
493
|
+
ranking uses it.)
|
|
494
|
+
- The spider skill advertised settings it didn't honor. `follow_robots_txt`
|
|
495
|
+
was never checked: with it on, `scrape_url`, `extract_structured_data`
|
|
496
|
+
and `crawl_site` now skip pages the site's robots.txt disallows for
|
|
497
|
+
`user_agent`, check each redirect's target too, and keep a site's rules
|
|
498
|
+
for 24 hours (a robots.txt that fails with a server or network error is
|
|
499
|
+
tried again on the next request). The schema's defaults now match the
|
|
500
|
+
skill's (`max_text_length` 3000, `follow_robots_txt` false,
|
|
501
|
+
`user_agent` `Spider/1.0 (SignalWire AI Agent)`), and `extract_type`
|
|
502
|
+
lists `fast_text`, `markdown` and `structured`. The never-implemented
|
|
503
|
+
`clean_text`, `full_text`, `html` and `custom` still run as `fast_text`,
|
|
504
|
+
with a warning; any other value fails setup. `concurrent_requests` is
|
|
505
|
+
deprecated and has no effect.
|
|
506
|
+
- `BedrockAgent` rendered its `amazon_bedrock` prompt without
|
|
507
|
+
`max_tokens`, which the constructor and `setInferenceParams()` stored, and
|
|
508
|
+
dropped `presence_penalty` and `frequency_penalty`, which the Bedrock
|
|
509
|
+
prompt defines. `setPromptLlmParams()` now works: `temperature`, `top_p`
|
|
510
|
+
and `max_tokens` update the inference settings, and `confidence` and the
|
|
511
|
+
two penalties go into the prompt; any other setting, such as
|
|
512
|
+
`barge_confidence`, is ignored with a warning. The documented example
|
|
513
|
+
voice is one Bedrock offers (`tiffany`, `matthew`, `amy`, `lupe` or
|
|
514
|
+
`carlos`).
|
|
515
|
+
- `AIChatClient`'s read timeout (`readIdleTimeoutSeconds`, default 60) was
|
|
516
|
+
a limit on the whole request, so a slow reply the service kept alive with
|
|
517
|
+
keepalive padding was cut off at 60 seconds. It's now an idle timeout that
|
|
518
|
+
every chunk restarts.
|
|
519
|
+
- `FunctionResult.executeSwml(swml, true)` put `transfer` inside the SWML
|
|
520
|
+
document, where it isn't a SWML key, so the call never left the agent. It
|
|
521
|
+
now goes beside the document, as `connect()` sends it.
|
|
522
|
+
- `FunctionResult.tap()` accepted `direction: 'hear'`, which the engine
|
|
523
|
+
rejects, and left the direction out for the default `both`, so the verb's
|
|
524
|
+
own default (`speak`) tapped less than asked. Directions are now
|
|
525
|
+
`speak`/`listen`/`both` (`TAP_DIRECTIONS` too), and the direction is
|
|
526
|
+
always sent.
|
|
527
|
+
- The prefab agents' tool handlers (FAQ bot, info gatherer, receptionist,
|
|
528
|
+
survey, concierge) run on the agent running the call, so a dynamic config
|
|
529
|
+
callback that changes their data (a tenant's FAQs, say) takes effect in
|
|
530
|
+
the tools too. They were bound to the agent itself.
|
|
531
|
+
- `onSwmlRequest(requestData, callbackPath, context)` receives the Hono
|
|
532
|
+
context on a served request, as documented; it was always undefined.
|
|
533
|
+
- A plain `SWMLService`'s `/swaig` answered `{}` for an `async` tool
|
|
534
|
+
handler, since it didn't await the result. It now awaits it, and returns a
|
|
535
|
+
`FunctionResult` or string result as a SWAIG response.
|
|
536
|
+
- `AgentServer` served an agent under its route twice (`/sales/sales`),
|
|
537
|
+
so `register(agent)` answered `404` at the agent's own route.
|
|
538
|
+
`asRouter()` now returns the agent's routes relative to its root, like the
|
|
539
|
+
reference's `as_router()`, and `AgentServer` mounts it under the route;
|
|
540
|
+
`getApp()` still serves them under the agent's route.
|
|
541
|
+
- An agent's app and `AgentServer` serve a path with a trailing slash or
|
|
542
|
+
repeated slashes (`/agent/swaig/`, `/agent//swaig`) like the plain path,
|
|
543
|
+
with the same auth and signature checks; they answered `404`. `asRouter()`
|
|
544
|
+
registers `/swaig/`, `/post_prompt/` and routing-callback paths with a
|
|
545
|
+
trailing slash too, for a host app with strict routing.
|
|
546
|
+
- `AgentServer.getApp()` threw ("Can not add a route since the matcher is
|
|
547
|
+
already built") when called again after the server had handled a request.
|
|
548
|
+
- Constructor arguments take precedence over an agent's config file, as
|
|
549
|
+
documented. The file's `service.name` always replaced the `name` passed to
|
|
550
|
+
`AgentBase`, and its route and host replaced a `route: '/'` or
|
|
551
|
+
`host: '0.0.0.0'` passed on purpose; now the file fills in only what the
|
|
552
|
+
caller left out.
|
|
553
|
+
- `AgentBase` ignored basic auth credentials in its config file. Credentials
|
|
554
|
+
now resolve as: constructor, config file, environment, generated.
|
|
555
|
+
`getBasicAuthCredentials(true)` reports `'config file'` for the file's
|
|
556
|
+
(`SWMLService` reported them as `'environment'`), and the file's
|
|
557
|
+
`security.auth.basic` key is read as well as `security.basicAuth`. A
|
|
558
|
+
password set without a user (in the file or `SWML_BASIC_AUTH_PASSWORD`)
|
|
559
|
+
gets the user `signalwire`.
|
|
560
|
+
- A tool handler gets the agent running the call as a third argument,
|
|
561
|
+
`(args, rawData, agent)`: with a dynamic config callback, the request's
|
|
562
|
+
configured copy, so the handler sees what the callback set up. `onSummary`
|
|
563
|
+
runs on that copy too. Existing two-argument handlers are unaffected.
|
|
564
|
+
- A `fetch_conversation` request to the post-prompt endpoint now gets back
|
|
565
|
+
what `onSummary` returns, as the platform expects; the endpoint answered
|
|
566
|
+
`{ ok: true }` either way. Other deliveries now answer `{ success: true }`,
|
|
567
|
+
as the reference does.
|
|
568
|
+
- `GET /swaig` (with `?call_id=` for a call's tokens) returns the SWML
|
|
569
|
+
document, like the agent's root; it answered `400`.
|
|
570
|
+
- The per-request copy of an agent loaded every skill again, running each
|
|
571
|
+
skill's `setup()` on every request, and its skill list was empty while
|
|
572
|
+
that finished. It now starts with the skills the agent loaded, without
|
|
573
|
+
setting them up again. Removing one from the copy leaves the agent's
|
|
574
|
+
instance alone.
|
|
575
|
+
- With a dynamic config callback, an agent's structured (POM) prompt was
|
|
576
|
+
rendered to text on the per-request copy, and a section the callback added
|
|
577
|
+
with `promptAddSection()` was lost. The copy now keeps the POM sections, so
|
|
578
|
+
the prompt stays structured and includes the callback's sections.
|
|
579
|
+
- `LOG_LEVEL` is case-insensitive and an unknown value falls back to `info`
|
|
580
|
+
(never `debug`).
|
|
581
|
+
- `paginate()` guards against a repeating server cursor (no infinite loop).
|
|
582
|
+
- SWAIG `/swaig` handlers receive the unwrapped `argument.parsed` flat args.
|
|
583
|
+
|
|
584
|
+
- `DataMap.body()` wrote a `body` key, which the platform doesn't read, so
|
|
585
|
+
the webhook went out with no request body. That included
|
|
586
|
+
`createSimpleApiTool({ body })`. `body()` now sets the webhook's `params`,
|
|
587
|
+
which the platform sends as the JSON body, and the request is a POST.
|
|
588
|
+
`createSimpleApiTool()` leaves out an empty `body: {}`, so a GET tool
|
|
589
|
+
stays a GET.
|
|
590
|
+
- `FunctionResult.pay()` sent whatever it was given for `timeout`,
|
|
591
|
+
`max_attempts`, `min_postal_code_length` and `security_code`. It now
|
|
592
|
+
checks them (an integer, a boolean, a numeric string, `"true"`/`"false"`
|
|
593
|
+
or a SWML variable reference) and throws for anything else. It still
|
|
594
|
+
sends all five pay settings as strings, as the platform reads them: its
|
|
595
|
+
SWML validator requires strings for `security_code` and `postal_code`,
|
|
596
|
+
and the pay request reads all five as strings.
|
|
597
|
+
- `FunctionResult.joinConference()` refused `maxParticipants` above 250 and
|
|
598
|
+
dropped an explicit 250. It now accepts any integer of 2 or more, as the
|
|
599
|
+
platform does (the schema's cap of 100000 isn't enforced), or a SWML
|
|
600
|
+
variable reference, and sends the value whenever it's given.
|
|
601
|
+
- LiveWire: `allowInterruptions: false` set the `barge_confidence` AI param,
|
|
602
|
+
which the platform doesn't read, so callers could still interrupt the
|
|
603
|
+
agent. It now sets `enable_barge: false`. The LLM parameters guide no
|
|
604
|
+
longer presents `barge_confidence` as a working setting and points to
|
|
605
|
+
`barge_min_words`, `enable_barge` and `barge_match_string`.
|
|
606
|
+
- `BedrockAgent` copied `contexts`, `confidence` and the two penalties into
|
|
607
|
+
the Bedrock prompt. The platform's Bedrock session reads only the prompt's
|
|
608
|
+
text, `voice_id`, `temperature` and `top_p` (it uses 1024 for
|
|
609
|
+
`max_tokens`), and the schema rejects `contexts`. The prompt now carries
|
|
610
|
+
only those, and the agent warns once per agent for each left-out feature
|
|
611
|
+
(hints, languages, pronunciation rules, multilingual settings, contexts)
|
|
612
|
+
instead of on every render; `setPromptLlmParams()` warns about the
|
|
613
|
+
settings it ignores.
|
|
614
|
+
- `BedrockAgent` stored `temperature`, `top_p` and `max_tokens` as given, so
|
|
615
|
+
a value such as `"hot"` reached the SWML, and `setPromptLlmParams()`
|
|
616
|
+
ignored numeric strings. The constructor, `setInferenceParams()`,
|
|
617
|
+
`setLlmTemperature()` and `setPromptLlmParams()` now convert numeric
|
|
618
|
+
strings, keep a `${var}` reference for `temperature` and `top_p`, and
|
|
619
|
+
throw for anything else, changing nothing.
|
|
620
|
+
- The `info_gatherer` and `claude_skills` parameter schemas advertised a
|
|
621
|
+
`tool_name` parameter the skills never read. They no longer list it.
|
|
622
|
+
`env_var` in a parameter schema is described as a hint for configuration
|
|
623
|
+
tools, which the SDK doesn't read.
|
|
624
|
+
- `WebService` served no files when a parent Hono app mounted it under a
|
|
625
|
+
prefix with `route()`, because it looked up its folders by the full
|
|
626
|
+
request path. It now works from the path below the prefix, matched at a
|
|
627
|
+
segment boundary, and its directory redirects and overview links keep the
|
|
628
|
+
prefix.
|
|
629
|
+
- `WebService` served a directory's `index.html` in place when the URL had
|
|
630
|
+
no trailing slash, which broke the page's relative links. It now answers
|
|
631
|
+
with a 307 redirect to the slash form, on this host, with the path's
|
|
632
|
+
percent-encoding kept.
|
|
633
|
+
- swaig-test's DataMap simulator now does what the platform does where it
|
|
634
|
+
used to differ on purpose: an unresolved template expands to an empty
|
|
635
|
+
string (with a note on stderr), not `<MISSING:path>`; names match without
|
|
636
|
+
regard to case; `fmt_ph` formats North American numbers (any number, with the optional
|
|
637
|
+
`libphonenumber-js` installed), and reads a vanity number's letters as
|
|
638
|
+
keypad digits, as the platform's libphonenumber does (`1-800-FLOWERS` is
|
|
639
|
+
`(800) 356-9377`); the call data
|
|
640
|
+
holds `meta_data`, the call details and `prompt_vars`, and the webhook
|
|
641
|
+
stage adds `prompt_vars` and `global_data`; a matched webhook expression's
|
|
642
|
+
result is expanded twice; a template expands only once; outputs are
|
|
643
|
+
expanded as JSON text; and when nothing produces a result the tool returns
|
|
644
|
+
the platform's `{"response": "There was an error processing this
|
|
645
|
+
request."}`.
|
|
646
|
+
- swaig-test's DataMap simulator followed webhook redirects with browser
|
|
647
|
+
rules: at most 10, and a POST turned into a bodyless GET after a 301, 302
|
|
648
|
+
or 303. It now follows them as the platform's curl does: up to 15, and a
|
|
649
|
+
POST is sent again with its body. Every hop is still checked for private
|
|
650
|
+
addresses, and credentials are still dropped on a change of origin.
|
|
651
|
+
- swaig-test's DataMap simulator read `${meta_data.x}` from the function's
|
|
652
|
+
own `meta_data` only. It now merges the function's `meta_data` over
|
|
653
|
+
`global_data`, key by key, as the platform does when it loads the
|
|
654
|
+
function. `swaig-test --exec` also passes the agent's global data when
|
|
655
|
+
`--custom-data` has no `global_data`.
|
|
656
|
+
- swaig-test's DataMap simulator reported `http_code` 0 when a webhook
|
|
657
|
+
request failed after a redirect, such as a redirect loop past the limit or
|
|
658
|
+
a redirect target that doesn't connect. It now reports the last status it
|
|
659
|
+
received, as the platform's curl does, and 0 only when no response came
|
|
660
|
+
back.
|
|
661
|
+
- `swaig-test --custom-data` now reaches DataMap functions as the call data
|
|
662
|
+
the platform adds, such as `global_data` and `prompt_vars`. Before, a
|
|
663
|
+
DataMap tool that read `${global_data.x}` always got an empty value.
|
|
664
|
+
- `swaig-test --simulate-serverless` now builds the function URL from parts
|
|
665
|
+
given by `--env` or `--env-file`, not only by flags, and uses a part given
|
|
666
|
+
under its other name (`GCP_PROJECT`, `GOOGLE_CLOUD_REGION`,
|
|
667
|
+
`FUNCTION_TARGET`, `AZURE_FUNCTIONS_APP_NAME`) instead of the preset's
|
|
668
|
+
value under the preferred name. For example, `--env AWS_REGION=eu-west-1`
|
|
669
|
+
used to keep the preset's us-east-1 URL.
|
|
670
|
+
- Tutorials: Penny asks a locked-out caller before connecting them with a
|
|
671
|
+
person, and Fred's dated fun facts are replaced with checked ones.
|
|
672
|
+
|
|
673
|
+
### Notes for upgraders
|
|
674
|
+
|
|
675
|
+
- An agent's `validateBasicAuth()` override now replaces the credential
|
|
676
|
+
check on every route. An override written to add a check and return
|
|
677
|
+
`true` must call `super.validateBasicAuth()` to keep the comparison.
|
|
678
|
+
- `SWML_SSL_ENABLED` with a certificate and key makes an agent serve HTTPS.
|
|
679
|
+
An agent behind a TLS-terminating proxy with those variables set should
|
|
680
|
+
unset them.
|
|
681
|
+
- `LanguageConfig`'s object forms of `fillers` and `functionFillers` still
|
|
682
|
+
work, flattened into lists with a warning; pass `speechFillers` and
|
|
683
|
+
`functionFillers` as string arrays.
|
|
684
|
+
- In a DataMap webhook's output, read the tool's arguments as
|
|
685
|
+
`${input.args.x}`; `${args.x}` there always expanded to nothing on the
|
|
686
|
+
platform.
|
|
687
|
+
- `swaig-test`: everything after `--exec <function>` is now an argument
|
|
688
|
+
for the function, so put the CLI's own options (`--raw`, `--verbose`)
|
|
689
|
+
before `--exec`. `--route` now picks the service with that route instead
|
|
690
|
+
of changing the agent's route. `--call-state` defaults to `created`. The
|
|
691
|
+
output of `--dump-swml` is the JSON document alone, and `--exec` prints
|
|
692
|
+
`RESULT:` and the response. `--simulate-serverless` runs the chosen
|
|
693
|
+
action with the platform's environment instead of printing a simulated
|
|
694
|
+
platform response.
|
|
695
|
+
- A `FunctionResult`'s structured response (`setToolResponse()`, or the
|
|
696
|
+
constructor's third and fourth arguments) is sent by `toDict()`; the
|
|
697
|
+
`response` property stays the plain string. `setResponse()` clears the
|
|
698
|
+
structured form; assigning `response` directly doesn't.
|
|
699
|
+
- Adding an `execute`, `connect`, `cond`, `switch`, `join_conference`,
|
|
700
|
+
`ai_sidecar` or `amazon_bedrock` verb with an unknown or mistyped key
|
|
701
|
+
now fails schema validation, where it used to pass. The first of these
|
|
702
|
+
verbs validated in a process compiles the document schema, which takes
|
|
703
|
+
up to about a second; `SWML_SKIP_SCHEMA_VALIDATION=true` turns
|
|
704
|
+
validation off.
|
|
705
|
+
- `FunctionResult.tap({ direction: 'hear' })` now throws; use `'listen'`.
|
|
706
|
+
- `rpcAiMessage()` throws when given neither message text nor global data.
|
|
707
|
+
- `asRouter()` returns routes relative to the agent's root. Mount it under
|
|
708
|
+
the agent's route: `hostApp.route(agent.route, agent.asRouter())`. Code
|
|
709
|
+
that mounted it at `/` to get the routes under the agent's route should use
|
|
710
|
+
`getApp()`, or mount it at the route.
|
|
711
|
+
- A subclass that passes its own default (say `route: '/'`) to `AgentBase`
|
|
712
|
+
now overrides a route set in the config file even when its caller didn't
|
|
713
|
+
pass one. Forward only the options the caller gave.
|
|
714
|
+
- Basic auth credentials in a config file now win over
|
|
715
|
+
`SWML_BASIC_AUTH_USER`/`SWML_BASIC_AUTH_PASSWORD`.
|
|
716
|
+
- With a dynamic config callback set, a function call runs on the
|
|
717
|
+
request's configured copy of the agent, and so does `onSummary`. A handler
|
|
718
|
+
gets the copy as its third argument; a handler that captured the agent (an
|
|
719
|
+
arrow function, or a method passed with `.bind(this)`) still sees the agent
|
|
720
|
+
itself, so read per-call configuration from the third argument. The SDK's
|
|
721
|
+
prefabs do. State `onSummary` keeps by assigning to the agent
|
|
722
|
+
(`this.count += 1`) now lands on the copy and is gone after the request;
|
|
723
|
+
keep it in an object the agent already holds, or in your own storage.
|
|
724
|
+
- An agent subclass with JavaScript `#private` fields can't be copied per
|
|
725
|
+
request (a copy doesn't carry them), so with a dynamic config callback its
|
|
726
|
+
methods that read them throw on the copy. Use TypeScript `private` fields.
|
|
727
|
+
- An exception from `onSummary` is logged, and the post-prompt endpoint
|
|
728
|
+
answers `{ success: true }`, as the reference does; it used to answer 500.
|
|
729
|
+
- The post-prompt endpoint answers a delivered summary with
|
|
730
|
+
`{ success: true }` instead of `{ ok: true }`.
|
|
731
|
+
- A secure SWAIG function called directly, for example with `curl`, now
|
|
732
|
+
needs the token from its `web_hook_url` in the SWML, fetched with
|
|
733
|
+
`GET /?call_id=<id>`. SignalWire's own requests already carry it, and
|
|
734
|
+
`swaig-test` is unaffected.
|
|
735
|
+
- A `POST` to the post-prompt endpoint needs the token from the SWML's
|
|
736
|
+
`post_prompt_url`; SignalWire's requests already carry it.
|
|
737
|
+
- An MCP client that calls an agent's `/mcp` endpoint must send the agent's
|
|
738
|
+
basic auth credentials.
|
|
739
|
+
- The spider and web_search skills fetch pages directly, ignoring any
|
|
740
|
+
environment proxy. To fetch through a proxy that blocks private
|
|
741
|
+
destinations itself, set `SWML_URL_FETCH_USE_PROXY` and turn on Node's proxy
|
|
742
|
+
support (`NODE_USE_ENV_PROXY=1`) with `HTTP_PROXY`/`HTTPS_PROXY`; a request
|
|
743
|
+
that `NO_PROXY` exempts still connects directly, with the address check.
|
|
744
|
+
- `validateUrl()` refuses a hostname that doesn't resolve. Code that relied on
|
|
745
|
+
it passing unresolvable hosts, such as tests that stub `fetch`, can set
|
|
746
|
+
`SWML_ALLOW_PRIVATE_URLS` while testing.
|
|
747
|
+
- `WebService` needs credentials. Set `SWML_BASIC_AUTH_USER` and
|
|
748
|
+
`SWML_BASIC_AUTH_PASSWORD`, pass `basicAuth: [user, password]`, or set
|
|
749
|
+
`security.auth.basic` in the config file; otherwise `start()` throws, and
|
|
750
|
+
an app from `getApp()` refuses every request but `/health`. Clients,
|
|
751
|
+
including URLs the platform fetches such as `play` URLs, must send the
|
|
752
|
+
credentials. Load balancers can keep probing `/health` without them.
|
|
753
|
+
- A DataMap `body()` is now sent, and makes the webhook a POST even when
|
|
754
|
+
it's declared `GET`. `body()` and `params()` now write the same field, so
|
|
755
|
+
the later call wins; a tool that called both must merge them into one
|
|
756
|
+
object. A hand-written `body` key in a raw `data_map` is still not sent.
|
|
757
|
+
- `pay()` throws for a value that isn't an integer or a boolean (such as
|
|
758
|
+
`timeout: 'soon'` or `maxAttempts: 1.5`).
|
|
759
|
+
`joinConference()` now sends an explicit `maxParticipants: 250`, and
|
|
760
|
+
throws for a value below 2.
|
|
761
|
+
- `BedrockAgent` throws on a non-numeric `temperature`, `top_p` or
|
|
762
|
+
`max_tokens`, where it used to store the value, or in
|
|
763
|
+
`setPromptLlmParams()`, warn and ignore it. `confidence`,
|
|
764
|
+
`presence_penalty` and `frequency_penalty` are no longer sent in the
|
|
765
|
+
Bedrock prompt.
|
|
766
|
+
- swaig-test's DataMap simulator writes an empty string for an unresolved
|
|
767
|
+
template, as the platform does, and returns the platform's generic error
|
|
768
|
+
response when nothing produces a result, and `swaig-test --exec` exits
|
|
769
|
+
with status 0 then, as it does for an output that isn't valid JSON after
|
|
770
|
+
expansion. Scripts that looked for `<MISSING:`, the old error object or
|
|
771
|
+
exit status 1 should read the result and stderr's notes instead.
|
|
772
|
+
|
|
773
|
+
## 3.2.0
|
|
774
|
+
|
|
775
|
+
Adds the **Messages** REST resource (send + redact).
|
|
776
|
+
|
|
777
|
+
### Added
|
|
778
|
+
|
|
779
|
+
- `client.messages` — `Messages` resource bound to `/api/messaging/messages`
|
|
780
|
+
(`BaseResource`) with `create` (POST — send an SMS/MMS) and `update` (PATCH
|
|
781
|
+
`/{message_id}` — redact a message body). Generated from
|
|
782
|
+
`porting-sdk/rest-apis/messages` via the spec-discovery REST generator.
|
|
783
|
+
Distinct from the message **logs** namespace (`client.logs.messages`, read-only
|
|
784
|
+
`/api/messaging/logs`).
|
|
785
|
+
|
|
786
|
+
### Fixed
|
|
787
|
+
|
|
788
|
+
- REST generator: a spec field literally named `body` (the Messages create/redact
|
|
789
|
+
bodies) no longer collides with the assembled request-body local variable — the
|
|
790
|
+
local falls back to `body_` when a `body` parameter is emitted.
|
|
791
|
+
|
|
792
|
+
## 3.1.0
|
|
793
|
+
|
|
794
|
+
Adds the plural **Projects** REST resource.
|
|
795
|
+
|
|
796
|
+
### Added
|
|
797
|
+
|
|
798
|
+
- `client.projects` — full-CRUD `Projects` resource bound to `/api/projects`
|
|
799
|
+
(list, get, create, update, delete) plus `rotateSigningKey` (POST
|
|
800
|
+
`/{id}/signing-key/rotate`). Generated from `porting-sdk/rest-apis/projects`
|
|
801
|
+
via the spec-discovery REST generator. Distinct from the singular
|
|
802
|
+
`project` token namespace (`/api/project/tokens`).
|
|
803
|
+
|
|
804
|
+
## 3.0.2
|
|
805
|
+
|
|
806
|
+
Release-readiness milestone for the TypeScript SDK.
|
|
807
|
+
|
|
808
|
+
### Added
|
|
809
|
+
|
|
810
|
+
- `exports` map in `package.json` exposing the public entry point and the
|
|
811
|
+
`@signalwire/sdk/livewire` subpath (previously importable only from the source
|
|
812
|
+
tree), plus `package.json` self-export for tooling.
|
|
813
|
+
- Package metadata: `keywords`, `bugs`, and `author` fields.
|
|
814
|
+
- `port_signatures.baseline.json` — the committed public-API surface floor that
|
|
815
|
+
the SEMVER-DIFF gate diffs the working tree against.
|
|
816
|
+
- This CHANGELOG.
|
|
817
|
+
|
|
818
|
+
### Notes
|
|
819
|
+
|
|
820
|
+
- No public API signatures were removed or retyped; the surface is unchanged
|
|
821
|
+
from the recorded baseline.
|