@scout9/app 1.0.0-alpha.0.2.4 → 1.0.0-alpha.0.2.6

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.
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var spirits = require("./spirits-76855e30.cjs");
4
- var dev = require("./dev-73ac7343.cjs");
4
+ var dev = require("./dev-170fa3f5.cjs");
5
+ var macros = require("./macros-eff64992.cjs");
5
6
  var require$$0 = require('fs');
6
7
  var require$$2$1 = require('events');
7
8
  var require$$1 = require('path');
@@ -29482,7 +29483,7 @@ class Body {
29482
29483
  }
29483
29484
  const {
29484
29485
  toFormData
29485
- } = await Promise.resolve().then(function () { return require("./multipart-parser-a55dfbdc.cjs"); });
29486
+ } = await Promise.resolve().then(function () { return require("./multipart-parser-bd1fae8a.cjs"); });
29486
29487
  return toFormData(this.body, ct);
29487
29488
  }
29488
29489
 
@@ -41891,7 +41892,7 @@ function _loadUserPackageJson() {
41891
41892
  targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
41892
41893
  _context.t0 = JSON;
41893
41894
  _context.next = 10;
41894
- 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-6fd2c8cd.js', document.baseURI).href))), 'utf-8');
41895
+ 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-44e73470.js', document.baseURI).href))), 'utf-8');
41895
41896
  case 10:
41896
41897
  _context.t1 = _context.sent;
41897
41898
  pkg = _context.t0.parse.call(_context.t0, _context.t1);
@@ -41964,7 +41965,7 @@ var EventResponse = /*#__PURE__*/function () {
41964
41965
  * @template T
41965
41966
  * @param {T} body - The body of the response.
41966
41967
  * @param {ResponseInit} [options] - Additional options for the response.
41967
- * @returns {EventResponse<T>} A new EventResponse instance.
41968
+ * @returns {EventResponse<T = any>} A new EventResponse instance.
41968
41969
  */
41969
41970
  function json(body, options) {
41970
41971
  return new EventResponse(body, options);
@@ -42133,7 +42134,7 @@ function _loadEntityApiConfig() {
42133
42134
  config[key] = true;
42134
42135
  }
42135
42136
  }
42136
- dev.EntityApiConfigurationSchema.parse(config);
42137
+ macros.EntityApiConfigurationSchema.parse(config);
42137
42138
  return _context.abrupt("return", config);
42138
42139
  case 14:
42139
42140
  return _context.abrupt("return", null);
@@ -42282,7 +42283,7 @@ function _loadEntitiesConfig() {
42282
42283
  throw new Error("Invalid entity type (".concat(entityType, ") returned at \"").concat(filePath, "\""));
42283
42284
  case 21:
42284
42285
  // Validate entity configuration
42285
- result = dev.EntityConfigurationSchema.safeParse(entityConfig, {
42286
+ result = macros.EntityConfigurationSchema.safeParse(entityConfig, {
42286
42287
  path: ['entities', config.length]
42287
42288
  });
42288
42289
  if (result.success) {
@@ -42307,7 +42308,7 @@ function _loadEntitiesConfig() {
42307
42308
  entities: parents.reverse(),
42308
42309
  api: api
42309
42310
  });
42310
- dev.EntityRootProjectConfigurationSchema.parse(entityProjectConfig);
42311
+ macros.EntityRootProjectConfigurationSchema.parse(entityProjectConfig);
42311
42312
  existingIndex = config.findIndex(function (c) {
42312
42313
  return c.entity === entityProjectConfig.entity;
42313
42314
  });
@@ -42363,7 +42364,7 @@ function _loadEntitiesConfig() {
42363
42364
  // }
42364
42365
 
42365
42366
  // Validate the config
42366
- dev.EntitiesRootProjectConfigurationSchema.parse(config);
42367
+ macros.EntitiesRootProjectConfigurationSchema.parse(config);
42367
42368
  return _context4.abrupt("return", config);
42368
42369
  case 32:
42369
42370
  case "end":
@@ -42422,10 +42423,10 @@ function _loadWorkflowsConfig() {
42422
42423
  entity: parents[0],
42423
42424
  entities: parents.reverse()
42424
42425
  };
42425
- dev.WorkflowConfigurationSchema.parse(workflowConfig);
42426
+ macros.WorkflowConfigurationSchema.parse(workflowConfig);
42426
42427
  return workflowConfig;
42427
42428
  }); // Validate the config
42428
- dev.WorkflowsConfigurationSchema.parse(config);
42429
+ macros.WorkflowsConfigurationSchema.parse(config);
42429
42430
  return _context.abrupt("return", config);
42430
42431
  case 4:
42431
42432
  case "end":
@@ -42876,7 +42877,7 @@ var ProjectFiles = /*#__PURE__*/function () {
42876
42877
  case 21:
42877
42878
  projectConfig.workflows = _context4.sent;
42878
42879
  // Validate the config
42879
- result = dev.Scout9ProjectBuildConfigSchema.safeParse(projectConfig);
42880
+ result = macros.Scout9ProjectBuildConfigSchema.safeParse(projectConfig);
42880
42881
  if (result.success) {
42881
42882
  _context4.next = 26;
42882
42883
  break;
@@ -43097,7 +43098,7 @@ var ProjectFiles = /*#__PURE__*/function () {
43097
43098
  return ProjectFiles;
43098
43099
  }();
43099
43100
 
43100
- 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-6fd2c8cd.js', document.baseURI).href)));
43101
+ 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-44e73470.js', document.baseURI).href)));
43101
43102
  var __dirname$1 = path__default["default"].dirname(__filename$1);
43102
43103
  function zipDirectory(source, out) {
43103
43104
  var archive = archiver$1('tar', {
@@ -43312,7 +43313,7 @@ function _buildApp() {
43312
43313
  case 11:
43313
43314
  _context4.t0 = JSON;
43314
43315
  _context4.next = 14;
43315
- 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-6fd2c8cd.js', document.baseURI).href))), 'utf-8');
43316
+ 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-44e73470.js', document.baseURI).href))), 'utf-8');
43316
43317
  case 14:
43317
43318
  _context4.t1 = _context4.sent;
43318
43319
  packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
@@ -43599,7 +43600,7 @@ function _run$1() {
43599
43600
  while (1) switch (_context8.prev = _context8.next) {
43600
43601
  case 0:
43601
43602
  _ref2 = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {}, eventSource = _ref2.eventSource;
43602
- result = dev.WorkflowEventSchema.safeParse(event);
43603
+ result = macros.WorkflowEventSchema.safeParse(event);
43603
43604
  if (result.success) {
43604
43605
  _context8.next = 5;
43605
43606
  break;
@@ -44427,7 +44428,7 @@ var Scout9Platform = {
44427
44428
  break;
44428
44429
  default:
44429
44430
  console.error(dev.$.bold().red("> ".concat(error.message)));
44430
- if (error instanceof dev.z.ZodError) {
44431
+ if (error instanceof macros.z.ZodError) {
44431
44432
  console.error(error.issues.map(function (i) {
44432
44433
  return dev.$.red("".concat(dev.$.bold("\tZod Error (".concat(i.code, "): ")), "\"").concat(i.message, "\" ").concat(JSON.stringify(i.path)));
44433
44434
  }).join('\n'));
package/dist/index.cjs CHANGED
@@ -2,9 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require("./index-6fd2c8cd.cjs");
6
- var dev = require("./dev-73ac7343.cjs");
5
+ var index = require("./index-44e73470.cjs");
6
+ var dev = require("./dev-170fa3f5.cjs");
7
7
  require("./spirits-76855e30.cjs");
8
+ require("./macros-eff64992.cjs");
8
9
  require('fs');
9
10
  require('events');
10
11
  require('path');
@@ -47,62 +48,12 @@ exports.did = index.did;
47
48
  exports.json = index.json;
48
49
  exports.run = index.run;
49
50
  exports.sendEvent = index.sendEvent;
50
- exports.AgentConfigurationSchema = dev.AgentConfigurationSchema;
51
- exports.AgentSchema = dev.AgentSchema;
52
- exports.AgentsConfigurationSchema = dev.AgentsConfigurationSchema;
53
- exports.AgentsSchema = dev.AgentsSchema;
54
- exports.Baz = dev.Baz;
55
- exports.Bus = dev.Bus;
56
- exports.ContextExampleSchema = dev.ContextExampleSchema;
57
- exports.ContextExampleWithTrainingDataSchema = dev.ContextExampleWithTrainingDataSchema;
58
- exports.ConversationAnticipateSchema = dev.ConversationAnticipateSchema;
59
- exports.ConversationContext = dev.ConversationContext;
60
- exports.ConversationSchema = dev.ConversationSchema;
61
- exports.CustomerSchema = dev.CustomerSchema;
62
- exports.CustomerValueSchema = dev.CustomerValueSchema;
63
- exports.EntitiesRootConfigurationSchema = dev.EntitiesRootConfigurationSchema;
64
- exports.EntitiesRootProjectConfigurationSchema = dev.EntitiesRootProjectConfigurationSchema;
65
- exports.EntityApiConfigurationSchema = dev.EntityApiConfigurationSchema;
66
- exports.EntityConfigurationSchema = dev.EntityConfigurationSchema;
67
- exports.EntityRootProjectConfigurationSchema = dev.EntityRootProjectConfigurationSchema;
68
- exports.FollowupBaseSchema = dev.FollowupBaseSchema;
69
- exports.FollowupSchema = dev.FollowupSchema;
70
- exports.ForwardSchema = dev.ForwardSchema;
71
- exports.InstructionObjectSchema = dev.InstructionObjectSchema;
72
- exports.InstructionSchema = dev.InstructionSchema;
73
- exports.IntentWorkflowEventSchema = dev.IntentWorkflowEventSchema;
74
- exports.MessageSchema = dev.MessageSchema;
75
- exports.PersonaConfigurationSchema = dev.PersonaConfigurationSchema;
76
- exports.PersonaSchema = dev.PersonaSchema;
77
- exports.PersonasConfigurationSchema = dev.PersonasConfigurationSchema;
78
- exports.PersonasSchema = dev.PersonasSchema;
79
- exports.Scout9ProjectBuildConfigSchema = dev.Scout9ProjectBuildConfigSchema;
80
- exports.Scout9ProjectConfigSchema = dev.Scout9ProjectConfigSchema;
81
51
  exports.Scout9Test = dev.Scout9Test;
82
- exports.TestSchema = dev.TestSchema;
83
- exports.WorkflowConfigurationSchema = dev.WorkflowConfigurationSchema;
84
- exports.WorkflowEventSchema = dev.WorkflowEventSchema;
85
- exports.WorkflowFunctionSchema = dev.WorkflowFunctionSchema;
86
- exports.WorkflowResponseMessage = dev.WorkflowResponseMessage;
87
- exports.WorkflowResponseMessageApiRequest = dev.WorkflowResponseMessageApiRequest;
88
- exports.WorkflowResponseMessageApiResponse = dev.WorkflowResponseMessageApiResponse;
89
- exports.WorkflowResponseSchema = dev.WorkflowResponseSchema;
90
- exports.WorkflowResponseSlotBaseSchema = dev.WorkflowResponseSlotBaseSchema;
91
- exports.WorkflowResponseSlotSchema = dev.WorkflowResponseSlotSchema;
92
- exports.WorkflowsConfigurationSchema = dev.WorkflowsConfigurationSchema;
93
- exports.apiFunctionSchema = dev.apiFunctionSchema;
94
52
  exports.createMockAgent = dev.createMockAgent;
95
53
  exports.createMockConversation = dev.createMockConversation;
96
54
  exports.createMockCustomer = dev.createMockCustomer;
97
55
  exports.createMockMessage = dev.createMockMessage;
98
56
  exports.createMockWorkflowEvent = dev.createMockWorkflowEvent;
99
- exports.deleteApiFunctionSchema = dev.deleteApiFunctionSchema;
100
- exports.eventResponseSchema = dev.eventResponseSchema;
101
57
  exports.forward = dev.forward;
102
- exports.getApiFunctionSchema = dev.getApiFunctionSchema;
103
58
  exports.instruct = dev.instruct;
104
- exports.patchApiFunctionSchema = dev.patchApiFunctionSchema;
105
- exports.postApiFunctionSchema = dev.postApiFunctionSchema;
106
- exports.putApiFunctionSchema = dev.putApiFunctionSchema;
107
- exports.queryApiFunctionSchema = dev.queryApiFunctionSchema;
108
59
  exports.reply = dev.reply;