@scout9/app 1.0.0-alpha.0.1.85 → 1.0.0-alpha.0.1.86
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-dc75cb8b.cjs → exports-291eb22e.cjs} +37 -11
- package/dist/index.cjs +28 -1
- package/dist/{multipart-parser-f133fa41.cjs → multipart-parser-caa634a9.cjs} +1 -1
- package/dist/testing-tools.cjs +1 -1
- package/package.json +1 -1
- package/src/exports.js +1 -0
- package/src/runtime/client/utils.js +1 -2
- package/types/index.d.ts +2024 -123
- package/types/index.d.ts.map +39 -3
|
@@ -41174,7 +41174,7 @@ class Body {
|
|
|
41174
41174
|
}
|
|
41175
41175
|
const {
|
|
41176
41176
|
toFormData
|
|
41177
|
-
} = await Promise.resolve().then(function () { return require("./multipart-parser-
|
|
41177
|
+
} = await Promise.resolve().then(function () { return require("./multipart-parser-caa634a9.cjs"); });
|
|
41178
41178
|
return toFormData(this.body, ct);
|
|
41179
41179
|
}
|
|
41180
41180
|
|
|
@@ -81230,7 +81230,7 @@ function _loadUserPackageJson$1() {
|
|
|
81230
81230
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
81231
81231
|
_context2.t0 = JSON;
|
|
81232
81232
|
_context2.next = 10;
|
|
81233
|
-
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('exports-
|
|
81233
|
+
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('exports-291eb22e.js', document.baseURI).href))), 'utf-8');
|
|
81234
81234
|
case 10:
|
|
81235
81235
|
_context2.t1 = _context2.sent;
|
|
81236
81236
|
pkg = _context2.t0.parse.call(_context2.t0, _context2.t1);
|
|
@@ -82075,7 +82075,7 @@ function _loadUserPackageJson() {
|
|
|
82075
82075
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
82076
82076
|
_context.t0 = JSON;
|
|
82077
82077
|
_context.next = 10;
|
|
82078
|
-
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('exports-
|
|
82078
|
+
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('exports-291eb22e.js', document.baseURI).href))), 'utf-8');
|
|
82079
82079
|
case 10:
|
|
82080
82080
|
_context.t1 = _context.sent;
|
|
82081
82081
|
pkg = _context.t0.parse.call(_context.t0, _context.t1);
|
|
@@ -86634,9 +86634,8 @@ var momentExports = moment$1.exports;
|
|
|
86634
86634
|
var moment = /*@__PURE__*/getDefaultExportFromCjs(momentExports);
|
|
86635
86635
|
|
|
86636
86636
|
/**
|
|
86637
|
-
*
|
|
86638
86637
|
* @param {string} name
|
|
86639
|
-
* @returns {ZodString}
|
|
86638
|
+
* @returns {import('zod').ZodString}
|
|
86640
86639
|
*/
|
|
86641
86640
|
function zId(name) {
|
|
86642
86641
|
return z.string().regex(/^[A-Za-z0-9\-_\[\]]+$/, {
|
|
@@ -86981,7 +86980,7 @@ var entityConfigurationSchema = _entityConfigurationSchema.refine(function (data
|
|
|
86981
86980
|
// Custom error message
|
|
86982
86981
|
message: "If 'definitions' is provided, then 'training' must also be provided"
|
|
86983
86982
|
});
|
|
86984
|
-
z.array(entityConfigurationSchema);
|
|
86983
|
+
var entitiesRootConfigurationSchema = z.array(entityConfigurationSchema);
|
|
86985
86984
|
var entityExtendedProjectConfigurationSchema = z.object({
|
|
86986
86985
|
entities: z.array(zId('Entity Folder', z.string()), {
|
|
86987
86986
|
description: 'Entity id association, used to handle route params'
|
|
@@ -87072,7 +87071,7 @@ var InstructionSchema = z.object({
|
|
|
87072
87071
|
* If its a string, it will be sent as a static string.
|
|
87073
87072
|
* If it's a object or WorkflowResponseMessageAPI - it will use
|
|
87074
87073
|
*/
|
|
87075
|
-
z.union(z.string(),
|
|
87074
|
+
var WorkflowResponseMessage = z.union(z.string(),
|
|
87076
87075
|
/**
|
|
87077
87076
|
* An api call that should be called later, must return a string or {message: string}
|
|
87078
87077
|
*/
|
|
@@ -87087,7 +87086,7 @@ var WorkflowResponseMessageApiRequest = z.object({
|
|
|
87087
87086
|
/**
|
|
87088
87087
|
* The intended response provided by the WorkflowResponseMessageApiRequest
|
|
87089
87088
|
*/
|
|
87090
|
-
z.union([z.string(), z.object({
|
|
87089
|
+
var WorkflowResponseMessageApiResponse = z.union([z.string(), z.object({
|
|
87091
87090
|
message: z.string()
|
|
87092
87091
|
}), z.object({
|
|
87093
87092
|
text: z.string()
|
|
@@ -87111,7 +87110,7 @@ var WorkflowResponseSlotSchema = z.object({
|
|
|
87111
87110
|
contextUpsert: ConversationContext.optional(),
|
|
87112
87111
|
resetIntent: z["boolean"]().optional()
|
|
87113
87112
|
});
|
|
87114
|
-
z.union([WorkflowResponseSlotSchema, z.array(WorkflowResponseSlotSchema)]);
|
|
87113
|
+
var WorkflowResponseSchema = z.union([WorkflowResponseSlotSchema, z.array(WorkflowResponseSlotSchema)]);
|
|
87115
87114
|
|
|
87116
87115
|
var llmModelOptions = z.union([z.literal('gpt-4-1106-preview'), z.literal('gpt-4-vision-preview'), z.literal('gpt-4'), z.literal('gpt-4-0314'), z.literal('gpt-4-0613'), z.literal('gpt-4-32k'), z.literal('gpt-4-32k-0314'), z.literal('gpt-4-32k-0613'), z.literal('gpt-3.5-turbo'), z.literal('gpt-3.5-turbo-16k'), z.literal('gpt-3.5-turbo-0301'), z.literal('gpt-3.5-turbo-0613'), z.literal('gpt-3.5-turbo-16k-0613'), z.string() // for the (string & {}) part
|
|
87117
87116
|
]);
|
|
@@ -88350,7 +88349,7 @@ function report(config, logger) {
|
|
|
88350
88349
|
logger.primary("Run ".concat(cyan('scout9 dev'), " to test your project locally"));
|
|
88351
88350
|
}
|
|
88352
88351
|
|
|
88353
|
-
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-
|
|
88352
|
+
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-291eb22e.js', document.baseURI).href)));
|
|
88354
88353
|
var __dirname$1 = path__default["default"].dirname(__filename$1);
|
|
88355
88354
|
|
|
88356
88355
|
/**
|
|
@@ -88593,7 +88592,7 @@ function _buildApp() {
|
|
|
88593
88592
|
case 11:
|
|
88594
88593
|
_context4.t0 = JSON;
|
|
88595
88594
|
_context4.next = 14;
|
|
88596
|
-
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('exports-
|
|
88595
|
+
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('exports-291eb22e.js', document.baseURI).href))), 'utf-8');
|
|
88597
88596
|
case 14:
|
|
88598
88597
|
_context4.t1 = _context4.sent;
|
|
88599
88598
|
packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
|
@@ -91665,15 +91664,42 @@ function json(data, init) {
|
|
|
91665
91664
|
}
|
|
91666
91665
|
var encoder = new TextEncoder();
|
|
91667
91666
|
|
|
91667
|
+
exports.ConversationContext = ConversationContext;
|
|
91668
|
+
exports.ConversationSchema = ConversationSchema;
|
|
91668
91669
|
exports.EventResponse = EventResponse;
|
|
91669
91670
|
exports.File = File;
|
|
91670
91671
|
exports.FormData = FormData$2;
|
|
91672
|
+
exports.ForwardSchema = ForwardSchema;
|
|
91673
|
+
exports.InstructionSchema = InstructionSchema;
|
|
91674
|
+
exports.IntentWorkflowEventSchema = IntentWorkflowEventSchema;
|
|
91675
|
+
exports.MessageSchema = MessageSchema;
|
|
91676
|
+
exports.Scout9ProjectBuildConfigSchema = Scout9ProjectBuildConfigSchema;
|
|
91671
91677
|
exports.Scout9Test = Scout9Test;
|
|
91678
|
+
exports.WorkflowConfigurationSchema = WorkflowConfigurationSchema;
|
|
91679
|
+
exports.WorkflowEventSchema = WorkflowEventSchema;
|
|
91680
|
+
exports.WorkflowResponseMessage = WorkflowResponseMessage;
|
|
91681
|
+
exports.WorkflowResponseMessageApiRequest = WorkflowResponseMessageApiRequest;
|
|
91682
|
+
exports.WorkflowResponseMessageApiResponse = WorkflowResponseMessageApiResponse;
|
|
91683
|
+
exports.WorkflowResponseSchema = WorkflowResponseSchema;
|
|
91684
|
+
exports.WorkflowResponseSlotSchema = WorkflowResponseSlotSchema;
|
|
91685
|
+
exports.WorkflowsConfigurationSchema = WorkflowsConfigurationSchema;
|
|
91686
|
+
exports._entityApiConfigurationSchema = _entityApiConfigurationSchema;
|
|
91687
|
+
exports.agentBaseConfigurationSchema = agentBaseConfigurationSchema;
|
|
91688
|
+
exports.agentConfigurationSchema = agentConfigurationSchema;
|
|
91689
|
+
exports.agentsBaseConfigurationSchema = agentsBaseConfigurationSchema;
|
|
91690
|
+
exports.agentsConfigurationSchema = agentsConfigurationSchema;
|
|
91672
91691
|
exports.createMockAgent = createMockAgent;
|
|
91673
91692
|
exports.createMockConversation = createMockConversation;
|
|
91674
91693
|
exports.createMockCustomer = createMockCustomer;
|
|
91675
91694
|
exports.createMockMessage = createMockMessage;
|
|
91676
91695
|
exports.createMockWorkflowEvent = createMockWorkflowEvent;
|
|
91696
|
+
exports.customerSchema = customerSchema;
|
|
91697
|
+
exports.customerValueSchema = customerValueSchema;
|
|
91698
|
+
exports.entitiesRootConfigurationSchema = entitiesRootConfigurationSchema;
|
|
91699
|
+
exports.entitiesRootProjectConfigurationSchema = entitiesRootProjectConfigurationSchema;
|
|
91700
|
+
exports.entityApiConfigurationSchema = entityApiConfigurationSchema;
|
|
91701
|
+
exports.entityConfigurationSchema = entityConfigurationSchema;
|
|
91702
|
+
exports.entityRootProjectConfigurationSchema = entityRootProjectConfigurationSchema;
|
|
91677
91703
|
exports.json = json;
|
|
91678
91704
|
exports.run = run;
|
|
91679
91705
|
exports.sendEvent = sendEvent;
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var exports$1 = require("./exports-
|
|
5
|
+
var exports$1 = require("./exports-291eb22e.cjs");
|
|
6
6
|
var spirits = require("./spirits-643c422a.cjs");
|
|
7
7
|
require('node:readline');
|
|
8
8
|
require('fs');
|
|
@@ -39,13 +39,40 @@ require('node:vm');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
exports.ConversationContext = exports$1.ConversationContext;
|
|
43
|
+
exports.ConversationSchema = exports$1.ConversationSchema;
|
|
42
44
|
exports.EventResponse = exports$1.EventResponse;
|
|
45
|
+
exports.ForwardSchema = exports$1.ForwardSchema;
|
|
46
|
+
exports.InstructionSchema = exports$1.InstructionSchema;
|
|
47
|
+
exports.IntentWorkflowEventSchema = exports$1.IntentWorkflowEventSchema;
|
|
48
|
+
exports.MessageSchema = exports$1.MessageSchema;
|
|
49
|
+
exports.Scout9ProjectBuildConfigSchema = exports$1.Scout9ProjectBuildConfigSchema;
|
|
43
50
|
exports.Scout9Test = exports$1.Scout9Test;
|
|
51
|
+
exports.WorkflowConfigurationSchema = exports$1.WorkflowConfigurationSchema;
|
|
52
|
+
exports.WorkflowEventSchema = exports$1.WorkflowEventSchema;
|
|
53
|
+
exports.WorkflowResponseMessage = exports$1.WorkflowResponseMessage;
|
|
54
|
+
exports.WorkflowResponseMessageApiRequest = exports$1.WorkflowResponseMessageApiRequest;
|
|
55
|
+
exports.WorkflowResponseMessageApiResponse = exports$1.WorkflowResponseMessageApiResponse;
|
|
56
|
+
exports.WorkflowResponseSchema = exports$1.WorkflowResponseSchema;
|
|
57
|
+
exports.WorkflowResponseSlotSchema = exports$1.WorkflowResponseSlotSchema;
|
|
58
|
+
exports.WorkflowsConfigurationSchema = exports$1.WorkflowsConfigurationSchema;
|
|
59
|
+
exports._entityApiConfigurationSchema = exports$1._entityApiConfigurationSchema;
|
|
60
|
+
exports.agentBaseConfigurationSchema = exports$1.agentBaseConfigurationSchema;
|
|
61
|
+
exports.agentConfigurationSchema = exports$1.agentConfigurationSchema;
|
|
62
|
+
exports.agentsBaseConfigurationSchema = exports$1.agentsBaseConfigurationSchema;
|
|
63
|
+
exports.agentsConfigurationSchema = exports$1.agentsConfigurationSchema;
|
|
44
64
|
exports.createMockAgent = exports$1.createMockAgent;
|
|
45
65
|
exports.createMockConversation = exports$1.createMockConversation;
|
|
46
66
|
exports.createMockCustomer = exports$1.createMockCustomer;
|
|
47
67
|
exports.createMockMessage = exports$1.createMockMessage;
|
|
48
68
|
exports.createMockWorkflowEvent = exports$1.createMockWorkflowEvent;
|
|
69
|
+
exports.customerSchema = exports$1.customerSchema;
|
|
70
|
+
exports.customerValueSchema = exports$1.customerValueSchema;
|
|
71
|
+
exports.entitiesRootConfigurationSchema = exports$1.entitiesRootConfigurationSchema;
|
|
72
|
+
exports.entitiesRootProjectConfigurationSchema = exports$1.entitiesRootProjectConfigurationSchema;
|
|
73
|
+
exports.entityApiConfigurationSchema = exports$1.entityApiConfigurationSchema;
|
|
74
|
+
exports.entityConfigurationSchema = exports$1.entityConfigurationSchema;
|
|
75
|
+
exports.entityRootProjectConfigurationSchema = exports$1.entityRootProjectConfigurationSchema;
|
|
49
76
|
exports.json = exports$1.json;
|
|
50
77
|
exports.run = exports$1.run;
|
|
51
78
|
exports.sendEvent = exports$1.sendEvent;
|
package/dist/testing-tools.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var exports$1 = require("./exports-
|
|
5
|
+
var exports$1 = require("./exports-291eb22e.cjs");
|
|
6
6
|
var spirits = require("./spirits-643c422a.cjs");
|
|
7
7
|
require('node:readline');
|
|
8
8
|
require('fs');
|
package/package.json
CHANGED
package/src/exports.js
CHANGED
|
@@ -4,6 +4,7 @@ import { EventResponse } from './runtime/index.js';
|
|
|
4
4
|
export { EventResponse } from './runtime/index.js';
|
|
5
5
|
// export * from './types';
|
|
6
6
|
export * from './testing-tools/index.js';
|
|
7
|
+
export * from './runtime/client/index.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @param {WorkflowEvent} event - every workflow receives an event object
|