cogito-client 1.0.66 → 1.0.68
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.d.ts +154 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -195,24 +195,8 @@ export declare interface CogitoConfig {
|
|
|
195
195
|
message?: string;
|
|
196
196
|
[k: string]: unknown;
|
|
197
197
|
};
|
|
198
|
-
stt?:
|
|
199
|
-
|
|
200
|
-
language?: string;
|
|
201
|
-
[k: string]: unknown;
|
|
202
|
-
};
|
|
203
|
-
tts?: {
|
|
204
|
-
model?: string;
|
|
205
|
-
voice?: string;
|
|
206
|
-
language?: string;
|
|
207
|
-
voiceOverrides?: {
|
|
208
|
-
voice?: string;
|
|
209
|
-
language?: string;
|
|
210
|
-
}[];
|
|
211
|
-
pronunciation?: {
|
|
212
|
-
[k: string]: string;
|
|
213
|
-
};
|
|
214
|
-
[k: string]: unknown;
|
|
215
|
-
};
|
|
198
|
+
stt?: CogitoSTTConfig;
|
|
199
|
+
tts?: CogitoTTSConfig;
|
|
216
200
|
llm?: {
|
|
217
201
|
model?: string;
|
|
218
202
|
extra_kwargs?: {
|
|
@@ -530,6 +514,14 @@ export declare interface CogitoLinkPreviewSurface {
|
|
|
530
514
|
};
|
|
531
515
|
}
|
|
532
516
|
|
|
517
|
+
export declare interface CogitoMCPTool {
|
|
518
|
+
type: "mcp";
|
|
519
|
+
url: string;
|
|
520
|
+
headers?: {
|
|
521
|
+
[k: string]: string;
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
|
|
533
525
|
export declare type CogitoMessage = CogitoSystemMessage | CogitoAssistantMessage | CogitoUserMessage | CogitoToolMessage | CogitoSurfaceMessage;
|
|
534
526
|
|
|
535
527
|
export declare interface CogitoMessagePayload {
|
|
@@ -958,6 +950,20 @@ export declare interface CogitoStatsDisplaySurface {
|
|
|
958
950
|
};
|
|
959
951
|
}
|
|
960
952
|
|
|
953
|
+
export declare interface CogitoSTTConfig {
|
|
954
|
+
model?: string;
|
|
955
|
+
language?: string;
|
|
956
|
+
smartFormat?: SmartFormat;
|
|
957
|
+
punctuate?: Punctuation;
|
|
958
|
+
numerals?: Numerals;
|
|
959
|
+
profanityFilter?: ProfanityFilter;
|
|
960
|
+
fillerWords?: KeepFillerWords;
|
|
961
|
+
endpointing?: EndpointingMs;
|
|
962
|
+
keyterms?: KeyTerms;
|
|
963
|
+
extra_kwargs?: ExtraOptions;
|
|
964
|
+
[k: string]: unknown;
|
|
965
|
+
}
|
|
966
|
+
|
|
961
967
|
export declare interface CogitoSurfaceActionPayload {
|
|
962
968
|
type: "surface-action";
|
|
963
969
|
/**
|
|
@@ -1084,7 +1090,7 @@ export declare interface CogitoTerminalSurface {
|
|
|
1084
1090
|
};
|
|
1085
1091
|
}
|
|
1086
1092
|
|
|
1087
|
-
export declare type CogitoTool = CogitoFunctionTool | CogitoHandoffTool;
|
|
1093
|
+
export declare type CogitoTool = CogitoFunctionTool | CogitoHandoffTool | CogitoMCPTool;
|
|
1088
1094
|
|
|
1089
1095
|
export declare interface CogitoToolMessage {
|
|
1090
1096
|
role: "tool";
|
|
@@ -1099,6 +1105,32 @@ export declare interface CogitoToolMessage {
|
|
|
1099
1105
|
isError?: boolean;
|
|
1100
1106
|
}
|
|
1101
1107
|
|
|
1108
|
+
export declare interface CogitoTTSConfig {
|
|
1109
|
+
model?: string;
|
|
1110
|
+
voice?: string;
|
|
1111
|
+
language?: string;
|
|
1112
|
+
speed?: Speed;
|
|
1113
|
+
stability?: Stability;
|
|
1114
|
+
similarityBoost?: SimilarityBoost;
|
|
1115
|
+
style?: StyleExaggeration;
|
|
1116
|
+
useSpeakerBoost?: SpeakerBoost;
|
|
1117
|
+
voiceOverrides?: {
|
|
1118
|
+
voice?: string;
|
|
1119
|
+
language?: string;
|
|
1120
|
+
speed?: Speed1;
|
|
1121
|
+
stability?: Stability1;
|
|
1122
|
+
similarityBoost?: SimilarityBoost1;
|
|
1123
|
+
style?: StyleExaggeration1;
|
|
1124
|
+
useSpeakerBoost?: SpeakerBoost1;
|
|
1125
|
+
extra_kwargs?: ExtraOptions1;
|
|
1126
|
+
}[];
|
|
1127
|
+
pronunciation?: {
|
|
1128
|
+
[k: string]: string;
|
|
1129
|
+
};
|
|
1130
|
+
extra_kwargs?: ExtraOptions2;
|
|
1131
|
+
[k: string]: unknown;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1102
1134
|
export declare interface CogitoUserMessage {
|
|
1103
1135
|
role: "user";
|
|
1104
1136
|
userName?: string;
|
|
@@ -1380,6 +1412,109 @@ export declare type CogitoWebhookPayload = CogitoMessageWebhook | CogitoCallComp
|
|
|
1380
1412
|
|
|
1381
1413
|
export declare type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
1382
1414
|
|
|
1415
|
+
/**
|
|
1416
|
+
* Silence in milliseconds before an utterance is considered finished.
|
|
1417
|
+
*/
|
|
1418
|
+
export declare type EndpointingMs = number;
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* Escape hatch for provider STT options not promoted to typed fields.
|
|
1422
|
+
*/
|
|
1423
|
+
export declare interface ExtraOptions {
|
|
1424
|
+
[k: string]: unknown;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
export declare interface ExtraOptions1 {
|
|
1428
|
+
[k: string]: unknown;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* Escape hatch for provider TTS options not promoted to typed fields.
|
|
1433
|
+
*/
|
|
1434
|
+
export declare interface ExtraOptions2 {
|
|
1435
|
+
[k: string]: unknown;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* Keep filler words (um, uh) in transcripts.
|
|
1440
|
+
*/
|
|
1441
|
+
export declare type KeepFillerWords = boolean;
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Boost recognition of domain words/names (nova-3 only).
|
|
1445
|
+
*/
|
|
1446
|
+
export declare type KeyTerms = string[];
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Convert spoken numbers to digits.
|
|
1450
|
+
*/
|
|
1451
|
+
export declare type Numerals = boolean;
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Mask profanity in transcripts.
|
|
1455
|
+
*/
|
|
1456
|
+
export declare type ProfanityFilter = boolean;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* Add punctuation to transcripts.
|
|
1460
|
+
*/
|
|
1461
|
+
export declare type Punctuation = boolean;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* How closely the output matches the original voice.
|
|
1465
|
+
*/
|
|
1466
|
+
export declare type SimilarityBoost = number;
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* Inherits from top-level TTS when unset.
|
|
1470
|
+
*/
|
|
1471
|
+
export declare type SimilarityBoost1 = number;
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* Apply Deepgram smart formatting (dates, times, currency, etc.).
|
|
1475
|
+
*/
|
|
1476
|
+
export declare type SmartFormat = boolean;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* Boosts similarity to the original speaker (adds slight latency).
|
|
1480
|
+
*/
|
|
1481
|
+
export declare type SpeakerBoost = boolean;
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Inherits from top-level TTS when unset.
|
|
1485
|
+
*/
|
|
1486
|
+
export declare type SpeakerBoost1 = boolean;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* Speech rate. 1.0 = normal.
|
|
1490
|
+
*/
|
|
1491
|
+
export declare type Speed = number;
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* Speech rate. 1.0 = normal. Inherits from top-level TTS when unset.
|
|
1495
|
+
*/
|
|
1496
|
+
export declare type Speed1 = number;
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* Lower = more expressive/variable, higher = more consistent/flat.
|
|
1500
|
+
*/
|
|
1501
|
+
export declare type Stability = number;
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
* Inherits from top-level TTS when unset.
|
|
1505
|
+
*/
|
|
1506
|
+
export declare type Stability1 = number;
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* Amplifies the speaker's style. 0 = off (lowest latency).
|
|
1510
|
+
*/
|
|
1511
|
+
export declare type StyleExaggeration = number;
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Inherits from top-level TTS when unset.
|
|
1515
|
+
*/
|
|
1516
|
+
export declare type StyleExaggeration1 = number;
|
|
1517
|
+
|
|
1383
1518
|
export declare function useCogito({ mode, server, configuration, applicationId, tenantId, id }: UseCogitoOptions): {
|
|
1384
1519
|
messages: CogitoMessage[];
|
|
1385
1520
|
connectionState: ConnectionState;
|