@scout9/app 1.0.0-alpha.1.1.1 → 1.0.0-alpha.1.1.3
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/{dev-3b5b4857.cjs → dev-239e0fe6.cjs} +231 -19
- package/dist/{index-5a0f0a1d.cjs → index-6435aa36.cjs} +7 -7
- package/dist/index.cjs +4 -4
- package/dist/{macros-f3e264c7.cjs → macros-f1b93e95.cjs} +50 -28
- package/dist/{multipart-parser-5bd9d0ca.cjs → multipart-parser-f45908f7.cjs} +4 -4
- package/dist/schemas.cjs +2 -1
- package/dist/{spirits-46694b34.cjs → spirits-68f893c3.cjs} +5 -5
- package/dist/spirits.cjs +1 -1
- package/dist/testing-tools.cjs +3 -3
- package/package.json +2 -2
- package/src/core/templates/app.js +1 -1
- package/src/public.d.ts +2 -36
- package/src/runtime/schemas/conversation.js +42 -19
- package/src/testing-tools/dev.js +1 -1
- package/src/testing-tools/message-utils.js +1 -1
- package/src/testing-tools/mocks.js +3 -4
- package/src/testing-tools/spirits.js +4 -4
- package/types/index.d.ts +212 -134
- package/types/index.d.ts.map +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _rollupPluginBabelHelpers = require("./_rollupPluginBabelHelpers-9c73c95c.cjs");
|
|
4
|
-
var spirits = require("./spirits-
|
|
4
|
+
var spirits = require("./spirits-68f893c3.cjs");
|
|
5
5
|
var require$$0$4 = require('util');
|
|
6
6
|
var require$$0$3 = require('stream');
|
|
7
7
|
var require$$1 = require('path');
|
|
@@ -22,7 +22,7 @@ var node_url = require('node:url');
|
|
|
22
22
|
var node_events = require('node:events');
|
|
23
23
|
var Stream = require('node:stream');
|
|
24
24
|
var node_string_decoder = require('node:string_decoder');
|
|
25
|
-
var macros = require("./macros-
|
|
25
|
+
var macros = require("./macros-f1b93e95.cjs");
|
|
26
26
|
var readline = require('node:readline');
|
|
27
27
|
var process$2 = require('node:process');
|
|
28
28
|
var node_os = require('node:os');
|
|
@@ -25428,8 +25428,8 @@ common.createRequestFunction = createRequestFunction;
|
|
|
25428
25428
|
Object.defineProperty(exports, "__esModule", {
|
|
25429
25429
|
value: true
|
|
25430
25430
|
});
|
|
25431
|
-
exports.
|
|
25432
|
-
exports.Scout9Api = exports.Scout9ApiGenerated = exports.Scout9ApiFactory = exports.Scout9ApiFp = exports.Scout9ApiAxiosParamCreator = exports.NoopApi = exports.NoopApiFactory = exports.NoopApiFp = exports.NoopApiAxiosParamCreator = exports.WorkflowResponseSlotForwardOneOfModeEnum = exports.PurposeEnum = exports.PmtTransformResponseTypeEnum = void 0;
|
|
25431
|
+
exports.LlmConfigOneOf6AllOfEngineEnum = exports.LlmConfigOneOf6ModelEnum = exports.LlmConfigOneOf6EngineEnum = exports.LlmConfigOneOf5AllOfModelEnum = exports.LlmConfigOneOf5AllOfEngineEnum = exports.LlmConfigOneOf5ModelEnum = exports.LlmConfigOneOf5EngineEnum = exports.LlmConfigOneOf4AllOfModelEnum = exports.LlmConfigOneOf4AllOfEngineEnum = exports.LlmConfigOneOf4ModelEnum = exports.LlmConfigOneOf4EngineEnum = exports.LlmConfigOneOf3AllOfModelEnum = exports.LlmConfigOneOf3AllOfEngineEnum = exports.LlmConfigOneOf3ModelEnum = exports.LlmConfigOneOf3EngineEnum = exports.LlmConfigOneOf2AllOfModelEnum = exports.LlmConfigOneOf2AllOfEngineEnum = exports.LlmConfigOneOf2ModelEnum = exports.LlmConfigOneOf2EngineEnum = exports.LlmConfigOneOf1AllOfModelEnum = exports.LlmConfigOneOf1AllOfEngineEnum = exports.LlmConfigOneOf1ModelEnum = exports.LlmConfigOneOf1EngineEnum = exports.LlmConfigOneOfModelEnum = exports.LlmConfigOneOfEngineEnum = exports.ListConversationsResponseInnerIngressEnum = exports.ListConversationsResponseInnerLockCodeEnum = exports.ListApiOperationsResponseInnerMethodEnum = exports.GetApiOperationResponseMethodEnum = exports.ForwardRequestLatestMessageRoleEnum = exports.ForwardRequestForwardOneOfModeEnum = exports.ExistenceOperator = exports.EqualityOperator = exports.ConversationWithIdIngressEnum = exports.ConversationWithIdLockCodeEnum = exports.ConversationUpdateRequestIngressEnum = exports.ConversationUpdateRequestLockCodeEnum = exports.ConversationGetResponseIngressEnum = exports.ConversationGetResponseLockCodeEnum = exports.ConversationCreateRequestIngressEnum = exports.ConversationCreateRequestLockCodeEnum = exports.ConversationContextFieldConditionOperatorEnum = exports.ConversationChannelPropsChannelResolutionPathEnum = exports.ConversationChannel = exports.ConversationBaseIngressEnum = exports.ConversationBaseLockCodeEnum = exports.ConversationAnticipateTypeEnum = exports.ConversationIngressEnum = exports.ConversationLockCodeEnum = exports.ApiOperationMethodEnum = void 0;
|
|
25432
|
+
exports.Scout9Api = exports.Scout9ApiGenerated = exports.Scout9ApiFactory = exports.Scout9ApiFp = exports.Scout9ApiAxiosParamCreator = exports.NoopApi = exports.NoopApiFactory = exports.NoopApiFp = exports.NoopApiAxiosParamCreator = exports.WorkflowResponseSlotForwardOneOfModeEnum = exports.ScheduledConversationGroupIngressEnum = exports.ScheduledConversationGroupLockCodeEnum = exports.ScheduledConversationIngressEnum = exports.ScheduledConversationLockCodeEnum = exports.ScheduleUpdateRequestIngressEnum = exports.ScheduleUpdateRequestLockCodeEnum = exports.ScheduleGroupUpdateRequestIngressEnum = exports.ScheduleGroupUpdateRequestLockCodeEnum = exports.ScheduleGroupGetResponseIngressEnum = exports.ScheduleGroupGetResponseLockCodeEnum = exports.ScheduleGroupCreateRequestIngressEnum = exports.ScheduleGroupCreateRequestLockCodeEnum = exports.ScheduleGetResponseIngressEnum = exports.ScheduleGetResponseLockCodeEnum = exports.ScheduleCreateRequestIngressEnum = exports.ScheduleCreateRequestLockCodeEnum = exports.PurposeEnum = exports.PmtTransformResponseTypeEnum = exports.PmtConfigModelEnum = exports.PmtConfigEngineEnum = exports.MessageGetResponseInnerRoleEnum = exports.MessageCreateRequestRoleEnum = exports.MessageBaseRoleEnum = exports.MessageRoleEnum = exports.MacroResultTypeEnum = exports.MacroDoesResultTypeEnum = exports.MacroDoesInputRoleEnum = exports.MacroDidResultTypeEnum = exports.MacroContextResultTypeEnum = exports.LlmConfigOneOfAllOfModelEnum = exports.LlmConfigOneOfAllOfEngineEnum = exports.LlmConfigOneOf7AllOfEngineEnum = exports.LlmConfigOneOf7EngineEnum = exports.LlmConfigOneOf6AllOfModelEnum = void 0;
|
|
25433
25433
|
const axios_1$1 = __importDefault(axios_1);
|
|
25434
25434
|
// Some imports not used depending on template conditions
|
|
25435
25435
|
// @ts-ignore
|
|
@@ -25443,6 +25443,59 @@ common.createRequestFunction = createRequestFunction;
|
|
|
25443
25443
|
Delete: 'delete',
|
|
25444
25444
|
Patch: 'patch'
|
|
25445
25445
|
};
|
|
25446
|
+
exports.ConversationLockCodeEnum = {
|
|
25447
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25448
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25449
|
+
RuntimeError: 'runtime_error',
|
|
25450
|
+
ManualMode: 'manual_mode',
|
|
25451
|
+
PolicyBlock: 'policy_block'
|
|
25452
|
+
};
|
|
25453
|
+
exports.ConversationIngressEnum = {
|
|
25454
|
+
Auto: 'auto',
|
|
25455
|
+
Manual: 'manual',
|
|
25456
|
+
App: 'app',
|
|
25457
|
+
Webhook: 'webhook'
|
|
25458
|
+
};
|
|
25459
|
+
exports.ConversationAnticipateTypeEnum = {
|
|
25460
|
+
Did: 'did',
|
|
25461
|
+
Literal: 'literal',
|
|
25462
|
+
Context: 'context'
|
|
25463
|
+
};
|
|
25464
|
+
exports.ConversationBaseLockCodeEnum = {
|
|
25465
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25466
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25467
|
+
RuntimeError: 'runtime_error',
|
|
25468
|
+
ManualMode: 'manual_mode',
|
|
25469
|
+
PolicyBlock: 'policy_block'
|
|
25470
|
+
};
|
|
25471
|
+
exports.ConversationBaseIngressEnum = {
|
|
25472
|
+
Auto: 'auto',
|
|
25473
|
+
Manual: 'manual',
|
|
25474
|
+
App: 'app',
|
|
25475
|
+
Webhook: 'webhook'
|
|
25476
|
+
};
|
|
25477
|
+
/**
|
|
25478
|
+
* Canonical channel that initiated and should continue the customer conversation.
|
|
25479
|
+
* @export
|
|
25480
|
+
* @enum {string}
|
|
25481
|
+
*/
|
|
25482
|
+
exports.ConversationChannel = {
|
|
25483
|
+
Web: 'web',
|
|
25484
|
+
DemoPhoneTest: 'demo_phone_test',
|
|
25485
|
+
SmsPhone: 'sms_phone',
|
|
25486
|
+
Outlook: 'outlook',
|
|
25487
|
+
Gmail: 'gmail',
|
|
25488
|
+
Iphone: 'iphone',
|
|
25489
|
+
Android: 'android',
|
|
25490
|
+
Teams: 'teams',
|
|
25491
|
+
Discord: 'discord',
|
|
25492
|
+
Whatsapp: 'whatsapp'
|
|
25493
|
+
};
|
|
25494
|
+
exports.ConversationChannelPropsChannelResolutionPathEnum = {
|
|
25495
|
+
Production: 'twilio_production',
|
|
25496
|
+
LegacyPmt: 'twilio_legacy_pmt',
|
|
25497
|
+
FreeBridge: 'twilio_free_bridge'
|
|
25498
|
+
};
|
|
25446
25499
|
exports.ConversationContextFieldConditionOperatorEnum = {
|
|
25447
25500
|
Eq: 'eq',
|
|
25448
25501
|
Equal: 'equal',
|
|
@@ -25467,15 +25520,57 @@ common.createRequestFunction = createRequestFunction;
|
|
|
25467
25520
|
StartsWith: 'startsWith',
|
|
25468
25521
|
EndsWith: 'endsWith'
|
|
25469
25522
|
};
|
|
25470
|
-
|
|
25471
|
-
|
|
25472
|
-
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
|
|
25477
|
-
|
|
25478
|
-
|
|
25523
|
+
exports.ConversationCreateRequestLockCodeEnum = {
|
|
25524
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25525
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25526
|
+
RuntimeError: 'runtime_error',
|
|
25527
|
+
ManualMode: 'manual_mode',
|
|
25528
|
+
PolicyBlock: 'policy_block'
|
|
25529
|
+
};
|
|
25530
|
+
exports.ConversationCreateRequestIngressEnum = {
|
|
25531
|
+
Auto: 'auto',
|
|
25532
|
+
Manual: 'manual',
|
|
25533
|
+
App: 'app',
|
|
25534
|
+
Webhook: 'webhook'
|
|
25535
|
+
};
|
|
25536
|
+
exports.ConversationGetResponseLockCodeEnum = {
|
|
25537
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25538
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25539
|
+
RuntimeError: 'runtime_error',
|
|
25540
|
+
ManualMode: 'manual_mode',
|
|
25541
|
+
PolicyBlock: 'policy_block'
|
|
25542
|
+
};
|
|
25543
|
+
exports.ConversationGetResponseIngressEnum = {
|
|
25544
|
+
Auto: 'auto',
|
|
25545
|
+
Manual: 'manual',
|
|
25546
|
+
App: 'app',
|
|
25547
|
+
Webhook: 'webhook'
|
|
25548
|
+
};
|
|
25549
|
+
exports.ConversationUpdateRequestLockCodeEnum = {
|
|
25550
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25551
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25552
|
+
RuntimeError: 'runtime_error',
|
|
25553
|
+
ManualMode: 'manual_mode',
|
|
25554
|
+
PolicyBlock: 'policy_block'
|
|
25555
|
+
};
|
|
25556
|
+
exports.ConversationUpdateRequestIngressEnum = {
|
|
25557
|
+
Auto: 'auto',
|
|
25558
|
+
Manual: 'manual',
|
|
25559
|
+
App: 'app',
|
|
25560
|
+
Webhook: 'webhook'
|
|
25561
|
+
};
|
|
25562
|
+
exports.ConversationWithIdLockCodeEnum = {
|
|
25563
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25564
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25565
|
+
RuntimeError: 'runtime_error',
|
|
25566
|
+
ManualMode: 'manual_mode',
|
|
25567
|
+
PolicyBlock: 'policy_block'
|
|
25568
|
+
};
|
|
25569
|
+
exports.ConversationWithIdIngressEnum = {
|
|
25570
|
+
Auto: 'auto',
|
|
25571
|
+
Manual: 'manual',
|
|
25572
|
+
App: 'app',
|
|
25573
|
+
Webhook: 'webhook'
|
|
25479
25574
|
};
|
|
25480
25575
|
/**
|
|
25481
25576
|
*
|
|
@@ -25531,6 +25626,19 @@ common.createRequestFunction = createRequestFunction;
|
|
|
25531
25626
|
Delete: 'delete',
|
|
25532
25627
|
Patch: 'patch'
|
|
25533
25628
|
};
|
|
25629
|
+
exports.ListConversationsResponseInnerLockCodeEnum = {
|
|
25630
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25631
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25632
|
+
RuntimeError: 'runtime_error',
|
|
25633
|
+
ManualMode: 'manual_mode',
|
|
25634
|
+
PolicyBlock: 'policy_block'
|
|
25635
|
+
};
|
|
25636
|
+
exports.ListConversationsResponseInnerIngressEnum = {
|
|
25637
|
+
Auto: 'auto',
|
|
25638
|
+
Manual: 'manual',
|
|
25639
|
+
App: 'app',
|
|
25640
|
+
Webhook: 'webhook'
|
|
25641
|
+
};
|
|
25534
25642
|
exports.LlmConfigOneOfEngineEnum = {
|
|
25535
25643
|
Openai: 'openai'
|
|
25536
25644
|
};
|
|
@@ -25709,6 +25817,110 @@ common.createRequestFunction = createRequestFunction;
|
|
|
25709
25817
|
AgentAudio: 'agent-audio',
|
|
25710
25818
|
AgentTranscript: 'agent-transcript'
|
|
25711
25819
|
};
|
|
25820
|
+
exports.ScheduleCreateRequestLockCodeEnum = {
|
|
25821
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25822
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25823
|
+
RuntimeError: 'runtime_error',
|
|
25824
|
+
ManualMode: 'manual_mode',
|
|
25825
|
+
PolicyBlock: 'policy_block'
|
|
25826
|
+
};
|
|
25827
|
+
exports.ScheduleCreateRequestIngressEnum = {
|
|
25828
|
+
Auto: 'auto',
|
|
25829
|
+
Manual: 'manual',
|
|
25830
|
+
App: 'app',
|
|
25831
|
+
Webhook: 'webhook'
|
|
25832
|
+
};
|
|
25833
|
+
exports.ScheduleGetResponseLockCodeEnum = {
|
|
25834
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25835
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25836
|
+
RuntimeError: 'runtime_error',
|
|
25837
|
+
ManualMode: 'manual_mode',
|
|
25838
|
+
PolicyBlock: 'policy_block'
|
|
25839
|
+
};
|
|
25840
|
+
exports.ScheduleGetResponseIngressEnum = {
|
|
25841
|
+
Auto: 'auto',
|
|
25842
|
+
Manual: 'manual',
|
|
25843
|
+
App: 'app',
|
|
25844
|
+
Webhook: 'webhook'
|
|
25845
|
+
};
|
|
25846
|
+
exports.ScheduleGroupCreateRequestLockCodeEnum = {
|
|
25847
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25848
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25849
|
+
RuntimeError: 'runtime_error',
|
|
25850
|
+
ManualMode: 'manual_mode',
|
|
25851
|
+
PolicyBlock: 'policy_block'
|
|
25852
|
+
};
|
|
25853
|
+
exports.ScheduleGroupCreateRequestIngressEnum = {
|
|
25854
|
+
Auto: 'auto',
|
|
25855
|
+
Manual: 'manual',
|
|
25856
|
+
App: 'app',
|
|
25857
|
+
Webhook: 'webhook'
|
|
25858
|
+
};
|
|
25859
|
+
exports.ScheduleGroupGetResponseLockCodeEnum = {
|
|
25860
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25861
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25862
|
+
RuntimeError: 'runtime_error',
|
|
25863
|
+
ManualMode: 'manual_mode',
|
|
25864
|
+
PolicyBlock: 'policy_block'
|
|
25865
|
+
};
|
|
25866
|
+
exports.ScheduleGroupGetResponseIngressEnum = {
|
|
25867
|
+
Auto: 'auto',
|
|
25868
|
+
Manual: 'manual',
|
|
25869
|
+
App: 'app',
|
|
25870
|
+
Webhook: 'webhook'
|
|
25871
|
+
};
|
|
25872
|
+
exports.ScheduleGroupUpdateRequestLockCodeEnum = {
|
|
25873
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25874
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25875
|
+
RuntimeError: 'runtime_error',
|
|
25876
|
+
ManualMode: 'manual_mode',
|
|
25877
|
+
PolicyBlock: 'policy_block'
|
|
25878
|
+
};
|
|
25879
|
+
exports.ScheduleGroupUpdateRequestIngressEnum = {
|
|
25880
|
+
Auto: 'auto',
|
|
25881
|
+
Manual: 'manual',
|
|
25882
|
+
App: 'app',
|
|
25883
|
+
Webhook: 'webhook'
|
|
25884
|
+
};
|
|
25885
|
+
exports.ScheduleUpdateRequestLockCodeEnum = {
|
|
25886
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25887
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25888
|
+
RuntimeError: 'runtime_error',
|
|
25889
|
+
ManualMode: 'manual_mode',
|
|
25890
|
+
PolicyBlock: 'policy_block'
|
|
25891
|
+
};
|
|
25892
|
+
exports.ScheduleUpdateRequestIngressEnum = {
|
|
25893
|
+
Auto: 'auto',
|
|
25894
|
+
Manual: 'manual',
|
|
25895
|
+
App: 'app',
|
|
25896
|
+
Webhook: 'webhook'
|
|
25897
|
+
};
|
|
25898
|
+
exports.ScheduledConversationLockCodeEnum = {
|
|
25899
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25900
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25901
|
+
RuntimeError: 'runtime_error',
|
|
25902
|
+
ManualMode: 'manual_mode',
|
|
25903
|
+
PolicyBlock: 'policy_block'
|
|
25904
|
+
};
|
|
25905
|
+
exports.ScheduledConversationIngressEnum = {
|
|
25906
|
+
Auto: 'auto',
|
|
25907
|
+
Manual: 'manual',
|
|
25908
|
+
App: 'app',
|
|
25909
|
+
Webhook: 'webhook'
|
|
25910
|
+
};
|
|
25911
|
+
exports.ScheduledConversationGroupLockCodeEnum = {
|
|
25912
|
+
WorkflowStagnation: 'workflow_stagnation',
|
|
25913
|
+
MaxLockAttempts: 'max_lock_attempts',
|
|
25914
|
+
RuntimeError: 'runtime_error',
|
|
25915
|
+
ManualMode: 'manual_mode',
|
|
25916
|
+
PolicyBlock: 'policy_block'
|
|
25917
|
+
};
|
|
25918
|
+
exports.ScheduledConversationGroupIngressEnum = {
|
|
25919
|
+
Auto: 'auto',
|
|
25920
|
+
Manual: 'manual',
|
|
25921
|
+
App: 'app',
|
|
25922
|
+
Webhook: 'webhook'
|
|
25923
|
+
};
|
|
25712
25924
|
exports.WorkflowResponseSlotForwardOneOfModeEnum = {
|
|
25713
25925
|
AfterReply: 'after-reply',
|
|
25714
25926
|
Immediately: 'immediately'
|
|
@@ -30312,7 +30524,7 @@ common.createRequestFunction = createRequestFunction;
|
|
|
30312
30524
|
var configuration = {};
|
|
30313
30525
|
|
|
30314
30526
|
var name$1 = "@scout9/admin";
|
|
30315
|
-
var version$2 = "1.0.0-alpha.0.0.
|
|
30527
|
+
var version$2 = "1.0.0-alpha.0.0.70";
|
|
30316
30528
|
var description$1 = "";
|
|
30317
30529
|
var main$2 = "./build/index.js";
|
|
30318
30530
|
var types$1 = "./build/index.d.ts";
|
|
@@ -35377,7 +35589,7 @@ function _loadUserPackageJson() {
|
|
|
35377
35589
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
35378
35590
|
_context2.t0 = JSON;
|
|
35379
35591
|
_context2.next = 10;
|
|
35380
|
-
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('dev-
|
|
35592
|
+
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('dev-239e0fe6.js', document.baseURI).href))), 'utf-8');
|
|
35381
35593
|
case 10:
|
|
35382
35594
|
_context2.t1 = _context2.sent;
|
|
35383
35595
|
pkg = _context2.t0.parse.call(_context2.t0, _context2.t1);
|
|
@@ -38261,14 +38473,14 @@ var createMockMessage = function createMockMessage(content) {
|
|
|
38261
38473
|
};
|
|
38262
38474
|
|
|
38263
38475
|
/**
|
|
38264
|
-
* @param {import('@scout9/app').Conversation['
|
|
38476
|
+
* @param {import('@scout9/app').Conversation['channel']} [channel]
|
|
38265
38477
|
* @param {string} [$agent]
|
|
38266
38478
|
* @param {string} [$customer]
|
|
38267
38479
|
* @param {string} [$id]
|
|
38268
38480
|
* @returns {import('@scout9/app').Conversation}
|
|
38269
38481
|
*/
|
|
38270
38482
|
var createMockConversation = function createMockConversation() {
|
|
38271
|
-
var
|
|
38483
|
+
var channel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'sms_phone';
|
|
38272
38484
|
var $agent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
38273
38485
|
var $customer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default';
|
|
38274
38486
|
var $id = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'default';
|
|
@@ -38276,7 +38488,7 @@ var createMockConversation = function createMockConversation() {
|
|
|
38276
38488
|
$id: $id,
|
|
38277
38489
|
$agent: $agent,
|
|
38278
38490
|
$customer: $customer,
|
|
38279
|
-
|
|
38491
|
+
channel: channel
|
|
38280
38492
|
};
|
|
38281
38493
|
};
|
|
38282
38494
|
|
|
@@ -38876,7 +39088,7 @@ var Scout9Test = /*#__PURE__*/function () {
|
|
|
38876
39088
|
return _context7.abrupt("return", _rollupPluginBabelHelpers._classPrivateFieldGet(this, _api).generate({
|
|
38877
39089
|
convo: _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({
|
|
38878
39090
|
$customer: this.customer.id,
|
|
38879
|
-
|
|
39091
|
+
channel: this.conversation.channel,
|
|
38880
39092
|
initialContexts: this.conversation.initialContexts || []
|
|
38881
39093
|
}, conversation), {}, {
|
|
38882
39094
|
$agent: persona
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _rollupPluginBabelHelpers = require("./_rollupPluginBabelHelpers-9c73c95c.cjs");
|
|
4
|
-
var dev = require("./dev-
|
|
5
|
-
var macros = require("./macros-
|
|
6
|
-
var spirits = require("./spirits-
|
|
4
|
+
var dev = require("./dev-239e0fe6.cjs");
|
|
5
|
+
var macros = require("./macros-f1b93e95.cjs");
|
|
6
|
+
var spirits = require("./spirits-68f893c3.cjs");
|
|
7
7
|
var require$$0 = require('fs');
|
|
8
8
|
var require$$2$1 = require('events');
|
|
9
9
|
var require$$1 = require('path');
|
|
@@ -29484,7 +29484,7 @@ class Body {
|
|
|
29484
29484
|
}
|
|
29485
29485
|
const {
|
|
29486
29486
|
toFormData
|
|
29487
|
-
} = await Promise.resolve().then(function () { return require("./multipart-parser-
|
|
29487
|
+
} = await Promise.resolve().then(function () { return require("./multipart-parser-f45908f7.cjs"); });
|
|
29488
29488
|
return toFormData(this.body, ct);
|
|
29489
29489
|
}
|
|
29490
29490
|
|
|
@@ -41885,7 +41885,7 @@ function _loadUserPackageJson() {
|
|
|
41885
41885
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
41886
41886
|
_context.t0 = JSON;
|
|
41887
41887
|
_context.next = 10;
|
|
41888
|
-
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
41888
|
+
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-6435aa36.js', document.baseURI).href))), 'utf-8');
|
|
41889
41889
|
case 10:
|
|
41890
41890
|
_context.t1 = _context.sent;
|
|
41891
41891
|
pkg = _context.t0.parse.call(_context.t0, _context.t1);
|
|
@@ -43177,7 +43177,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43177
43177
|
return ProjectFiles;
|
|
43178
43178
|
}();
|
|
43179
43179
|
|
|
43180
|
-
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
43180
|
+
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-6435aa36.js', document.baseURI).href)));
|
|
43181
43181
|
var __dirname$1 = path__default["default"].dirname(__filename$1);
|
|
43182
43182
|
function zipDirectory(source, out) {
|
|
43183
43183
|
var archive = archiver$1('tar', {
|
|
@@ -43392,7 +43392,7 @@ function _buildApp() {
|
|
|
43392
43392
|
case 11:
|
|
43393
43393
|
_context4.t0 = JSON;
|
|
43394
43394
|
_context4.next = 14;
|
|
43395
|
-
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
43395
|
+
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-6435aa36.js', document.baseURI).href))), 'utf-8');
|
|
43396
43396
|
case 14:
|
|
43397
43397
|
_context4.t1 = _context4.sent;
|
|
43398
43398
|
packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
package/dist/index.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require("./index-
|
|
6
|
-
var dev = require("./dev-
|
|
5
|
+
var index = require("./index-6435aa36.cjs");
|
|
6
|
+
var dev = require("./dev-239e0fe6.cjs");
|
|
7
7
|
require("./_rollupPluginBabelHelpers-9c73c95c.cjs");
|
|
8
|
-
require("./macros-
|
|
9
|
-
require("./spirits-
|
|
8
|
+
require("./macros-f1b93e95.cjs");
|
|
9
|
+
require("./spirits-68f893c3.cjs");
|
|
10
10
|
require('fs');
|
|
11
11
|
require('events');
|
|
12
12
|
require('path');
|
|
@@ -4207,55 +4207,76 @@ var ConversationAnticipateSchema = z.object({
|
|
|
4207
4207
|
description: 'For literal keywords, this map helps point which slot the keyword matches to'
|
|
4208
4208
|
}).optional()
|
|
4209
4209
|
});
|
|
4210
|
+
var ConversationChannelPropsSchema = z.object({
|
|
4211
|
+
subject: z.string({
|
|
4212
|
+
description: 'Subject line for email-style channels such as Gmail and Outlook'
|
|
4213
|
+
}).optional(),
|
|
4214
|
+
platformEmailThreadId: z.string({
|
|
4215
|
+
description: 'Provider thread id used to sync Gmail/Outlook channel messages with this conversation'
|
|
4216
|
+
}).optional(),
|
|
4217
|
+
smsMessageSid: z.string({
|
|
4218
|
+
description: 'Twilio message sid that initiated this conversation'
|
|
4219
|
+
}).optional(),
|
|
4220
|
+
channelResolutionPath: z["enum"](['twilio_production', 'twilio_legacy_pmt', 'twilio_free_bridge'], {
|
|
4221
|
+
description: 'Persisted channel-resolution path used for the current conversation'
|
|
4222
|
+
}).optional()
|
|
4223
|
+
}).catchall(z.any());
|
|
4210
4224
|
var ConversationSchema = z.object({
|
|
4211
|
-
$id: zId('Conversation ID',
|
|
4225
|
+
$id: zId('Conversation ID', {
|
|
4212
4226
|
description: 'Conversation unique id'
|
|
4213
|
-
})),
|
|
4214
|
-
$agent: zId('Conversation Agent ID',
|
|
4215
|
-
description: '
|
|
4216
|
-
})
|
|
4217
|
-
$customer: zId('Conversation Customer ID',
|
|
4227
|
+
}).optional(),
|
|
4228
|
+
$agent: zId('Conversation Agent ID', {
|
|
4229
|
+
description: 'The user id assigned to this conversation'
|
|
4230
|
+
}),
|
|
4231
|
+
$customer: zId('Conversation Customer ID', {
|
|
4218
4232
|
description: 'Customer this conversation is with'
|
|
4219
|
-
})
|
|
4233
|
+
}),
|
|
4220
4234
|
initialContexts: z.array(z.string(), {
|
|
4221
4235
|
description: 'Initial contexts to load when starting the conversation'
|
|
4222
4236
|
}).optional(),
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
subject: z.string({
|
|
4226
|
-
description: 'HTML Subject of the conversation'
|
|
4227
|
-
}).optional(),
|
|
4228
|
-
platformEmailThreadId: z.string({
|
|
4229
|
-
description: 'Used to sync email messages with the conversation'
|
|
4230
|
-
}).optional()
|
|
4231
|
-
}).optional(),
|
|
4237
|
+
channel: z["enum"](['web', 'demo_phone_test', 'sms_phone', 'outlook', 'gmail', 'iphone', 'android', 'teams', 'discord', 'whatsapp']),
|
|
4238
|
+
channelProps: ConversationChannelPropsSchema.optional(),
|
|
4232
4239
|
locked: z["boolean"]({
|
|
4233
|
-
description: 'Whether the conversation
|
|
4240
|
+
description: 'Whether automated replies are locked and the conversation requires a policy outcome or manual intervention'
|
|
4234
4241
|
}).optional().nullable(),
|
|
4242
|
+
lockCode: z["enum"](['workflow_stagnation', 'max_lock_attempts', 'runtime_error', 'manual_mode', 'policy_block'], {
|
|
4243
|
+
description: 'Machine-readable lock reason'
|
|
4244
|
+
}).optional(),
|
|
4235
4245
|
lockedReason: z.string({
|
|
4236
|
-
description: '
|
|
4246
|
+
description: 'Human-readable locked reason'
|
|
4237
4247
|
}).optional().nullable(),
|
|
4238
4248
|
lockAttempts: z.number({
|
|
4239
|
-
description: 'Number
|
|
4249
|
+
description: 'Number of consecutive workflow/context no-progress attempts'
|
|
4240
4250
|
}).optional().nullable(),
|
|
4241
4251
|
forwardedTo: z.string({
|
|
4242
|
-
description: '
|
|
4252
|
+
description: 'Contact that received a forward handoff'
|
|
4243
4253
|
}).optional().nullable(),
|
|
4244
4254
|
forwarded: z.string({
|
|
4245
|
-
description: '
|
|
4255
|
+
description: 'ISO 8601 datetime string for when the conversation was forwarded'
|
|
4246
4256
|
}).optional().nullable(),
|
|
4247
|
-
forwardNote: z.string(
|
|
4257
|
+
forwardNote: z.string({
|
|
4258
|
+
description: 'Operator or workflow note attached to the forward'
|
|
4259
|
+
}).optional().nullable(),
|
|
4260
|
+
initiated: z.string({
|
|
4261
|
+
description: 'ISO 8601 datetime string for when this conversation was initiated'
|
|
4262
|
+
}).optional(),
|
|
4248
4263
|
intent: z.string({
|
|
4249
|
-
description: 'Detected intent
|
|
4264
|
+
description: 'Detected intent attached at conversation start or first customer message'
|
|
4250
4265
|
}).optional().nullable(),
|
|
4251
4266
|
intentScore: z.number({
|
|
4252
|
-
description: 'Confidence score
|
|
4267
|
+
description: 'Confidence score for the detected intent'
|
|
4253
4268
|
}).optional().nullable(),
|
|
4269
|
+
read: z.string({
|
|
4270
|
+
description: 'ISO 8601 datetime string for when the account user read this conversation in the app'
|
|
4271
|
+
}).optional(),
|
|
4272
|
+
metadata: z.record(z.any(), {
|
|
4273
|
+
description: 'Server-assigned conversation metadata'
|
|
4274
|
+
}).optional(),
|
|
4254
4275
|
anticipate: ConversationAnticipateSchema.optional(),
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4276
|
+
command: CommandSchema.optional(),
|
|
4277
|
+
ingress: z["enum"](['auto', 'manual', 'app', 'webhook'], {
|
|
4278
|
+
description: 'Overrides the Persona Model ingress mode for this conversation'
|
|
4279
|
+
}).optional()
|
|
4259
4280
|
});
|
|
4260
4281
|
|
|
4261
4282
|
var ForwardSchema = z.union([z["boolean"](), z.string(), z.object({
|
|
@@ -4683,6 +4704,7 @@ exports.CompletionUsageSchema = CompletionUsageSchema;
|
|
|
4683
4704
|
exports.ContextExampleSchema = ContextExampleSchema;
|
|
4684
4705
|
exports.ContextExampleWithTrainingDataSchema = ContextExampleWithTrainingDataSchema;
|
|
4685
4706
|
exports.ConversationAnticipateSchema = ConversationAnticipateSchema;
|
|
4707
|
+
exports.ConversationChannelPropsSchema = ConversationChannelPropsSchema;
|
|
4686
4708
|
exports.ConversationContext = ConversationContext;
|
|
4687
4709
|
exports.ConversationSchema = ConversationSchema;
|
|
4688
4710
|
exports.CustomerSchema = CustomerSchema;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
require('node:fs');
|
|
4
4
|
require('node:path');
|
|
5
|
-
var index = require("./index-
|
|
5
|
+
var index = require("./index-6435aa36.cjs");
|
|
6
6
|
require("./_rollupPluginBabelHelpers-9c73c95c.cjs");
|
|
7
|
-
require("./dev-
|
|
8
|
-
require("./spirits-
|
|
7
|
+
require("./dev-239e0fe6.cjs");
|
|
8
|
+
require("./spirits-68f893c3.cjs");
|
|
9
9
|
require('util');
|
|
10
10
|
require('stream');
|
|
11
11
|
require('path');
|
|
@@ -24,7 +24,7 @@ require('node:url');
|
|
|
24
24
|
require('node:events');
|
|
25
25
|
require('node:stream');
|
|
26
26
|
require('node:string_decoder');
|
|
27
|
-
require("./macros-
|
|
27
|
+
require("./macros-f1b93e95.cjs");
|
|
28
28
|
require('node:readline');
|
|
29
29
|
require('node:process');
|
|
30
30
|
require('node:os');
|
package/dist/schemas.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var macros = require("./macros-
|
|
5
|
+
var macros = require("./macros-f1b93e95.cjs");
|
|
6
6
|
require("./_rollupPluginBabelHelpers-9c73c95c.cjs");
|
|
7
7
|
|
|
8
8
|
|
|
@@ -17,6 +17,7 @@ exports.CompletionUsageSchema = macros.CompletionUsageSchema;
|
|
|
17
17
|
exports.ContextExampleSchema = macros.ContextExampleSchema;
|
|
18
18
|
exports.ContextExampleWithTrainingDataSchema = macros.ContextExampleWithTrainingDataSchema;
|
|
19
19
|
exports.ConversationAnticipateSchema = macros.ConversationAnticipateSchema;
|
|
20
|
+
exports.ConversationChannelPropsSchema = macros.ConversationChannelPropsSchema;
|
|
20
21
|
exports.ConversationContext = macros.ConversationContext;
|
|
21
22
|
exports.ConversationSchema = macros.ConversationSchema;
|
|
22
23
|
exports.CustomerSchema = macros.CustomerSchema;
|
|
@@ -4966,7 +4966,7 @@ var Spirits = {
|
|
|
4966
4966
|
*/
|
|
4967
4967
|
customer: function () {
|
|
4968
4968
|
var _customer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2(input) {
|
|
4969
|
-
var _contextualizerRespon, _recentUserMessage;
|
|
4969
|
+
var _contextualizerRespon, _recentUserMessage, _forwardNote2;
|
|
4970
4970
|
var onError,
|
|
4971
4971
|
customer,
|
|
4972
4972
|
config,
|
|
@@ -5460,7 +5460,7 @@ var Spirits = {
|
|
|
5460
5460
|
}).join(', ')));
|
|
5461
5461
|
case 46:
|
|
5462
5462
|
// Normalize existing message times ONCE at the start
|
|
5463
|
-
enforceMonotonicWithEmits(messages,
|
|
5463
|
+
enforceMonotonicWithEmits(messages, 0.005);
|
|
5464
5464
|
|
|
5465
5465
|
// init emits
|
|
5466
5466
|
emitSetConversation(conversation);
|
|
@@ -6135,7 +6135,7 @@ var Spirits = {
|
|
|
6135
6135
|
seen: new Set(),
|
|
6136
6136
|
items: []
|
|
6137
6137
|
}).items;
|
|
6138
|
-
enforceMonotonicWithEmits(addedMessages,
|
|
6138
|
+
enforceMonotonicWithEmits(addedMessages, 0.005);
|
|
6139
6139
|
logToolPairingIssues([].concat(_rollupPluginBabelHelpers._toConsumableArray(messages), _rollupPluginBabelHelpers._toConsumableArray(addedMessages)), 'post-dedupe');
|
|
6140
6140
|
if (lastAgentMessage && lastAgentMessage.content && addedMessages.some(function (message) {
|
|
6141
6141
|
return message.content === lastAgentMessage.content;
|
|
@@ -6143,7 +6143,7 @@ var Spirits = {
|
|
|
6143
6143
|
// Error should not have happened
|
|
6144
6144
|
conversation = lockConversation(conversation, 'Duplicate message');
|
|
6145
6145
|
} else {
|
|
6146
|
-
enforceMonotonicWithEmits(messagesToTransform,
|
|
6146
|
+
enforceMonotonicWithEmits(messagesToTransform, 0.005);
|
|
6147
6147
|
_iterator9 = _rollupPluginBabelHelpers._createForOfIteratorHelper(addedMessages);
|
|
6148
6148
|
try {
|
|
6149
6149
|
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
@@ -6312,7 +6312,7 @@ var Spirits = {
|
|
|
6312
6312
|
before: conversationBefore,
|
|
6313
6313
|
after: conversation,
|
|
6314
6314
|
forward: _forward || null,
|
|
6315
|
-
forwardNote: _forwardNote
|
|
6315
|
+
forwardNote: (_forwardNote2 = _forwardNote) !== null && _forwardNote2 !== void 0 ? _forwardNote2 : null
|
|
6316
6316
|
},
|
|
6317
6317
|
messages: {
|
|
6318
6318
|
before: messagesBefore,
|
package/dist/spirits.cjs
CHANGED
package/dist/testing-tools.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var dev = require("./dev-
|
|
5
|
+
var dev = require("./dev-239e0fe6.cjs");
|
|
6
6
|
require("./_rollupPluginBabelHelpers-9c73c95c.cjs");
|
|
7
|
-
require("./spirits-
|
|
7
|
+
require("./spirits-68f893c3.cjs");
|
|
8
8
|
require('util');
|
|
9
9
|
require('stream');
|
|
10
10
|
require('path');
|
|
@@ -25,7 +25,7 @@ require('node:url');
|
|
|
25
25
|
require('node:events');
|
|
26
26
|
require('node:stream');
|
|
27
27
|
require('node:string_decoder');
|
|
28
|
-
require("./macros-
|
|
28
|
+
require("./macros-f1b93e95.cjs");
|
|
29
29
|
require('node:readline');
|
|
30
30
|
require('node:process');
|
|
31
31
|
require('node:os');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scout9/app",
|
|
3
|
-
"version": "1.0.0-alpha.1.1.
|
|
4
|
-
"description": "Build and deploy your Scout9
|
|
3
|
+
"version": "1.0.0-alpha.1.1.3",
|
|
4
|
+
"description": "Build and deploy your Scout9 Persona Model workflow",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|