@absolutejs/voice 0.0.22-beta.356 → 0.0.22-beta.358

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.
@@ -6363,6 +6363,7 @@ var serverMessageToAction = (message) => {
6363
6363
  partial: message.partial,
6364
6364
  scenarioId: message.scenarioId,
6365
6365
  sessionId: message.sessionId,
6366
+ sessionMetadata: message.sessionMetadata,
6366
6367
  status: message.status,
6367
6368
  turns: message.turns,
6368
6369
  type: "replay"
@@ -6370,6 +6371,7 @@ var serverMessageToAction = (message) => {
6370
6371
  case "session":
6371
6372
  return {
6372
6373
  sessionId: message.sessionId,
6374
+ sessionMetadata: message.sessionMetadata,
6373
6375
  scenarioId: message.scenarioId,
6374
6376
  status: message.status,
6375
6377
  type: "session"
@@ -7395,6 +7397,7 @@ var createInitialState = () => ({
7395
7397
  call: null,
7396
7398
  error: null,
7397
7399
  isConnected: false,
7400
+ sessionMetadata: null,
7398
7401
  scenarioId: null,
7399
7402
  partial: "",
7400
7403
  reconnect: createInitialReconnectState(),
@@ -7510,6 +7513,7 @@ var createVoiceStreamStore = () => {
7510
7513
  } : state.reconnect,
7511
7514
  scenarioId: action.scenarioId ?? state.scenarioId,
7512
7515
  sessionId: action.sessionId,
7516
+ sessionMetadata: action.sessionMetadata ?? state.sessionMetadata,
7513
7517
  status: action.status,
7514
7518
  turns: [...action.turns]
7515
7519
  };
@@ -7521,6 +7525,7 @@ var createVoiceStreamStore = () => {
7521
7525
  scenarioId: action.scenarioId ?? state.scenarioId,
7522
7526
  isConnected: action.status === "active",
7523
7527
  sessionId: action.sessionId,
7528
+ sessionMetadata: action.sessionMetadata ?? state.sessionMetadata,
7524
7529
  status: action.status
7525
7530
  };
7526
7531
  break;
@@ -7627,6 +7632,9 @@ var createVoiceStream = (path, options = {}) => {
7627
7632
  get scenarioId() {
7628
7633
  return store.getSnapshot().scenarioId;
7629
7634
  },
7635
+ get sessionMetadata() {
7636
+ return store.getSnapshot().sessionMetadata;
7637
+ },
7630
7638
  start,
7631
7639
  get partial() {
7632
7640
  return store.getSnapshot().partial;
@@ -7678,6 +7686,7 @@ var EMPTY_SNAPSHOT = {
7678
7686
  status: "idle"
7679
7687
  },
7680
7688
  sessionId: "",
7689
+ sessionMetadata: null,
7681
7690
  status: "idle",
7682
7691
  turns: []
7683
7692
  };
@@ -8170,6 +8179,7 @@ var createInitialState2 = (stream) => ({
8170
8179
  reconnect: stream.reconnect,
8171
8180
  recordingError: null,
8172
8181
  sessionId: stream.sessionId,
8182
+ sessionMetadata: stream.sessionMetadata,
8173
8183
  scenarioId: stream.scenarioId,
8174
8184
  status: stream.status,
8175
8185
  turns: [...stream.turns]
@@ -8199,6 +8209,7 @@ var createVoiceController = (path, options = {}) => {
8199
8209
  partial: stream.partial,
8200
8210
  reconnect: stream.reconnect,
8201
8211
  sessionId: stream.sessionId,
8212
+ sessionMetadata: stream.sessionMetadata,
8202
8213
  scenarioId: stream.scenarioId,
8203
8214
  status: stream.status,
8204
8215
  turns: [...stream.turns]
@@ -8305,6 +8316,9 @@ var createVoiceController = (path, options = {}) => {
8305
8316
  get sessionId() {
8306
8317
  return state.sessionId;
8307
8318
  },
8319
+ get sessionMetadata() {
8320
+ return state.sessionMetadata;
8321
+ },
8308
8322
  get scenarioId() {
8309
8323
  return state.scenarioId;
8310
8324
  },
@@ -9,6 +9,7 @@ export declare const useVoiceController: <TResult = unknown>(path: string, optio
9
9
  stopRecording: () => void;
10
10
  toggleRecording: () => Promise<void>;
11
11
  call: import("..").VoiceCallLifecycleState | null;
12
+ sessionMetadata: Record<string, unknown> | null;
12
13
  sessionId: string | null;
13
14
  scenarioId: string | null;
14
15
  status: import("..").VoiceSessionStatus | "idle";
@@ -5,6 +5,7 @@ export declare const useVoiceStream: <TResult = unknown>(path: string, options?:
5
5
  endTurn: () => void;
6
6
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
7
7
  call: import("..").VoiceCallLifecycleState | null;
8
+ sessionMetadata: Record<string, unknown> | null;
8
9
  sessionId: string | null;
9
10
  scenarioId: string | null;
10
11
  status: import("..").VoiceSessionStatus | "idle";
@@ -3421,6 +3421,7 @@ var serverMessageToAction = (message) => {
3421
3421
  partial: message.partial,
3422
3422
  scenarioId: message.scenarioId,
3423
3423
  sessionId: message.sessionId,
3424
+ sessionMetadata: message.sessionMetadata,
3424
3425
  status: message.status,
3425
3426
  turns: message.turns,
3426
3427
  type: "replay"
@@ -3428,6 +3429,7 @@ var serverMessageToAction = (message) => {
3428
3429
  case "session":
3429
3430
  return {
3430
3431
  sessionId: message.sessionId,
3432
+ sessionMetadata: message.sessionMetadata,
3431
3433
  scenarioId: message.scenarioId,
3432
3434
  status: message.status,
3433
3435
  type: "session"
@@ -4453,6 +4455,7 @@ var createInitialState = () => ({
4453
4455
  call: null,
4454
4456
  error: null,
4455
4457
  isConnected: false,
4458
+ sessionMetadata: null,
4456
4459
  scenarioId: null,
4457
4460
  partial: "",
4458
4461
  reconnect: createInitialReconnectState(),
@@ -4568,6 +4571,7 @@ var createVoiceStreamStore = () => {
4568
4571
  } : state.reconnect,
4569
4572
  scenarioId: action.scenarioId ?? state.scenarioId,
4570
4573
  sessionId: action.sessionId,
4574
+ sessionMetadata: action.sessionMetadata ?? state.sessionMetadata,
4571
4575
  status: action.status,
4572
4576
  turns: [...action.turns]
4573
4577
  };
@@ -4579,6 +4583,7 @@ var createVoiceStreamStore = () => {
4579
4583
  scenarioId: action.scenarioId ?? state.scenarioId,
4580
4584
  isConnected: action.status === "active",
4581
4585
  sessionId: action.sessionId,
4586
+ sessionMetadata: action.sessionMetadata ?? state.sessionMetadata,
4582
4587
  status: action.status
4583
4588
  };
4584
4589
  break;
@@ -4685,6 +4690,9 @@ var createVoiceStream = (path, options = {}) => {
4685
4690
  get scenarioId() {
4686
4691
  return store.getSnapshot().scenarioId;
4687
4692
  },
4693
+ get sessionMetadata() {
4694
+ return store.getSnapshot().sessionMetadata;
4695
+ },
4688
4696
  start,
4689
4697
  get partial() {
4690
4698
  return store.getSnapshot().partial;
@@ -6489,6 +6497,7 @@ var createInitialState2 = (stream) => ({
6489
6497
  reconnect: stream.reconnect,
6490
6498
  recordingError: null,
6491
6499
  sessionId: stream.sessionId,
6500
+ sessionMetadata: stream.sessionMetadata,
6492
6501
  scenarioId: stream.scenarioId,
6493
6502
  status: stream.status,
6494
6503
  turns: [...stream.turns]
@@ -6518,6 +6527,7 @@ var createVoiceController = (path, options = {}) => {
6518
6527
  partial: stream.partial,
6519
6528
  reconnect: stream.reconnect,
6520
6529
  sessionId: stream.sessionId,
6530
+ sessionMetadata: stream.sessionMetadata,
6521
6531
  scenarioId: stream.scenarioId,
6522
6532
  status: stream.status,
6523
6533
  turns: [...stream.turns]
@@ -6624,6 +6634,9 @@ var createVoiceController = (path, options = {}) => {
6624
6634
  get sessionId() {
6625
6635
  return state.sessionId;
6626
6636
  },
6637
+ get sessionMetadata() {
6638
+ return state.sessionMetadata;
6639
+ },
6627
6640
  get scenarioId() {
6628
6641
  return state.scenarioId;
6629
6642
  },
@@ -2138,6 +2138,7 @@ var serverMessageToAction = (message) => {
2138
2138
  partial: message.partial,
2139
2139
  scenarioId: message.scenarioId,
2140
2140
  sessionId: message.sessionId,
2141
+ sessionMetadata: message.sessionMetadata,
2141
2142
  status: message.status,
2142
2143
  turns: message.turns,
2143
2144
  type: "replay"
@@ -2145,6 +2146,7 @@ var serverMessageToAction = (message) => {
2145
2146
  case "session":
2146
2147
  return {
2147
2148
  sessionId: message.sessionId,
2149
+ sessionMetadata: message.sessionMetadata,
2148
2150
  scenarioId: message.scenarioId,
2149
2151
  status: message.status,
2150
2152
  type: "session"
@@ -3170,6 +3172,7 @@ var createInitialState2 = () => ({
3170
3172
  call: null,
3171
3173
  error: null,
3172
3174
  isConnected: false,
3175
+ sessionMetadata: null,
3173
3176
  scenarioId: null,
3174
3177
  partial: "",
3175
3178
  reconnect: createInitialReconnectState(),
@@ -3285,6 +3288,7 @@ var createVoiceStreamStore = () => {
3285
3288
  } : state.reconnect,
3286
3289
  scenarioId: action.scenarioId ?? state.scenarioId,
3287
3290
  sessionId: action.sessionId,
3291
+ sessionMetadata: action.sessionMetadata ?? state.sessionMetadata,
3288
3292
  status: action.status,
3289
3293
  turns: [...action.turns]
3290
3294
  };
@@ -3296,6 +3300,7 @@ var createVoiceStreamStore = () => {
3296
3300
  scenarioId: action.scenarioId ?? state.scenarioId,
3297
3301
  isConnected: action.status === "active",
3298
3302
  sessionId: action.sessionId,
3303
+ sessionMetadata: action.sessionMetadata ?? state.sessionMetadata,
3299
3304
  status: action.status
3300
3305
  };
3301
3306
  break;
@@ -3402,6 +3407,9 @@ var createVoiceStream = (path, options = {}) => {
3402
3407
  get scenarioId() {
3403
3408
  return store.getSnapshot().scenarioId;
3404
3409
  },
3410
+ get sessionMetadata() {
3411
+ return store.getSnapshot().sessionMetadata;
3412
+ },
3405
3413
  start,
3406
3414
  get partial() {
3407
3415
  return store.getSnapshot().partial;
@@ -3767,6 +3775,7 @@ var createInitialState3 = (stream) => ({
3767
3775
  reconnect: stream.reconnect,
3768
3776
  recordingError: null,
3769
3777
  sessionId: stream.sessionId,
3778
+ sessionMetadata: stream.sessionMetadata,
3770
3779
  scenarioId: stream.scenarioId,
3771
3780
  status: stream.status,
3772
3781
  turns: [...stream.turns]
@@ -3796,6 +3805,7 @@ var createVoiceController = (path, options = {}) => {
3796
3805
  partial: stream.partial,
3797
3806
  reconnect: stream.reconnect,
3798
3807
  sessionId: stream.sessionId,
3808
+ sessionMetadata: stream.sessionMetadata,
3799
3809
  scenarioId: stream.scenarioId,
3800
3810
  status: stream.status,
3801
3811
  turns: [...stream.turns]
@@ -3902,6 +3912,9 @@ var createVoiceController = (path, options = {}) => {
3902
3912
  get sessionId() {
3903
3913
  return state.sessionId;
3904
3914
  },
3915
+ get sessionMetadata() {
3916
+ return state.sessionMetadata;
3917
+ },
3905
3918
  get scenarioId() {
3906
3919
  return state.scenarioId;
3907
3920
  },
@@ -6272,6 +6285,7 @@ var createVoiceSession = (options) => {
6272
6285
  partial: session.currentTurn.partialText,
6273
6286
  scenarioId: session.scenarioId,
6274
6287
  sessionId: options.id,
6288
+ sessionMetadata: session.metadata && typeof session.metadata === "object" ? session.metadata : undefined,
6275
6289
  status: session.status,
6276
6290
  turns: session.turns,
6277
6291
  type: "replay"
@@ -7563,6 +7577,12 @@ var createVoiceSession = (options) => {
7563
7577
  if (options.scenarioId && session.scenarioId !== options.scenarioId) {
7564
7578
  session.scenarioId = options.scenarioId;
7565
7579
  }
7580
+ if (options.sessionMetadata) {
7581
+ session.metadata = {
7582
+ ...session.metadata && typeof session.metadata === "object" ? session.metadata : {},
7583
+ ...options.sessionMetadata
7584
+ };
7585
+ }
7566
7586
  ensureCommittedTurnGuard(session);
7567
7587
  let shouldFireOnSession = !existingSession;
7568
7588
  if (existingSession?.scenarioId && options.scenarioId && existingSession.scenarioId !== options.scenarioId) {
@@ -7611,6 +7631,7 @@ var createVoiceSession = (options) => {
7611
7631
  await send({
7612
7632
  sessionId: options.id,
7613
7633
  status: session.status,
7634
+ sessionMetadata: session.metadata && typeof session.metadata === "object" ? session.metadata : undefined,
7614
7635
  scenarioId: session.scenarioId,
7615
7636
  type: "session"
7616
7637
  });
package/dist/types.d.ts CHANGED
@@ -5,6 +5,9 @@ import type { VoiceIntegrationSink } from './opsSinks';
5
5
  import type { StoredVoiceCallReviewArtifact, VoiceCallReviewArtifact, VoiceCallReviewStore } from './testing/review';
6
6
  import type { VoiceTraceEventStore } from './trace';
7
7
  import type { VoiceLiveOpsControlState } from './liveOps';
8
+ import type { VoiceAuditActor, VoiceAuditEventStore } from './audit';
9
+ import type { VoiceProfileSwitchGuardDecision, VoiceProfileSwitchGuardMode, VoiceProfileSwitchObservedSignals } from './profileSwitchRecommendation';
10
+ import type { VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileHistoryReport } from './proofTrends';
8
11
  export type AudioFormat = {
9
12
  container: 'raw';
10
13
  encoding: 'alaw' | 'mulaw' | 'pcm_s16le';
@@ -614,6 +617,30 @@ export type VoiceRuntimeOpsConfig<TContext = unknown, TSession extends VoiceSess
614
617
  export type VoiceLiveOpsRuntimeConfig = {
615
618
  getControl: (sessionId: string) => Promise<VoiceLiveOpsControlState | null | undefined> | VoiceLiveOpsControlState | null | undefined;
616
619
  };
620
+ export type VoiceProfileSwitchGuardResolverInput<TContext = unknown> = {
621
+ context: TContext;
622
+ scenarioId?: string;
623
+ sessionId: string;
624
+ };
625
+ export type VoicePluginProfileSwitchGuardConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
626
+ actor?: VoiceAuditActor;
627
+ audit?: VoiceAuditEventStore;
628
+ currentProfileId?: string | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<string | undefined> | string | undefined);
629
+ defaultProfileId?: string;
630
+ defaults: VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport> | VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport);
631
+ metadata?: Record<string, unknown> | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<Record<string, unknown> | undefined> | Record<string, unknown> | undefined);
632
+ minConfidence?: number | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<number | undefined> | number | undefined);
633
+ mode?: VoiceProfileSwitchGuardMode | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceProfileSwitchGuardMode | undefined> | VoiceProfileSwitchGuardMode | undefined);
634
+ observed?: VoiceProfileSwitchObservedSignals | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceProfileSwitchObservedSignals | undefined> | VoiceProfileSwitchObservedSignals | undefined);
635
+ onDecision?: (input: {
636
+ context: TContext;
637
+ decision: VoiceProfileSwitchGuardDecision;
638
+ scenarioId?: string;
639
+ sessionId: string;
640
+ }) => Promise<void> | void;
641
+ sessionMetadataKey?: string | false;
642
+ trace?: false | VoiceTraceEventStore;
643
+ };
617
644
  export type VoiceNormalizedRouteConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Omit<VoiceRouteConfig<TContext, TSession, TResult>, 'onTurn'> & {
618
645
  onTurn: VoiceOnTurnObjectHandler<TContext, TSession, TResult>;
619
646
  };
@@ -649,6 +676,7 @@ export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionR
649
676
  handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
650
677
  ops?: VoiceRuntimeOpsConfig<TContext, TSession, TResult>;
651
678
  liveOps?: VoiceLiveOpsRuntimeConfig;
679
+ profileSwitchGuard?: VoicePluginProfileSwitchGuardConfig<TContext, TSession, TResult>;
652
680
  trace?: VoiceTraceEventStore;
653
681
  } & VoiceRouteConfig<TContext, TSession, TResult>;
654
682
  export type CreateVoiceSessionOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
@@ -667,6 +695,7 @@ export type CreateVoiceSessionOptions<TContext = unknown, TSession extends Voice
667
695
  trace?: VoiceTraceEventStore;
668
696
  reconnect: Required<VoiceReconnectConfig>;
669
697
  phraseHints?: VoicePhraseHint[];
698
+ sessionMetadata?: Record<string, unknown>;
670
699
  scenarioId?: string;
671
700
  sttLifecycle: VoiceSTTLifecycle;
672
701
  turnDetection: VoiceResolvedTurnDetectionConfig;
@@ -705,6 +734,7 @@ export type VoiceServerSessionMessage = {
705
734
  sessionId: string;
706
735
  status: VoiceSessionStatus;
707
736
  scenarioId?: string;
737
+ sessionMetadata?: Record<string, unknown>;
708
738
  };
709
739
  export type VoiceServerReplayMessage<TResult = unknown> = {
710
740
  type: 'replay';
@@ -713,6 +743,7 @@ export type VoiceServerReplayMessage<TResult = unknown> = {
713
743
  partial: string;
714
744
  scenarioId?: string;
715
745
  sessionId: string;
746
+ sessionMetadata?: Record<string, unknown>;
716
747
  status: VoiceSessionStatus;
717
748
  turns: VoiceTurnRecord<TResult>[];
718
749
  };
@@ -902,6 +933,7 @@ export type VoiceHTMXOptions<TSession extends VoiceSessionRecord = VoiceSessionR
902
933
  export type VoiceHTMXConfig<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceHTMXRenderer<TSession, TResult> | VoiceHTMXOptions<TSession, TResult>;
903
934
  export type VoiceStreamState<TResult = unknown> = {
904
935
  call: VoiceCallLifecycleState | null;
936
+ sessionMetadata: Record<string, unknown> | null;
905
937
  sessionId: string | null;
906
938
  scenarioId: string | null;
907
939
  status: VoiceSessionStatus | 'idle';
@@ -935,6 +967,7 @@ export type VoiceStream<TResult = unknown> = {
935
967
  reconnect: VoiceReconnectClientState;
936
968
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
937
969
  sessionId: string | null;
970
+ sessionMetadata: Record<string, unknown> | null;
938
971
  scenarioId: string | null;
939
972
  status: VoiceSessionStatus | 'idle';
940
973
  subscribe: (subscriber: () => void) => () => void;
@@ -1006,6 +1039,7 @@ export type VoiceController<TResult = unknown> = {
1006
1039
  recordingError: string | null;
1007
1040
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
1008
1041
  sessionId: string | null;
1042
+ sessionMetadata: Record<string, unknown> | null;
1009
1043
  scenarioId: string | null;
1010
1044
  startRecording: () => Promise<void>;
1011
1045
  status: VoiceSessionStatus | 'idle';
@@ -1034,6 +1068,7 @@ export type VoiceHTMXBindingOptions = {
1034
1068
  export type VoiceStoreAction<TResult = unknown> = {
1035
1069
  type: 'session';
1036
1070
  sessionId: string;
1071
+ sessionMetadata?: Record<string, unknown>;
1037
1072
  scenarioId?: string;
1038
1073
  status: VoiceSessionStatus;
1039
1074
  } | {
@@ -1043,6 +1078,7 @@ export type VoiceStoreAction<TResult = unknown> = {
1043
1078
  partial: string;
1044
1079
  scenarioId?: string;
1045
1080
  sessionId: string;
1081
+ sessionMetadata?: Record<string, unknown>;
1046
1082
  status: VoiceSessionStatus;
1047
1083
  turns: VoiceTurnRecord<TResult>[];
1048
1084
  } | {
package/dist/vue/index.js CHANGED
@@ -5743,6 +5743,7 @@ var serverMessageToAction = (message) => {
5743
5743
  partial: message.partial,
5744
5744
  scenarioId: message.scenarioId,
5745
5745
  sessionId: message.sessionId,
5746
+ sessionMetadata: message.sessionMetadata,
5746
5747
  status: message.status,
5747
5748
  turns: message.turns,
5748
5749
  type: "replay"
@@ -5750,6 +5751,7 @@ var serverMessageToAction = (message) => {
5750
5751
  case "session":
5751
5752
  return {
5752
5753
  sessionId: message.sessionId,
5754
+ sessionMetadata: message.sessionMetadata,
5753
5755
  scenarioId: message.scenarioId,
5754
5756
  status: message.status,
5755
5757
  type: "session"
@@ -6775,6 +6777,7 @@ var createInitialState = () => ({
6775
6777
  call: null,
6776
6778
  error: null,
6777
6779
  isConnected: false,
6780
+ sessionMetadata: null,
6778
6781
  scenarioId: null,
6779
6782
  partial: "",
6780
6783
  reconnect: createInitialReconnectState(),
@@ -6890,6 +6893,7 @@ var createVoiceStreamStore = () => {
6890
6893
  } : state.reconnect,
6891
6894
  scenarioId: action.scenarioId ?? state.scenarioId,
6892
6895
  sessionId: action.sessionId,
6896
+ sessionMetadata: action.sessionMetadata ?? state.sessionMetadata,
6893
6897
  status: action.status,
6894
6898
  turns: [...action.turns]
6895
6899
  };
@@ -6901,6 +6905,7 @@ var createVoiceStreamStore = () => {
6901
6905
  scenarioId: action.scenarioId ?? state.scenarioId,
6902
6906
  isConnected: action.status === "active",
6903
6907
  sessionId: action.sessionId,
6908
+ sessionMetadata: action.sessionMetadata ?? state.sessionMetadata,
6904
6909
  status: action.status
6905
6910
  };
6906
6911
  break;
@@ -7007,6 +7012,9 @@ var createVoiceStream = (path, options = {}) => {
7007
7012
  get scenarioId() {
7008
7013
  return store.getSnapshot().scenarioId;
7009
7014
  },
7015
+ get sessionMetadata() {
7016
+ return store.getSnapshot().sessionMetadata;
7017
+ },
7010
7018
  start,
7011
7019
  get partial() {
7012
7020
  return store.getSnapshot().partial;
@@ -7055,6 +7063,7 @@ function useVoiceStream(path, options = {}) {
7055
7063
  const partial = ref13("");
7056
7064
  const reconnect = shallowRef16(stream.reconnect);
7057
7065
  const sessionId = ref13(stream.sessionId);
7066
+ const sessionMetadata = shallowRef16(stream.sessionMetadata);
7058
7067
  const status = ref13(stream.status);
7059
7068
  const turns = shallowRef16([]);
7060
7069
  const sync = () => {
@@ -7066,6 +7075,7 @@ function useVoiceStream(path, options = {}) {
7066
7075
  partial.value = stream.partial;
7067
7076
  reconnect.value = stream.reconnect;
7068
7077
  sessionId.value = stream.sessionId;
7078
+ sessionMetadata.value = stream.sessionMetadata;
7069
7079
  status.value = stream.status;
7070
7080
  turns.value = [...stream.turns];
7071
7081
  };
@@ -7089,6 +7099,7 @@ function useVoiceStream(path, options = {}) {
7089
7099
  reconnect,
7090
7100
  sendAudio: (audio) => stream.sendAudio(audio),
7091
7101
  sessionId,
7102
+ sessionMetadata,
7092
7103
  status,
7093
7104
  turns
7094
7105
  };
@@ -7566,6 +7577,7 @@ var createInitialState2 = (stream) => ({
7566
7577
  reconnect: stream.reconnect,
7567
7578
  recordingError: null,
7568
7579
  sessionId: stream.sessionId,
7580
+ sessionMetadata: stream.sessionMetadata,
7569
7581
  scenarioId: stream.scenarioId,
7570
7582
  status: stream.status,
7571
7583
  turns: [...stream.turns]
@@ -7595,6 +7607,7 @@ var createVoiceController = (path, options = {}) => {
7595
7607
  partial: stream.partial,
7596
7608
  reconnect: stream.reconnect,
7597
7609
  sessionId: stream.sessionId,
7610
+ sessionMetadata: stream.sessionMetadata,
7598
7611
  scenarioId: stream.scenarioId,
7599
7612
  status: stream.status,
7600
7613
  turns: [...stream.turns]
@@ -7701,6 +7714,9 @@ var createVoiceController = (path, options = {}) => {
7701
7714
  get sessionId() {
7702
7715
  return state.sessionId;
7703
7716
  },
7717
+ get sessionMetadata() {
7718
+ return state.sessionMetadata;
7719
+ },
7704
7720
  get scenarioId() {
7705
7721
  return state.scenarioId;
7706
7722
  },
@@ -22,6 +22,7 @@ export declare function useVoiceStream<TResult = unknown>(path: string, options?
22
22
  reconnect: import("vue").ShallowRef<import("..").VoiceReconnectClientState, import("..").VoiceReconnectClientState>;
23
23
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
24
24
  sessionId: import("vue").Ref<string | null, string | null>;
25
+ sessionMetadata: import("vue").ShallowRef<Record<string, unknown> | null, Record<string, unknown> | null>;
25
26
  status: import("vue").Ref<import("..").VoiceSessionStatus | "idle", import("..").VoiceSessionStatus | "idle">;
26
27
  turns: import("vue").ShallowRef<VoiceTurnRecord<TResult>[], VoiceTurnRecord<TResult>[]>;
27
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.356",
3
+ "version": "0.0.22-beta.358",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",