@scout9/app 1.0.0-alpha.0.1.87 → 1.0.0-alpha.0.1.88
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/{exports-85e8c05c.cjs → exports-b2e88386.cjs} +46 -41
- package/dist/index.cjs +2 -2
- package/dist/{multipart-parser-1f8d78d0.cjs → multipart-parser-78fb466c.cjs} +2 -2
- package/dist/{spirits-643c422a.cjs → spirits-1dc18cf4.cjs} +19 -19
- package/dist/spirits.cjs +1 -1
- package/dist/testing-tools.cjs +2 -2
- package/package.json +1 -1
- package/src/core/config/entities.js +2 -2
- package/src/core/config/index.js +2 -4
- package/src/core/config/project.js +3 -2
- package/src/core/config/workflow.js +3 -7
- package/src/core/index.js +4 -4
- package/src/core/sync.js +2 -2
- package/src/core/templates/project-files.js +1 -5
- package/src/runtime/client/message.js +1 -0
- package/src/testing-tools/dev.js +13 -13
- package/src/testing-tools/mocks.js +6 -6
- package/src/testing-tools/spirits.js +19 -19
- package/src/utils/project-templates.js +5 -4
- package/types/index.d.ts +107 -51
- package/types/index.d.ts.map +1 -1
package/types/index.d.ts
CHANGED
|
@@ -330,11 +330,11 @@ declare module '@scout9/app' {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
declare module '@scout9/app/testing-tools' {
|
|
333
|
-
export function createMockAgent(firstName?: string, lastName?: string):
|
|
334
|
-
export function createMockCustomer(firstName?: string, lastName?: string):
|
|
335
|
-
export function createMockMessage(content: any, role?: string, time?: string):
|
|
336
|
-
export function createMockConversation(environment?: string, $agent?: string, $customer?: string):
|
|
337
|
-
export function createMockWorkflowEvent(message: string, intent?: string | import('@scout9/app').
|
|
333
|
+
export function createMockAgent(firstName?: string, lastName?: string): any;
|
|
334
|
+
export function createMockCustomer(firstName?: string, lastName?: string): any;
|
|
335
|
+
export function createMockMessage(content: any, role?: string, time?: string): any;
|
|
336
|
+
export function createMockConversation(environment?: string, $agent?: string, $customer?: string): any;
|
|
337
|
+
export function createMockWorkflowEvent(message: string, intent?: string | import('@scout9/app').IWorkflowEvent['intent'] | null): any;
|
|
338
338
|
/**
|
|
339
339
|
* Testing tool kit, used to handle Scout9 operations such as parsing, workflow, and generating responses
|
|
340
340
|
*/
|
|
@@ -355,19 +355,19 @@ declare module '@scout9/app/testing-tools' {
|
|
|
355
355
|
persona: any;
|
|
356
356
|
customer: any;
|
|
357
357
|
context: any;
|
|
358
|
-
conversation?:
|
|
358
|
+
conversation?: any;
|
|
359
359
|
api: any;
|
|
360
360
|
app: any;
|
|
361
361
|
project: any;
|
|
362
362
|
});
|
|
363
363
|
|
|
364
|
-
customer:
|
|
364
|
+
customer: any;
|
|
365
365
|
|
|
366
|
-
persona:
|
|
366
|
+
persona: any;
|
|
367
367
|
|
|
368
|
-
conversation:
|
|
368
|
+
conversation: any;
|
|
369
369
|
|
|
370
|
-
messages: import('@scout9/app').
|
|
370
|
+
messages: import('@scout9/app').IMessage[];
|
|
371
371
|
|
|
372
372
|
context: any;
|
|
373
373
|
|
|
@@ -412,7 +412,7 @@ declare module '@scout9/app/testing-tools' {
|
|
|
412
412
|
* @param message - the message to run through the workflow
|
|
413
413
|
* @param event - additional event data
|
|
414
414
|
* */
|
|
415
|
-
workflow(message: string, event?: Omit<Partial<import('@scout9/app').
|
|
415
|
+
workflow(message: string, event?: Omit<Partial<import('@scout9/app').IWorkflowEvent>, 'message'> | undefined): Promise<import('@scout9/app').IWorkflowResponse>;
|
|
416
416
|
/**
|
|
417
417
|
* Generate a response to the user from the given or registered persona's voice in relation to the current conversation's context.
|
|
418
418
|
* @param {Object} input - Generation input, defaults to test registered data such as existing messages, context, and persona information.
|
|
@@ -420,7 +420,7 @@ declare module '@scout9/app/testing-tools' {
|
|
|
420
420
|
generate({ personaId, conversation, messages, context }?: {
|
|
421
421
|
personaId?: string | undefined;
|
|
422
422
|
conversation?: Partial<import("@scout9/admin").ConversationCreateRequest> | undefined;
|
|
423
|
-
messages?:
|
|
423
|
+
messages?: any[] | undefined;
|
|
424
424
|
context?: any;
|
|
425
425
|
} | undefined): Promise<import('@scout9/admin').GenerateResponse>;
|
|
426
426
|
|
|
@@ -449,36 +449,36 @@ declare module '@scout9/app/testing-tools' {
|
|
|
449
449
|
/**
|
|
450
450
|
* - used to define generation and extract persona metadata
|
|
451
451
|
*/
|
|
452
|
-
config:
|
|
453
|
-
conversation:
|
|
454
|
-
messages: Array<import('@scout9/app').
|
|
452
|
+
config: any;
|
|
453
|
+
conversation: any;
|
|
454
|
+
messages: Array<import('@scout9/app').IMessage>;
|
|
455
455
|
/**
|
|
456
456
|
* - the message sent by the customer (should exist in messages)
|
|
457
457
|
*/
|
|
458
|
-
message:
|
|
459
|
-
customer:
|
|
458
|
+
message: any;
|
|
459
|
+
customer: any;
|
|
460
460
|
context: any;
|
|
461
461
|
};
|
|
462
462
|
export type ParseOutput = {
|
|
463
|
-
messages: Array<import('@scout9/app').
|
|
464
|
-
conversation:
|
|
465
|
-
message:
|
|
463
|
+
messages: Array<import('@scout9/app').IMessage>;
|
|
464
|
+
conversation: any;
|
|
465
|
+
message: any;
|
|
466
466
|
context: any;
|
|
467
467
|
};
|
|
468
468
|
export type WorkflowOutput = {
|
|
469
|
-
slots: Array<import('@scout9/app').
|
|
470
|
-
messages: Array<import('@scout9/app').
|
|
471
|
-
conversation:
|
|
469
|
+
slots: Array<import('@scout9/app').IWorkflowResponseSlot>;
|
|
470
|
+
messages: Array<import('@scout9/app').IMessage>;
|
|
471
|
+
conversation: any;
|
|
472
472
|
context: any;
|
|
473
473
|
};
|
|
474
474
|
export type GenerateOutput = {
|
|
475
475
|
generate: import('@scout9/admin').GenerateResponse | undefined;
|
|
476
|
-
messages: Array<import('@scout9/app').
|
|
477
|
-
conversation:
|
|
476
|
+
messages: Array<import('@scout9/app').IMessage>;
|
|
477
|
+
conversation: any;
|
|
478
478
|
context: any;
|
|
479
479
|
};
|
|
480
480
|
export type ParseFun = (message: string, language: string | undefined) => Promise<import('@scout9/admin').ParseResponse>;
|
|
481
|
-
export type WorkflowFun = (event:
|
|
481
|
+
export type WorkflowFun = (event: any) => Promise<import('@scout9/app').IWorkflowResponse>;
|
|
482
482
|
export type GenerateFun = (data: import('@scout9/admin').GenerateRequestOneOf) => Promise<import('@scout9/admin').GenerateResponse>;
|
|
483
483
|
export type IdGeneratorFun = (prefix: any) => string;
|
|
484
484
|
export type StatusCallback = (message: string, level?: 'info' | 'warn' | 'error' | 'success' | undefined, type?: string | undefined, payload?: any | undefined) => void;
|
|
@@ -490,13 +490,13 @@ declare module '@scout9/app/testing-tools' {
|
|
|
490
490
|
progress?: StatusCallback | undefined;
|
|
491
491
|
};
|
|
492
492
|
export type ConversationEvent = {
|
|
493
|
-
conversation: Change<import('@scout9/app').
|
|
493
|
+
conversation: Change<import('@scout9/app').IConversation> & {
|
|
494
494
|
forwardNote?: string;
|
|
495
495
|
forward?: import('@scout9/app').WorkflowResponseSlot['forward'];
|
|
496
496
|
};
|
|
497
|
-
messages: Change<Array<import('@scout9/app').
|
|
497
|
+
messages: Change<Array<import('@scout9/app').IMessage>>;
|
|
498
498
|
context: Change<Object>;
|
|
499
|
-
message: Change<import('@scout9/app').
|
|
499
|
+
message: Change<import('@scout9/app').IMessage>;
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
|
|
@@ -598,6 +598,7 @@ declare module '@scout9/app/types' {
|
|
|
598
598
|
context: z.ZodOptional<z.ZodAny>;
|
|
599
599
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
600
600
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
601
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
601
602
|
}, "strip", z.ZodTypeAny, {
|
|
602
603
|
time: string;
|
|
603
604
|
id: string;
|
|
@@ -608,6 +609,7 @@ declare module '@scout9/app/types' {
|
|
|
608
609
|
context?: any;
|
|
609
610
|
intent?: string | null | undefined;
|
|
610
611
|
intentScore?: number | null | undefined;
|
|
612
|
+
delayInSeconds?: number | null | undefined;
|
|
611
613
|
}, {
|
|
612
614
|
time: string;
|
|
613
615
|
id: string;
|
|
@@ -618,6 +620,7 @@ declare module '@scout9/app/types' {
|
|
|
618
620
|
context?: any;
|
|
619
621
|
intent?: string | null | undefined;
|
|
620
622
|
intentScore?: number | null | undefined;
|
|
623
|
+
delayInSeconds?: number | null | undefined;
|
|
621
624
|
}>, "many">, "many">>;
|
|
622
625
|
audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
623
626
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -650,6 +653,7 @@ declare module '@scout9/app/types' {
|
|
|
650
653
|
context?: any;
|
|
651
654
|
intent?: string | null | undefined;
|
|
652
655
|
intentScore?: number | null | undefined;
|
|
656
|
+
delayInSeconds?: number | null | undefined;
|
|
653
657
|
}[][] | undefined;
|
|
654
658
|
audios?: any[] | undefined;
|
|
655
659
|
}, {
|
|
@@ -682,6 +686,7 @@ declare module '@scout9/app/types' {
|
|
|
682
686
|
context?: any;
|
|
683
687
|
intent?: string | null | undefined;
|
|
684
688
|
intentScore?: number | null | undefined;
|
|
689
|
+
delayInSeconds?: number | null | undefined;
|
|
685
690
|
}[][] | undefined;
|
|
686
691
|
audios?: any[] | undefined;
|
|
687
692
|
}>;
|
|
@@ -703,6 +708,7 @@ declare module '@scout9/app/types' {
|
|
|
703
708
|
context: z.ZodOptional<z.ZodAny>;
|
|
704
709
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
705
710
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
711
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
706
712
|
}, "strip", z.ZodTypeAny, {
|
|
707
713
|
time: string;
|
|
708
714
|
id: string;
|
|
@@ -713,6 +719,7 @@ declare module '@scout9/app/types' {
|
|
|
713
719
|
context?: any;
|
|
714
720
|
intent?: string | null | undefined;
|
|
715
721
|
intentScore?: number | null | undefined;
|
|
722
|
+
delayInSeconds?: number | null | undefined;
|
|
716
723
|
}, {
|
|
717
724
|
time: string;
|
|
718
725
|
id: string;
|
|
@@ -723,6 +730,7 @@ declare module '@scout9/app/types' {
|
|
|
723
730
|
context?: any;
|
|
724
731
|
intent?: string | null | undefined;
|
|
725
732
|
intentScore?: number | null | undefined;
|
|
733
|
+
delayInSeconds?: number | null | undefined;
|
|
726
734
|
}>, "many">, "many">>;
|
|
727
735
|
audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
728
736
|
includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -766,6 +774,7 @@ declare module '@scout9/app/types' {
|
|
|
766
774
|
context?: any;
|
|
767
775
|
intent?: string | null | undefined;
|
|
768
776
|
intentScore?: number | null | undefined;
|
|
777
|
+
delayInSeconds?: number | null | undefined;
|
|
769
778
|
}[][] | undefined;
|
|
770
779
|
audios?: any[] | undefined;
|
|
771
780
|
includedLocations?: string[] | undefined;
|
|
@@ -798,6 +807,7 @@ declare module '@scout9/app/types' {
|
|
|
798
807
|
context?: any;
|
|
799
808
|
intent?: string | null | undefined;
|
|
800
809
|
intentScore?: number | null | undefined;
|
|
810
|
+
delayInSeconds?: number | null | undefined;
|
|
801
811
|
}[][] | undefined;
|
|
802
812
|
audios?: any[] | undefined;
|
|
803
813
|
includedLocations?: string[] | undefined;
|
|
@@ -832,6 +842,7 @@ declare module '@scout9/app/types' {
|
|
|
832
842
|
context: z.ZodOptional<z.ZodAny>;
|
|
833
843
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
834
844
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
845
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
835
846
|
}, "strip", z.ZodTypeAny, {
|
|
836
847
|
time: string;
|
|
837
848
|
id: string;
|
|
@@ -842,6 +853,7 @@ declare module '@scout9/app/types' {
|
|
|
842
853
|
context?: any;
|
|
843
854
|
intent?: string | null | undefined;
|
|
844
855
|
intentScore?: number | null | undefined;
|
|
856
|
+
delayInSeconds?: number | null | undefined;
|
|
845
857
|
}, {
|
|
846
858
|
time: string;
|
|
847
859
|
id: string;
|
|
@@ -852,6 +864,7 @@ declare module '@scout9/app/types' {
|
|
|
852
864
|
context?: any;
|
|
853
865
|
intent?: string | null | undefined;
|
|
854
866
|
intentScore?: number | null | undefined;
|
|
867
|
+
delayInSeconds?: number | null | undefined;
|
|
855
868
|
}>, "many">, "many">>;
|
|
856
869
|
audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
857
870
|
includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -895,6 +908,7 @@ declare module '@scout9/app/types' {
|
|
|
895
908
|
context?: any;
|
|
896
909
|
intent?: string | null | undefined;
|
|
897
910
|
intentScore?: number | null | undefined;
|
|
911
|
+
delayInSeconds?: number | null | undefined;
|
|
898
912
|
}[][] | undefined;
|
|
899
913
|
audios?: any[] | undefined;
|
|
900
914
|
includedLocations?: string[] | undefined;
|
|
@@ -927,6 +941,7 @@ declare module '@scout9/app/types' {
|
|
|
927
941
|
context?: any;
|
|
928
942
|
intent?: string | null | undefined;
|
|
929
943
|
intentScore?: number | null | undefined;
|
|
944
|
+
delayInSeconds?: number | null | undefined;
|
|
930
945
|
}[][] | undefined;
|
|
931
946
|
audios?: any[] | undefined;
|
|
932
947
|
includedLocations?: string[] | undefined;
|
|
@@ -982,6 +997,7 @@ declare module '@scout9/app/types' {
|
|
|
982
997
|
context: z.ZodOptional<z.ZodAny>;
|
|
983
998
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
984
999
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1000
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
985
1001
|
}, "strip", z.ZodTypeAny, {
|
|
986
1002
|
time: string;
|
|
987
1003
|
id: string;
|
|
@@ -992,6 +1008,7 @@ declare module '@scout9/app/types' {
|
|
|
992
1008
|
context?: any;
|
|
993
1009
|
intent?: string | null | undefined;
|
|
994
1010
|
intentScore?: number | null | undefined;
|
|
1011
|
+
delayInSeconds?: number | null | undefined;
|
|
995
1012
|
}, {
|
|
996
1013
|
time: string;
|
|
997
1014
|
id: string;
|
|
@@ -1002,6 +1019,7 @@ declare module '@scout9/app/types' {
|
|
|
1002
1019
|
context?: any;
|
|
1003
1020
|
intent?: string | null | undefined;
|
|
1004
1021
|
intentScore?: number | null | undefined;
|
|
1022
|
+
delayInSeconds?: number | null | undefined;
|
|
1005
1023
|
}>, "many">, "many">>;
|
|
1006
1024
|
audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
1007
1025
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1034,6 +1052,7 @@ declare module '@scout9/app/types' {
|
|
|
1034
1052
|
context?: any;
|
|
1035
1053
|
intent?: string | null | undefined;
|
|
1036
1054
|
intentScore?: number | null | undefined;
|
|
1055
|
+
delayInSeconds?: number | null | undefined;
|
|
1037
1056
|
}[][] | undefined;
|
|
1038
1057
|
audios?: any[] | undefined;
|
|
1039
1058
|
}, {
|
|
@@ -1066,6 +1085,7 @@ declare module '@scout9/app/types' {
|
|
|
1066
1085
|
context?: any;
|
|
1067
1086
|
intent?: string | null | undefined;
|
|
1068
1087
|
intentScore?: number | null | undefined;
|
|
1088
|
+
delayInSeconds?: number | null | undefined;
|
|
1069
1089
|
}[][] | undefined;
|
|
1070
1090
|
audios?: any[] | undefined;
|
|
1071
1091
|
}>, "many">;
|
|
@@ -1248,7 +1268,6 @@ declare module '@scout9/app/types' {
|
|
|
1248
1268
|
phone?: string | undefined;
|
|
1249
1269
|
}>>;
|
|
1250
1270
|
}, "strip", z.ZodTypeAny, {
|
|
1251
|
-
initialContext: string[];
|
|
1252
1271
|
llm: {
|
|
1253
1272
|
model: string;
|
|
1254
1273
|
engine: "openai";
|
|
@@ -1263,6 +1282,7 @@ declare module '@scout9/app/types' {
|
|
|
1263
1282
|
model: string;
|
|
1264
1283
|
engine: "scout9";
|
|
1265
1284
|
};
|
|
1285
|
+
initialContext: string[];
|
|
1266
1286
|
tag?: string | undefined;
|
|
1267
1287
|
maxLockAttempts?: number | undefined;
|
|
1268
1288
|
organization?: {
|
|
@@ -1277,7 +1297,6 @@ declare module '@scout9/app/types' {
|
|
|
1277
1297
|
phone?: string | undefined;
|
|
1278
1298
|
} | undefined;
|
|
1279
1299
|
}, {
|
|
1280
|
-
initialContext: string[];
|
|
1281
1300
|
llm: {
|
|
1282
1301
|
model: string;
|
|
1283
1302
|
engine: "openai";
|
|
@@ -1292,6 +1311,7 @@ declare module '@scout9/app/types' {
|
|
|
1292
1311
|
model: string;
|
|
1293
1312
|
engine: "scout9";
|
|
1294
1313
|
};
|
|
1314
|
+
initialContext: string[];
|
|
1295
1315
|
tag?: string | undefined;
|
|
1296
1316
|
maxLockAttempts?: number | undefined;
|
|
1297
1317
|
organization?: {
|
|
@@ -1339,7 +1359,6 @@ declare module '@scout9/app/types' {
|
|
|
1339
1359
|
email?: string | undefined;
|
|
1340
1360
|
phone?: string | undefined;
|
|
1341
1361
|
}>>;
|
|
1342
|
-
initialContext: z.ZodArray<z.ZodString, "many">;
|
|
1343
1362
|
tag: z.ZodOptional<z.ZodString>;
|
|
1344
1363
|
llm: z.ZodUnion<[z.ZodObject<{
|
|
1345
1364
|
engine: z.ZodLiteral<"openai">;
|
|
@@ -1380,6 +1399,7 @@ declare module '@scout9/app/types' {
|
|
|
1380
1399
|
engine: "scout9";
|
|
1381
1400
|
}>;
|
|
1382
1401
|
maxLockAttempts: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
1402
|
+
initialContext: z.ZodArray<z.ZodString, "many">;
|
|
1383
1403
|
agents: z.ZodArray<z.ZodObject<{
|
|
1384
1404
|
deployed: z.ZodOptional<z.ZodObject<{
|
|
1385
1405
|
web: z.ZodOptional<z.ZodString>;
|
|
@@ -1418,6 +1438,7 @@ declare module '@scout9/app/types' {
|
|
|
1418
1438
|
context: z.ZodOptional<z.ZodAny>;
|
|
1419
1439
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1420
1440
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1441
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1421
1442
|
}, "strip", z.ZodTypeAny, {
|
|
1422
1443
|
time: string;
|
|
1423
1444
|
id: string;
|
|
@@ -1428,6 +1449,7 @@ declare module '@scout9/app/types' {
|
|
|
1428
1449
|
context?: any;
|
|
1429
1450
|
intent?: string | null | undefined;
|
|
1430
1451
|
intentScore?: number | null | undefined;
|
|
1452
|
+
delayInSeconds?: number | null | undefined;
|
|
1431
1453
|
}, {
|
|
1432
1454
|
time: string;
|
|
1433
1455
|
id: string;
|
|
@@ -1438,6 +1460,7 @@ declare module '@scout9/app/types' {
|
|
|
1438
1460
|
context?: any;
|
|
1439
1461
|
intent?: string | null | undefined;
|
|
1440
1462
|
intentScore?: number | null | undefined;
|
|
1463
|
+
delayInSeconds?: number | null | undefined;
|
|
1441
1464
|
}>, "many">, "many">>;
|
|
1442
1465
|
audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
1443
1466
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1470,6 +1493,7 @@ declare module '@scout9/app/types' {
|
|
|
1470
1493
|
context?: any;
|
|
1471
1494
|
intent?: string | null | undefined;
|
|
1472
1495
|
intentScore?: number | null | undefined;
|
|
1496
|
+
delayInSeconds?: number | null | undefined;
|
|
1473
1497
|
}[][] | undefined;
|
|
1474
1498
|
audios?: any[] | undefined;
|
|
1475
1499
|
}, {
|
|
@@ -1502,6 +1526,7 @@ declare module '@scout9/app/types' {
|
|
|
1502
1526
|
context?: any;
|
|
1503
1527
|
intent?: string | null | undefined;
|
|
1504
1528
|
intentScore?: number | null | undefined;
|
|
1529
|
+
delayInSeconds?: number | null | undefined;
|
|
1505
1530
|
}[][] | undefined;
|
|
1506
1531
|
audios?: any[] | undefined;
|
|
1507
1532
|
}>, "many">;
|
|
@@ -1733,6 +1758,7 @@ declare module '@scout9/app/types' {
|
|
|
1733
1758
|
context?: any;
|
|
1734
1759
|
intent?: string | null | undefined;
|
|
1735
1760
|
intentScore?: number | null | undefined;
|
|
1761
|
+
delayInSeconds?: number | null | undefined;
|
|
1736
1762
|
}[][] | undefined;
|
|
1737
1763
|
audios?: any[] | undefined;
|
|
1738
1764
|
}[];
|
|
@@ -1765,7 +1791,6 @@ declare module '@scout9/app/types' {
|
|
|
1765
1791
|
utterance?: string | undefined;
|
|
1766
1792
|
}[] | undefined;
|
|
1767
1793
|
}[];
|
|
1768
|
-
initialContext: string[];
|
|
1769
1794
|
llm: {
|
|
1770
1795
|
model: string;
|
|
1771
1796
|
engine: "openai";
|
|
@@ -1780,6 +1805,7 @@ declare module '@scout9/app/types' {
|
|
|
1780
1805
|
model: string;
|
|
1781
1806
|
engine: "scout9";
|
|
1782
1807
|
};
|
|
1808
|
+
initialContext: string[];
|
|
1783
1809
|
workflows: {
|
|
1784
1810
|
entity: string;
|
|
1785
1811
|
entities: string[];
|
|
@@ -1828,6 +1854,7 @@ declare module '@scout9/app/types' {
|
|
|
1828
1854
|
context?: any;
|
|
1829
1855
|
intent?: string | null | undefined;
|
|
1830
1856
|
intentScore?: number | null | undefined;
|
|
1857
|
+
delayInSeconds?: number | null | undefined;
|
|
1831
1858
|
}[][] | undefined;
|
|
1832
1859
|
audios?: any[] | undefined;
|
|
1833
1860
|
}[];
|
|
@@ -1860,7 +1887,6 @@ declare module '@scout9/app/types' {
|
|
|
1860
1887
|
utterance?: string | undefined;
|
|
1861
1888
|
}[] | undefined;
|
|
1862
1889
|
}[];
|
|
1863
|
-
initialContext: string[];
|
|
1864
1890
|
llm: {
|
|
1865
1891
|
model: string;
|
|
1866
1892
|
engine: "openai";
|
|
@@ -1875,6 +1901,7 @@ declare module '@scout9/app/types' {
|
|
|
1875
1901
|
model: string;
|
|
1876
1902
|
engine: "scout9";
|
|
1877
1903
|
};
|
|
1904
|
+
initialContext: string[];
|
|
1878
1905
|
workflows: {
|
|
1879
1906
|
entity: string;
|
|
1880
1907
|
entities: string[];
|
|
@@ -2562,6 +2589,7 @@ declare module '@scout9/app/types' {
|
|
|
2562
2589
|
context: z.ZodOptional<z.ZodAny>;
|
|
2563
2590
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2564
2591
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2592
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2565
2593
|
}, "strip", z.ZodTypeAny, {
|
|
2566
2594
|
time: string;
|
|
2567
2595
|
id: string;
|
|
@@ -2572,6 +2600,7 @@ declare module '@scout9/app/types' {
|
|
|
2572
2600
|
context?: any;
|
|
2573
2601
|
intent?: string | null | undefined;
|
|
2574
2602
|
intentScore?: number | null | undefined;
|
|
2603
|
+
delayInSeconds?: number | null | undefined;
|
|
2575
2604
|
}, {
|
|
2576
2605
|
time: string;
|
|
2577
2606
|
id: string;
|
|
@@ -2582,6 +2611,7 @@ declare module '@scout9/app/types' {
|
|
|
2582
2611
|
context?: any;
|
|
2583
2612
|
intent?: string | null | undefined;
|
|
2584
2613
|
intentScore?: number | null | undefined;
|
|
2614
|
+
delayInSeconds?: number | null | undefined;
|
|
2585
2615
|
}>;
|
|
2586
2616
|
export type IMessage = import('zod').infer<typeof MessageSchema>;
|
|
2587
2617
|
export const WorkflowConfigurationSchema: z.ZodObject<{
|
|
@@ -2690,6 +2720,7 @@ declare module '@scout9/app/types' {
|
|
|
2690
2720
|
context: z.ZodOptional<z.ZodAny>;
|
|
2691
2721
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2692
2722
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2723
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2693
2724
|
}, "strip", z.ZodTypeAny, {
|
|
2694
2725
|
time: string;
|
|
2695
2726
|
id: string;
|
|
@@ -2700,6 +2731,7 @@ declare module '@scout9/app/types' {
|
|
|
2700
2731
|
context?: any;
|
|
2701
2732
|
intent?: string | null | undefined;
|
|
2702
2733
|
intentScore?: number | null | undefined;
|
|
2734
|
+
delayInSeconds?: number | null | undefined;
|
|
2703
2735
|
}, {
|
|
2704
2736
|
time: string;
|
|
2705
2737
|
id: string;
|
|
@@ -2710,6 +2742,7 @@ declare module '@scout9/app/types' {
|
|
|
2710
2742
|
context?: any;
|
|
2711
2743
|
intent?: string | null | undefined;
|
|
2712
2744
|
intentScore?: number | null | undefined;
|
|
2745
|
+
delayInSeconds?: number | null | undefined;
|
|
2713
2746
|
}>, "many">;
|
|
2714
2747
|
conversation: z.ZodObject<{
|
|
2715
2748
|
$agent: z.ZodString;
|
|
@@ -2780,6 +2813,7 @@ declare module '@scout9/app/types' {
|
|
|
2780
2813
|
context: z.ZodOptional<z.ZodAny>;
|
|
2781
2814
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2782
2815
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2816
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2783
2817
|
}, "strip", z.ZodTypeAny, {
|
|
2784
2818
|
time: string;
|
|
2785
2819
|
id: string;
|
|
@@ -2790,6 +2824,7 @@ declare module '@scout9/app/types' {
|
|
|
2790
2824
|
context?: any;
|
|
2791
2825
|
intent?: string | null | undefined;
|
|
2792
2826
|
intentScore?: number | null | undefined;
|
|
2827
|
+
delayInSeconds?: number | null | undefined;
|
|
2793
2828
|
}, {
|
|
2794
2829
|
time: string;
|
|
2795
2830
|
id: string;
|
|
@@ -2800,6 +2835,7 @@ declare module '@scout9/app/types' {
|
|
|
2800
2835
|
context?: any;
|
|
2801
2836
|
intent?: string | null | undefined;
|
|
2802
2837
|
intentScore?: number | null | undefined;
|
|
2838
|
+
delayInSeconds?: number | null | undefined;
|
|
2803
2839
|
}>;
|
|
2804
2840
|
agent: z.ZodObject<Omit<{
|
|
2805
2841
|
inactive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2818,6 +2854,7 @@ declare module '@scout9/app/types' {
|
|
|
2818
2854
|
context: z.ZodOptional<z.ZodAny>;
|
|
2819
2855
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2820
2856
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2857
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2821
2858
|
}, "strip", z.ZodTypeAny, {
|
|
2822
2859
|
time: string;
|
|
2823
2860
|
id: string;
|
|
@@ -2828,6 +2865,7 @@ declare module '@scout9/app/types' {
|
|
|
2828
2865
|
context?: any;
|
|
2829
2866
|
intent?: string | null | undefined;
|
|
2830
2867
|
intentScore?: number | null | undefined;
|
|
2868
|
+
delayInSeconds?: number | null | undefined;
|
|
2831
2869
|
}, {
|
|
2832
2870
|
time: string;
|
|
2833
2871
|
id: string;
|
|
@@ -2838,6 +2876,7 @@ declare module '@scout9/app/types' {
|
|
|
2838
2876
|
context?: any;
|
|
2839
2877
|
intent?: string | null | undefined;
|
|
2840
2878
|
intentScore?: number | null | undefined;
|
|
2879
|
+
delayInSeconds?: number | null | undefined;
|
|
2841
2880
|
}>, "many">, "many">>;
|
|
2842
2881
|
audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
2843
2882
|
includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -2978,6 +3017,7 @@ declare module '@scout9/app/types' {
|
|
|
2978
3017
|
context?: any;
|
|
2979
3018
|
intent?: string | null | undefined;
|
|
2980
3019
|
intentScore?: number | null | undefined;
|
|
3020
|
+
delayInSeconds?: number | null | undefined;
|
|
2981
3021
|
};
|
|
2982
3022
|
agent: {
|
|
2983
3023
|
id: string;
|
|
@@ -3051,6 +3091,7 @@ declare module '@scout9/app/types' {
|
|
|
3051
3091
|
context?: any;
|
|
3052
3092
|
intent?: string | null | undefined;
|
|
3053
3093
|
intentScore?: number | null | undefined;
|
|
3094
|
+
delayInSeconds?: number | null | undefined;
|
|
3054
3095
|
}[];
|
|
3055
3096
|
stagnationCount: number;
|
|
3056
3097
|
context?: any;
|
|
@@ -3066,6 +3107,7 @@ declare module '@scout9/app/types' {
|
|
|
3066
3107
|
context?: any;
|
|
3067
3108
|
intent?: string | null | undefined;
|
|
3068
3109
|
intentScore?: number | null | undefined;
|
|
3110
|
+
delayInSeconds?: number | null | undefined;
|
|
3069
3111
|
};
|
|
3070
3112
|
agent: {
|
|
3071
3113
|
id: string;
|
|
@@ -3139,6 +3181,7 @@ declare module '@scout9/app/types' {
|
|
|
3139
3181
|
context?: any;
|
|
3140
3182
|
intent?: string | null | undefined;
|
|
3141
3183
|
intentScore?: number | null | undefined;
|
|
3184
|
+
delayInSeconds?: number | null | undefined;
|
|
3142
3185
|
}[];
|
|
3143
3186
|
stagnationCount: number;
|
|
3144
3187
|
context?: any;
|
|
@@ -3514,6 +3557,7 @@ declare module '@scout9/app/types' {
|
|
|
3514
3557
|
context: z.ZodOptional<z.ZodAny>;
|
|
3515
3558
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3516
3559
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3560
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3517
3561
|
}, "strip", z.ZodTypeAny, {
|
|
3518
3562
|
time: string;
|
|
3519
3563
|
id: string;
|
|
@@ -3524,6 +3568,7 @@ declare module '@scout9/app/types' {
|
|
|
3524
3568
|
context?: any;
|
|
3525
3569
|
intent?: string | null | undefined;
|
|
3526
3570
|
intentScore?: number | null | undefined;
|
|
3571
|
+
delayInSeconds?: number | null | undefined;
|
|
3527
3572
|
}, {
|
|
3528
3573
|
time: string;
|
|
3529
3574
|
id: string;
|
|
@@ -3534,6 +3579,7 @@ declare module '@scout9/app/types' {
|
|
|
3534
3579
|
context?: any;
|
|
3535
3580
|
intent?: string | null | undefined;
|
|
3536
3581
|
intentScore?: number | null | undefined;
|
|
3582
|
+
delayInSeconds?: number | null | undefined;
|
|
3537
3583
|
}>, "many">;
|
|
3538
3584
|
conversation: z.ZodObject<{
|
|
3539
3585
|
$agent: z.ZodString;
|
|
@@ -3604,6 +3650,7 @@ declare module '@scout9/app/types' {
|
|
|
3604
3650
|
context: z.ZodOptional<z.ZodAny>;
|
|
3605
3651
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3606
3652
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3653
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3607
3654
|
}, "strip", z.ZodTypeAny, {
|
|
3608
3655
|
time: string;
|
|
3609
3656
|
id: string;
|
|
@@ -3614,6 +3661,7 @@ declare module '@scout9/app/types' {
|
|
|
3614
3661
|
context?: any;
|
|
3615
3662
|
intent?: string | null | undefined;
|
|
3616
3663
|
intentScore?: number | null | undefined;
|
|
3664
|
+
delayInSeconds?: number | null | undefined;
|
|
3617
3665
|
}, {
|
|
3618
3666
|
time: string;
|
|
3619
3667
|
id: string;
|
|
@@ -3624,6 +3672,7 @@ declare module '@scout9/app/types' {
|
|
|
3624
3672
|
context?: any;
|
|
3625
3673
|
intent?: string | null | undefined;
|
|
3626
3674
|
intentScore?: number | null | undefined;
|
|
3675
|
+
delayInSeconds?: number | null | undefined;
|
|
3627
3676
|
}>;
|
|
3628
3677
|
agent: z.ZodObject<Omit<{
|
|
3629
3678
|
inactive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3642,6 +3691,7 @@ declare module '@scout9/app/types' {
|
|
|
3642
3691
|
context: z.ZodOptional<z.ZodAny>;
|
|
3643
3692
|
intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3644
3693
|
intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3694
|
+
delayInSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3645
3695
|
}, "strip", z.ZodTypeAny, {
|
|
3646
3696
|
time: string;
|
|
3647
3697
|
id: string;
|
|
@@ -3652,6 +3702,7 @@ declare module '@scout9/app/types' {
|
|
|
3652
3702
|
context?: any;
|
|
3653
3703
|
intent?: string | null | undefined;
|
|
3654
3704
|
intentScore?: number | null | undefined;
|
|
3705
|
+
delayInSeconds?: number | null | undefined;
|
|
3655
3706
|
}, {
|
|
3656
3707
|
time: string;
|
|
3657
3708
|
id: string;
|
|
@@ -3662,6 +3713,7 @@ declare module '@scout9/app/types' {
|
|
|
3662
3713
|
context?: any;
|
|
3663
3714
|
intent?: string | null | undefined;
|
|
3664
3715
|
intentScore?: number | null | undefined;
|
|
3716
|
+
delayInSeconds?: number | null | undefined;
|
|
3665
3717
|
}>, "many">, "many">>;
|
|
3666
3718
|
audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
3667
3719
|
includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -3802,6 +3854,7 @@ declare module '@scout9/app/types' {
|
|
|
3802
3854
|
context?: any;
|
|
3803
3855
|
intent?: string | null | undefined;
|
|
3804
3856
|
intentScore?: number | null | undefined;
|
|
3857
|
+
delayInSeconds?: number | null | undefined;
|
|
3805
3858
|
};
|
|
3806
3859
|
agent: {
|
|
3807
3860
|
id: string;
|
|
@@ -3875,6 +3928,7 @@ declare module '@scout9/app/types' {
|
|
|
3875
3928
|
context?: any;
|
|
3876
3929
|
intent?: string | null | undefined;
|
|
3877
3930
|
intentScore?: number | null | undefined;
|
|
3931
|
+
delayInSeconds?: number | null | undefined;
|
|
3878
3932
|
}[];
|
|
3879
3933
|
stagnationCount: number;
|
|
3880
3934
|
context?: any;
|
|
@@ -3890,6 +3944,7 @@ declare module '@scout9/app/types' {
|
|
|
3890
3944
|
context?: any;
|
|
3891
3945
|
intent?: string | null | undefined;
|
|
3892
3946
|
intentScore?: number | null | undefined;
|
|
3947
|
+
delayInSeconds?: number | null | undefined;
|
|
3893
3948
|
};
|
|
3894
3949
|
agent: {
|
|
3895
3950
|
id: string;
|
|
@@ -3963,6 +4018,7 @@ declare module '@scout9/app/types' {
|
|
|
3963
4018
|
context?: any;
|
|
3964
4019
|
intent?: string | null | undefined;
|
|
3965
4020
|
intentScore?: number | null | undefined;
|
|
4021
|
+
delayInSeconds?: number | null | undefined;
|
|
3966
4022
|
}[];
|
|
3967
4023
|
stagnationCount: number;
|
|
3968
4024
|
context?: any;
|
|
@@ -4688,36 +4744,36 @@ declare module '@scout9/app/spirits' {
|
|
|
4688
4744
|
/**
|
|
4689
4745
|
* - used to define generation and extract persona metadata
|
|
4690
4746
|
*/
|
|
4691
|
-
config:
|
|
4692
|
-
conversation:
|
|
4693
|
-
messages: Array<import('@scout9/app').
|
|
4747
|
+
config: any;
|
|
4748
|
+
conversation: any;
|
|
4749
|
+
messages: Array<import('@scout9/app').IMessage>;
|
|
4694
4750
|
/**
|
|
4695
4751
|
* - the message sent by the customer (should exist in messages)
|
|
4696
4752
|
*/
|
|
4697
|
-
message:
|
|
4698
|
-
customer:
|
|
4753
|
+
message: any;
|
|
4754
|
+
customer: any;
|
|
4699
4755
|
context: any;
|
|
4700
4756
|
};
|
|
4701
4757
|
export type ParseOutput = {
|
|
4702
|
-
messages: Array<import('@scout9/app').
|
|
4703
|
-
conversation:
|
|
4704
|
-
message:
|
|
4758
|
+
messages: Array<import('@scout9/app').IMessage>;
|
|
4759
|
+
conversation: any;
|
|
4760
|
+
message: any;
|
|
4705
4761
|
context: any;
|
|
4706
4762
|
};
|
|
4707
4763
|
export type WorkflowOutput = {
|
|
4708
|
-
slots: Array<import('@scout9/app').
|
|
4709
|
-
messages: Array<import('@scout9/app').
|
|
4710
|
-
conversation:
|
|
4764
|
+
slots: Array<import('@scout9/app').IWorkflowResponseSlot>;
|
|
4765
|
+
messages: Array<import('@scout9/app').IMessage>;
|
|
4766
|
+
conversation: any;
|
|
4711
4767
|
context: any;
|
|
4712
4768
|
};
|
|
4713
4769
|
export type GenerateOutput = {
|
|
4714
4770
|
generate: import('@scout9/admin').GenerateResponse | undefined;
|
|
4715
|
-
messages: Array<import('@scout9/app').
|
|
4716
|
-
conversation:
|
|
4771
|
+
messages: Array<import('@scout9/app').IMessage>;
|
|
4772
|
+
conversation: any;
|
|
4717
4773
|
context: any;
|
|
4718
4774
|
};
|
|
4719
4775
|
export type ParseFun = (message: string, language: string | undefined) => Promise<import('@scout9/admin').ParseResponse>;
|
|
4720
|
-
export type WorkflowFun = (event:
|
|
4776
|
+
export type WorkflowFun = (event: any) => Promise<import('@scout9/app').IWorkflowResponse>;
|
|
4721
4777
|
export type GenerateFun = (data: import('@scout9/admin').GenerateRequestOneOf) => Promise<import('@scout9/admin').GenerateResponse>;
|
|
4722
4778
|
export type IdGeneratorFun = (prefix: any) => string;
|
|
4723
4779
|
export type StatusCallback = (message: string, level?: 'info' | 'warn' | 'error' | 'success' | undefined, type?: string | undefined, payload?: any | undefined) => void;
|
|
@@ -4729,13 +4785,13 @@ declare module '@scout9/app/spirits' {
|
|
|
4729
4785
|
progress?: StatusCallback | undefined;
|
|
4730
4786
|
};
|
|
4731
4787
|
export type ConversationEvent = {
|
|
4732
|
-
conversation: Change<import('@scout9/app').
|
|
4788
|
+
conversation: Change<import('@scout9/app').IConversation> & {
|
|
4733
4789
|
forwardNote?: string;
|
|
4734
4790
|
forward?: import('@scout9/app').WorkflowResponseSlot['forward'];
|
|
4735
4791
|
};
|
|
4736
|
-
messages: Change<Array<import('@scout9/app').
|
|
4792
|
+
messages: Change<Array<import('@scout9/app').IMessage>>;
|
|
4737
4793
|
context: Change<Object>;
|
|
4738
|
-
message: Change<import('@scout9/app').
|
|
4794
|
+
message: Change<import('@scout9/app').IMessage>;
|
|
4739
4795
|
};
|
|
4740
4796
|
}
|
|
4741
4797
|
|