@promptbook/remote-client 0.84.0-21 → 0.84.0-9

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 (38) hide show
  1. package/README.md +5 -21
  2. package/esm/index.es.js +9 -62
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/cli.index.d.ts +0 -4
  5. package/esm/typings/src/_packages/core.index.d.ts +2 -12
  6. package/esm/typings/src/_packages/types.index.d.ts +0 -2
  7. package/esm/typings/src/_packages/utils.index.d.ts +0 -2
  8. package/esm/typings/src/_packages/wizzard.index.d.ts +0 -4
  9. package/esm/typings/src/cli/cli-commands/about.d.ts +1 -3
  10. package/esm/typings/src/cli/cli-commands/hello.d.ts +1 -3
  11. package/esm/typings/src/cli/cli-commands/list-models.d.ts +1 -3
  12. package/esm/typings/src/cli/cli-commands/make.d.ts +1 -3
  13. package/esm/typings/src/cli/cli-commands/prettify.d.ts +1 -3
  14. package/esm/typings/src/cli/cli-commands/run.d.ts +1 -3
  15. package/esm/typings/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -1
  16. package/esm/typings/src/cli/cli-commands/test-command.d.ts +1 -3
  17. package/esm/typings/src/config.d.ts +1 -27
  18. package/esm/typings/src/conversion/compilePipelineOnRemoteServer.d.ts +1 -1
  19. package/esm/typings/src/execution/FilesystemTools.d.ts +1 -1
  20. package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -3
  21. package/esm/typings/src/pipeline/book-notation.d.ts +2 -3
  22. package/esm/typings/src/pipeline/prompt-notation.d.ts +5 -18
  23. package/esm/typings/src/prepare/preparePipelineOnRemoteServer.d.ts +1 -1
  24. package/esm/typings/src/remote-server/socket-types/_subtypes/PromptbookServer_Identification.d.ts +2 -5
  25. package/esm/typings/src/wizzard/wizzard.d.ts +1 -7
  26. package/package.json +16 -9
  27. package/umd/index.umd.js +9 -62
  28. package/umd/index.umd.js.map +1 -1
  29. package/esm/typings/src/_packages/deepseek.index.d.ts +0 -8
  30. package/esm/typings/src/cli/cli-commands/list-scrapers.d.ts +0 -13
  31. package/esm/typings/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +0 -9
  32. package/esm/typings/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -14
  33. package/esm/typings/src/llm-providers/deepseek/register-configuration.d.ts +0 -14
  34. package/esm/typings/src/llm-providers/deepseek/register-constructor.d.ts +0 -15
  35. package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.test.d.ts +0 -1
  36. package/esm/typings/src/utils/editable/utils/isFlatPipeline.test.d.ts +0 -1
  37. package/esm/typings/src/utils/files/mimeTypeToExtension.d.ts +0 -10
  38. package/esm/typings/src/utils/files/mimeTypeToExtension.test.d.ts +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten -->
2
2
 
3
- # Promptbook
3
+ # Promptbook
4
4
 
5
5
 
6
6
 
@@ -14,13 +14,12 @@
14
14
 
15
15
 
16
16
 
17
- ## 🌟 New Features
17
+ ## New Features
18
18
 
