@promptbook/cli 0.74.0-8 → 0.75.0-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 (58) hide show
  1. package/README.md +4 -13
  2. package/bin/promptbook-cli.js +8 -4
  3. package/esm/index.es.js +499 -266
  4. package/esm/index.es.js.map +1 -1
  5. package/esm/typings/promptbook-collection/index.d.ts +3 -0
  6. package/esm/typings/src/_packages/core.index.d.ts +25 -1
  7. package/esm/typings/src/_packages/types.index.d.ts +10 -0
  8. package/esm/typings/src/_packages/utils.index.d.ts +4 -0
  9. package/esm/typings/src/cli/cli-commands/run.d.ts +1 -1
  10. package/esm/typings/src/cli/main.d.ts +4 -1
  11. package/esm/typings/src/cli/promptbookCli.d.ts +1 -1
  12. package/esm/typings/src/cli/test/ptbk.d.ts +1 -1
  13. package/esm/typings/src/collection/collectionToJson.test.d.ts +1 -1
  14. package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -1
  15. package/esm/typings/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -1
  16. package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +2 -2
  17. package/esm/typings/src/commands/FORMFACTOR/FormfactorCommand.d.ts +11 -0
  18. package/esm/typings/src/commands/FORMFACTOR/formfactorCommand.test.d.ts +1 -0
  19. package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +11 -0
  20. package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -1
  21. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +2 -0
  22. package/esm/typings/src/commands/index.d.ts +1 -1
  23. package/esm/typings/src/config.d.ts +7 -0
  24. package/esm/typings/src/conversion/pipelineJsonToString.d.ts +3 -3
  25. package/esm/typings/src/conversion/pipelineStringToJson.d.ts +2 -2
  26. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +2 -2
  27. package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -1
  28. package/esm/typings/src/conversion/validation/_importPipeline.d.ts +7 -7
  29. package/esm/typings/src/formats/_common/FormatDefinition.d.ts +1 -1
  30. package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +1 -1
  31. package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +14 -0
  32. package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +34 -0
  33. package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +5 -0
  34. package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +5 -0
  35. package/esm/typings/src/formfactors/chat/ChatFormfactorDefinition.d.ts +15 -0
  36. package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +14 -0
  37. package/esm/typings/src/formfactors/index.d.ts +39 -0
  38. package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +14 -0
  39. package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +14 -0
  40. package/esm/typings/src/pipeline/pipeline-interface/PipelineInterface.d.ts +22 -0
  41. package/esm/typings/src/pipeline/pipeline-interface/constants.d.ts +9 -0
  42. package/esm/typings/src/pipeline/pipeline-interface/getPipelineInterface.d.ts +11 -0
  43. package/esm/typings/src/pipeline/pipeline-interface/isPipelineImplementingInterface.d.ts +25 -0
  44. package/esm/typings/src/pipeline/pipeline-interface/isPipelineInterfacesEqual.d.ts +11 -0
  45. package/esm/typings/src/storage/blackhole/BlackholeStorage.d.ts +33 -0
  46. package/esm/typings/src/storage/memory/MemoryStorage.d.ts +1 -1
  47. package/esm/typings/src/storage/{memory/utils → utils}/PrefixStorage.d.ts +1 -1
  48. package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +11 -4
  49. package/esm/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -1
  50. package/esm/typings/src/types/Prompt.d.ts +1 -1
  51. package/esm/typings/src/types/typeAliases.d.ts +2 -2
  52. package/esm/typings/src/utils/expectation-counters/constants.d.ts +15 -0
  53. package/esm/typings/src/utils/expectation-counters/countLines.d.ts +2 -0
  54. package/esm/typings/src/utils/expectation-counters/countPages.d.ts +2 -0
  55. package/package.json +1 -1
  56. package/umd/index.umd.js +499 -266
  57. package/umd/index.umd.js.map +1 -1
  58. /package/esm/typings/src/storage/{memory → local-storage}/utils/makePromptbookStorageFromWebStorage.d.ts +0 -0
