@livekit/agents 1.0.15 → 1.0.16
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/cli.cjs +12 -12
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +3 -3
- package/dist/cli.d.ts +3 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +13 -13
- package/dist/cli.js.map +1 -1
- package/dist/inference/stt.cjs.map +1 -1
- package/dist/inference/stt.d.ts.map +1 -1
- package/dist/inference/stt.js +1 -1
- package/dist/inference/stt.js.map +1 -1
- package/dist/inference/tts.cjs.map +1 -1
- package/dist/inference/tts.d.cts +2 -1
- package/dist/inference/tts.d.ts +2 -1
- package/dist/inference/tts.d.ts.map +1 -1
- package/dist/inference/tts.js +1 -5
- package/dist/inference/tts.js.map +1 -1
- package/dist/llm/chat_context.cjs +78 -0
- package/dist/llm/chat_context.cjs.map +1 -1
- package/dist/llm/chat_context.d.cts +16 -0
- package/dist/llm/chat_context.d.ts +16 -0
- package/dist/llm/chat_context.d.ts.map +1 -1
- package/dist/llm/chat_context.js +78 -0
- package/dist/llm/chat_context.js.map +1 -1
- package/dist/llm/chat_context.test.cjs +531 -0
- package/dist/llm/chat_context.test.cjs.map +1 -1
- package/dist/llm/chat_context.test.js +531 -0
- package/dist/llm/chat_context.test.js.map +1 -1
- package/dist/llm/tool_context.cjs +40 -0
- package/dist/llm/tool_context.cjs.map +1 -1
- package/dist/llm/tool_context.d.cts +2 -0
- package/dist/llm/tool_context.d.ts +2 -0
- package/dist/llm/tool_context.d.ts.map +1 -1
- package/dist/llm/tool_context.js +38 -0
- package/dist/llm/tool_context.js.map +1 -1
- package/dist/metrics/base.cjs.map +1 -1
- package/dist/metrics/base.d.cts +7 -0
- package/dist/metrics/base.d.ts +7 -0
- package/dist/metrics/base.d.ts.map +1 -1
- package/dist/stt/stt.cjs +1 -0
- package/dist/stt/stt.cjs.map +1 -1
- package/dist/stt/stt.d.cts +7 -1
- package/dist/stt/stt.d.ts +7 -1
- package/dist/stt/stt.d.ts.map +1 -1
- package/dist/stt/stt.js +1 -0
- package/dist/stt/stt.js.map +1 -1
- package/dist/voice/agent_activity.cjs +83 -8
- package/dist/voice/agent_activity.cjs.map +1 -1
- package/dist/voice/agent_activity.d.cts +6 -2
- package/dist/voice/agent_activity.d.ts +6 -2
- package/dist/voice/agent_activity.d.ts.map +1 -1
- package/dist/voice/agent_activity.js +83 -8
- package/dist/voice/agent_activity.js.map +1 -1
- package/dist/voice/agent_session.cjs +3 -2
- package/dist/voice/agent_session.cjs.map +1 -1
- package/dist/voice/agent_session.d.cts +2 -1
- package/dist/voice/agent_session.d.ts +2 -1
- package/dist/voice/agent_session.d.ts.map +1 -1
- package/dist/voice/agent_session.js +3 -2
- package/dist/voice/agent_session.js.map +1 -1
- package/dist/voice/audio_recognition.cjs +138 -16
- package/dist/voice/audio_recognition.cjs.map +1 -1
- package/dist/voice/audio_recognition.d.cts +11 -0
- package/dist/voice/audio_recognition.d.ts +11 -0
- package/dist/voice/audio_recognition.d.ts.map +1 -1
- package/dist/voice/audio_recognition.js +138 -16
- package/dist/voice/audio_recognition.js.map +1 -1
- package/dist/voice/room_io/_input.cjs.map +1 -1
- package/dist/voice/room_io/_input.d.ts.map +1 -1
- package/dist/voice/room_io/_input.js +0 -1
- package/dist/voice/room_io/_input.js.map +1 -1
- package/dist/worker.cjs +17 -11
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.cts +16 -9
- package/dist/worker.d.ts +16 -9
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +16 -12
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +17 -17
- package/src/inference/stt.ts +2 -1
- package/src/inference/tts.ts +2 -5
- package/src/llm/chat_context.test.ts +607 -0
- package/src/llm/chat_context.ts +106 -0
- package/src/llm/tool_context.ts +44 -0
- package/src/metrics/base.ts +7 -0
- package/src/stt/stt.ts +6 -0
- package/src/voice/agent_activity.ts +119 -9
- package/src/voice/agent_session.ts +3 -1
- package/src/voice/audio_recognition.ts +235 -57
- package/src/voice/room_io/_input.ts +1 -1
- package/src/worker.ts +29 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/llm/chat_context.test.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { describe, expect, it } from 'vitest';\nimport {\n type AudioContent,\n ChatContext,\n type ChatItem,\n ChatMessage,\n FunctionCall,\n FunctionCallOutput,\n type ImageContent,\n ReadonlyChatContext,\n} from './chat_context.js';\n\ndescribe('ChatContext.toJSON', () => {\n it('should match snapshot for empty context', () => {\n const context = new ChatContext();\n expect(context.toJSON()).toMatchSnapshot();\n });\n\n it('should match snapshot for simple conversation', () => {\n const context = new ChatContext();\n\n context.addMessage({\n id: 'msg_system_1',\n role: 'system',\n content: 'You are a helpful assistant.',\n createdAt: 1000000000,\n });\n\n context.addMessage({\n id: 'msg_user_1',\n role: 'user',\n content: 'Hello, how are you?',\n createdAt: 1000000001,\n });\n\n context.addMessage({\n id: 'msg_assistant_1',\n role: 'assistant',\n content: \"I'm doing well, thank you! How can I help you today?\",\n createdAt: 1000000002,\n });\n\n expect(context.toJSON()).toMatchSnapshot('simple-conversation-no-timestamps');\n\n expect(context.toJSON({ excludeTimestamp: false })).toMatchSnapshot(\n 'simple-conversation-with-timestamps',\n );\n });\n\n it('should match snapshot for multimodal content', () => {\n const context = new ChatContext();\n\n const imageContent: ImageContent = {\n id: 'img_test_1',\n type: 'image_content',\n image: 'https://example.com/test-image.jpg',\n inferenceDetail: 'high',\n inferenceWidth: 1024,\n inferenceHeight: 768,\n mimeType: 'image/jpeg',\n _cache: {},\n };\n\n const audioContent: AudioContent = {\n type: 'audio_content',\n frame: [], // This won't be included in JSON\n transcript: 'This is a test audio transcript',\n };\n\n context.addMessage({\n id: 'msg_user_2',\n role: 'user',\n content: [\n 'Check out this image and audio:',\n imageContent,\n audioContent,\n 'What do you think?',\n ],\n createdAt: 2000000000,\n });\n\n expect(context.toJSON()).toMatchSnapshot('multimodal-default-exclusions');\n\n expect(\n context.toJSON({\n excludeImage: false,\n excludeAudio: true,\n }),\n ).toMatchSnapshot('multimodal-with-images-only');\n\n expect(\n context.toJSON({\n excludeImage: true,\n excludeAudio: false,\n }),\n ).toMatchSnapshot('multimodal-with-audio-only');\n\n expect(\n context.toJSON({\n excludeImage: false,\n excludeAudio: false,\n excludeTimestamp: false,\n }),\n ).toMatchSnapshot('multimodal-full-content');\n });\n\n it('should match snapshot for function calls', () => {\n const context = new ChatContext();\n\n context.addMessage({\n id: 'msg_user_3',\n role: 'user',\n content: \"What's the weather in Paris?\",\n createdAt: 3000000000,\n });\n\n const functionCall = new FunctionCall({\n id: 'func_call_1',\n callId: 'call_weather_123',\n name: 'get_weather',\n args: '{\"location\": \"Paris, France\", \"unit\": \"celsius\"}',\n createdAt: 3000000001,\n });\n context.insert(functionCall);\n\n const functionOutput = new FunctionCallOutput({\n id: 'func_output_1',\n callId: 'call_weather_123',\n name: 'get_weather',\n output: '{\"temperature\": 22, \"condition\": \"partly cloudy\", \"humidity\": 65}',\n isError: false,\n createdAt: 3000000002,\n });\n context.insert(functionOutput);\n\n context.addMessage({\n id: 'msg_assistant_2',\n role: 'assistant',\n content: 'The weather in Paris is currently 22°C and partly cloudy with 65% humidity.',\n createdAt: 3000000003,\n });\n\n expect(context.toJSON()).toMatchSnapshot('conversation-with-function-calls');\n\n expect(\n context.toJSON({\n excludeFunctionCall: true,\n }),\n ).toMatchSnapshot('conversation-without-function-calls');\n\n expect(\n context.toJSON({\n excludeTimestamp: false,\n }),\n ).toMatchSnapshot('conversation-with-function-calls-and-timestamps');\n });\n\n it('should match snapshot for edge cases', () => {\n const context = new ChatContext();\n\n context.addMessage({\n id: 'msg_empty_1',\n role: 'user',\n content: [],\n createdAt: 5000000000,\n });\n\n const silentAudio: AudioContent = {\n type: 'audio_content',\n frame: [],\n transcript: undefined,\n };\n\n context.addMessage({\n id: 'msg_silent_audio',\n role: 'user',\n content: [silentAudio],\n createdAt: 5000000001,\n });\n\n context.addMessage({\n id: 'msg_multi_text',\n role: 'assistant',\n content: ['Part 1. ', 'Part 2. ', 'Part 3.'],\n createdAt: 5000000002,\n });\n\n const minimalCall = new FunctionCall({\n id: 'func_minimal',\n callId: 'minimal',\n name: 'test',\n args: '{}',\n createdAt: 5000000003,\n });\n context.insert(minimalCall);\n\n const namelessOutput = new FunctionCallOutput({\n id: 'func_output_nameless',\n callId: 'minimal',\n output: 'OK',\n isError: false,\n createdAt: 5000000004,\n });\n context.insert(namelessOutput);\n\n context.addMessage({\n id: 'msg_special_chars',\n role: 'user',\n content:\n 'Test with special chars: \\n\\t\\r \"quotes\" \\'apostrophes\\' \\\\backslashes\\\\ {braces} [brackets]',\n createdAt: 5000000005,\n });\n\n expect(context.toJSON()).toMatchSnapshot('edge-cases-default');\n expect(\n context.toJSON({\n excludeTimestamp: false,\n excludeAudio: false,\n }),\n ).toMatchSnapshot('edge-cases-with-details');\n });\n\n it('should match snapshot for message property variations', () => {\n const context = new ChatContext();\n\n context.addMessage({\n id: 'custom-message-id-123',\n role: 'user',\n content: 'Message with custom ID',\n createdAt: 6000000000,\n });\n\n context.addMessage({\n id: 'msg_interrupted',\n role: 'assistant',\n content: 'This response was interrupted...',\n interrupted: true,\n createdAt: 6000000001,\n });\n\n context.addMessage({\n id: 'msg_dev_2',\n role: 'developer',\n content: 'Developer message',\n createdAt: 6000000002,\n });\n\n context.addMessage({\n id: 'msg_system_3',\n role: 'system',\n content: 'System message',\n createdAt: 6000000003,\n });\n\n const detailedImage: ImageContent = {\n id: 'img_detailed',\n type: 'image_content',\n image: 'https://example.com/image.jpg',\n inferenceDetail: 'low',\n inferenceWidth: 512,\n inferenceHeight: 512,\n mimeType: 'image/png',\n _cache: { cached: true },\n };\n\n context.addMessage({\n id: 'msg_with_image',\n role: 'user',\n content: ['Image with all properties:', detailedImage],\n createdAt: 6000000004,\n });\n\n expect(context.toJSON()).toMatchSnapshot('message-properties-default');\n expect(\n context.toJSON({\n excludeImage: false,\n excludeTimestamp: false,\n }),\n ).toMatchSnapshot('message-properties-full');\n });\n});\n\ndescribe('ReadonlyChatContext with immutable array', () => {\n it('should have readonly property set to true', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test'],\n interrupted: false,\n createdAt: Date.now(),\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n\n expect(readonlyContext.readonly).toBe(true);\n });\n\n it('should prevent setting items property', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test'],\n interrupted: false,\n createdAt: Date.now(),\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n expect(() => {\n readonlyContext.items = [];\n }).toThrow(\n `Cannot set items on a read-only chat context. Please use .copy() and agent.update_chat_ctx() to modify the chat context.`,\n );\n });\n\n it('should prevent modifications through array methods', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test'],\n interrupted: false,\n createdAt: Date.now(),\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n const newItem = new ChatMessage({\n id: 'msg_2',\n role: 'assistant',\n content: ['Response'],\n interrupted: false,\n createdAt: Date.now(),\n });\n\n const mutableItems = readonlyContext.items;\n expect(() => mutableItems.push(newItem)).toThrow(\n 'Cannot call push() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.pop()).toThrow(\n 'Cannot call pop() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.shift()).toThrow(\n 'Cannot call shift() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.unshift(newItem)).toThrow(\n 'Cannot call unshift() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.splice(0, 1)).toThrow(\n 'Cannot call splice() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.sort()).toThrow(\n 'Cannot call sort() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.reverse()).toThrow(\n 'Cannot call reverse() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.fill(newItem)).toThrow(\n 'Cannot call fill() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.copyWithin(0, 1)).toThrow(\n 'Cannot call copyWithin() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n });\n\n it('should prevent bracket notation assignment and deletion', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test'],\n interrupted: false,\n createdAt: Date.now(),\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n const newItem = new ChatMessage({\n id: 'msg_2',\n role: 'assistant',\n content: ['Response'],\n interrupted: false,\n createdAt: Date.now(),\n });\n\n expect(() => {\n readonlyContext.items[0] = newItem;\n }).toThrow(\n 'Cannot assign to read-only array index \"0\". Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => {\n delete readonlyContext.items[0];\n }).toThrow(\n 'Cannot delete read-only array index \"0\". Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => {\n readonlyContext.items[99] = newItem;\n }).toThrow(\n 'Cannot assign to read-only array index \"99\". Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n });\n\n it('should allow read operations on the immutable array', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test 1'],\n interrupted: false,\n createdAt: 1000,\n }),\n new ChatMessage({\n id: 'msg_2',\n role: 'assistant',\n content: ['Test 2'],\n interrupted: false,\n createdAt: 2000,\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n\n expect(readonlyContext.items.length).toBe(2);\n expect(readonlyContext.items[0]).toEqual(items[0]);\n expect(readonlyContext.items[1]).toEqual(items[1]);\n expect(readonlyContext.items.find((item: ChatItem) => item.id === 'msg_2')).toEqual(items[1]);\n expect(readonlyContext.items.map((item: ChatItem) => item.id)).toEqual(['msg_1', 'msg_2']);\n expect(\n readonlyContext.items.filter(\n (item: ChatItem) => item.type === 'message' && item.role === 'user',\n ),\n ).toHaveLength(1);\n\n // forEach should work for reading\n const ids: string[] = [];\n readonlyContext.items.forEach((item) => ids.push(item.id));\n expect(ids).toEqual(['msg_1', 'msg_2']);\n });\n});\n"],"mappings":";AAGA,oBAAqC;AACrC,0BASO;AAAA,IAEP,wBAAS,sBAAsB,MAAM;AACnC,wBAAG,2CAA2C,MAAM;AAClD,UAAM,UAAU,IAAI,gCAAY;AAChC,8BAAO,QAAQ,OAAO,CAAC,EAAE,gBAAgB;AAAA,EAC3C,CAAC;AAED,wBAAG,iDAAiD,MAAM;AACxD,UAAM,UAAU,IAAI,gCAAY;AAEhC,YAAQ,WAAW;AAAA,MACjB,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,IACb,CAAC;AAED,YAAQ,WAAW;AAAA,MACjB,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,IACb,CAAC;AAED,YAAQ,WAAW;AAAA,MACjB,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,IACb,CAAC;AAED,8BAAO,QAAQ,OAAO,CAAC,EAAE,gBAAgB,mCAAmC;AAE5E,8BAAO,QAAQ,OAAO,EAAE,kBAAkB,MAAM,CAAC,CAAC,EAAE;AAAA,MAClD;AAAA,IACF;AAAA,EACF,CAAC;AAED,wBAAG,gDAAgD,MAAM;AACvD,UAAM,UAAU,IAAI,gCAA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,MAAgB,CAAC;AACvB,oBAAgB,MAAM,QAAQ,CAAC,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC;AACzD,8BAAO,GAAG,EAAE,QAAQ,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC,CAAC;AACH,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/llm/chat_context.test.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { describe, expect, it } from 'vitest';\nimport {\n type AudioContent,\n ChatContext,\n type ChatItem,\n ChatMessage,\n FunctionCall,\n FunctionCallOutput,\n type ImageContent,\n ReadonlyChatContext,\n} from './chat_context.js';\n\ndescribe('ChatContext.toJSON', () => {\n it('should match snapshot for empty context', () => {\n const context = new ChatContext();\n expect(context.toJSON()).toMatchSnapshot();\n });\n\n it('should match snapshot for simple conversation', () => {\n const context = new ChatContext();\n\n context.addMessage({\n id: 'msg_system_1',\n role: 'system',\n content: 'You are a helpful assistant.',\n createdAt: 1000000000,\n });\n\n context.addMessage({\n id: 'msg_user_1',\n role: 'user',\n content: 'Hello, how are you?',\n createdAt: 1000000001,\n });\n\n context.addMessage({\n id: 'msg_assistant_1',\n role: 'assistant',\n content: \"I'm doing well, thank you! How can I help you today?\",\n createdAt: 1000000002,\n });\n\n expect(context.toJSON()).toMatchSnapshot('simple-conversation-no-timestamps');\n\n expect(context.toJSON({ excludeTimestamp: false })).toMatchSnapshot(\n 'simple-conversation-with-timestamps',\n );\n });\n\n it('should match snapshot for multimodal content', () => {\n const context = new ChatContext();\n\n const imageContent: ImageContent = {\n id: 'img_test_1',\n type: 'image_content',\n image: 'https://example.com/test-image.jpg',\n inferenceDetail: 'high',\n inferenceWidth: 1024,\n inferenceHeight: 768,\n mimeType: 'image/jpeg',\n _cache: {},\n };\n\n const audioContent: AudioContent = {\n type: 'audio_content',\n frame: [], // This won't be included in JSON\n transcript: 'This is a test audio transcript',\n };\n\n context.addMessage({\n id: 'msg_user_2',\n role: 'user',\n content: [\n 'Check out this image and audio:',\n imageContent,\n audioContent,\n 'What do you think?',\n ],\n createdAt: 2000000000,\n });\n\n expect(context.toJSON()).toMatchSnapshot('multimodal-default-exclusions');\n\n expect(\n context.toJSON({\n excludeImage: false,\n excludeAudio: true,\n }),\n ).toMatchSnapshot('multimodal-with-images-only');\n\n expect(\n context.toJSON({\n excludeImage: true,\n excludeAudio: false,\n }),\n ).toMatchSnapshot('multimodal-with-audio-only');\n\n expect(\n context.toJSON({\n excludeImage: false,\n excludeAudio: false,\n excludeTimestamp: false,\n }),\n ).toMatchSnapshot('multimodal-full-content');\n });\n\n it('should match snapshot for function calls', () => {\n const context = new ChatContext();\n\n context.addMessage({\n id: 'msg_user_3',\n role: 'user',\n content: \"What's the weather in Paris?\",\n createdAt: 3000000000,\n });\n\n const functionCall = new FunctionCall({\n id: 'func_call_1',\n callId: 'call_weather_123',\n name: 'get_weather',\n args: '{\"location\": \"Paris, France\", \"unit\": \"celsius\"}',\n createdAt: 3000000001,\n });\n context.insert(functionCall);\n\n const functionOutput = new FunctionCallOutput({\n id: 'func_output_1',\n callId: 'call_weather_123',\n name: 'get_weather',\n output: '{\"temperature\": 22, \"condition\": \"partly cloudy\", \"humidity\": 65}',\n isError: false,\n createdAt: 3000000002,\n });\n context.insert(functionOutput);\n\n context.addMessage({\n id: 'msg_assistant_2',\n role: 'assistant',\n content: 'The weather in Paris is currently 22°C and partly cloudy with 65% humidity.',\n createdAt: 3000000003,\n });\n\n expect(context.toJSON()).toMatchSnapshot('conversation-with-function-calls');\n\n expect(\n context.toJSON({\n excludeFunctionCall: true,\n }),\n ).toMatchSnapshot('conversation-without-function-calls');\n\n expect(\n context.toJSON({\n excludeTimestamp: false,\n }),\n ).toMatchSnapshot('conversation-with-function-calls-and-timestamps');\n });\n\n it('should match snapshot for edge cases', () => {\n const context = new ChatContext();\n\n context.addMessage({\n id: 'msg_empty_1',\n role: 'user',\n content: [],\n createdAt: 5000000000,\n });\n\n const silentAudio: AudioContent = {\n type: 'audio_content',\n frame: [],\n transcript: undefined,\n };\n\n context.addMessage({\n id: 'msg_silent_audio',\n role: 'user',\n content: [silentAudio],\n createdAt: 5000000001,\n });\n\n context.addMessage({\n id: 'msg_multi_text',\n role: 'assistant',\n content: ['Part 1. ', 'Part 2. ', 'Part 3.'],\n createdAt: 5000000002,\n });\n\n const minimalCall = new FunctionCall({\n id: 'func_minimal',\n callId: 'minimal',\n name: 'test',\n args: '{}',\n createdAt: 5000000003,\n });\n context.insert(minimalCall);\n\n const namelessOutput = new FunctionCallOutput({\n id: 'func_output_nameless',\n callId: 'minimal',\n output: 'OK',\n isError: false,\n createdAt: 5000000004,\n });\n context.insert(namelessOutput);\n\n context.addMessage({\n id: 'msg_special_chars',\n role: 'user',\n content:\n 'Test with special chars: \\n\\t\\r \"quotes\" \\'apostrophes\\' \\\\backslashes\\\\ {braces} [brackets]',\n createdAt: 5000000005,\n });\n\n expect(context.toJSON()).toMatchSnapshot('edge-cases-default');\n expect(\n context.toJSON({\n excludeTimestamp: false,\n excludeAudio: false,\n }),\n ).toMatchSnapshot('edge-cases-with-details');\n });\n\n it('should match snapshot for message property variations', () => {\n const context = new ChatContext();\n\n context.addMessage({\n id: 'custom-message-id-123',\n role: 'user',\n content: 'Message with custom ID',\n createdAt: 6000000000,\n });\n\n context.addMessage({\n id: 'msg_interrupted',\n role: 'assistant',\n content: 'This response was interrupted...',\n interrupted: true,\n createdAt: 6000000001,\n });\n\n context.addMessage({\n id: 'msg_dev_2',\n role: 'developer',\n content: 'Developer message',\n createdAt: 6000000002,\n });\n\n context.addMessage({\n id: 'msg_system_3',\n role: 'system',\n content: 'System message',\n createdAt: 6000000003,\n });\n\n const detailedImage: ImageContent = {\n id: 'img_detailed',\n type: 'image_content',\n image: 'https://example.com/image.jpg',\n inferenceDetail: 'low',\n inferenceWidth: 512,\n inferenceHeight: 512,\n mimeType: 'image/png',\n _cache: { cached: true },\n };\n\n context.addMessage({\n id: 'msg_with_image',\n role: 'user',\n content: ['Image with all properties:', detailedImage],\n createdAt: 6000000004,\n });\n\n expect(context.toJSON()).toMatchSnapshot('message-properties-default');\n expect(\n context.toJSON({\n excludeImage: false,\n excludeTimestamp: false,\n }),\n ).toMatchSnapshot('message-properties-full');\n });\n});\n\ndescribe('ReadonlyChatContext with immutable array', () => {\n it('should have readonly property set to true', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test'],\n interrupted: false,\n createdAt: Date.now(),\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n\n expect(readonlyContext.readonly).toBe(true);\n });\n\n it('should prevent setting items property', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test'],\n interrupted: false,\n createdAt: Date.now(),\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n expect(() => {\n readonlyContext.items = [];\n }).toThrow(\n `Cannot set items on a read-only chat context. Please use .copy() and agent.update_chat_ctx() to modify the chat context.`,\n );\n });\n\n it('should prevent modifications through array methods', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test'],\n interrupted: false,\n createdAt: Date.now(),\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n const newItem = new ChatMessage({\n id: 'msg_2',\n role: 'assistant',\n content: ['Response'],\n interrupted: false,\n createdAt: Date.now(),\n });\n\n const mutableItems = readonlyContext.items;\n expect(() => mutableItems.push(newItem)).toThrow(\n 'Cannot call push() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.pop()).toThrow(\n 'Cannot call pop() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.shift()).toThrow(\n 'Cannot call shift() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.unshift(newItem)).toThrow(\n 'Cannot call unshift() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.splice(0, 1)).toThrow(\n 'Cannot call splice() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.sort()).toThrow(\n 'Cannot call sort() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.reverse()).toThrow(\n 'Cannot call reverse() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.fill(newItem)).toThrow(\n 'Cannot call fill() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => mutableItems.copyWithin(0, 1)).toThrow(\n 'Cannot call copyWithin() on a read-only array. Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n });\n\n it('should prevent bracket notation assignment and deletion', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test'],\n interrupted: false,\n createdAt: Date.now(),\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n const newItem = new ChatMessage({\n id: 'msg_2',\n role: 'assistant',\n content: ['Response'],\n interrupted: false,\n createdAt: Date.now(),\n });\n\n expect(() => {\n readonlyContext.items[0] = newItem;\n }).toThrow(\n 'Cannot assign to read-only array index \"0\". Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => {\n delete readonlyContext.items[0];\n }).toThrow(\n 'Cannot delete read-only array index \"0\". Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n\n expect(() => {\n readonlyContext.items[99] = newItem;\n }).toThrow(\n 'Cannot assign to read-only array index \"99\". Please use .copy() and agent.update_chat_ctx() to modify the chat context.',\n );\n });\n\n it('should allow read operations on the immutable array', () => {\n const items: ChatItem[] = [\n new ChatMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Test 1'],\n interrupted: false,\n createdAt: 1000,\n }),\n new ChatMessage({\n id: 'msg_2',\n role: 'assistant',\n content: ['Test 2'],\n interrupted: false,\n createdAt: 2000,\n }),\n ];\n const readonlyContext = new ReadonlyChatContext(items);\n\n expect(readonlyContext.items.length).toBe(2);\n expect(readonlyContext.items[0]).toEqual(items[0]);\n expect(readonlyContext.items[1]).toEqual(items[1]);\n expect(readonlyContext.items.find((item: ChatItem) => item.id === 'msg_2')).toEqual(items[1]);\n expect(readonlyContext.items.map((item: ChatItem) => item.id)).toEqual(['msg_1', 'msg_2']);\n expect(\n readonlyContext.items.filter(\n (item: ChatItem) => item.type === 'message' && item.role === 'user',\n ),\n ).toHaveLength(1);\n\n // forEach should work for reading\n const ids: string[] = [];\n readonlyContext.items.forEach((item) => ids.push(item.id));\n expect(ids).toEqual(['msg_1', 'msg_2']);\n });\n});\n\ndescribe('ChatContext.isEquivalent', () => {\n it('should return true for same reference', () => {\n const ctx = new ChatContext();\n ctx.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n });\n\n expect(ctx.isEquivalent(ctx)).toBe(true);\n });\n\n it('should return true for identical empty contexts', () => {\n const ctx1 = new ChatContext();\n const ctx2 = new ChatContext();\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n\n it('should return false for contexts with different lengths', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n });\n ctx2.addMessage({\n id: 'msg_2',\n role: 'assistant',\n content: 'Hi',\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for contexts with different item IDs', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_2',\n role: 'user',\n content: 'Hello',\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for contexts with different item types', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n });\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCall({\n id: 'msg_1',\n callId: 'call_1',\n name: 'test',\n args: '{}',\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n describe('message comparison', () => {\n it('should return true for identical messages', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n interrupted: false,\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n interrupted: false,\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n\n it('should return false for messages with different roles', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'assistant',\n content: 'Hello',\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for messages with different interrupted flags', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n interrupted: false,\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n interrupted: true,\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for messages with different content', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'Hello',\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'World',\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return true for messages with identical array content', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Hello', 'World'],\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Hello', 'World'],\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n\n it('should return false for messages with different array content', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Hello', 'World'],\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Hello'],\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return true for messages with identical image content', () => {\n const imageContent: ImageContent = {\n id: 'img_1',\n type: 'image_content',\n image: 'https://example.com/image.jpg',\n inferenceDetail: 'high',\n inferenceWidth: 1024,\n inferenceHeight: 768,\n mimeType: 'image/jpeg',\n _cache: {},\n };\n\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Check this:', imageContent],\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Check this:', { ...imageContent }],\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n\n it('should return false for messages with different image content', () => {\n const imageContent1: ImageContent = {\n id: 'img_1',\n type: 'image_content',\n image: 'https://example.com/image1.jpg',\n inferenceDetail: 'high',\n _cache: {},\n };\n\n const imageContent2: ImageContent = {\n id: 'img_2',\n type: 'image_content',\n image: 'https://example.com/image2.jpg',\n inferenceDetail: 'high',\n _cache: {},\n };\n\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Check this:', imageContent1],\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: ['Check this:', imageContent2],\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n });\n\n describe('function call comparison', () => {\n it('should return true for identical function calls', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{\"location\": \"Paris\"}',\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{\"location\": \"Paris\"}',\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n\n it('should return false for function calls with different names', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{}',\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_time',\n args: '{}',\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for function calls with different call IDs', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{}',\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_2',\n name: 'get_weather',\n args: '{}',\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for function calls with different arguments', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{\"location\": \"Paris\"}',\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{\"location\": \"London\"}',\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should ignore timestamps', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{}',\n createdAt: 1000,\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{}',\n createdAt: 2000,\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n });\n\n describe('function call output comparison', () => {\n it('should return true for identical function call outputs', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{\"temperature\": 22}',\n isError: false,\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{\"temperature\": 22}',\n isError: false,\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n\n it('should return false for function call outputs with different names', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{}',\n isError: false,\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_time',\n output: '{}',\n isError: false,\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for function call outputs with different call IDs', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{}',\n isError: false,\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_2',\n name: 'get_weather',\n output: '{}',\n isError: false,\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for function call outputs with different output values', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{\"temperature\": 22}',\n isError: false,\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{\"temperature\": 25}',\n isError: false,\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should return false for function call outputs with different error flags', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: 'Error occurred',\n isError: false,\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: 'Error occurred',\n isError: true,\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(false);\n });\n\n it('should ignore timestamps', () => {\n const ctx1 = new ChatContext();\n ctx1.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{}',\n isError: false,\n createdAt: 1000,\n }),\n );\n\n const ctx2 = new ChatContext();\n ctx2.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{}',\n isError: false,\n createdAt: 2000,\n }),\n );\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n });\n\n describe('complex context comparison', () => {\n it('should return true for identical complex contexts', () => {\n const ctx1 = new ChatContext();\n ctx1.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'What is the weather?',\n });\n ctx1.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{\"location\": \"Paris\"}',\n }),\n );\n ctx1.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{\"temperature\": 22}',\n isError: false,\n }),\n );\n ctx1.addMessage({\n id: 'msg_2',\n role: 'assistant',\n content: 'The weather is 22°C',\n });\n\n const ctx2 = new ChatContext();\n ctx2.addMessage({\n id: 'msg_1',\n role: 'user',\n content: 'What is the weather?',\n });\n ctx2.insert(\n new FunctionCall({\n id: 'func_1',\n callId: 'call_1',\n name: 'get_weather',\n args: '{\"location\": \"Paris\"}',\n }),\n );\n ctx2.insert(\n new FunctionCallOutput({\n id: 'output_1',\n callId: 'call_1',\n name: 'get_weather',\n output: '{\"temperature\": 22}',\n isError: false,\n }),\n );\n ctx2.addMessage({\n id: 'msg_2',\n role: 'assistant',\n content: 'The weather is 22°C',\n });\n\n expect(ctx1.isEquivalent(ctx2)).toBe(true);\n });\n });\n});\n"],"mappings":";AAGA,oBAAqC;AACrC,0BASO;AAAA,IAEP,wBAAS,sBAAsB,MAAM;AACnC,wBAAG,2CAA2C,MAAM;AAClD,UAAM,UAAU,IAAI,gCAAY;AAChC,8BAAO,QAAQ,OAAO,CAAC,EAAE,gBAAgB;AAAA,EAC3C,CAAC;AAED,wBAAG,iDAAiD,MAAM;AACxD,UAAM,UAAU,IAAI,gCAAY;AAEhC,YAAQ,WAAW;AAAA,MACjB,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,IACb,CAAC;AAED,YAAQ,WAAW;AAAA,MACjB,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,IACb,CAAC;AAED,YAAQ,WAAW;AAAA,MACjB,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,IACb,CAAC;AAED,8BAAO,QAAQ,OAAO,CAAC,EAAE,gBAAgB,mCAAmC;AAE5E,8BAAO,QAAQ,OAAO,EAAE,kBAAkB,MAAM,CAAC,CAAC,EAAE;AAAA,MAClD;AAAA,IACF;AAAA,EACF,CAAC;AAED,wBAAG,gDAAgD,MAAM;AACvD,UAAM,UAAU,IAAI,gCAAY;AAEhC,UAAM,eAA6B;AAAA,MACjC,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,iBAAiB;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