19
- - 💫 Support of [`o3-mini` model by OpenAI](https://openai.com/index/openai-o3-mini/)
20
- - 🐋 **Support of [DeepSeek models](https://www.npmjs.com/package/@promptbook/deepseek)**
21
19
  - 💙 Working [the **Book** language v1.0.0](https://github.com/webgptorg/book)
22
20
  - 🖤 Run books from CLI - `npx ptbk run path/to/your/book`
23
- - 📚 Support of `.docx`, `.doc` and `.pdf` documents as knowledge
21
+ - 📚 Support of `.docx`, `.doc` and `.pdf` documents
22
+ - ✨ **Support of [OpenAI o1 model](https://openai.com/o1/)**
24
23
 
25
24
 
26
25
 
@@ -264,9 +263,8 @@ Or you can install them separately:
264
263
  - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
265
264
  - **[@promptbook/vercel](https://www.npmjs.com/package/@promptbook/vercel)** - Adapter for Vercel functionalities
266
265
  - **[@promptbook/google](https://www.npmjs.com/package/@promptbook/google)** - Integration with Google's Gemini API
267
- - **[@promptbook/deepseek](https://www.npmjs.com/package/@promptbook/deepseek)** - Integration with [DeepSeek API](https://www.deepseek.com/)
268
266
  - **[@promptbook/azure-openai](https://www.npmjs.com/package/@promptbook/azure-openai)** - Execution tools for Azure OpenAI API
269
-
267
+ - **[@promptbook/langtail](https://www.npmjs.com/package/@promptbook/langtail)** - Execution tools for Langtail API, wrapper around Langtail SDK
270
268
  - **[@promptbook/fake-llm](https://www.npmjs.com/package/@promptbook/fake-llm)** - Mocked execution tools for testing the library and saving the tokens
271
269
  - **[@promptbook/remote-client](https://www.npmjs.com/package/@promptbook/remote-client)** - Remote client for remote execution of promptbooks
272
270
  - **[@promptbook/remote-server](https://www.npmjs.com/package/@promptbook/remote-server)** - Remote server for remote execution of promptbooks
@@ -436,20 +434,6 @@ See [TODO.md](./TODO.md)
436
434
 
437
435
 
438
436
 
439
- ## 🤝 Partners
440
-
441
- <div style="display: flex; align-items: center; gap: 20px;">
442
-
443
- <a href="https://promptbook.studio/">
444
- <img src="./other/design/promptbook-studio-logo.png" alt="Partner 3" height="100">
445
- </a>
446
-
447
- <a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
448
- <img src="./other/partners/CI-Technology-Incubation.png" alt="Technology Incubation" height="100">
449
- </a>
450
-
451
- </div>
452
-
453
437
  ## 🖋️ Contributing
454
438
 
455
439
  I am open to pull requests, feedback, and suggestions. Or if you like this utility, you can [☕ buy me a coffee](https://www.buymeacoffee.com/hejny) or [donate via cryptocurrencies](https://github.com/hejny/hejny/blob/main/documents/crypto.md).
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.84.0-20';
22
+ var PROMPTBOOK_ENGINE_VERSION = '0.84.0-8';
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
@@ -430,12 +430,6 @@ var DEFAULT_BOOK_TITLE = "\u2728 Untitled Book";
430
430
  * @public exported from `@promptbook/core`
431
431
  */
432
432
  var DEFAULT_TASK_TITLE = "Task";
433
- /**
434
- * When the pipeline is flat and no name of return parameter is provided, this name is used
435
- *
436
- * @public exported from `@promptbook/core`
437
- */
438
- var DEFAULT_BOOK_OUTPUT_PARAMETER_NAME = 'result';
439
433
  /**
440
434
  * Timeout for the connections in milliseconds
441
435
  *
@@ -651,7 +645,7 @@ function preparePipelineOnRemoteServer(pipeline, options) {
651
645
  });
652
646
  }
653
647
  /**
654
- * TODO: [🐚] Do not return Promise<PipelineJson> But PreparePipelineTask
648
+ * TODO: !!!! Do not return Promise<PipelineJson> But PreparePipelineTask
655
649
  */
656
650
 
657
651
  /**
@@ -4454,10 +4448,7 @@ var QuickChatbotHla = {
4454
4448
  description: 'Chatbot response',
4455
4449
  isInput: false,
4456
4450
  isOutput: true,
4457
- exampleValues: [
4458
- 'Hello, how can I help you?',
4459
- // <- TODO: [🧠] Make this dynamic, async, prepare-phase HLAs
4460
- ],
4451
+ exampleValues: ['Hello, I am a Pavol`s virtual avatar. How can I help you?'],
4461
4452
  });
4462
4453
  // TODO: Use spaceTrim in multiline strings
4463
4454
  $pipelineJson.tasks.push({
@@ -4517,21 +4508,6 @@ var HIGH_LEVEL_ABSTRACTIONS = [
4517
4508
  * Note: [💞] Ignore a discrepancy between file name and entity name
4518
4509
  */
4519
4510
 
4520
- /**
4521
- * Checks if value is valid email
4522
- *
4523
- * @public exported from `@promptbook/utils`
4524
- */
4525
- function isValidEmail(email) {
4526
- if (typeof email !== 'string') {
4527
- return false;
4528
- }
4529
- if (email.split('\n').length > 1) {
4530
- return false;
4531
- }
4532
- return /^.+@.+\..+$/.test(email);
4533
- }
4534
-
4535
4511
  /**
4536
4512
  * Function `validatePipelineString` will validate the if the string is a valid pipeline string
4537
4513
  * 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.
@@ -4545,15 +4521,6 @@ function validatePipelineString(pipelineString) {
4545
4521
  if (isValidJsonString(pipelineString)) {
4546
4522
  throw new ParseError('Expected a book, but got a JSON string');
4547
4523
  }
4548
- else if (isValidUrl(pipelineString)) {
4549
- throw new ParseError("Expected a book, but got just the URL \"".concat(pipelineString, "\""));
4550
- }
4551
- else if (isValidFilePath(pipelineString)) {
4552
- throw new ParseError("Expected a book, but got just the file path \"".concat(pipelineString, "\""));
4553
- }
4554
- else if (isValidEmail(pipelineString)) {
4555
- throw new ParseError("Expected a book, but got just the email \"".concat(pipelineString, "\""));
4556
- }
4557
4524
  // <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
4558
4525
  return pipelineString;
4559
4526
  }
@@ -4589,15 +4556,12 @@ function isFlatPipeline(pipelineString) {
4589
4556
  pipelineString = removeMarkdownComments(pipelineString);
4590
4557
  pipelineString = spaceTrim$1(pipelineString);
4591
4558
  var isMarkdownBeginningWithHeadline = pipelineString.startsWith('# ');
4592
- //const isLastLineReturnStatement = pipelineString.split('\n').pop()!.split('`').join('').startsWith('->');
4593
- var isBacktickBlockUsed = pipelineString.includes('```');
4594
- var isQuoteBlocksUsed = /^>\s+/m.test(pipelineString);
4595
- var isBlocksUsed = isBacktickBlockUsed || isQuoteBlocksUsed;
4596
- // TODO: [🧉] Also (double)check
4559
+ var isLastLineReturnStatement = pipelineString.split('\n').pop().split('`').join('').startsWith('->');
4560
+ // TODO: Also (double)check
4597
4561
  // > const usedCommands
4598
4562
  // > const isBlocksUsed
4599
4563
  // > const returnStatementCount
4600
- var isFlat = !isMarkdownBeginningWithHeadline && !isBlocksUsed; /* && isLastLineReturnStatement */
4564
+ var isFlat = !isMarkdownBeginningWithHeadline && isLastLineReturnStatement;
4601
4565
  return isFlat;
4602
4566
  }
4603
4567
 
@@ -4611,26 +4575,9 @@ function deflatePipeline(pipelineString) {
4611
4575
  return pipelineString;
4612
4576
  }
4613
4577
  var pipelineStringLines = pipelineString.split('\n');
4614
- var potentialReturnStatement = pipelineStringLines.pop();
4615
- var returnStatement;
4616
- if (/(-|=)>\s*\{.*\}/.test(potentialReturnStatement)) {
4617
- // Note: Last line is return statement
4618
- returnStatement = potentialReturnStatement;
4619
- }
4620
- else {
4621
- // Note: Last line is not a return statement
4622
- returnStatement = "-> {".concat(DEFAULT_BOOK_OUTPUT_PARAMETER_NAME, "}");
4623
- pipelineStringLines.push(potentialReturnStatement);
4624
- }
4578
+ var returnStatement = pipelineStringLines.pop();
4625
4579
  var prompt = spaceTrim$1(pipelineStringLines.join('\n'));
4626
- var quotedPrompt;
4627
- if (prompt.split('\n').length <= 1) {
4628
- quotedPrompt = "> ".concat(prompt);
4629
- }
4630
- else {
4631
- quotedPrompt = spaceTrim$1(function (block) { return "\n ```\n ".concat(block(prompt.split('`').join('\\`')), "\n ```\n "); });
4632
- }
4633
- pipelineString = validatePipelineString(spaceTrim$1(function (block) { return "\n # ".concat(DEFAULT_BOOK_TITLE, "\n\n ## Prompt\n\n ").concat(block(quotedPrompt), "\n\n ").concat(returnStatement, "\n "); }));
4580
+ pipelineString = validatePipelineString(spaceTrim$1(function (block) { return "\n # ".concat(DEFAULT_BOOK_TITLE, "\n\n ## Prompt\n\n ```\n ").concat(block(prompt), "\n ```\n\n ").concat(returnStatement, "\n "); }));
4634
4581
  // <- TODO: Maybe use book` notation
4635
4582
  return pipelineString;
4636
4583
  }
@@ -5636,7 +5583,7 @@ function compilePipelineOnRemoteServer(pipelineString, options) {
5636
5583
  });
5637
5584
  }
5638
5585
  /**
5639
- * TODO: [🐚] Do not return Promise<PipelineJson> But PreparePipelineTask
5586
+ * TODO: !!!! Do not return Promise<PipelineJson> But PreparePipelineTask
5640
5587
  */
5641
5588
 
5642
5589
  /**