@promptbook/remote-client 0.84.0-0 → 0.84.0-11

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 (30) hide show
  1. package/README.md +1 -0
  2. package/esm/index.es.js +27 -3
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/cli.index.d.ts +8 -0
  5. package/esm/typings/src/_packages/core.index.d.ts +4 -0
  6. package/esm/typings/src/_packages/markitdown.index.d.ts +8 -0
  7. package/esm/typings/src/_packages/pdf.index.d.ts +6 -0
  8. package/esm/typings/src/_packages/utils.index.d.ts +4 -0
  9. package/esm/typings/src/_packages/wizzard.index.d.ts +8 -0
  10. package/esm/typings/src/constants.d.ts +1 -1
  11. package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +1 -1
  12. package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +1 -1
  13. package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +3 -1
  14. package/esm/typings/src/pipeline/book-notation.d.ts +5 -0
  15. package/esm/typings/src/pipeline/prompt-notation.d.ts +31 -0
  16. package/esm/typings/src/pipeline/prompt-notation.test.d.ts +4 -0
  17. package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +43 -0
  18. package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +20 -0
  19. package/esm/typings/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +5 -0
  20. package/esm/typings/src/scrapers/_boilerplate/register-constructor.d.ts +15 -0
  21. package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +28 -0
  22. package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +50 -0
  23. package/esm/typings/src/scrapers/markitdown/createMarkitdownScraper.d.ts +22 -0
  24. package/esm/typings/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +5 -0
  25. package/esm/typings/src/scrapers/markitdown/register-constructor.d.ts +17 -0
  26. package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +28 -0
  27. package/esm/typings/src/types/typeAliases.d.ts +1 -1
  28. package/package.json +3 -3
  29. package/umd/index.umd.js +27 -3
  30. package/umd/index.umd.js.map +1 -1
package/README.md CHANGED
@@ -269,6 +269,7 @@ Or you can install them separately:
269
269
  - **[@promptbook/remote-client](https://www.npmjs.com/package/@promptbook/remote-client)** - Remote client for remote execution of promptbooks
270
270
  - **[@promptbook/remote-server](https://www.npmjs.com/package/@promptbook/remote-server)** - Remote server for remote execution of promptbooks
271
271
  - **[@promptbook/pdf](https://www.npmjs.com/package/@promptbook/pdf)** - Read knowledge from `.pdf` documents
272
+ - **[@promptbook/documents](https://www.npmjs.com/package/@promptbook/markitdown)** - Integration of [Markitdown by Microsoft](https://github.com/microsoft/markitdown)
272
273
  - **[@promptbook/documents](https://www.npmjs.com/package/@promptbook/documents)** - Read knowledge from documents like `.docx`, `.odt`,…
273
274
  - **[@promptbook/legacy-documents](https://www.npmjs.com/package/@promptbook/legacy-documents)** - Read knowledge from legacy documents like `.doc`, `.rtf`,…
274
275
  - **[@promptbook/website-crawler](https://www.npmjs.com/package/@promptbook/website-crawler)** - Crawl knowledge from the web
package/esm/index.es.js CHANGED
@@ -19,7 +19,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
19
19
  * @generated
20
20
  * @see https://github.com/webgptorg/promptbook
21
21
  */
22
- var PROMPTBOOK_ENGINE_VERSION = '0.83.0';
22
+ var PROMPTBOOK_ENGINE_VERSION = '0.84.0-10';
23
23
  /**
24
24
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
25
25
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -303,7 +303,7 @@ var NotFoundError = /** @class */ (function (_super) {
303
303
  var NotYetImplementedError = /** @class */ (function (_super) {
304
304
  __extends(NotYetImplementedError, _super);
305
305
  function NotYetImplementedError(message) {
306
- var _this = _super.call(this, spaceTrim(function (block) { return "\n ".concat(block(message), "\n\n Note: This feature is not implemented yet but it will be soon.\n\n If you want speed up the implementation or just read more, look here:\n https://github.com/webgptorg/promptbook\n\n Or contact us on me@pavolhejny.com\n\n "); })) || this;
306
+ var _this = _super.call(this, spaceTrim(function (block) { return "\n ".concat(block(message), "\n\n Note: This feature is not implemented yet but it will be soon.\n\n If you want speed up the implementation or just read more, look here:\n https://github.com/webgptorg/promptbook\n\n Or contact us on pavol@ptbk.io\n\n "); })) || this;
307
307
  _this.name = 'NotYetImplementedError';
308
308
  Object.setPrototypeOf(_this, NotYetImplementedError.prototype);
309
309
  return _this;
@@ -411,7 +411,7 @@ var NAME = "Promptbook";
411
411
  *
412
412
  * @public exported from `@promptbook/core`
413
413
  */
414
- var ADMIN_EMAIL = 'me@pavolhejny.com';
414
+ var ADMIN_EMAIL = 'pavol@ptbk.io';
415
415
  /**
416
416
  * Name of the responsible person for the Promptbook on GitHub
417
417
  *
@@ -4508,6 +4508,21 @@ var HIGH_LEVEL_ABSTRACTIONS = [
4508
4508
  * Note: [💞] Ignore a discrepancy between file name and entity name
4509
4509
  */
4510
4510
 
4511
+ /**
4512
+ * Checks if value is valid email
4513
+ *
4514
+ * @public exported from `@promptbook/utils`
4515
+ */
4516
+ function isValidEmail(email) {
4517
+ if (typeof email !== 'string') {
4518
+ return false;
4519
+ }
4520
+ if (email.split('\n').length > 1) {
4521
+ return false;
4522
+ }
4523
+ return /^.+@.+\..+$/.test(email);
4524
+ }
4525
+
4511
4526
  /**
4512
4527
  * Function `validatePipelineString` will validate the if the string is a valid pipeline string
4513
4528
  * It does not check if the string is fully logically correct, but if it is a string that can be a pipeline string or the string looks completely different.
@@ -4521,6 +4536,15 @@ function validatePipelineString(pipelineString) {
4521
4536
  if (isValidJsonString(pipelineString)) {
4522
4537
  throw new ParseError('Expected a book, but got a JSON string');
4523
4538
  }
4539
+ else if (isValidUrl(pipelineString)) {
4540
+ throw new ParseError("Expected a book, but got just the URL \"".concat(pipelineString, "\""));
4541
+ }
4542
+ else if (isValidFilePath(pipelineString)) {
4543
+ throw new ParseError("Expected a book, but got just the file path \"".concat(pipelineString, "\""));
4544
+ }
4545
+ else if (isValidEmail(pipelineString)) {
4546
+ throw new ParseError("Expected a book, but got just the email \"".concat(pipelineString, "\""));
4547
+ }
4524
4548
  // <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
4525
4549
  return pipelineString;
4526
4550
  }