@scout9/app 1.0.0-alpha.0.8.8 → 1.0.0-alpha.0.9.0

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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var spirits = require("./spirits-2d7d7919.cjs");
3
+ var _rollupPluginBabelHelpers = require("./_rollupPluginBabelHelpers-9c73c95c.cjs");
4
4
  var require$$0$4 = require('util');
5
5
  var require$$0$3 = require('stream');
6
6
  var require$$1 = require('path');
@@ -21,11 +21,12 @@ var node_url = require('node:url');
21
21
  var node_events = require('node:events');
22
22
  var Stream = require('node:stream');
23
23
  var node_string_decoder = require('node:string_decoder');
24
- var macros = require("./macros-f62cceac.cjs");
24
+ var macros = require("./macros-77983cef.cjs");
25
25
  var readline = require('node:readline');
26
26
  var process$2 = require('node:process');
27
27
  var node_os = require('node:os');
28
28
  var promises = require('fs/promises');
29
+ var spirits = require("./spirits.cjs");
29
30
 
30
31
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
31
32
 
@@ -32034,7 +32035,7 @@ createLogUpdate(process__default["default"].stderr);
32034
32035
  var ProgressLogger = /*#__PURE__*/function () {
32035
32036
  function ProgressLogger() {
32036
32037
  var initialMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
32037
- spirits._classCallCheck(this, ProgressLogger);
32038
+ _rollupPluginBabelHelpers._classCallCheck(this, ProgressLogger);
32038
32039
  this.lines = [];
32039
32040
  this._indents = 0;
32040
32041
  this._interval = -1;
@@ -32045,7 +32046,7 @@ var ProgressLogger = /*#__PURE__*/function () {
32045
32046
  this.write(initialMessage);
32046
32047
  }
32047
32048
  }
32048
- spirits._createClass(ProgressLogger, [{
32049
+ _rollupPluginBabelHelpers._createClass(ProgressLogger, [{
32049
32050
  key: "indents",
32050
32051
  set: function set(value) {
32051
32052
  this._indents = value;
@@ -32155,9 +32156,9 @@ function importFile(_x) {
32155
32156
  return _importFile.apply(this, arguments);
32156
32157
  }
32157
32158
  function _importFile() {
32158
- _importFile = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee(filePath) {
32159
+ _importFile = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(filePath) {
32159
32160
  var fileUrl;
32160
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
32161
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
32161
32162
  while (1) switch (_context.prev = _context.next) {
32162
32163
  case 0:
32163
32164
  fileUrl = node_url.pathToFileURL(filePath);
@@ -32174,8 +32175,8 @@ function requireProjectFile(_x2) {
32174
32175
  return _requireProjectFile.apply(this, arguments);
32175
32176
  }
32176
32177
  function _requireProjectFile() {
32177
- _requireProjectFile = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee2(filePath) {
32178
- return spirits._regeneratorRuntime().wrap(function _callee2$(_context2) {
32178
+ _requireProjectFile = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2(filePath) {
32179
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context2) {
32179
32180
  while (1) switch (_context2.prev = _context2.next) {
32180
32181
  case 0:
32181
32182
  _context2.prev = 0;
@@ -32196,8 +32197,8 @@ function requireOptionalProjectFile(_x3) {
32196
32197
  return _requireOptionalProjectFile.apply(this, arguments);
32197
32198
  }
32198
32199
  function _requireOptionalProjectFile() {
32199
- _requireOptionalProjectFile = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee3(filePath) {
32200
- return spirits._regeneratorRuntime().wrap(function _callee3$(_context3) {
32200
+ _requireOptionalProjectFile = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3(filePath) {
32201
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context3) {
32201
32202
  while (1) switch (_context3.prev = _context3.next) {
32202
32203
  case 0:
32203
32204
  return _context3.abrupt("return", importFile(filePath)["catch"](function (e) {
@@ -32222,7 +32223,7 @@ function checkVariableType(variable) {
32222
32223
  if (variable === null) {
32223
32224
  return 'null';
32224
32225
  }
32225
- var type = spirits._typeof(variable);
32226
+ var type = _rollupPluginBabelHelpers._typeof(variable);
32226
32227
 
32227
32228
  // Check for function or async function
32228
32229
  if (type === 'function') {
@@ -32264,9 +32265,9 @@ function fileTypeFromBuffer(_x) {
32264
32265
  return _fileTypeFromBuffer.apply(this, arguments);
32265
32266
  }
32266
32267
  function _fileTypeFromBuffer() {
32267
- _fileTypeFromBuffer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee(input) {
32268
+ _fileTypeFromBuffer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(input) {
32268
32269
  var buf, check, sliced, idPos, docTypePos, findDocType;
32269
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
32270
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
32270
32271
  while (1) switch (_context.prev = _context.next) {
32271
32272
  case 0:
32272
32273
  buf = new Uint8Array(input);
@@ -32988,9 +32989,9 @@ function fetchFileToBuffer(_x) {
32988
32989
  * @returns {Promise<ToBufferResult>}
32989
32990
  */
32990
32991
  function _fetchFileToBuffer() {
32991
- _fetchFileToBuffer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee(url) {
32992
+ _fetchFileToBuffer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(url) {
32992
32993
  var response, buffer;
32993
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
32994
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
32994
32995
  while (1) switch (_context.prev = _context.next) {
32995
32996
  case 0:
32996
32997
  if (isRemoteUrl(url)) {
@@ -33052,9 +33053,9 @@ function toBuffer(_x2, _x3) {
33052
33053
  * @returns {Promise<ToBufferResult & {uri: string}>}
33053
33054
  */
33054
33055
  function _toBuffer() {
33055
- _toBuffer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee2(fileBufferOrFilepath, source) {
33056
+ _toBuffer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2(fileBufferOrFilepath, source) {
33056
33057
  var buffer, mime, ext, _result, relative, result, isVideo, isAudio, isImage;
33057
- return spirits._regeneratorRuntime().wrap(function _callee2$(_context2) {
33058
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context2) {
33058
33059
  while (1) switch (_context2.prev = _context2.next) {
33059
33060
  case 0:
33060
33061
  if (!(typeof fileBufferOrFilepath === 'string')) {
@@ -33142,7 +33143,7 @@ function _toBuffer() {
33142
33143
  _context2.next = 44;
33143
33144
  break;
33144
33145
  case 43:
33145
- throw new Error("Invalid img type: ".concat(spirits._typeof(fileBufferOrFilepath)));
33146
+ throw new Error("Invalid img type: ".concat(_rollupPluginBabelHelpers._typeof(fileBufferOrFilepath)));
33146
33147
  case 44:
33147
33148
  if (buffer) {
33148
33149
  _context2.next = 46;
@@ -33185,7 +33186,7 @@ function writeFileToLocal() {
33185
33186
  return _writeFileToLocal.apply(this, arguments);
33186
33187
  }
33187
33188
  function _writeFileToLocal() {
33188
- _writeFileToLocal = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee3() {
33189
+ _writeFileToLocal = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3() {
33189
33190
  var _ref,
33190
33191
  _ref$dest,
33191
33192
  dest,
@@ -33198,7 +33199,7 @@ function _writeFileToLocal() {
33198
33199
  buffer,
33199
33200
  ext,
33200
33201
  _args3 = arguments;
33201
- return spirits._regeneratorRuntime().wrap(function _callee3$(_context3) {
33202
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context3) {
33202
33203
  while (1) switch (_context3.prev = _context3.next) {
33203
33204
  case 0:
33204
33205
  _ref = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, _ref$dest = _ref.dest, dest = _ref$dest === void 0 ? path$2.resolve(node_os.tmpdir(), 'scout9') : _ref$dest, file = _ref.file, fileName = _ref.fileName, source = _ref.source;
@@ -33227,7 +33228,7 @@ function _writeFileToLocal() {
33227
33228
  _context3.next = 12;
33228
33229
  return fs$1.writeFile(filePath, buffer);
33229
33230
  case 12:
33230
- return _context3.abrupt("return", spirits._objectSpread2({
33231
+ return _context3.abrupt("return", _rollupPluginBabelHelpers._objectSpread2({
33231
33232
  uri: filePath
33232
33233
  }, result));
33233
33234
  case 13:
@@ -33272,7 +33273,7 @@ function entityTemplate(entity) {
33272
33273
  entity.entities;
33273
33274
  entity.api;
33274
33275
  entity.id;
33275
- var rest = spirits._objectWithoutProperties(entity, _excluded$3);
33276
+ var rest = _rollupPluginBabelHelpers._objectWithoutProperties(entity, _excluded$3);
33276
33277
  if (!_entity.endsWith('Entity')) {
33277
33278
  _entity = "".concat(_entity, "Entity");
33278
33279
  }
@@ -35169,7 +35170,7 @@ var fxp = {
35169
35170
 
35170
35171
  function isSvg(str) {
35171
35172
  if (typeof str !== 'string') {
35172
- throw new TypeError("Expected a `string`, got `".concat(spirits._typeof(str), "`"));
35173
+ throw new TypeError("Expected a `string`, got `".concat(_rollupPluginBabelHelpers._typeof(str), "`"));
35173
35174
  }
35174
35175
  str = str.trim();
35175
35176
  if (str.length === 0) {
@@ -35207,12 +35208,12 @@ function imageBuffer(_x) {
35207
35208
  return _imageBuffer.apply(this, arguments);
35208
35209
  }
35209
35210
  function _imageBuffer() {
35210
- _imageBuffer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee(img) {
35211
+ _imageBuffer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(img) {
35211
35212
  var allowSvg,
35212
35213
  source,
35213
35214
  imageResult,
35214
35215
  _args = arguments;
35215
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
35216
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
35216
35217
  while (1) switch (_context.prev = _context.next) {
35217
35218
  case 0:
35218
35219
  allowSvg = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
@@ -35225,7 +35226,7 @@ function _imageBuffer() {
35225
35226
  _context.next = 7;
35226
35227
  break;
35227
35228
  }
35228
- throw new Error("Invalid image type: ".concat(spirits._typeof(img)));
35229
+ throw new Error("Invalid image type: ".concat(_rollupPluginBabelHelpers._typeof(img)));
35229
35230
  case 7:
35230
35231
  if (imageExtensions.has(imageResult.ext)) {
35231
35232
  _context.next = 10;
@@ -35263,9 +35264,9 @@ function writeImageToServer(_x) {
35263
35264
  * @returns {Promise<{isTest: boolean, pkg: {name: string; version: string; dependencies: Record<string, string>}}>}
35264
35265
  */
35265
35266
  function _writeImageToServer() {
35266
- _writeImageToServer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee(_ref) {
35267
+ _writeImageToServer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(_ref) {
35267
35268
  var img, _ref$type, type, source, buffer, scout9, url, result, _result;
35268
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
35269
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
35269
35270
  while (1) switch (_context.prev = _context.next) {
35270
35271
  case 0:
35271
35272
  img = _ref.img, _ref$type = _ref.type, type = _ref$type === void 0 ? 'icon' : _ref$type, source = _ref.source;
@@ -35323,9 +35324,9 @@ function loadUserPackageJson(_x2) {
35323
35324
  * @returns {Promise<Scout9ProjectConfig>}
35324
35325
  */
35325
35326
  function _loadUserPackageJson() {
35326
- _loadUserPackageJson = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee2(_ref2) {
35327
+ _loadUserPackageJson = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2(_ref2) {
35327
35328
  var _ref2$cwd, cwd, packageJsonPath, packageTestJsonPath, packageJsonUrl, packageTestJsonUrl, isTest, targetPkgUrl, pkg;
35328
- return spirits._regeneratorRuntime().wrap(function _callee2$(_context2) {
35329
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context2) {
35329
35330
  while (1) switch (_context2.prev = _context2.next) {
35330
35331
  case 0:
35331
35332
  _ref2$cwd = _ref2.cwd, cwd = _ref2$cwd === void 0 ? process.cwd() : _ref2$cwd;
@@ -35337,7 +35338,7 @@ function _loadUserPackageJson() {
35337
35338
  targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
35338
35339
  _context2.t0 = JSON;
35339
35340
  _context2.next = 10;
35340
- 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-b085bde6.js', document.baseURI).href))), 'utf-8');
35341
+ 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-024a0325.js', document.baseURI).href))), 'utf-8');
35341
35342
  case 10:
35342
35343
  _context2.t1 = _context2.sent;
35343
35344
  pkg = _context2.t0.parse.call(_context2.t0, _context2.t1);
@@ -35357,7 +35358,7 @@ function loadProjectConfig() {
35357
35358
  return _loadProjectConfig.apply(this, arguments);
35358
35359
  }
35359
35360
  function _loadProjectConfig() {
35360
- _loadProjectConfig = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee3() {
35361
+ _loadProjectConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3() {
35361
35362
  var _ref3,
35362
35363
  _ref3$cwd,
35363
35364
  cwd,
@@ -35376,7 +35377,7 @@ function _loadProjectConfig() {
35376
35377
  project,
35377
35378
  serverDeployed,
35378
35379
  _args3 = arguments;
35379
- return spirits._regeneratorRuntime().wrap(function _callee3$(_context3) {
35380
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context3) {
35380
35381
  while (1) switch (_context3.prev = _context3.next) {
35381
35382
  case 0:
35382
35383
  _ref3 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, _ref3$cwd = _ref3.cwd, cwd = _ref3$cwd === void 0 ? process.cwd() : _ref3$cwd, _ref3$deploying = _ref3.deploying, deploying = _ref3$deploying === void 0 ? false : _ref3$deploying, _ref3$src = _ref3.src, src = _ref3$src === void 0 ? 'src' : _ref3$src, _ref3$cb = _ref3.cb, cb = _ref3$cb === void 0 ? function (message) {} : _ref3$cb;
@@ -35404,7 +35405,7 @@ function _loadProjectConfig() {
35404
35405
  }
35405
35406
  throw new Error("Multiple main project entry files found ".concat(src, "/index.{js|ts|cjs|mjs}"));
35406
35407
  case 13:
35407
- _paths = spirits._slicedToArray(paths, 1), filePath = _paths[0];
35408
+ _paths = _rollupPluginBabelHelpers._slicedToArray(paths, 1), filePath = _paths[0];
35408
35409
  _context3.next = 16;
35409
35410
  return requireProjectFile(filePath).then(function (mod) {
35410
35411
  return mod["default"];
@@ -35502,7 +35503,7 @@ function _loadProjectConfig() {
35502
35503
  _context3.next = 51;
35503
35504
  break;
35504
35505
  case 50:
35505
- throw new Error("Invalid logo type: ".concat(spirits._typeof(project.organization.logo)));
35506
+ throw new Error("Invalid logo type: ".concat(_rollupPluginBabelHelpers._typeof(project.organization.logo)));
35506
35507
  case 51:
35507
35508
  if (!project.organization.icon) {
35508
35509
  _context3.next = 84;
@@ -35594,7 +35595,7 @@ function _loadProjectConfig() {
35594
35595
  _context3.next = 84;
35595
35596
  break;
35596
35597
  case 83:
35597
- throw new Error("Invalid icon type: ".concat(spirits._typeof(project.organization.icon)));
35598
+ throw new Error("Invalid icon type: ".concat(_rollupPluginBabelHelpers._typeof(project.organization.icon)));
35598
35599
  case 84:
35599
35600
  if (!serverDeployed) {
35600
35601
  _context3.next = 88;
@@ -35602,11 +35603,11 @@ function _loadProjectConfig() {
35602
35603
  }
35603
35604
  cb("Syncing ".concat(filePath, " with latest server changes"));
35604
35605
  _context3.next = 88;
35605
- return fs__default["default"].writeFile(filePath, projectTemplates.root(spirits._objectSpread2({
35606
+ return fs__default["default"].writeFile(filePath, projectTemplates.root(_rollupPluginBabelHelpers._objectSpread2({
35606
35607
  tag: tag
35607
35608
  }, project), path__default["default"].extname(filePath)));
35608
35609
  case 88:
35609
- return _context3.abrupt("return", spirits._objectSpread2({
35610
+ return _context3.abrupt("return", _rollupPluginBabelHelpers._objectSpread2({
35610
35611
  tag: tag
35611
35612
  }, project));
35612
35613
  case 89:
@@ -36058,7 +36059,7 @@ function MacroUtilsFactory() {
36058
36059
  scheduledToUnix: function scheduledToUnix(scheduled) {
36059
36060
  var _this$scheduledToUnix = this.scheduledToUnixSafe(scheduled),
36060
36061
  success = _this$scheduledToUnix.success,
36061
- rest = spirits._objectWithoutProperties(_this$scheduledToUnix, _excluded$2);
36062
+ rest = _rollupPluginBabelHelpers._objectWithoutProperties(_this$scheduledToUnix, _excluded$2);
36062
36063
  if (success) {
36063
36064
  return rest.data;
36064
36065
  } else {
@@ -36071,9 +36072,9 @@ var MacroUtils = MacroUtilsFactory();
36071
36072
 
36072
36073
  var MacroGlobals = /*#__PURE__*/function () {
36073
36074
  function MacroGlobals() {
36074
- spirits._classCallCheck(this, MacroGlobals);
36075
+ _rollupPluginBabelHelpers._classCallCheck(this, MacroGlobals);
36075
36076
  }
36076
- spirits._createClass(MacroGlobals, null, [{
36077
+ _rollupPluginBabelHelpers._createClass(MacroGlobals, null, [{
36077
36078
  key: "$convo",
36078
36079
  value:
36079
36080
  /**
@@ -36083,7 +36084,7 @@ var MacroGlobals = /*#__PURE__*/function () {
36083
36084
  var _globalThis$SCOUT;
36084
36085
  var $convo = globalThis === null || globalThis === void 0 || (_globalThis$SCOUT = globalThis.SCOUT9) === null || _globalThis$SCOUT === void 0 ? void 0 : _globalThis$SCOUT.$convo;
36085
36086
  if (!$convo) {
36086
- throw new Error("$convo not found in runtime context, ".concat(spirits._classStaticPrivateFieldSpecGet(MacroGlobals, MacroGlobals, _hint)));
36087
+ throw new Error("$convo not found in runtime context, ".concat(_rollupPluginBabelHelpers._classStaticPrivateFieldSpecGet(MacroGlobals, MacroGlobals, _hint)));
36087
36088
  }
36088
36089
  if (typeof $convo !== 'string') {
36089
36090
  throw new Error("$convo not a type string, $convo=".concat(JSON.stringify($convo)));
@@ -36099,7 +36100,7 @@ var MacroGlobals = /*#__PURE__*/function () {
36099
36100
  value: function event() {
36100
36101
  var event = globalThis === null || globalThis === void 0 ? void 0 : globalThis.SCOUT9;
36101
36102
  if (!event) {
36102
- throw new Error("No runtime context, ".concat(spirits._classStaticPrivateFieldSpecGet(MacroGlobals, MacroGlobals, _hint)));
36103
+ throw new Error("No runtime context, ".concat(_rollupPluginBabelHelpers._classStaticPrivateFieldSpecGet(MacroGlobals, MacroGlobals, _hint)));
36103
36104
  }
36104
36105
  return event;
36105
36106
  }
@@ -36224,12 +36225,12 @@ function EventMacrosFactory() {
36224
36225
  // Check if it's date value
36225
36226
  var _MacroUtils$scheduled = MacroUtils.scheduledToUnixSafe(options),
36226
36227
  success = _MacroUtils$scheduled.success,
36227
- rest = spirits._objectWithoutProperties(_MacroUtils$scheduled, _excluded$1);
36228
+ rest = _rollupPluginBabelHelpers._objectWithoutProperties(_MacroUtils$scheduled, _excluded$1);
36228
36229
  if (!success) {
36229
36230
  if (!('scheduled' in options)) {
36230
36231
  throw new Error('.scheduled was not included in options and needs to be required');
36231
36232
  }
36232
- if (spirits._typeof(options) !== 'object') {
36233
+ if (_rollupPluginBabelHelpers._typeof(options) !== 'object') {
36233
36234
  throw new Error('second argument options in followup is not an object type');
36234
36235
  }
36235
36236
 
@@ -36283,7 +36284,7 @@ function EventMacrosFactory() {
36283
36284
  anticipate: []
36284
36285
  };
36285
36286
  if (Array.isArray(instruction)) {
36286
- var _iterator = spirits._createForOfIteratorHelper(instruction),
36287
+ var _iterator = _rollupPluginBabelHelpers._createForOfIteratorHelper(instruction),
36287
36288
  _step;
36288
36289
  try {
36289
36290
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -36424,7 +36425,7 @@ function EventMacrosFactory() {
36424
36425
  instruction.forEach(function (_instruction) {
36425
36426
  /** @type {WorkflowResponseSlot} */
36426
36427
  var slot = {};
36427
- if (spirits._typeof(_instruction) === 'object' && 'content' in _instruction) {
36428
+ if (_rollupPluginBabelHelpers._typeof(_instruction) === 'object' && 'content' in _instruction) {
36428
36429
  /** @type {Instruction} */
36429
36430
  var instructionObj = {
36430
36431
  content: instruction
@@ -36549,7 +36550,7 @@ function EventMacrosFactory() {
36549
36550
  toJSON: function toJSON() {
36550
36551
  var flush = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
36551
36552
  if (flush) {
36552
- var copy = spirits._toConsumableArray(slots);
36553
+ var copy = _rollupPluginBabelHelpers._toConsumableArray(slots);
36553
36554
  slots = [];
36554
36555
  return copy;
36555
36556
  } else {
@@ -36682,7 +36683,7 @@ const bgWhite = init(47, 49);
36682
36683
  function logUserValidationError(zodError, source) {
36683
36684
  var issues = (zodError === null || zodError === void 0 ? void 0 : zodError.issues) || [];
36684
36685
  console.log(red("Scout9 Schema Validation Error at ".concat(bold(source), ", fix these issues and rerun")));
36685
- var _iterator = spirits._createForOfIteratorHelper(issues),
36686
+ var _iterator = _rollupPluginBabelHelpers._createForOfIteratorHelper(issues),
36686
36687
  _step;
36687
36688
  try {
36688
36689
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -36736,7 +36737,7 @@ function report(config, logger) {
36736
36737
  return "".concat(white('-'), " ").concat(magenta('"')).concat(italic(i)).concat(magenta('"'));
36737
36738
  }).join('\n\t\t')));
36738
36739
  // logger.primary(`${config.agents.length} Persona${config.agents.length > 1 ? 's' : ''}\n\n`);
36739
- var _iterator2 = spirits._createForOfIteratorHelper(config.agents),
36740
+ var _iterator2 = _rollupPluginBabelHelpers._createForOfIteratorHelper(config.agents),
36740
36741
  _step2;
36741
36742
  try {
36742
36743
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -36765,7 +36766,7 @@ function report(config, logger) {
36765
36766
  } finally {
36766
36767
  _iterator2.f();
36767
36768
  }
36768
- var _iterator3 = spirits._createForOfIteratorHelper(config.entities),
36769
+ var _iterator3 = _rollupPluginBabelHelpers._createForOfIteratorHelper(config.entities),
36769
36770
  _step3;
36770
36771
  try {
36771
36772
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -36814,7 +36815,7 @@ function report(config, logger) {
36814
36815
  } finally {
36815
36816
  _iterator3.f();
36816
36817
  }
36817
- var _iterator4 = spirits._createForOfIteratorHelper(config.workflows),
36818
+ var _iterator4 = _rollupPluginBabelHelpers._createForOfIteratorHelper(config.workflows),
36818
36819
  _step4;
36819
36820
  try {
36820
36821
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
@@ -36840,12 +36841,12 @@ function audioBuffer(_x) {
36840
36841
  return _audioBuffer.apply(this, arguments);
36841
36842
  }
36842
36843
  function _audioBuffer() {
36843
- _audioBuffer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee(audio) {
36844
+ _audioBuffer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(audio) {
36844
36845
  var allowVideo,
36845
36846
  source,
36846
36847
  result,
36847
36848
  _args = arguments;
36848
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
36849
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
36849
36850
  while (1) switch (_context.prev = _context.next) {
36850
36851
  case 0:
36851
36852
  allowVideo = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
@@ -36858,7 +36859,7 @@ function _audioBuffer() {
36858
36859
  _context.next = 7;
36859
36860
  break;
36860
36861
  }
36861
- throw new Error("Invalid audio type: ".concat(spirits._typeof(audio)));
36862
+ throw new Error("Invalid audio type: ".concat(_rollupPluginBabelHelpers._typeof(audio)));
36862
36863
  case 7:
36863
36864
  if (audioExtensions.has(result.ext)) {
36864
36865
  _context.next = 10;
@@ -36892,9 +36893,9 @@ function registerAgent(_x) {
36892
36893
  * @returns {Promise<string>}
36893
36894
  */
36894
36895
  function _registerAgent() {
36895
- _registerAgent = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee(_ref) {
36896
+ _registerAgent = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(_ref) {
36896
36897
  var agent, _yield$Scout9Api$agen, id;
36897
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
36898
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
36898
36899
  while (1) switch (_context.prev = _context.next) {
36899
36900
  case 0:
36900
36901
  agent = _ref.agent;
@@ -36933,9 +36934,9 @@ function writeImgToServer(_x2) {
36933
36934
  return _writeImgToServer.apply(this, arguments);
36934
36935
  }
36935
36936
  function _writeImgToServer() {
36936
- _writeImgToServer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee2(_ref2) {
36937
+ _writeImgToServer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2(_ref2) {
36937
36938
  var img, agentId, _ref2$source, source, _yield$Scout9Api$agen2, url;
36938
- return spirits._regeneratorRuntime().wrap(function _callee2$(_context2) {
36939
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context2) {
36939
36940
  while (1) switch (_context2.prev = _context2.next) {
36940
36941
  case 0:
36941
36942
  img = _ref2.img, agentId = _ref2.agentId, _ref2$source = _ref2.source, source = _ref2$source === void 0 ? '' : _ref2$source;
@@ -36975,9 +36976,9 @@ function writeTranscriptsToServer(_x3) {
36975
36976
  return _writeTranscriptsToServer.apply(this, arguments);
36976
36977
  }
36977
36978
  function _writeTranscriptsToServer() {
36978
- _writeTranscriptsToServer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee3(_ref3) {
36979
+ _writeTranscriptsToServer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3(_ref3) {
36979
36980
  var transcripts, agentId, i, result, _yield$Scout9Api$agen3, urls;
36980
- return spirits._regeneratorRuntime().wrap(function _callee3$(_context3) {
36981
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context3) {
36981
36982
  while (1) switch (_context3.prev = _context3.next) {
36982
36983
  case 0:
36983
36984
  transcripts = _ref3.transcripts, agentId = _ref3.agentId, _ref3.source;
@@ -37029,9 +37030,9 @@ function writeAudiosToServer(_x4) {
37029
37030
  return _writeAudiosToServer.apply(this, arguments);
37030
37031
  }
37031
37032
  function _writeAudiosToServer() {
37032
- _writeAudiosToServer = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee4(_ref4) {
37033
+ _writeAudiosToServer = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee4(_ref4) {
37033
37034
  var audios, agentId, _ref4$source, source, buffers, i, _yield$audioBuffer, buffer, _yield$Scout9Api$agen4, urls;
37034
- return spirits._regeneratorRuntime().wrap(function _callee4$(_context4) {
37035
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee4$(_context4) {
37035
37036
  while (1) switch (_context4.prev = _context4.next) {
37036
37037
  case 0:
37037
37038
  audios = _ref4.audios, agentId = _ref4.agentId, _ref4$source = _ref4.source, source = _ref4$source === void 0 ? '' : _ref4$source;
@@ -37081,7 +37082,7 @@ function loadAgentConfig() {
37081
37082
  return _loadAgentConfig.apply(this, arguments);
37082
37083
  }
37083
37084
  function _loadAgentConfig() {
37084
- _loadAgentConfig = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee5() {
37085
+ _loadAgentConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee5() {
37085
37086
  var _ref5,
37086
37087
  _ref5$cwd,
37087
37088
  cwd,
@@ -37102,7 +37103,7 @@ function _loadAgentConfig() {
37102
37103
  _loop,
37103
37104
  result,
37104
37105
  _args6 = arguments;
37105
- return spirits._regeneratorRuntime().wrap(function _callee5$(_context6) {
37106
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee5$(_context6) {
37106
37107
  while (1) switch (_context6.prev = _context6.next) {
37107
37108
  case 0:
37108
37109
  _ref5 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref5$cwd = _ref5.cwd, cwd = _ref5$cwd === void 0 ? process.cwd() : _ref5$cwd, _ref5.dest, _ref5$deploying = _ref5.deploying, deploying = _ref5$deploying === void 0 ? false : _ref5$deploying, _ref5$src = _ref5.src, src = _ref5$src === void 0 ? 'src' : _ref5$src, _ref5$cb = _ref5.cb, cb = _ref5$cb === void 0 ? function (message) {} : _ref5$cb;
@@ -37152,11 +37153,11 @@ function _loadAgentConfig() {
37152
37153
  case 22:
37153
37154
  serverDeployed = false; // Track whether we deployed to server, so that we can sync code base
37154
37155
  // Send warnings if not properly registered
37155
- _iterator = spirits._createForOfIteratorHelper(agents);
37156
+ _iterator = _rollupPluginBabelHelpers._createForOfIteratorHelper(agents);
37156
37157
  _context6.prev = 24;
37157
- _loop = /*#__PURE__*/spirits._regeneratorRuntime().mark(function _loop() {
37158
+ _loop = /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _loop() {
37158
37159
  var agent, rest, userName, deployedTranscripts, pendingTranscripts, _iterator2, _step2, _transcript, txtResult, urls, i, transcript, deployedAudios, pendingAudios, _iterator3, _step3, _audio, fileType, _urls, _i, audio;
37159
- return spirits._regeneratorRuntime().wrap(function _loop$(_context5) {
37160
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _loop$(_context5) {
37160
37161
  while (1) switch (_context5.prev = _context5.next) {
37161
37162
  case 0:
37162
37163
  agent = _step.value;
@@ -37164,7 +37165,7 @@ function _loadAgentConfig() {
37164
37165
  _context5.next = 8;
37165
37166
  break;
37166
37167
  }
37167
- agent.img, agent.transcripts, agent.audios, rest = spirits._objectWithoutProperties(agent, _excluded);
37168
+ agent.img, agent.transcripts, agent.audios, rest = _rollupPluginBabelHelpers._objectWithoutProperties(agent, _excluded);
37168
37169
  _context5.next = 5;
37169
37170
  return registerAgent({
37170
37171
  agent: rest
@@ -37231,7 +37232,7 @@ function _loadAgentConfig() {
37231
37232
  var uri = _ref6.uri,
37232
37233
  isImage = _ref6.isImage;
37233
37234
  if (!isImage) {
37234
- throw new Error("Invalid image type: ".concat(spirits._typeof(agent.img)));
37235
+ throw new Error("Invalid image type: ".concat(_rollupPluginBabelHelpers._typeof(agent.img)));
37235
37236
  }
37236
37237
  return uri;
37237
37238
  });
@@ -37273,7 +37274,7 @@ function _loadAgentConfig() {
37273
37274
  var uri = _ref7.uri,
37274
37275
  isImage = _ref7.isImage;
37275
37276
  if (!isImage) {
37276
- throw new Error("Invalid image type: ".concat(spirits._typeof(agent.img)));
37277
+ throw new Error("Invalid image type: ".concat(_rollupPluginBabelHelpers._typeof(agent.img)));
37277
37278
  }
37278
37279
  return uri;
37279
37280
  });
@@ -37284,7 +37285,7 @@ function _loadAgentConfig() {
37284
37285
  _context5.next = 45;
37285
37286
  break;
37286
37287
  case 44:
37287
- throw new Error("Invalid img type: ".concat(spirits._typeof(agent.img)));
37288
+ throw new Error("Invalid img type: ".concat(_rollupPluginBabelHelpers._typeof(agent.img)));
37288
37289
  case 45:
37289
37290
  if (!(((agent === null || agent === void 0 ? void 0 : agent.transcripts) || []).length > 0)) {
37290
37291
  _context5.next = 107;
@@ -37292,7 +37293,7 @@ function _loadAgentConfig() {
37292
37293
  }
37293
37294
  deployedTranscripts = [];
37294
37295
  pendingTranscripts = [];
37295
- _iterator2 = spirits._createForOfIteratorHelper(agent.transcripts);
37296
+ _iterator2 = _rollupPluginBabelHelpers._createForOfIteratorHelper(agent.transcripts);
37296
37297
  _context5.prev = 49;
37297
37298
  _iterator2.s();
37298
37299
  case 51:
@@ -37341,7 +37342,7 @@ function _loadAgentConfig() {
37341
37342
  _context5.next = 75;
37342
37343
  break;
37343
37344
  case 74:
37344
- throw new Error("Invalid transcript type: ".concat(spirits._typeof(_transcript)));
37345
+ throw new Error("Invalid transcript type: ".concat(_rollupPluginBabelHelpers._typeof(_transcript)));
37345
37346
  case 75:
37346
37347
  _context5.next = 51;
37347
37348
  break;
@@ -37406,7 +37407,7 @@ function _loadAgentConfig() {
37406
37407
  case 105:
37407
37408
  cb("\u2705 Copied ".concat(agent.firstName || 'agent', "'s transcripts to ").concat(urls));
37408
37409
  case 106:
37409
- agent.transcripts = [].concat(deployedTranscripts, spirits._toConsumableArray(urls));
37410
+ agent.transcripts = [].concat(deployedTranscripts, _rollupPluginBabelHelpers._toConsumableArray(urls));
37410
37411
  case 107:
37411
37412
  if (!(((agent === null || agent === void 0 ? void 0 : agent.audios) || []).length > 0)) {
37412
37413
  _context5.next = 172;
@@ -37414,7 +37415,7 @@ function _loadAgentConfig() {
37414
37415
  }
37415
37416
  deployedAudios = [];
37416
37417
  pendingAudios = [];
37417
- _iterator3 = spirits._createForOfIteratorHelper(agent.audios);
37418
+ _iterator3 = _rollupPluginBabelHelpers._createForOfIteratorHelper(agent.audios);
37418
37419
  _context5.prev = 111;
37419
37420
  _iterator3.s();
37420
37421
  case 113:
@@ -37468,7 +37469,7 @@ function _loadAgentConfig() {
37468
37469
  _context5.next = 133;
37469
37470
  break;
37470
37471
  }
37471
- throw new Error("Invalid audio type: ".concat(spirits._typeof(_audio)));
37472
+ throw new Error("Invalid audio type: ".concat(_rollupPluginBabelHelpers._typeof(_audio)));
37472
37473
  case 133:
37473
37474
  if (!(videoExtensions.has(fileType.ext) || audioExtensions.has(fileType.ext))) {
37474
37475
  _context5.next = 137;
@@ -37483,7 +37484,7 @@ function _loadAgentConfig() {
37483
37484
  _context5.next = 141;
37484
37485
  break;
37485
37486
  case 140:
37486
- throw new Error("Invalid audio type: ".concat(spirits._typeof(_audio)));
37487
+ throw new Error("Invalid audio type: ".concat(_rollupPluginBabelHelpers._typeof(_audio)));
37487
37488
  case 141:
37488
37489
  _context5.next = 113;
37489
37490
  break;
@@ -37549,7 +37550,7 @@ function _loadAgentConfig() {
37549
37550
  _context5.next = 161;
37550
37551
  break;
37551
37552
  case 171:
37552
- agent.audios = [].concat(deployedAudios, spirits._toConsumableArray(_urls));
37553
+ agent.audios = [].concat(deployedAudios, _rollupPluginBabelHelpers._toConsumableArray(_urls));
37553
37554
  case 172:
37554
37555
  case "end":
37555
37556
  return _context5.stop();
@@ -37610,9 +37611,9 @@ function loadEntityApiConfig(_x, _x2) {
37610
37611
  * @returns {Promise<EntitiesRootProjectConfiguration>}
37611
37612
  */
37612
37613
  function _loadEntityApiConfig() {
37613
- _loadEntityApiConfig = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee(cwd, filePath) {
37614
+ _loadEntityApiConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(cwd, filePath) {
37614
37615
  var dir, extension, apiFilePath, mod, config, methods, key;
37615
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
37616
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
37616
37617
  while (1) switch (_context.prev = _context.next) {
37617
37618
  case 0:
37618
37619
  dir = path__default["default"].dirname(filePath);
@@ -37656,7 +37657,7 @@ function loadEntitiesConfig() {
37656
37657
  return _loadEntitiesConfig.apply(this, arguments);
37657
37658
  }
37658
37659
  function _loadEntitiesConfig() {
37659
- _loadEntitiesConfig = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee2() {
37660
+ _loadEntitiesConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2() {
37660
37661
  var _ref,
37661
37662
  _ref$cwd,
37662
37663
  cwd,
@@ -37673,7 +37674,7 @@ function _loadEntitiesConfig() {
37673
37674
  _i,
37674
37675
  _data,
37675
37676
  _args4 = arguments;
37676
- return spirits._regeneratorRuntime().wrap(function _callee2$(_context4) {
37677
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context4) {
37677
37678
  while (1) switch (_context4.prev = _context4.next) {
37678
37679
  case 0:
37679
37680
  _ref = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref$cwd = _ref.cwd, cwd = _ref$cwd === void 0 ? process.cwd() : _ref$cwd, _ref$src = _ref.src, src = _ref$src === void 0 ? 'src' : _ref$src, _ref.logger, _ref.cb;
@@ -37684,11 +37685,11 @@ function _loadEntitiesConfig() {
37684
37685
  absolute: true
37685
37686
  });
37686
37687
  data = [];
37687
- _iterator = spirits._createForOfIteratorHelper(filePaths);
37688
+ _iterator = _rollupPluginBabelHelpers._createForOfIteratorHelper(filePaths);
37688
37689
  _context4.prev = 5;
37689
- _loop2 = /*#__PURE__*/spirits._regeneratorRuntime().mark(function _loop2() {
37690
+ _loop2 = /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _loop2() {
37690
37691
  var filePath, segments, srcIndex, parents, api;
37691
- return spirits._regeneratorRuntime().wrap(function _loop2$(_context3) {
37692
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _loop2$(_context3) {
37692
37693
  while (1) switch (_context3.prev = _context3.next) {
37693
37694
  case 0:
37694
37695
  filePath = _step.value;
@@ -37744,9 +37745,9 @@ function _loadEntitiesConfig() {
37744
37745
  return _context4.finish(17);
37745
37746
  case 20:
37746
37747
  specialEntities = ['agents'];
37747
- _loop = /*#__PURE__*/spirits._regeneratorRuntime().mark(function _loop() {
37748
+ _loop = /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _loop() {
37748
37749
  var _data$_i, filePath, parents, api, entityConfig, fileName, isSpecial, entityConfigHandler, entityType, result, entityProjectConfig, existingIndex;
37749
- return spirits._regeneratorRuntime().wrap(function _loop$(_context2) {
37750
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _loop$(_context2) {
37750
37751
  while (1) switch (_context2.prev = _context2.next) {
37751
37752
  case 0:
37752
37753
  _data$_i = _data[_i], filePath = _data$_i.filePath, parents = _data$_i.parents, api = _data$_i.api;
@@ -37808,7 +37809,7 @@ function _loadEntitiesConfig() {
37808
37809
  return _context2.abrupt("return", 1);
37809
37810
  case 28:
37810
37811
  // Validate project configuration
37811
- entityProjectConfig = spirits._objectSpread2(spirits._objectSpread2({}, entityConfig), {}, {
37812
+ entityProjectConfig = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, entityConfig), {}, {
37812
37813
  entity: parents[0],
37813
37814
  entities: parents.reverse(),
37814
37815
  api: api
@@ -37835,11 +37836,11 @@ function _loadEntitiesConfig() {
37835
37836
  }
37836
37837
  throw new Error("Invalid entity configuration at \"".concat(filePath, "\", entity name mismatch"));
37837
37838
  case 40:
37838
- config[existingIndex] = spirits._objectSpread2(spirits._objectSpread2({}, config[existingIndex]), {}, {
37839
- definitions: [].concat(spirits._toConsumableArray(config[existingIndex].definitions), spirits._toConsumableArray(entityProjectConfig.definitions || [])),
37840
- training: [].concat(spirits._toConsumableArray(config[existingIndex].training), spirits._toConsumableArray(entityProjectConfig.training || [])),
37841
- tests: [].concat(spirits._toConsumableArray(config[existingIndex].tests), spirits._toConsumableArray(entityProjectConfig.tests || [])),
37842
- api: !config[existingIndex].api && !entityProjectConfig.api ? null : spirits._objectSpread2(spirits._objectSpread2({}, config[existingIndex].api || {}), entityProjectConfig.api || {})
37839
+ config[existingIndex] = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, config[existingIndex]), {}, {
37840
+ definitions: [].concat(_rollupPluginBabelHelpers._toConsumableArray(config[existingIndex].definitions), _rollupPluginBabelHelpers._toConsumableArray(entityProjectConfig.definitions || [])),
37841
+ training: [].concat(_rollupPluginBabelHelpers._toConsumableArray(config[existingIndex].training), _rollupPluginBabelHelpers._toConsumableArray(entityProjectConfig.training || [])),
37842
+ tests: [].concat(_rollupPluginBabelHelpers._toConsumableArray(config[existingIndex].tests), _rollupPluginBabelHelpers._toConsumableArray(entityProjectConfig.tests || [])),
37843
+ api: !config[existingIndex].api && !entityProjectConfig.api ? null : _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, config[existingIndex].api || {}), entityProjectConfig.api || {})
37843
37844
  });
37844
37845
  _context2.next = 44;
37845
37846
  break;
@@ -37907,7 +37908,7 @@ function loadWorkflowsConfig() {
37907
37908
  return _loadWorkflowsConfig.apply(this, arguments);
37908
37909
  }
37909
37910
  function _loadWorkflowsConfig() {
37910
- _loadWorkflowsConfig = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee() {
37911
+ _loadWorkflowsConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee() {
37911
37912
  var _ref,
37912
37913
  _ref$cwd,
37913
37914
  cwd,
@@ -37915,7 +37916,7 @@ function _loadWorkflowsConfig() {
37915
37916
  src,
37916
37917
  config,
37917
37918
  _args = arguments;
37918
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
37919
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
37919
37920
  while (1) switch (_context.prev = _context.next) {
37920
37921
  case 0:
37921
37922
  _ref = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref$cwd = _ref.cwd, cwd = _ref$cwd === void 0 ? process.cwd() : _ref$cwd, _ref$src = _ref.src, src = _ref$src === void 0 ? 'src' : _ref$src, _ref.cb;
@@ -37976,7 +37977,7 @@ function loadCommandsConfig() {
37976
37977
  return _loadCommandsConfig.apply(this, arguments);
37977
37978
  }
37978
37979
  function _loadCommandsConfig() {
37979
- _loadCommandsConfig = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee() {
37980
+ _loadCommandsConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee() {
37980
37981
  var _ref,
37981
37982
  _ref$cwd,
37982
37983
  cwd,
@@ -37984,7 +37985,7 @@ function _loadCommandsConfig() {
37984
37985
  src,
37985
37986
  config,
37986
37987
  _args = arguments;
37987
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
37988
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
37988
37989
  while (1) switch (_context.prev = _context.next) {
37989
37990
  case 0:
37990
37991
  _ref = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref$cwd = _ref.cwd, cwd = _ref$cwd === void 0 ? process.cwd() : _ref$cwd, _ref$src = _ref.src, src = _ref$src === void 0 ? 'src' : _ref$src, _ref.cb;
@@ -38062,7 +38063,7 @@ function loadConfig() {
38062
38063
  return _loadConfig.apply(this, arguments);
38063
38064
  }
38064
38065
  function _loadConfig() {
38065
- _loadConfig = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee() {
38066
+ _loadConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee() {
38066
38067
  var _ref2,
38067
38068
  _ref2$cwd,
38068
38069
  cwd,
@@ -38084,7 +38085,7 @@ function _loadConfig() {
38084
38085
  projectConfig,
38085
38086
  result,
38086
38087
  _args = arguments;
38087
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
38088
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
38088
38089
  while (1) switch (_context.prev = _context.next) {
38089
38090
  case 0:
38090
38091
  _ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$cwd = _ref2.cwd, cwd = _ref2$cwd === void 0 ? process.cwd() : _ref2$cwd, _ref2$src = _ref2.src, src = _ref2$src === void 0 ? 'src' : _ref2$src, _ref2$dest = _ref2.dest, dest = _ref2$dest === void 0 ? '/tmp/project' : _ref2$dest, _ref2$deploying = _ref2.deploying, deploying = _ref2$deploying === void 0 ? false : _ref2$deploying, _ref2$logger = _ref2.logger, logger = _ref2$logger === void 0 ? new ProgressLogger() : _ref2$logger, _ref2$cb = _ref2.cb, cb = _ref2$cb === void 0 ? function (msg) {} : _ref2$cb;
@@ -38149,7 +38150,7 @@ function _loadConfig() {
38149
38150
  /**
38150
38151
  * @type {Scout9ProjectBuildConfig}
38151
38152
  */
38152
- projectConfig = spirits._objectSpread2(spirits._objectSpread2({}, baseProjectConfig), {}, {
38153
+ projectConfig = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, baseProjectConfig), {}, {
38153
38154
  entities: entitiesConfig,
38154
38155
  agents: agentsConfig,
38155
38156
  workflows: workflowsConfig,
@@ -42799,7 +42800,7 @@ var createMockWorkflowEvent = function createMockWorkflowEvent(message) {
42799
42800
  current: intent,
42800
42801
  flow: [],
42801
42802
  initial: intent
42802
- } : spirits._typeof(intent) === 'object' ? intent : null,
42803
+ } : _rollupPluginBabelHelpers._typeof(intent) === 'object' ? intent : null,
42803
42804
  stagnationCount: 0
42804
42805
  };
42805
42806
  };
@@ -42856,89 +42857,89 @@ var Scout9Test = /*#__PURE__*/function () {
42856
42857
  project = _ref.project,
42857
42858
  _ref$log = _ref.log,
42858
42859
  log = _ref$log === void 0 ? false : _ref$log;
42859
- spirits._classCallCheck(this, Scout9Test);
42860
+ _rollupPluginBabelHelpers._classCallCheck(this, Scout9Test);
42860
42861
  /**
42861
42862
  * @param {string} command
42862
42863
  * @returns {Promise<void>}
42863
42864
  */
42864
- spirits._classPrivateMethodInitSpec(this, _loadCommand);
42865
- spirits._classPrivateMethodInitSpec(this, _loadApp);
42865
+ _rollupPluginBabelHelpers._classPrivateMethodInitSpec(this, _loadCommand);
42866
+ _rollupPluginBabelHelpers._classPrivateMethodInitSpec(this, _loadApp);
42866
42867
  /**
42867
42868
  * @type {import('@scout9/app').Customer}
42868
42869
  */
42869
- spirits._defineProperty(this, "customer", void 0);
42870
+ _rollupPluginBabelHelpers._defineProperty(this, "customer", void 0);
42870
42871
  /**
42871
42872
  * @type {import('@scout9/app').Persona}
42872
42873
  */
42873
- spirits._defineProperty(this, "persona", void 0);
42874
+ _rollupPluginBabelHelpers._defineProperty(this, "persona", void 0);
42874
42875
  /**
42875
42876
  * @type {import('@scout9/app').Conversation}
42876
42877
  */
42877
- spirits._defineProperty(this, "conversation", void 0);
42878
+ _rollupPluginBabelHelpers._defineProperty(this, "conversation", void 0);
42878
42879
  /**
42879
42880
  * @type {import('@scout9/app').Message[]}
42880
42881
  */
42881
- spirits._defineProperty(this, "messages", void 0);
42882
+ _rollupPluginBabelHelpers._defineProperty(this, "messages", void 0);
42882
42883
  /**
42883
42884
  * @type {import('@scout9/app').ConversationContext}
42884
42885
  */
42885
- spirits._defineProperty(this, "context", void 0);
42886
- spirits._classPrivateFieldInitSpec(this, _project, {
42886
+ _rollupPluginBabelHelpers._defineProperty(this, "context", void 0);
42887
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _project, {
42887
42888
  writable: true,
42888
42889
  value: null
42889
42890
  });
42890
- spirits._classPrivateFieldInitSpec(this, _app, {
42891
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _app, {
42891
42892
  writable: true,
42892
42893
  value: null
42893
42894
  });
42894
- spirits._classPrivateFieldInitSpec(this, _command, {
42895
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _command, {
42895
42896
  writable: true,
42896
42897
  value: null
42897
42898
  });
42898
- spirits._classPrivateFieldInitSpec(this, _api, {
42899
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _api, {
42899
42900
  writable: true,
42900
42901
  value: null
42901
42902
  });
42902
- spirits._classPrivateFieldInitSpec(this, _cwd, {
42903
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _cwd, {
42903
42904
  writable: true,
42904
42905
  value: void 0
42905
42906
  });
42906
- spirits._classPrivateFieldInitSpec(this, _src, {
42907
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _src, {
42907
42908
  writable: true,
42908
42909
  value: void 0
42909
42910
  });
42910
- spirits._classPrivateFieldInitSpec(this, _mode, {
42911
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _mode, {
42911
42912
  writable: true,
42912
42913
  value: void 0
42913
42914
  });
42914
- spirits._classPrivateFieldInitSpec(this, _loaded, {
42915
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _loaded, {
42915
42916
  writable: true,
42916
42917
  value: void 0
42917
42918
  });
42918
- spirits._classPrivateFieldInitSpec(this, _personaId, {
42919
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _personaId, {
42919
42920
  writable: true,
42920
42921
  value: void 0
42921
42922
  });
42922
- spirits._classPrivateFieldInitSpec(this, _defaultLog, {
42923
+ _rollupPluginBabelHelpers._classPrivateFieldInitSpec(this, _defaultLog, {
42923
42924
  writable: true,
42924
42925
  value: void 0
42925
42926
  });
42926
42927
  this.messages = [];
42927
- spirits._classPrivateFieldSet(this, _cwd, cwd);
42928
- spirits._classPrivateFieldSet(this, _src, src);
42929
- spirits._classPrivateFieldSet(this, _mode, mode);
42930
- this.context = spirits._objectSpread2(spirits._objectSpread2({}, context || {}), {}, {
42928
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _cwd, cwd);
42929
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _src, src);
42930
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _mode, mode);
42931
+ this.context = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, context || {}), {}, {
42931
42932
  __no_cache: true
42932
42933
  });
42933
42934
  this.conversation = conversation;
42934
42935
  if (api) {
42935
- spirits._classPrivateFieldSet(this, _api, api);
42936
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _api, api);
42936
42937
  }
42937
42938
  if (app) {
42938
- spirits._classPrivateFieldSet(this, _app, app);
42939
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _app, app);
42939
42940
  }
42940
42941
  if (project) {
42941
- spirits._classPrivateFieldSet(this, _project, project);
42942
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _project, project);
42942
42943
  }
42943
42944
  if (!customer) {
42944
42945
  customer = {
@@ -42953,8 +42954,8 @@ var Scout9Test = /*#__PURE__*/function () {
42953
42954
  }
42954
42955
  this.customer = customer;
42955
42956
  this.context.customer = customer;
42956
- spirits._classPrivateFieldSet(this, _personaId, persona);
42957
- spirits._classPrivateFieldSet(this, _defaultLog, !!log);
42957
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _personaId, persona);
42958
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _defaultLog, !!log);
42958
42959
  }
42959
42960
 
42960
42961
  /**
@@ -42962,76 +42963,76 @@ var Scout9Test = /*#__PURE__*/function () {
42962
42963
  * @param {boolean} [override] - defaults to false, if true, it will override the current loaded state such as the scout9 api, workflow function, and project config
42963
42964
  * @returns {Promise<void>}
42964
42965
  */
42965
- spirits._createClass(Scout9Test, [{
42966
+ _rollupPluginBabelHelpers._createClass(Scout9Test, [{
42966
42967
  key: "load",
42967
42968
  value: (function () {
42968
- var _load = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee() {
42969
+ var _load = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee() {
42969
42970
  var _this = this;
42970
42971
  var override,
42971
42972
  _ref2,
42972
42973
  _args = arguments;
42973
- return spirits._regeneratorRuntime().wrap(function _callee$(_context) {
42974
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
42974
42975
  while (1) switch (_context.prev = _context.next) {
42975
42976
  case 0:
42976
42977
  override = _args.length > 0 && _args[0] !== undefined ? _args[0] : false;
42977
- if (!(override || !spirits._classPrivateFieldGet(this, _app))) {
42978
+ if (!(override || !_rollupPluginBabelHelpers._classPrivateFieldGet(this, _app))) {
42978
42979
  _context.next = 9;
42979
42980
  break;
42980
42981
  }
42981
- _context.t0 = spirits._classPrivateFieldSet;
42982
+ _context.t0 = _rollupPluginBabelHelpers._classPrivateFieldSet;
42982
42983
  _context.t1 = this;
42983
42984
  _context.t2 = _app;
42984
42985
  _context.next = 7;
42985
- return spirits._classPrivateMethodGet(this, _loadApp, _loadApp2).call(this);
42986
+ return _rollupPluginBabelHelpers._classPrivateMethodGet(this, _loadApp, _loadApp2).call(this);
42986
42987
  case 7:
42987
42988
  _context.t3 = _context.sent;
42988
42989
  (0, _context.t0)(_context.t1, _context.t2, _context.t3);
42989
42990
  case 9:
42990
- if (!(override || !spirits._classPrivateFieldGet(this, _project))) {
42991
+ if (!(override || !_rollupPluginBabelHelpers._classPrivateFieldGet(this, _project))) {
42991
42992
  _context.next = 17;
42992
42993
  break;
42993
42994
  }
42994
- _context.t4 = spirits._classPrivateFieldSet;
42995
+ _context.t4 = _rollupPluginBabelHelpers._classPrivateFieldSet;
42995
42996
  _context.t5 = this;
42996
42997
  _context.t6 = _project;
42997
42998
  _context.next = 15;
42998
42999
  return loadConfig({
42999
- cwd: spirits._classPrivateFieldGet(this, _cwd),
43000
- src: spirits._classPrivateFieldGet(this, _src),
43001
- mode: spirits._classPrivateFieldGet(this, _mode)
43000
+ cwd: _rollupPluginBabelHelpers._classPrivateFieldGet(this, _cwd),
43001
+ src: _rollupPluginBabelHelpers._classPrivateFieldGet(this, _src),
43002
+ mode: _rollupPluginBabelHelpers._classPrivateFieldGet(this, _mode)
43002
43003
  });
43003
43004
  case 15:
43004
43005
  _context.t7 = _context.sent;
43005
43006
  (0, _context.t4)(_context.t5, _context.t6, _context.t7);
43006
43007
  case 17:
43007
- if (override || !spirits._classPrivateFieldGet(this, _api)) {
43008
- spirits._classPrivateFieldSet(this, _api, new build.Scout9Api(new build.Configuration({
43008
+ if (override || !_rollupPluginBabelHelpers._classPrivateFieldGet(this, _api)) {
43009
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _api, new build.Scout9Api(new build.Configuration({
43009
43010
  apiKey: process.env.SCOUT9_API_KEY
43010
43011
  })));
43011
43012
  }
43012
- if (spirits._classPrivateFieldGet(this, _personaId)) {
43013
+ if (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _personaId)) {
43013
43014
  _context.next = 22;
43014
43015
  break;
43015
43016
  }
43016
- spirits._classPrivateFieldSet(this, _personaId, (_ref2 = spirits._classPrivateFieldGet(this, _project).persona || spirits._classPrivateFieldGet(this, _project).agents) === null || _ref2 === void 0 || (_ref2 = _ref2[0]) === null || _ref2 === void 0 ? void 0 : _ref2.id);
43017
- if (spirits._classPrivateFieldGet(this, _personaId)) {
43017
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _personaId, (_ref2 = _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).persona || _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).agents) === null || _ref2 === void 0 || (_ref2 = _ref2[0]) === null || _ref2 === void 0 ? void 0 : _ref2.id);
43018
+ if (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _personaId)) {
43018
43019
  _context.next = 22;
43019
43020
  break;
43020
43021
  }
43021
43022
  throw new Error("No persona found in config, please specify a persona id");
43022
43023
  case 22:
43023
- this.conversation.$agent = spirits._classPrivateFieldGet(this, _personaId);
43024
- this.persona = (spirits._classPrivateFieldGet(this, _project).persona || spirits._classPrivateFieldGet(this, _project).agents).find(function (p) {
43025
- return p.id === spirits._classPrivateFieldGet(_this, _personaId);
43024
+ this.conversation.$agent = _rollupPluginBabelHelpers._classPrivateFieldGet(this, _personaId);
43025
+ this.persona = (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).persona || _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).agents).find(function (p) {
43026
+ return p.id === _rollupPluginBabelHelpers._classPrivateFieldGet(_this, _personaId);
43026
43027
  });
43027
43028
  if (this.persona) {
43028
43029
  _context.next = 26;
43029
43030
  break;
43030
43031
  }
43031
- throw new Error("Could not find persona with id: ".concat(spirits._classPrivateFieldGet(this, _personaId), ", ensure your project is sync'd by running \"scout9 sync\" or you are using the correct persona id"));
43032
+ throw new Error("Could not find persona with id: ".concat(_rollupPluginBabelHelpers._classPrivateFieldGet(this, _personaId), ", ensure your project is sync'd by running \"scout9 sync\" or you are using the correct persona id"));
43032
43033
  case 26:
43033
43034
  this.context.agent = this.persona;
43034
- spirits._classPrivateFieldSet(this, _loaded, true);
43035
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _loaded, true);
43035
43036
  case 28:
43036
43037
  case "end":
43037
43038
  return _context.stop();
@@ -43050,10 +43051,10 @@ var Scout9Test = /*#__PURE__*/function () {
43050
43051
  }, {
43051
43052
  key: "teardown",
43052
43053
  value: function teardown() {
43053
- spirits._classPrivateFieldSet(this, _loaded, false);
43054
- spirits._classPrivateFieldSet(this, _api, null);
43055
- spirits._classPrivateFieldSet(this, _project, null);
43056
- spirits._classPrivateFieldSet(this, _app, null);
43054
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _loaded, false);
43055
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _api, null);
43056
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _project, null);
43057
+ _rollupPluginBabelHelpers._classPrivateFieldSet(this, _app, null);
43057
43058
  }
43058
43059
 
43059
43060
  /**
@@ -43065,7 +43066,7 @@ var Scout9Test = /*#__PURE__*/function () {
43065
43066
  }, {
43066
43067
  key: "send",
43067
43068
  value: (function () {
43068
- var _send = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee4(message) {
43069
+ var _send = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee4(message) {
43069
43070
  var _this2 = this;
43070
43071
  var progress,
43071
43072
  target,
@@ -43077,11 +43078,11 @@ var Scout9Test = /*#__PURE__*/function () {
43077
43078
  _result$conversation$,
43078
43079
  _result$conversation$2,
43079
43080
  _args4 = arguments;
43080
- return spirits._regeneratorRuntime().wrap(function _callee4$(_context4) {
43081
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee4$(_context4) {
43081
43082
  while (1) switch (_context4.prev = _context4.next) {
43082
43083
  case 0:
43083
- progress = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : spirits._classPrivateFieldGet(this, _defaultLog);
43084
- if (spirits._classPrivateFieldGet(this, _loaded)) {
43084
+ progress = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : _rollupPluginBabelHelpers._classPrivateFieldGet(this, _defaultLog);
43085
+ if (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _loaded)) {
43085
43086
  _context4.next = 4;
43086
43087
  break;
43087
43088
  }
@@ -43090,18 +43091,18 @@ var Scout9Test = /*#__PURE__*/function () {
43090
43091
  case 4:
43091
43092
  // Check if it's a command
43092
43093
  target = message.toLowerCase().trim();
43093
- commandToSwitchTo = spirits._classPrivateFieldGet(this, _project).commands.find(function (command) {
43094
+ commandToSwitchTo = _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).commands.find(function (command) {
43094
43095
  return command.entity === target;
43095
43096
  });
43096
43097
  if (!commandToSwitchTo) {
43097
43098
  _context4.next = 15;
43098
43099
  break;
43099
43100
  }
43100
- _context4.t0 = spirits._classPrivateFieldSet;
43101
+ _context4.t0 = _rollupPluginBabelHelpers._classPrivateFieldSet;
43101
43102
  _context4.t1 = this;
43102
43103
  _context4.t2 = _command;
43103
43104
  _context4.next = 12;
43104
- return spirits._classPrivateMethodGet(this, _loadCommand, _loadCommand2).call(this, commandToSwitchTo.entity);
43105
+ return _rollupPluginBabelHelpers._classPrivateMethodGet(this, _loadCommand, _loadCommand2).call(this, commandToSwitchTo.entity);
43105
43106
  case 12:
43106
43107
  _context4.t3 = _context4.sent;
43107
43108
  (0, _context4.t0)(_context4.t1, _context4.t2, _context4.t3);
@@ -43139,19 +43140,19 @@ var Scout9Test = /*#__PURE__*/function () {
43139
43140
  _context4.next = 22;
43140
43141
  return spirits.Spirits.customer({
43141
43142
  customer: this.customer,
43142
- config: spirits._classPrivateFieldGet(this, _project),
43143
+ config: _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project),
43143
43144
  parser: function () {
43144
- var _parser = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee2(_msg, _lng) {
43145
+ var _parser = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2(_msg, _lng) {
43145
43146
  var detectableEntities;
43146
- return spirits._regeneratorRuntime().wrap(function _callee2$(_context2) {
43147
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context2) {
43147
43148
  while (1) switch (_context2.prev = _context2.next) {
43148
43149
  case 0:
43149
43150
  // @TODO can't do this for HUGE data sets
43150
- detectableEntities = spirits._classPrivateFieldGet(_this2, _project).entities.filter(function (e) {
43151
+ detectableEntities = _rollupPluginBabelHelpers._classPrivateFieldGet(_this2, _project).entities.filter(function (e) {
43151
43152
  var _e$training, _e$definitions;
43152
43153
  return ((_e$training = e.training) === null || _e$training === void 0 ? void 0 : _e$training.length) > 0 && ((_e$definitions = e.definitions) === null || _e$definitions === void 0 ? void 0 : _e$definitions.length) > 0;
43153
43154
  });
43154
- return _context2.abrupt("return", spirits._classPrivateFieldGet(_this2, _api).parse({
43155
+ return _context2.abrupt("return", _rollupPluginBabelHelpers._classPrivateFieldGet(_this2, _api).parse({
43155
43156
  message: _msg,
43156
43157
  language: _lng,
43157
43158
  entities: detectableEntities
@@ -43170,15 +43171,15 @@ var Scout9Test = /*#__PURE__*/function () {
43170
43171
  return parser;
43171
43172
  }(),
43172
43173
  workflow: function () {
43173
- var _workflow = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee3(event) {
43174
+ var _workflow = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3(event) {
43174
43175
  var _this2$conversation$$;
43175
- return spirits._regeneratorRuntime().wrap(function _callee3$(_context3) {
43176
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context3) {
43176
43177
  while (1) switch (_context3.prev = _context3.next) {
43177
43178
  case 0:
43178
- globalThis.SCOUT9 = spirits._objectSpread2(spirits._objectSpread2({}, event), {}, {
43179
+ globalThis.SCOUT9 = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, event), {}, {
43179
43180
  $convo: (_this2$conversation$$ = _this2.conversation.$id) !== null && _this2$conversation$$ !== void 0 ? _this2$conversation$$ : 'test_convo'
43180
43181
  });
43181
- return _context3.abrupt("return", (spirits._classPrivateFieldGet(_this2, _command) ? spirits._classPrivateFieldGet(_this2, _command) : spirits._classPrivateFieldGet(_this2, _app))(event).then(function (response) {
43182
+ return _context3.abrupt("return", (_rollupPluginBabelHelpers._classPrivateFieldGet(_this2, _command) ? _rollupPluginBabelHelpers._classPrivateFieldGet(_this2, _command) : _rollupPluginBabelHelpers._classPrivateFieldGet(_this2, _app))(event).then(function (response) {
43182
43183
  if ('toJSON' in response) {
43183
43184
  return response.toJSON();
43184
43185
  } else {
@@ -43203,7 +43204,7 @@ var Scout9Test = /*#__PURE__*/function () {
43203
43204
  return workflow;
43204
43205
  }(),
43205
43206
  generator: function generator(request) {
43206
- return spirits._classPrivateFieldGet(_this2, _api).generate(request).then(function (_res) {
43207
+ return _rollupPluginBabelHelpers._classPrivateFieldGet(_this2, _api).generate(request).then(function (_res) {
43207
43208
  return _res.data;
43208
43209
  });
43209
43210
  },
@@ -43265,23 +43266,23 @@ var Scout9Test = /*#__PURE__*/function () {
43265
43266
  }, {
43266
43267
  key: "parse",
43267
43268
  value: (function () {
43268
- var _parse = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee5(message) {
43269
+ var _parse = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee5(message) {
43269
43270
  var language,
43270
43271
  _args5 = arguments;
43271
- return spirits._regeneratorRuntime().wrap(function _callee5$(_context5) {
43272
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee5$(_context5) {
43272
43273
  while (1) switch (_context5.prev = _context5.next) {
43273
43274
  case 0:
43274
43275
  language = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : 'en';
43275
- if (spirits._classPrivateFieldGet(this, _project)) {
43276
+ if (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _project)) {
43276
43277
  _context5.next = 3;
43277
43278
  break;
43278
43279
  }
43279
43280
  throw new Error("Config is not defined");
43280
43281
  case 3:
43281
- return _context5.abrupt("return", spirits._classPrivateFieldGet(this, _api).parse({
43282
+ return _context5.abrupt("return", _rollupPluginBabelHelpers._classPrivateFieldGet(this, _api).parse({
43282
43283
  message: message,
43283
43284
  language: language,
43284
- entities: spirits._classPrivateFieldGet(this, _project).entities
43285
+ entities: _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).entities
43285
43286
  }).then(function (_res) {
43286
43287
  return _res.data;
43287
43288
  }));
@@ -43306,14 +43307,14 @@ var Scout9Test = /*#__PURE__*/function () {
43306
43307
  }, {
43307
43308
  key: "workflow",
43308
43309
  value: (function () {
43309
- var _workflow2 = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee6(message) {
43310
+ var _workflow2 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee6(message) {
43310
43311
  var event,
43311
43312
  _args6 = arguments;
43312
- return spirits._regeneratorRuntime().wrap(function _callee6$(_context6) {
43313
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee6$(_context6) {
43313
43314
  while (1) switch (_context6.prev = _context6.next) {
43314
43315
  case 0:
43315
43316
  event = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
43316
- if (spirits._classPrivateFieldGet(this, _app)) {
43317
+ if (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _app)) {
43317
43318
  _context6.next = 3;
43318
43319
  break;
43319
43320
  }
@@ -43322,7 +43323,7 @@ var Scout9Test = /*#__PURE__*/function () {
43322
43323
  if (event.hasOwnProperty('message')) {
43323
43324
  console.warn("WARNING: inserting a \"event.message\" will overwrite your \"message\" argument");
43324
43325
  }
43325
- return _context6.abrupt("return", spirits._classPrivateFieldGet(this, _app).call(this, spirits._objectSpread2(spirits._objectSpread2({}, createMockWorkflowEvent(message)), event)));
43326
+ return _context6.abrupt("return", _rollupPluginBabelHelpers._classPrivateFieldGet(this, _app).call(this, _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, createMockWorkflowEvent(message)), event)));
43326
43327
  case 5:
43327
43328
  case "end":
43328
43329
  return _context6.stop();
@@ -43347,25 +43348,25 @@ var Scout9Test = /*#__PURE__*/function () {
43347
43348
  }, {
43348
43349
  key: "generate",
43349
43350
  value: (function () {
43350
- var _generate = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee7(_ref3) {
43351
+ var _generate = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee7(_ref3) {
43351
43352
  var _ref3$personaId, personaId, _ref3$conversation, conversation, _ref3$messages, messages, _ref3$context, context, persona;
43352
- return spirits._regeneratorRuntime().wrap(function _callee7$(_context7) {
43353
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee7$(_context7) {
43353
43354
  while (1) switch (_context7.prev = _context7.next) {
43354
43355
  case 0:
43355
- _ref3$personaId = _ref3.personaId, personaId = _ref3$personaId === void 0 ? spirits._classPrivateFieldGet(this, _personaId) : _ref3$personaId, _ref3$conversation = _ref3.conversation, conversation = _ref3$conversation === void 0 ? {} : _ref3$conversation, _ref3$messages = _ref3.messages, messages = _ref3$messages === void 0 ? this.messages : _ref3$messages, _ref3$context = _ref3.context, context = _ref3$context === void 0 ? this.context : _ref3$context;
43356
- if (spirits._classPrivateFieldGet(this, _api)) {
43356
+ _ref3$personaId = _ref3.personaId, personaId = _ref3$personaId === void 0 ? _rollupPluginBabelHelpers._classPrivateFieldGet(this, _personaId) : _ref3$personaId, _ref3$conversation = _ref3.conversation, conversation = _ref3$conversation === void 0 ? {} : _ref3$conversation, _ref3$messages = _ref3.messages, messages = _ref3$messages === void 0 ? this.messages : _ref3$messages, _ref3$context = _ref3.context, context = _ref3$context === void 0 ? this.context : _ref3$context;
43357
+ if (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _api)) {
43357
43358
  _context7.next = 3;
43358
43359
  break;
43359
43360
  }
43360
43361
  throw new Error("Scout9 API is not loaded or found - make sure to run \".load()\" before calling \".generate()\"");
43361
43362
  case 3:
43362
- if (spirits._classPrivateFieldGet(this, _project)) {
43363
+ if (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _project)) {
43363
43364
  _context7.next = 5;
43364
43365
  break;
43365
43366
  }
43366
43367
  throw new Error("Config is not defined - make sure to run \".load()\" before calling \".generate()\"");
43367
43368
  case 5:
43368
- persona = (spirits._classPrivateFieldGet(this, _project).persona || spirits._classPrivateFieldGet(this, _project).agents).find(function (p) {
43369
+ persona = (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).persona || _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).agents).find(function (p) {
43369
43370
  return p.id === personaId;
43370
43371
  });
43371
43372
  if (persona) {
@@ -43374,8 +43375,8 @@ var Scout9Test = /*#__PURE__*/function () {
43374
43375
  }
43375
43376
  throw new Error("Could not find persona with id: ".concat(personaId, ", ensure your project is sync'd by running \"scout9 sync\""));
43376
43377
  case 8:
43377
- return _context7.abrupt("return", spirits._classPrivateFieldGet(this, _api).generate({
43378
- convo: spirits._objectSpread2(spirits._objectSpread2({
43378
+ return _context7.abrupt("return", _rollupPluginBabelHelpers._classPrivateFieldGet(this, _api).generate({
43379
+ convo: _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({
43379
43380
  $customer: this.customer.id,
43380
43381
  environment: this.conversation.environment,
43381
43382
  initialContexts: this.conversation.initialContexts || []
@@ -43385,8 +43386,8 @@ var Scout9Test = /*#__PURE__*/function () {
43385
43386
  messages: messages,
43386
43387
  context: context,
43387
43388
  persona: persona,
43388
- llm: spirits._classPrivateFieldGet(this, _project).llm,
43389
- pmt: spirits._classPrivateFieldGet(this, _project).pmt
43389
+ llm: _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).llm,
43390
+ pmt: _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).pmt
43390
43391
  }).then(function (_res) {
43391
43392
  return _res.data;
43392
43393
  }));
@@ -43408,7 +43409,7 @@ var Scout9Test = /*#__PURE__*/function () {
43408
43409
  }, {
43409
43410
  key: "context",
43410
43411
  set: function set(ctx) {
43411
- this.context = spirits._objectSpread2(spirits._objectSpread2({}, this.context), ctx);
43412
+ this.context = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, this.context), ctx);
43412
43413
  }
43413
43414
  }]);
43414
43415
  return Scout9Test;
@@ -43417,28 +43418,28 @@ function _loadApp2() {
43417
43418
  return _loadApp3.apply(this, arguments);
43418
43419
  }
43419
43420
  function _loadApp3() {
43420
- _loadApp3 = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee8() {
43421
+ _loadApp3 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee8() {
43421
43422
  var paths, _paths, appFilePath;
43422
- return spirits._regeneratorRuntime().wrap(function _callee8$(_context8) {
43423
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee8$(_context8) {
43423
43424
  while (1) switch (_context8.prev = _context8.next) {
43424
43425
  case 0:
43425
- paths = globSync("".concat(spirits._classPrivateFieldGet(this, _src), "/app.{ts,cjs,mjs,js}"), {
43426
- cwd: spirits._classPrivateFieldGet(this, _cwd),
43426
+ paths = globSync("".concat(_rollupPluginBabelHelpers._classPrivateFieldGet(this, _src), "/app.{ts,cjs,mjs,js}"), {
43427
+ cwd: _rollupPluginBabelHelpers._classPrivateFieldGet(this, _cwd),
43427
43428
  absolute: true
43428
43429
  });
43429
43430
  if (!(paths.length === 0)) {
43430
43431
  _context8.next = 5;
43431
43432
  break;
43432
43433
  }
43433
- throw new Error("Missing main project entry file ".concat(spirits._classPrivateFieldGet(this, _src), "/app.{js|ts|cjs|mjs}"));
43434
+ throw new Error("Missing main project entry file ".concat(_rollupPluginBabelHelpers._classPrivateFieldGet(this, _src), "/app.{js|ts|cjs|mjs}"));
43434
43435
  case 5:
43435
43436
  if (!(paths.length > 1)) {
43436
43437
  _context8.next = 7;
43437
43438
  break;
43438
43439
  }
43439
- throw new Error("Multiple main project entry files found ".concat(spirits._classPrivateFieldGet(this, _src), "/app.{js|ts|cjs|mjs}"));
43440
+ throw new Error("Multiple main project entry files found ".concat(_rollupPluginBabelHelpers._classPrivateFieldGet(this, _src), "/app.{js|ts|cjs|mjs}"));
43440
43441
  case 7:
43441
- _paths = spirits._slicedToArray(paths, 1), appFilePath = _paths[0];
43442
+ _paths = _rollupPluginBabelHelpers._slicedToArray(paths, 1), appFilePath = _paths[0];
43442
43443
  return _context8.abrupt("return", requireProjectFile(appFilePath).then(function (mod) {
43443
43444
  return mod["default"];
43444
43445
  }));
@@ -43454,19 +43455,19 @@ function _loadCommand2(_x8) {
43454
43455
  return _loadCommand3.apply(this, arguments);
43455
43456
  }
43456
43457
  function _loadCommand3() {
43457
- _loadCommand3 = spirits._asyncToGenerator( /*#__PURE__*/spirits._regeneratorRuntime().mark(function _callee9(command) {
43458
+ _loadCommand3 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee9(command) {
43458
43459
  var commandsDir, commandConfig, commandFilePath, mod;
43459
- return spirits._regeneratorRuntime().wrap(function _callee9$(_context9) {
43460
+ return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee9$(_context9) {
43460
43461
  while (1) switch (_context9.prev = _context9.next) {
43461
43462
  case 0:
43462
- if (spirits._classPrivateFieldGet(this, _project)) {
43463
+ if (_rollupPluginBabelHelpers._classPrivateFieldGet(this, _project)) {
43463
43464
  _context9.next = 2;
43464
43465
  break;
43465
43466
  }
43466
43467
  throw new Error("Must load #project before running #loadCommand");
43467
43468
  case 2:
43468
- commandsDir = path$2.resolve(spirits._classPrivateFieldGet(this, _src), "./commands");
43469
- commandConfig = spirits._classPrivateFieldGet(this, _project).commands.find(function (c) {
43469
+ commandsDir = path$2.resolve(_rollupPluginBabelHelpers._classPrivateFieldGet(this, _src), "./commands");
43470
+ commandConfig = _rollupPluginBabelHelpers._classPrivateFieldGet(this, _project).commands.find(function (c) {
43470
43471
  return c.entity === command || c.path === command;
43471
43472
  });
43472
43473
  if (commandConfig) {