@personaai/runtime 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -756,7 +756,11 @@ var createVoiceSession = async (request, ctx) => {
756
756
  const body = requireBodyObject(request.body);
757
757
  const agentId = requireStringField(body, "agentId");
758
758
  const threadId = typeof body.threadId === "string" && body.threadId ? body.threadId : void 0;
759
- const ticket = await ctx.client.voice.createSession(agentId, threadId ? { threadId } : {});
759
+ const contextOverride = typeof body.contextOverride === "string" && body.contextOverride ? body.contextOverride : void 0;
760
+ const ticket = await ctx.client.voice.createSession(agentId, {
761
+ ...threadId ? { threadId } : {},
762
+ ...contextOverride ? { contextOverride } : {}
763
+ });
760
764
  await ctx.hooks?.onVoiceSessionCreate?.({
761
765
  userId: request.userId,
762
766
  agentId,