@@ -156,146 +156,6 @@ describe("legacy migrate mention routing", () => {
156156 } ) ;
157157} ) ;
158158
159- describe ( "legacy migrate tts provider shape" , ( ) => {
160- it ( "moves messages.tts.<provider> keys into messages.tts.providers" , ( ) => {
161- const res = migrateLegacyConfig ( {
162- messages : {
163- tts : {
164- provider : "elevenlabs" ,
165- elevenlabs : {
166- apiKey : "test-key" ,
167- voiceId : "voice-1" ,
168- } ,
169- } ,
170- } ,
171- } ) ;
172-
173- expect ( res . changes ) . toContain (
174- "Moved messages.tts.elevenlabs → messages.tts.providers.elevenlabs." ,
175- ) ;
176- expect ( res . config ?. messages ?. tts ) . toEqual ( {
177- provider : "elevenlabs" ,
178- providers : {
179- elevenlabs : {
180- apiKey : "test-key" ,
181- voiceId : "voice-1" ,
182- } ,
183- } ,
184- } ) ;
185- } ) ;
186-
187- it ( "moves channels.discord.accounts.<id>.voice.tts.edge into providers.microsoft" , ( ) => {
188- const res = migrateLegacyConfig ( {
189- channels : {
190- discord : {
191- accounts : {
192- main : {
193- voice : {
194- tts : {
195- edge : {
196- voice : "en-US-JennyNeural" ,
197- } ,
198- } ,
199- } ,
200- } ,
201- } ,
202- } ,
203- } ,
204- } ) ;
205-
206- expect ( res . changes ) . toContain (
207- "Moved channels.discord.accounts.main.voice.tts.edge → channels.discord.accounts.main.voice.tts.providers.microsoft." ,
208- ) ;
209- const mainTts = (
210- res . config ?. channels ?. discord ?. accounts as
211- | Record < string , { voice ?: { tts ?: Record < string , unknown > } } >
212- | undefined
213- ) ?. main ?. voice ?. tts ;
214- expect ( mainTts ?. providers ) . toEqual ( {
215- microsoft : {
216- voice : "en-US-JennyNeural" ,
217- } ,
218- } ) ;
219- expect ( mainTts ?. edge ) . toBeUndefined ( ) ;
220- } ) ;
221-
222- it ( "moves plugins.entries.voice-call.config.tts.<provider> keys into providers" , ( ) => {
223- const res = migrateLegacyConfig ( {
224- plugins : {
225- entries : {
226- "voice-call" : {
227- config : {
228- tts : {
229- provider : "openai" ,
230- openai : {
231- model : "gpt-4o-mini-tts" ,
232- voice : "alloy" ,
233- } ,
234- } ,
235- } ,
236- } ,
237- } ,
238- } ,
239- } ) ;
240-
241- expect ( res . changes ) . toContain (
242- "Moved plugins.entries.voice-call.config.tts.openai → plugins.entries.voice-call.config.tts.providers.openai." ,
243- ) ;
244- const voiceCallTts = (
245- res . config ?. plugins ?. entries as
246- | Record < string , { config ?: { tts ?: Record < string , unknown > } } >
247- | undefined
248- ) ?. [ "voice-call" ] ?. config ?. tts ;
249- expect ( voiceCallTts ) . toEqual ( {
250- provider : "openai" ,
251- providers : {
252- openai : {
253- model : "gpt-4o-mini-tts" ,
254- voice : "alloy" ,
255- } ,
256- } ,
257- } ) ;
258- } ) ;
259-
260- it ( "does not migrate legacy tts provider keys for unknown plugin ids" , ( ) => {
261- const res = migrateLegacyConfig ( {
262- plugins : {
263- entries : {
264- "third-party-plugin" : {
265- config : {
266- tts : {
267- provider : "openai" ,
268- openai : {
269- model : "custom-tts" ,
270- } ,
271- } ,
272- } ,
273- } ,
274- } ,
275- } ,
276- } ) ;
277-
278- expect ( res . changes ) . toEqual ( [ ] ) ;
279- expect ( res . config ) . toBeNull ( ) ;
280- } ) ;
281- } ) ;
282-
283- describe ( "legacy migrate talk provider shape" , ( ) => {
284- it ( "does not migrate extension-owned talk legacy fields during config-load migration" , ( ) => {
285- const res = migrateLegacyConfig ( {
286- talk : {
287- voiceId : "voice-1" ,
288- modelId : "eleven_v3" ,
289- outputFormat : "pcm_44100" ,
290- apiKey : "test-key" ,
291- } ,
292- } ) ;
293-
294- expect ( res . config ) . toBeNull ( ) ;
295- expect ( res . changes ) . toEqual ( [ ] ) ;
296- } ) ;
297- } ) ;
298-
299159describe ( "legacy migrate sandbox scope aliases" , ( ) => {
300160 it ( "moves agents.defaults.sandbox.perSession into scope" , ( ) => {
301161 const res = migrateLegacyConfig ( {
0 commit comments