@promptbook/remote-server 0.35.1 → 0.36.1

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.
Files changed (106) hide show
  1. package/README.md +1 -1
  2. package/esm/index.es.js +20 -7
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/_packages/core.index.d.ts +8 -8
  5. package/esm/typings/_packages/remote-server.index.d.ts +2 -2
  6. package/esm/typings/_packages/types.index.d.ts +8 -8
  7. package/esm/typings/classes/PromptbookLibrary.d.ts +61 -0
  8. package/esm/typings/conversion/_importPromptbook.d.ts +12 -0
  9. package/esm/typings/conversion/promptbookStringToJson.d.ts +13 -0
  10. package/esm/typings/conversion/validatePromptbookJson.d.ts +26 -0
  11. package/{umd/typings/execution/PtpExecutor.d.ts → esm/typings/execution/PromptbookExecutor.d.ts} +5 -5
  12. package/esm/typings/execution/assertsExecutionSuccessful.d.ts +2 -2
  13. package/esm/typings/execution/createPromptbookExecutor.d.ts +40 -0
  14. package/esm/typings/execution/plugins/natural-execution-tools/mocked/joker.test.d.ts +1 -1
  15. package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +1 -1
  16. package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +1 -1
  17. package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +1 -1
  18. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Error.d.ts → Promptbook_Server_Error.d.ts} +1 -1
  19. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Progress.d.ts → Promptbook_Server_Progress.d.ts} +1 -1
  20. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Request.d.ts → Promptbook_Server_Request.d.ts} +2 -2
  21. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Response.d.ts → Promptbook_Server_Response.d.ts} +2 -2
  22. package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +3 -3
  23. package/{umd/typings/execution/plugins/natural-execution-tools/remote/runRemoteServer.d.ts → esm/typings/execution/plugins/natural-execution-tools/remote/startRemoteServer.d.ts} +2 -2
  24. package/esm/typings/types/Command.d.ts +12 -12
  25. package/esm/typings/types/Parameters.d.ts +3 -3
  26. package/esm/typings/types/Prompt.d.ts +5 -5
  27. package/{umd/typings/types/PromptTemplatePipelineJson → esm/typings/types/PromptbookJson}/PromptTemplateJson.d.ts +4 -4
  28. package/esm/typings/types/{PromptTemplatePipelineJson → PromptbookJson}/PromptTemplateParameterJson.d.ts +2 -2
  29. package/{umd/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts → esm/typings/types/PromptbookJson/PromptbookJson.d.ts} +11 -15
  30. package/esm/typings/types/PromptbookString.d.ts +12 -0
  31. package/esm/typings/types/TaskProgress.d.ts +1 -1
  32. package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +10 -10
  33. package/esm/typings/types/typeAliases.d.ts +4 -4
  34. package/esm/typings/utils/expectation-counters/countCharacters.d.ts +1 -1
  35. package/esm/typings/utils/expectation-counters/countLines.d.ts +1 -1
  36. package/esm/typings/utils/expectation-counters/countPages.d.ts +1 -1
  37. package/esm/typings/utils/expectation-counters/countParagraphs.d.ts +1 -1
  38. package/esm/typings/utils/expectation-counters/countSentences.d.ts +1 -1
  39. package/esm/typings/utils/expectation-counters/countWords.d.ts +1 -1
  40. package/esm/typings/utils/expectation-counters/index.d.ts +1 -1
  41. package/esm/typings/utils/isRunningInWhatever.d.ts +12 -0
  42. package/esm/typings/version.d.ts +1 -1
  43. package/package.json +2 -2
  44. package/umd/index.umd.js +20 -7
  45. package/umd/index.umd.js.map +1 -1
  46. package/umd/typings/_packages/core.index.d.ts +8 -8
  47. package/umd/typings/_packages/remote-server.index.d.ts +2 -2
  48. package/umd/typings/_packages/types.index.d.ts +8 -8
  49. package/umd/typings/classes/PromptbookLibrary.d.ts +61 -0
  50. package/umd/typings/conversion/_importPromptbook.d.ts +12 -0
  51. package/umd/typings/conversion/promptbookStringToJson.d.ts +13 -0
  52. package/umd/typings/conversion/validatePromptbookJson.d.ts +26 -0
  53. package/{esm/typings/execution/PtpExecutor.d.ts → umd/typings/execution/PromptbookExecutor.d.ts} +5 -5
  54. package/umd/typings/execution/assertsExecutionSuccessful.d.ts +2 -2
  55. package/umd/typings/execution/createPromptbookExecutor.d.ts +40 -0
  56. package/umd/typings/execution/plugins/natural-execution-tools/mocked/joker.test.d.ts +1 -1
  57. package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +1 -1
  58. package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +1 -1
  59. package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +1 -1
  60. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Error.d.ts → Promptbook_Server_Error.d.ts} +1 -1
  61. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Progress.d.ts → Promptbook_Server_Progress.d.ts} +1 -1
  62. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Request.d.ts → Promptbook_Server_Request.d.ts} +2 -2
  63. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Response.d.ts → Promptbook_Server_Response.d.ts} +2 -2
  64. package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +3 -3
  65. package/{esm/typings/execution/plugins/natural-execution-tools/remote/runRemoteServer.d.ts → umd/typings/execution/plugins/natural-execution-tools/remote/startRemoteServer.d.ts} +2 -2
  66. package/umd/typings/types/Command.d.ts +12 -12
  67. package/umd/typings/types/Parameters.d.ts +3 -3
  68. package/umd/typings/types/Prompt.d.ts +5 -5
  69. package/{esm/typings/types/PromptTemplatePipelineJson → umd/typings/types/PromptbookJson}/PromptTemplateJson.d.ts +4 -4
  70. package/umd/typings/types/{PromptTemplatePipelineJson → PromptbookJson}/PromptTemplateParameterJson.d.ts +2 -2
  71. package/{esm/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts → umd/typings/types/PromptbookJson/PromptbookJson.d.ts} +11 -15
  72. package/umd/typings/types/PromptbookString.d.ts +12 -0
  73. package/umd/typings/types/TaskProgress.d.ts +1 -1
  74. package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +10 -10
  75. package/umd/typings/types/typeAliases.d.ts +4 -4
  76. package/umd/typings/utils/expectation-counters/countCharacters.d.ts +1 -1
  77. package/umd/typings/utils/expectation-counters/countLines.d.ts +1 -1
  78. package/umd/typings/utils/expectation-counters/countPages.d.ts +1 -1
  79. package/umd/typings/utils/expectation-counters/countParagraphs.d.ts +1 -1
  80. package/umd/typings/utils/expectation-counters/countSentences.d.ts +1 -1
  81. package/umd/typings/utils/expectation-counters/countWords.d.ts +1 -1
  82. package/umd/typings/utils/expectation-counters/index.d.ts +1 -1
  83. package/umd/typings/utils/isRunningInWhatever.d.ts +12 -0
  84. package/umd/typings/version.d.ts +1 -1
  85. package/esm/typings/classes/PromptTemplatePipelineLibrary.d.ts +0 -71
  86. package/esm/typings/config.d.ts +0 -12
  87. package/esm/typings/conversion/_importPtp.d.ts +0 -12
  88. package/esm/typings/conversion/promptTemplatePipelineStringToJson.d.ts +0 -13
  89. package/esm/typings/conversion/validatePromptTemplatePipelineJson.d.ts +0 -26
  90. package/esm/typings/execution/createPtpExecutor.d.ts +0 -40
  91. package/esm/typings/types/PromptTemplatePipelineString.d.ts +0 -16
  92. package/umd/typings/classes/PromptTemplatePipelineLibrary.d.ts +0 -71
  93. package/umd/typings/config.d.ts +0 -12
  94. package/umd/typings/conversion/_importPtp.d.ts +0 -12
  95. package/umd/typings/conversion/promptTemplatePipelineStringToJson.d.ts +0 -13
  96. package/umd/typings/conversion/validatePromptTemplatePipelineJson.d.ts +0 -26
  97. package/umd/typings/execution/createPtpExecutor.d.ts +0 -40
  98. package/umd/typings/types/PromptTemplatePipelineString.d.ts +0 -16
  99. /package/esm/typings/conversion/{promptTemplatePipelineStringToJson-syntaxErrors.test.d.ts → promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
  100. /package/esm/typings/conversion/{promptTemplatePipelineStringToJson.test.d.ts → promptbookStringToJson.test.d.ts} +0 -0
  101. /package/esm/typings/conversion/{validatePromptTemplatePipelineJson-logicErrors.test.d.ts → validatePromptbookJson-logicErrors.test.d.ts} +0 -0
  102. /package/esm/typings/conversion/{validatePromptTemplatePipelineJson.test.d.ts → validatePromptbookJson.test.d.ts} +0 -0
  103. /package/umd/typings/conversion/{promptTemplatePipelineStringToJson-syntaxErrors.test.d.ts → promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
  104. /package/umd/typings/conversion/{promptTemplatePipelineStringToJson.test.d.ts → promptbookStringToJson.test.d.ts} +0 -0
  105. /package/umd/typings/conversion/{validatePromptTemplatePipelineJson-logicErrors.test.d.ts → validatePromptbookJson-logicErrors.test.d.ts} +0 -0
  106. /package/umd/typings/conversion/{validatePromptTemplatePipelineJson.test.d.ts → validatePromptbookJson.test.d.ts} +0 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 📖 Prompt template pipelines
1
+ # 📖 Promptbook
2
2
 
3
3
  Library to supercharge your use of large language models
4
4
 
package/esm/index.es.js CHANGED
@@ -59,7 +59,7 @@ function __generator(thisArg, body) {
59
59
  /**
60
60
  * The version of the Promptbook library
61
61
  */
62
- var PTBK_VERSION = '0.35.0';
62
+ var PROMPTBOOK_VERSION = '0.36.0';
63
63
 
64
64
  /**
65
65
  * Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
@@ -69,15 +69,15 @@ var PTBK_VERSION = '0.35.0';
69
69
  *
70
70
  * @see https://github.com/webgptorg/promptbook#remote-server
71
71
  */
72
- function runRemoteServer(options) {
72
+ function startRemoteServer(options) {
73
73
  var _this = this;
74
- var port = options.port, path = options.path, /* [🎛] ptbkLibrary, */ createNaturalExecutionTools = options.createNaturalExecutionTools, isVerbose = options.isVerbose;
74
+ var port = options.port, path = options.path, /* [🎛] promptbookLibrary, */ createNaturalExecutionTools = options.createNaturalExecutionTools, isVerbose = options.isVerbose;
75
75
  var httpServer = http.createServer({}, function (request, response) {
76
76
  var _a;
77
77
  if ((_a = request.url) === null || _a === void 0 ? void 0 : _a.includes('socket.io')) {
78
78
  return;
79
79
  }
80
- response.write(spaceTrim("\n Server for processing promptbook remote requests is running.\n\n Version: ".concat(PTBK_VERSION, "\n\n For more information look at:\n https://github.com/webgptorg/promptbook\n\n ")));
80
+ response.write(spaceTrim("\n Server for processing promptbook remote requests is running.\n\n Version: ".concat(PROMPTBOOK_VERSION, "\n\n For more information look at:\n https://github.com/webgptorg/promptbook\n\n ")));
81
81
  response.end();
82
82
  });
83
83
  var server = new Server(httpServer, {
@@ -149,18 +149,31 @@ function runRemoteServer(options) {
149
149
  });
150
150
  httpServer.listen(port);
151
151
  // Note: We want to log this also in non-verbose mode
152
- console.info(chalk.bgGreen("PTP server listening on port ".concat(port)));
152
+ console.info(chalk.bgGreen("PROMPTBOOK server listening on port ".concat(port)));
153
153
  if (isVerbose) {
154
154
  console.info(chalk.green("Verbose mode is enabled"));
155
155
  }
156
+ var isDestroyed = false;
157
+ return {
158
+ get isDestroyed() {
159
+ return isDestroyed;
160
+ },
161
+ destroy: function () {
162
+ if (isDestroyed) {
163
+ return;
164
+ }
165
+ isDestroyed = true;
166
+ httpServer.close();
167
+ server.close();
168
+ },
169
+ };
156
170
  }
157
171
  /**
158
- * TODO: !!! This should be name runRemoteServer OR startRemoteServer and return Destroyable OR Promise<Destroyable>
159
172
  * TODO: Handle progress - support streaming
160
173
  * TODO: [🤹‍♂️] Do not hang up immediately but wait until client closes OR timeout
161
174
  * TODO: [🤹‍♂️] Timeout on chat to free up resources
162
175
  * TODO: [🃏] Pass here some security token to prevent malitious usage and/or DDoS
163
176
  */
164
177
 
165
- export { runRemoteServer };
178
+ export { startRemoteServer };
166
179
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/version.ts","../../../src/execution/plugins/natural-execution-tools/remote/runRemoteServer.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuDA;AACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,E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AU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;IAGxB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,uCAAgC,IAAI,CAAE,CAAC,CAAC,CAAC;IACpE,IAAI,SAAS,EAAE;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;KACxD;AACL,CAAC;AAED;;;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/version.ts","../../../src/execution/plugins/natural-execution-tools/remote/startRemoteServer.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuDA;AACO,SAAS,SAAS,CAAC,OAAO,EAAE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C;QAEH,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE;;YAEpB,IAAI,SAAS,EAAE;gBACX,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;aAC9D;SACJ,CAAC,CAAC;KACN,CAAC,CAAC;IAEH,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;IAGxB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,8CAAuC,IAAI,CAAE,CAAC,CAAC,CAAC;IAC3E,IAAI,SAAS,EAAE;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;KACxD;IAED,IAAI,WAAW,GAAG,KAAK,CAAC;IAExB,OAAO;QACH,IAAI,WAAW;YACX,OAAO,WAAW,CAAC;SACtB;QACD,OAAO;YACH,IAAI,WAAW,EAAE;gBACb,OAAO;aACV;YACD,WAAW,GAAG,IAAI,CAAC;YACnB,UAAU,CAAC,KAAK,EAAE,CAAC;YACnB,MAAM,CAAC,KAAK,EAAE,CAAC;SAClB;KACJ,CAAC;AACN,CAAC;AAED;;;;;;;;;"}
@@ -1,16 +1,16 @@
1
- import { PromptTemplatePipelineLibrary } from '../classes/PromptTemplatePipelineLibrary';
2
- import { PTBK_VERSION } from '../version';
3
- import { promptTemplatePipelineStringToJson } from '../conversion/promptTemplatePipelineStringToJson';
4
- import { validatePromptTemplatePipelineJson } from '../conversion/validatePromptTemplatePipelineJson';
5
- import { createPtpExecutor } from '../execution/createPtpExecutor';
1
+ import { PromptbookLibrary } from '../classes/PromptbookLibrary';
2
+ import { promptbookStringToJson } from '../conversion/promptbookStringToJson';
3
+ import { validatePromptbookJson } from '../conversion/validatePromptbookJson';
4
+ import { createPromptbookExecutor } from '../execution/createPromptbookExecutor';
6
5
  import { MockedEchoNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools';
7
6
  import { CallbackInterfaceTools } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools';
8
7
  import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions';
9
8
  import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
10
9
  import { ExecutionTypes } from '../types/ExecutionTypes';
11
- export { ExecutionTypes, PTBK_VERSION, PromptTemplatePipelineLibrary };
10
+ import { PROMPTBOOK_VERSION } from '../version';
11
+ export { ExecutionTypes, PROMPTBOOK_VERSION, PromptbookLibrary };
12
12
  export { SimplePromptInterfaceTools };
13
- export { promptTemplatePipelineStringToJson, validatePromptTemplatePipelineJson };
13
+ export { promptbookStringToJson, validatePromptbookJson };
14
14
  export { MockedEchoNaturalExecutionTools };
15
- export { createPtpExecutor };
15
+ export { createPromptbookExecutor };
16
16
  export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
@@ -1,3 +1,3 @@
1
1
  import { RemoteServerOptions } from '../execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions';
2
- import { runRemoteServer } from '../execution/plugins/natural-execution-tools/remote/runRemoteServer';
3
- export { RemoteServerOptions, runRemoteServer };
2
+ import { startRemoteServer } from '../execution/plugins/natural-execution-tools/remote/startRemoteServer';
3
+ export { RemoteServerOptions, startRemoteServer };
@@ -2,24 +2,24 @@ import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionTo
2
2
  import type { ExecutionTools } from '../execution/ExecutionTools';
3
3
  import type { NaturalExecutionTools } from '../execution/NaturalExecutionTools';
4
4
  import type { PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult } from '../execution/PromptResult';
5
- import type { PtpExecutor } from '../execution/PtpExecutor';
5
+ import type { PromptbookExecutor } from '../execution/PromptbookExecutor';
6
6
  import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools';
7
7
  import type { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
8
8
  import type { ExecutionType } from '../types/ExecutionTypes';
9
9
  import type { ModelRequirements, ModelVariant } from '../types/ModelRequirements';
10
10
  import type { Parameters } from '../types/Parameters';
11
11
  import type { Prompt } from '../types/Prompt';
12
- import type { EXPECTATION_UNITS, ExpectationAmount, ExpectationUnit, PromptTemplateJson } from '../types/PromptTemplatePipelineJson/PromptTemplateJson';
13
- import type { PromptTemplateParameterJson } from '../types/PromptTemplatePipelineJson/PromptTemplateParameterJson';
14
- import type { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson';
15
- import type { PromptTemplatePipelineString } from '../types/PromptTemplatePipelineString';
12
+ import type { EXPECTATION_UNITS, ExpectationAmount, ExpectationUnit, PromptTemplateJson } from '../types/PromptbookJson/PromptTemplateJson';
13
+ import type { PromptTemplateParameterJson } from '../types/PromptbookJson/PromptTemplateParameterJson';
14
+ import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
15
+ import type { PromptbookString } from '../types/PromptbookString';
16
16
  import type { ScriptLanguage } from '../types/ScriptLanguage';
17
17
  import type { TaskProgress } from '../types/TaskProgress';
18
18
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
19
19
  import type { string_char_emoji } from '../types/typeAliasEmoji';
20
- import type { ILicense, IPersonProfile, IRepository, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml } from '../types/typeAliases';
20
+ import type { client_id, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_person_fullname, string_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_version } from '../types/typeAliases';
21
21
  import { FromtoItems } from '../utils/FromtoItems';
22
- export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_property, string_css_selector, string_css_value, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_xml, };
22
+ export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptbookExecutor, PromptbookJson, PromptbookString, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_person_fullname, string_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_version, };
23
23
  /**
24
- * TODO: !!! Filter out all the types that are not used in the library
24
+ * TODO: Delete type aliases that are not exported here
25
25
  */
@@ -0,0 +1,61 @@
1
+ import { string_name } from '.././types/typeAliases';
2
+ import { CreatePromptbookExecutorSettings } from '../execution/createPromptbookExecutor';
3
+ import { ExecutionTools } from '../execution/ExecutionTools';
4
+ import { PromptbookExecutor } from '../execution/PromptbookExecutor';
5
+ import { Prompt } from '../types/Prompt';
6
+ import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
7
+ import { PromptbookString } from '../types/PromptbookString';
8
+ /**
9
+ * Library of promptbooks that groups together promptbooks for an application. This is a very thin wrapper around the Array / Set of promptbooks.
10
+ *
11
+ * Promptbook library is a useful helper in execution, it can be shared between execution and consumer parts of the app and make common knowledge about promptbooks.
12
+ *
13
+ * It allows to create executor functions from promptbooks in the library.
14
+ *
15
+ * @see https://github.com/webgptorg/promptbook#prompt-template-pipeline-library
16
+ */
17
+ export declare class PromptbookLibrary {
18
+ private readonly options;
19
+ /**
20
+ * Constructs Promptbook from any sources
21
+ *
22
+ * Note: During the construction syntax and logic of all sources are validated
23
+ * Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended
24
+ *
25
+ * @param promptbookSources contents of .ptbk.md or .ptbk.json files
26
+ * @param settings settings for creating executor functions
27
+ * @returns PromptbookLibrary
28
+ */
29
+ static fromSources(promptbookSources: Record<string_name, PromptbookJson | PromptbookString>, settings?: Partial<CreatePromptbookExecutorSettings>): PromptbookLibrary;
30
+ private constructor();
31
+ /**
32
+ * Gets all promptbooks in the library
33
+ */
34
+ get promptbookNames(): Array<string_name>;
35
+ /**
36
+ * Gets promptbook by name
37
+ */
38
+ getPromptbookByName(name: string_name): PromptbookJson;
39
+ /**
40
+ * Checks whether prompt is in the library
41
+ */
42
+ isPromptInLibrary(prompt: Prompt): boolean;
43
+ /**
44
+ * Gets executor function for given promptbook
45
+ */
46
+ createExecutor(name: string_name, tools: ExecutionTools): PromptbookExecutor;
47
+ }
48
+ /**
49
+ * TODO: [🈴] Identify promptbooks by url `promptbookUrls` + `getPromptbookByUrl`
50
+ * TODO: !! [👐][🧠] Split of Promptbook,PromptbookLibrary between interface and class
51
+ * TODO: !! [👐] Make promptbooks private WHEN split between interface and class
52
+ * TODO: [🧠] Maybe isPromptInLibrary should be separate utility function
53
+ * TODO: [🧠] Maybe createExecutor should be separate utility function
54
+ * TODO: Static method fromDirectory
55
+ * TODO: [🤜] Add generic type for entry and result parameters
56
+ * TODO: [🧠] Is it better to promptbookLibrary.executePromptbook('writeXyz',{...}) OR promptbookLibrary.createExecutor('writeXyz')({...}) OR createExecutor(promptbookLibrary.getPromptbook('writeXyz'))
57
+ * TODO: [🧠] Formarly (before commit 62229afce7668a5b85077cc18becf798b583bf8d) there were two classes PromptbookLibrary+PromptbookLibraryExecutor (maybe it was better?)
58
+ * TODO: [🧠] Is it better to pass tools into getExecutor or into constructor
59
+ * Maybe it is not a good idea to cache executors when they are can be created with different tools
60
+ * TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
61
+ */
@@ -0,0 +1,12 @@
1
+ import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
+ import { PromptbookString } from '../types/PromptbookString';
3
+ /**
4
+ * Import the text file
5
+ *
6
+ * Note: Using here custom import to work in jest tests
7
+ * Note: Using sync version is 💩 in the production code, but it's ok here in tests
8
+ *
9
+ * @private
10
+ */
11
+ export declare function importPromptbook(path: `${string}.ptbk.md`): PromptbookString;
12
+ export declare function importPromptbook(path: `${string}.ptbk.json`): PromptbookJson;
@@ -0,0 +1,13 @@
1
+ import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
+ import { PromptbookString } from '../types/PromptbookString';
3
+ /**
4
+ * Parse promptbook from string format to JSON format
5
+ *
6
+ * Note: This function does not validate logic of the pipeline only the syntax
7
+ */
8
+ export declare function promptbookStringToJson(promptbookString: PromptbookString): PromptbookJson;
9
+ /**
10
+ * TODO: Report here line/column of error
11
+ * TODO: Use spaceTrim more effectively
12
+ * TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
13
+ */
@@ -0,0 +1,26 @@
1
+ import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
+ /**
3
+ * Validates PromptbookJson if it is logically valid.
4
+ *
5
+ * It checks:
6
+ * - if it has correct parameters dependency
7
+ *
8
+ * It does NOT check:
9
+ * - if it is valid json
10
+ * - if it is meaningful
11
+ *
12
+ * @param promptbook valid or invalid PromptbookJson
13
+ * @throws {Error} if invalid
14
+ */
15
+ export declare function validatePromptbookJson(promptbook: PromptbookJson): void;
16
+ /**
17
+ * TODO: [🧠] Work with promptbookVersion
18
+ * TODO: Use here some json-schema, Zod or something similar and change it to:
19
+ * > /**
20
+ * > * Validates PromptbookJson if it is logically valid.
21
+ * > *
22
+ * > * It checks:
23
+ * > * - it has a valid structure
24
+ * > * - ...
25
+ * > ex port function validatePromptbookJson(promptbook: unknown): asserts promptbook is PromptbookJson {
26
+ */
@@ -1,18 +1,18 @@
1
1
  import type { Promisable } from 'type-fest';
2
- import type { string_name } from '.././types/typeAliases';
3
2
  import type { TaskProgress } from '../types/TaskProgress';
4
3
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
4
+ import type { string_name } from '../types/typeAliases';
5
5
  /**
6
6
  * Executor is a simple async function that takes INPUT PARAMETERs and returns result parameters _(along with all intermediate parameters and INPUT PARAMETERs = it extends input object)_.
7
- * Executor is made by combining execution tools and prompt template pipeline library.
7
+ * Executor is made by combining execution tools and promptbook library.
8
8
  *
9
9
  * It can be done in two ways:
10
- * - From `PromptTemplatePipelineLibrary.getExecutor` method
11
- * - `createPtpExecutor` utility function
10
+ * - From `PromptbookLibrary.getExecutor` method
11
+ * - `createPromptbookExecutor` utility function
12
12
  *
13
13
  * @see https://github.com/webgptorg/promptbook#executor
14
14
  */
15
- export interface PtpExecutor {
15
+ export interface PromptbookExecutor {
16
16
  (inputParameters: Record<string_name, string>, onProgress: (taskProgress: TaskProgress) => Promisable<void>): Promise<{
17
17
  /**
18
18
  * Whether the execution was successful
@@ -1,11 +1,11 @@
1
- import type { PtpExecutor } from './PtpExecutor';
1
+ import type { PromptbookExecutor } from './PromptbookExecutor';
2
2
  /**
3
3
  * Asserts that the execution of a promptnook is successful
4
4
  *
5
5
  * @param executionResult - The partial result of the promptnook execution
6
6
  * @throws Error - If the execution is not successful or if multiple errors occurred
7
7
  */
8
- export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PtpExecutor>>, 'isSuccessful' | 'errors'>): void;
8
+ export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PromptbookExecutor>>, 'isSuccessful' | 'errors'>): void;
9
9
  /**
10
10
  * TODO: [🧠] Can this return type be better typed than void
11
11
  */
@@ -0,0 +1,40 @@
1
+ import { PromptbookJson } from '../_packages/types.index';
2
+ import { ExecutionTools } from './ExecutionTools';
3
+ import { PromptbookExecutor } from './PromptbookExecutor';
4
+ export interface CreatePromptbookExecutorSettings {
5
+ /**
6
+ * When executor does not satisfy expectations it will be retried this amount of times
7
+ *
8
+ * @default 3
9
+ */
10
+ readonly maxExecutionAttempts: number;
11
+ }
12
+ /**
13
+ * Options for creating a promptbook executor
14
+ */
15
+ interface CreatePromptbookExecutorOptions {
16
+ /**
17
+ * The promptbook to be executed
18
+ */
19
+ readonly promptbook: PromptbookJson;
20
+ /**
21
+ * The execution tools to be used during the execution of the PROMPTBOOK
22
+ */
23
+ readonly tools: ExecutionTools;
24
+ /**
25
+ * Optional settings for the PROMPTBOOK executor
26
+ */
27
+ readonly settings?: Partial<CreatePromptbookExecutorSettings>;
28
+ }
29
+ /**
30
+ * Creates executor function from promptbook and execution tools.
31
+ *
32
+ * Note: Consider using getExecutor method of the library instead of using this function
33
+ */
34
+ export declare function createPromptbookExecutor(options: CreatePromptbookExecutorOptions): PromptbookExecutor;
35
+ export {};
36
+ /**
37
+ * TODO: [🧠] When not meet expectations in PROMPT_DIALOG, make some way to tell the user
38
+ * TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
39
+ * Note: CreatePromptbookExecutorOptions are just connected to PromptbookExecutor so do not extract to types folder
40
+ */
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * TODO: [🧠] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPtpExecutor.test.ts"
3
+ * TODO: [🧠] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * TODO: [🧠] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPtpExecutor.test.ts"
3
+ * TODO: [🧠] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * TODO: [🧠] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPtpExecutor.test.ts"
3
+ * TODO: [🧠] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
4
4
  */
@@ -5,7 +5,7 @@ import { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOption
5
5
  */
6
6
  export interface RemoteNaturalExecutionToolsOptions extends CommonExecutionToolsOptions {
7
7
  /**
8
- * URL of the remote PTP server
8
+ * URL of the remote PROMPTBOOK server
9
9
  * On this server will be connected to the socket.io server
10
10
  */
11
11
  readonly remoteUrl: URL;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * This is sent from server to client when error occurs and stops the process
5
5
  */
6
- export interface Ptps_Error {
6
+ export interface Promptbook_Server_Error {
7
7
  /**
8
8
  * The error message which caused the error
9
9
  */
@@ -4,7 +4,7 @@ import { TaskProgress } from '../../../../../types/TaskProgress';
4
4
  *
5
5
  * This is sent from server to client arbitrarily and may be sent multiple times
6
6
  */
7
- export interface Ptps_Progress {
7
+ export interface Promptbook_Server_Progress {
8
8
  /**
9
9
  * The progress of text generation
10
10
  */
@@ -1,11 +1,11 @@
1
- import type { client_id } from '../../../../.././types/typeAliases';
1
+ import type { client_id } from '../../../../../types/typeAliases';
2
2
  import type { Prompt } from '../../../../../types/Prompt';
3
3
  /**
4
4
  * Socket.io progress for remote text generation
5
5
  *
6
6
  * This is a request from client to server
7
7
  */
8
- export interface Ptps_Request {
8
+ export interface Promptbook_Server_Request {
9
9
  /**
10
10
  * Client responsible for the requests
11
11
  */
@@ -1,10 +1,10 @@
1
- import { PromptResult } from '../../../../../execution/PromptResult';
1
+ import { PromptResult } from '../../../../PromptResult';
2
2
  /**
3
3
  * Socket.io error for remote text generation
4
4
  *
5
5
  * This is sent from server to client when the generated text is completed
6
6
  */
7
- export interface Ptps_Response {
7
+ export interface Promptbook_Server_Response {
8
8
  /**
9
9
  * The result of the prompt
10
10
  */
@@ -1,4 +1,4 @@
1
- import type { PromptTemplatePipelineLibrary } from '../../../../../classes/PromptTemplatePipelineLibrary';
1
+ import type { PromptbookLibrary } from '../../../../../classes/PromptbookLibrary';
2
2
  import type { client_id, string_uri } from '../../../../../types/typeAliases';
3
3
  import type { CommonExecutionToolsOptions } from '../../../../CommonExecutionToolsOptions';
4
4
  import type { NaturalExecutionTools } from '../../../../NaturalExecutionTools';
@@ -15,11 +15,11 @@ export interface RemoteServerOptions extends CommonExecutionToolsOptions {
15
15
  */
16
16
  readonly path: string_uri;
17
17
  /**
18
- * Prompt template pipeline library to use
18
+ * Promptbook library to use
19
19
  *
20
20
  * This is used to checkl validity of the prompt to prevent DDoS
21
21
  */
22
- readonly ptbkLibrary: PromptTemplatePipelineLibrary;
22
+ readonly library: PromptbookLibrary;
23
23
  /**
24
24
  * Creates natural execution tools for each client
25
25
  */
@@ -1,3 +1,4 @@
1
+ import type { IDestroyable } from 'destroyable';
1
2
  import { RemoteServerOptions } from './interfaces/RemoteServerOptions';
2
3
  /**
3
4
  * Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
@@ -7,9 +8,8 @@ import { RemoteServerOptions } from './interfaces/RemoteServerOptions';
7
8
  *
8
9
  * @see https://github.com/webgptorg/promptbook#remote-server
9
10
  */
10
- export declare function runRemoteServer(options: RemoteServerOptions): void;
11
+ export declare function startRemoteServer(options: RemoteServerOptions): IDestroyable;
11
12
  /**
12
- * TODO: !!! This should be name runRemoteServer OR startRemoteServer and return Destroyable OR Promise<Destroyable>
13
13
  * TODO: Handle progress - support streaming
14
14
  * TODO: [🤹‍♂️] Do not hang up immediately but wait until client closes OR timeout
15
15
  * TODO: [🤹‍♂️] Timeout on chat to free up resources
@@ -1,31 +1,31 @@
1
1
  import type { string_markdown_text, string_name, string_version } from '.././types/typeAliases';
2
2
  import type { ExecutionType } from './ExecutionTypes';
3
3
  import type { ModelRequirements } from './ModelRequirements';
4
- import type { ExpectationAmount, ExpectationUnit } from './PromptTemplatePipelineJson/PromptTemplateJson';
4
+ import type { ExpectationAmount, ExpectationUnit } from './PromptbookJson/PromptTemplateJson';
5
5
  /**
6
6
  * Command is one piece of the prompt template which adds some logic to the prompt template or the whole pipeline.
7
7
  * It is parsed from the markdown from ul/ol items - one command per one item.
8
8
  */
9
- export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | ModelCommand | JokerCommand | ParameterCommand | PostprocessCommand | ExpectCommand;
9
+ export type Command = PromptbookUrlCommand | PromptbookVersionCommand | ExecuteCommand | ModelCommand | JokerCommand | ParameterCommand | PostprocessCommand | ExpectCommand;
10
10
  /**
11
- * PtpVersion command tells which version is .ptp file using
11
+ * PromptbookVersion command tells which version is .promptbook file using
12
12
  *
13
13
  * - It is used for backward compatibility
14
- * - It is defined per whole .ptp file in the header
14
+ * - It is defined per whole .promptbook file in the header
15
15
  */
16
- export interface PtbkUrlCommand {
17
- readonly type: 'PTBK_URL';
18
- readonly ptbkUrl: URL;
16
+ export interface PromptbookUrlCommand {
17
+ readonly type: 'PROMPTBOOK_URL';
18
+ readonly promptbookUrl: URL;
19
19
  }
20
20
  /**
21
- * PtpVersion command tells which version is .ptp file using
21
+ * PromptbookVersion command tells which version is .promptbook file using
22
22
  *
23
23
  * - It is used for backward compatibility
24
- * - It is defined per whole .ptp file in the header
24
+ * - It is defined per whole .promptbook file in the header
25
25
  */
26
- export interface PtbkVersionCommand {
27
- readonly type: 'PTBK_VERSION';
28
- readonly ptbkVersion: string_version;
26
+ export interface PromptbookVersionCommand {
27
+ readonly type: 'PROMPTBOOK_VERSION';
28
+ readonly promptbookVersion: string_version;
29
29
  }
30
30
  /**
31
31
  * Execute command tells how to execute the section