package/README.md CHANGED
@@ -18,7 +18,7 @@ Build responsible, controlled and transparent applications on top of LLM models!
18
18
 
19
19
  ## ✨ New Features
20
20
 
21
- - 💙 Working on [the **Book** language v1](https://github.com/webgptorg/book)
21
+ - 💙 Working [the **Book** language v1.0.0](https://github.com/webgptorg/book)
22
22
  - 📚 Support of `.docx`, `.doc` and `.pdf` documents
23
23
  - ✨ **Support of [OpenAI o1 model](https://openai.com/o1/)**
24
24
 
@@ -70,7 +70,7 @@ import { OpenAiExecutionTools } from '@promptbook/openai';
70
70
 
71
71
  // ▶ Get single Pipeline
72
72
  const promptbook = await getPipelineCollection().getPipelineByUrl(
73
- `https://promptbook.studio/my-collection/write-article.ptbk.md`,
73
+ `https://promptbook.studio/my-collection/write-article.book.md`,
74
74
  );
75
75
 
76
76
  // ▶ Create executor - the function that will execute the Pipeline
@@ -97,7 +97,7 @@ There is also a javascript and json format available.
97
97
  ## Prettify
98
98
 
99
99
  ```bash
100
- npx ptbk prettify promptbook/**/*.ptbk.md
100
+ npx ptbk prettify promptbook/**/*.book.md
101
101
  ```
102
102
 
103
103
  This will prettify all promptbooks in `promptbook` directory and adds Mermaid graphs to them.
@@ -205,7 +205,7 @@ Following is the documentation and blueprint of the Book language.
205
205
 
206
206
  File is designed to be easy to read and write. It is strict subset of markdown. It is designed to be understandable by both humans and machines and without specific knowledge of the language.
207
207
 
208
- It has file with `.ptbk.md` or `.book` extension with `UTF-8` non BOM encoding.
208
+ It has file with `.book.md` or `.book` extension with `UTF-8` non BOM encoding.
209
209
 
210
210
  As it is source code, it can leverage all the features of version control systems like git and does not suffer from the problems of binary formats, proprietary formats, or no-code solutions.
211
211
 
@@ -298,11 +298,6 @@ Or you can install them separately:
298
298
 
299
299
  ## 📚 Dictionary
300
300
 
301
-
302
-
303
-
304
-
305
-
306
301
  ### 📚 Dictionary
307
302
 
308
303
  The following glossary is used to clarify certain concepts:
@@ -318,8 +313,6 @@ The following glossary is used to clarify certain concepts:
318
313
  - **Retrieval-augmented generation** is a machine learning paradigm where a model generates text by retrieving relevant information from a large database of text. This approach combines the benefits of generative models and retrieval models.
319
314
  - **Longtail** refers to non-common or rare events, items, or entities that are not well-represented in the training data of machine learning models. Longtail items are often challenging for models to predict accurately.
320
315
 
321
-
322
-
323
316
  _Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
324
317
 
325
318
  #### Promptbook core
@@ -380,8 +373,6 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
380
373
  - [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
381
374
  - [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
382
375
 
383
-
384
-
385
376
  ### Terms specific to Promptbook TypeScript implementation
386
377
 
387
378
  - Anonymous mode
@@ -1,10 +1,14 @@
1
- #!/usr/bin/env node --no-warnings
1
+ #!/usr/bin/env node
2
+ // <- TODO: [🎺] Ensure correct version of Node.js is used
2
3
 
3
- // <- TODO: !!!!!! Is this try to get rid of deprecation warnings in node v23.2.0 working?
4
+ /**
5
+ * Note: [🔺] Purpose of this file is to run CLI in production environment
6
+ */
4
7
 
5
- const { _CLI /* <- Note: [🥠] */ } = require('../umd/index.umd.js');
8
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
9
+ const { _CLI } = require('../umd/index.umd.js');
6
10
 
7
- _CLI._initialize();
11
+ _CLI._initialize_promptbookCli();
8
12
 
9
13
  /**
10
14
  * TODO: [🕌] When more functionalities, rename