@volley/recognition-client-sdk 0.1.296 → 0.1.297

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/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@volley/recognition-client-sdk",
3
- "version": "0.1.296",
3
+ "version": "0.1.297",
4
4
  "description": "Recognition Service TypeScript/Node.js Client SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
8
+ "types": "dist/index.bundled.d.ts",
9
9
  "engines": {
10
10
  "node": ">=22.0.0"
11
11
  },
12
12
  "exports": {
13
13
  ".": {
14
- "types": "./dist/index.d.ts",
14
+ "types": "./dist/index.bundled.d.ts",
15
15
  "import": "./dist/index.js",
16
16
  "default": "./dist/index.js"
17
17
  },
18
18
  "./browser": {
19
- "types": "./dist/recog-client-sdk.browser.d.ts",
19
+ "types": "./dist/browser.bundled.d.ts",
20
20
  "import": "./dist/recog-client-sdk.browser.js",
21
21
  "default": "./dist/recog-client-sdk.browser.js"
22
22
  }
@@ -49,13 +49,15 @@
49
49
  "@types/ws": "^8.5.5",
50
50
  "esbuild": "^0.25.0",
51
51
  "jest": "^29.6.1",
52
+ "rollup": "^4.52.5",
53
+ "rollup-plugin-dts": "^6.2.3",
52
54
  "semantic-release": "^25.0.1",
53
55
  "ts-jest": "^29.4.5",
54
56
  "typescript": "^5.1.6",
55
- "@recog/shared-utils": "1.0.0",
56
57
  "@recog/shared-types": "1.0.0",
57
- "@recog/shared-config": "1.0.0",
58
- "@recog/websocket": "1.0.0"
58
+ "@recog/websocket": "1.0.0",
59
+ "@recog/shared-utils": "1.0.0",
60
+ "@recog/shared-config": "1.0.0"
59
61
  },
60
62
  "keywords": [
61
63
  "recognition",
@@ -83,10 +83,11 @@ describe('SimplifiedVGFRecognitionClient', () => {
83
83
  // FINALIZED session gets new UUID to prevent server session reuse
84
84
  expect(state.audioUtteranceId).not.toBe('existing-session-id');
85
85
  expect(state.audioUtteranceId).toBeDefined();
86
- // Other state preserved
87
- expect(state.finalTranscript).toBe('Previous transcript');
88
- // Status reset to NOT_STARTED
86
+ // finalTranscript is cleared for fresh session
87
+ expect(state.finalTranscript).toBeUndefined();
88
+ // Statuses reset for fresh session
89
89
  expect(state.transcriptionStatus).toBe(TranscriptionStatus.NOT_STARTED);
90
+ expect(state.startRecordingStatus).toBe(RecordingStatus.READY);
90
91
 
91
92
  // Verify NEW audioUtteranceId was passed to underlying client
92
93
  const constructorCalls = (RealTimeTwoWayWebSocketRecognitionClient as jest.MockedClass<typeof RealTimeTwoWayWebSocketRecognitionClient>).mock.calls;
@@ -575,14 +576,14 @@ describe('SimplifiedVGFRecognitionClient', () => {
575
576
  expect(client.getVGFState().audioUtteranceId).toBe(newState.audioUtteranceId);
576
577
  });
577
578
 
578
- it('should auto-generate new UUID for FINALIZED session', () => {
579
+ it('should auto-generate new UUID for FINALIZED session and reset fields', () => {
579
580
  const stateChangeCallback = jest.fn();
580
581
  const finalizedState: RecognitionState = {
581
582
  audioUtteranceId: 'old-finalized-uuid',
582
583
  transcriptionStatus: TranscriptionStatus.FINALIZED,
583
584
  startRecordingStatus: RecordingStatus.FINISHED,
584
585
  pendingTranscript: '',
585
- finalTranscript: 'completed transcript'
586
+ finalTranscript: 'completed transcript from previous session'
586
587
  };
587
588
 
588
589
  const client = createSimplifiedVGFClient({
@@ -602,6 +603,8 @@ describe('SimplifiedVGFRecognitionClient', () => {
602
603
 
603
604
  expect(newState.audioUtteranceId).not.toBe('old-finalized-uuid');
604
605
  expect(newState.transcriptionStatus).toBe(TranscriptionStatus.NOT_STARTED);
606
+ expect(newState.startRecordingStatus).toBe(RecordingStatus.READY);
607
+ expect(newState.finalTranscript).toBeUndefined();
605
608
  });
606
609
 
607
610
  it('should preserve UUID for IN_PROGRESS session (valid resumption)', () => {