@promptbook/types 0.73.0 → 0.74.0-2

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 (31) hide show
  1. package/README.md +130 -3
  2. package/esm/typings/src/_packages/anthropic-claude.index.d.ts +2 -2
  3. package/esm/typings/src/_packages/azure-openai.index.d.ts +2 -2
  4. package/esm/typings/src/_packages/browser.index.d.ts +2 -2
  5. package/esm/typings/src/_packages/cli.index.d.ts +2 -2
  6. package/esm/typings/src/_packages/core.index.d.ts +2 -2
  7. package/esm/typings/src/_packages/documents.index.d.ts +2 -2
  8. package/esm/typings/src/_packages/execute-javascript.index.d.ts +2 -2
  9. package/esm/typings/src/_packages/fake-llm.index.d.ts +2 -2
  10. package/esm/typings/src/_packages/langtail.index.d.ts +2 -2
  11. package/esm/typings/src/_packages/legacy-documents.index.d.ts +2 -2
  12. package/esm/typings/src/_packages/markdown-utils.index.d.ts +2 -2
  13. package/esm/typings/src/_packages/node.index.d.ts +2 -2
  14. package/esm/typings/src/_packages/openai.index.d.ts +2 -2
  15. package/esm/typings/src/_packages/pdf.index.d.ts +2 -2
  16. package/esm/typings/src/_packages/remote-client.index.d.ts +2 -2
  17. package/esm/typings/src/_packages/remote-server.index.d.ts +2 -2
  18. package/esm/typings/src/_packages/utils.index.d.ts +2 -2
  19. package/esm/typings/src/_packages/website-crawler.index.d.ts +2 -2
  20. package/esm/typings/src/cli/cli-commands/make.d.ts +0 -1
  21. package/esm/typings/src/cli/cli-commands/run.d.ts +13 -0
  22. package/esm/typings/src/cli/promptbookCli.d.ts +1 -0
  23. package/esm/typings/src/cli/test/ptbk.d.ts +4 -1
  24. package/esm/typings/src/commands/{PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts → BOOK_VERSION/BookVersionCommand.d.ts} +4 -4
  25. package/esm/typings/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +9 -0
  26. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +1 -1
  27. package/esm/typings/src/commands/index.d.ts +1 -1
  28. package/esm/typings/src/version.d.ts +13 -2
  29. package/package.json +2 -2
  30. package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +0 -9
  31. /package/esm/typings/src/commands/{PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts → BOOK_VERSION/bookVersionCommand.test.d.ts} +0 -0
package/README.md CHANGED
@@ -24,6 +24,10 @@ Build responsible, controlled and transparent applications on top of LLM models!
24
24
 
25
25
 
26
26
 
27
+ <blockquote style="color: #ff8811">
28
+ <b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
29
+ </blockquote>
30
+
27
31
  ## 📦 Package `@promptbook/types`
28
32
 
29
33
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
@@ -73,6 +77,8 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
73
77
 
74
78
  ## 🤍 The Promptbook Whitepaper
75
79
 
80
+
81
+
76
82
  If you have a simple, single prompt for ChatGPT, GPT-4, Anthropic Claude, Google Gemini, Llama 3, or whatever, it doesn't matter how you integrate it. Whether it's calling a REST API directly, using the SDK, hardcoding the prompt into the source code, or importing a text file, the process remains the same.
77
83
 
78
84
  But often you will struggle with the **limitations of LLMs**, such as **hallucinations, off-topic responses, poor quality output, language and prompt drift, word repetition repetition repetition repetition or misuse, lack of context, or just plain w𝒆𝐢rd resp0nses**. When this happens, you generally have three options:
@@ -93,6 +99,52 @@ In all of these situations, but especially in 3., the **✨ Promptbook can make
93
99
 
94
100
 
95
101
 
102
+
103
+
104
+
105
+ ## 💜 The Promptbook Project
106
+
107
+ Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
108
+
109
+ <table>
110
+ <thead>
111
+ <tr>
112
+ <th>Project</th>
113
+ <th>Description</th>
114
+ <th>Link</th>
115
+ </tr>
116
+ </thead>
117
+ <tbody>
118
+ <tr>
119
+ <td>Core</td>
120
+ <td>Promptbook core is a description and documentation of basic innerworkings how should be Promptbook implemented and defines which fetures must be descriable by book language</td>
121
+ <td rowspan=2>https://ptbk.io<br/>https://github.com/webgptorg/book</td>
122
+ </tr>
123
+ <tr>
124
+ <td>Book language</td>
125
+ <td>
126
+ Book is a markdown-like language to define core entities like projects, pipelines, knowledge,.... It is designed to be understandable by non-programmers and non-technical people
127
+ </td>
128
+ </tr>
129
+ <tr>
130
+ <td>Promptbook typescript project</td>
131
+ <td>Implementation of Promptbook in TypeScript published into multiple packages to NPM</td>
132
+ <td>https://github.com/webgptorg/promptbook + Multiple packages on NPM</td>
133
+ </tr>
134
+ <tr>
135
+ <td>Promptbook studio</td>
136
+ <td>No-code studio to write book without need to write even the markdown</td>
137
+ <td rowspan=2>https://promptbook.studio<br/>https://github.com/hejny/promptbook-studio</td>
138
+ </tr>
139
+ <tr>
140
+ <td>Promptbook miniapps</td>
141
+ <td>Builder of LLM miniapps from book notation</td>
142
+ </tr>
143
+ </tbody>
144
+ </table>
145
+
146
+
147
+
96
148
  ## 💙 Book language _(for prompt-engineer)_
97
149
 
98
150
  Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) are written in markdown-like language called [Book](https://github.com/webgptorg/book). It is designed to be understandable by non-programmers and non-technical people.
@@ -102,6 +154,17 @@ Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) a
102
154
  ```markdown
103
155
  # 🌟 My first Book
104
156
 
157
+ - INPUT PARAMETER {subject}
158
+ - OUTPUT PARAMETER {article}
159
+
160
+ ## Sample subject
161
+
162
+ > Promptbook
163
+
164
+ -> {subject}
165
+
166
+ ## Write an article
167
+
105
168
  - PERSONA Jane, marketing specialist with prior experience in writing articles about technology and artificial intelligence
106
169
  - KNOWLEDGE https://ptbk.io
107
170
  - KNOWLEDGE ./promptbook.pdf
@@ -109,7 +172,7 @@ Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) a
109
172
  - EXPECT MAX 1 Paragraph
110
173
 
111
174
  > Write an article about the future of artificial intelligence in the next 10 years and how metalanguages will change the way AI is used in the world.
112
- > Look specifically at the impact of Promptbook on the AI industry.
175
+ > Look specifically at the impact of {subject} on the AI industry.
113
176
 
114
177
  -> {article}
115
178
  ```
@@ -152,11 +215,66 @@ Or you can install them separately:
152
215
 
153
216
 
154
217
 
218
+
219
+
220
+
155
221
  ## 📚 Dictionary
156
222
 
223
+
224
+
225
+
226
+
227
+
228
+ ### 📚 Dictionary
229
+
157
230
  The following glossary is used to clarify certain concepts:
158
231
 
159
- ### Core concepts
232
+ #### General LLM / AI terms
233
+
234
+ - **Prompt drift** is a phenomenon where the AI model starts to generate outputs that are not aligned with the original prompt. This can happen due to the model's training data, the prompt's wording, or the model's architecture.
235
+ - **Pipeline, workflow or chain** is a sequence of tasks that are executed in a specific order. In the context of AI, a pipeline can refer to a sequence of AI models that are used to process data.
236
+ - **Fine-tuning** is a process where a pre-trained AI model is further trained on a specific dataset to improve its performance on a specific task.
237
+ - **Zero-shot learning** is a machine learning paradigm where a model is trained to perform a task without any labeled examples. Instead, the model is provided with a description of the task and is expected to generate the correct output.
238
+ - **Few-shot learning** is a machine learning paradigm where a model is trained to perform a task with only a few labeled examples. This is in contrast to traditional machine learning, where models are trained on large datasets.
239
+ - **Meta-learning** is a machine learning paradigm where a model is trained on a variety of tasks and is able to learn new tasks with minimal additional training. This is achieved by learning a set of meta-parameters that can be quickly adapted to new tasks.
240
+ - **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.
241
+ - **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.
242
+
243
+
244
+
245
+ _Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
246
+
247
+ #### Promptbook core
248
+
249
+ - **Organization** _(legacy name collection)_ group jobs, workforce, knowledge, instruments, and actions into one package. Entities in one organization can share resources (= import resources from each other).
250
+ - **Jobs**
251
+ - **Task**
252
+ - **Subtask**
253
+ - **Workforce**
254
+ - **Persona**
255
+ - **Team**
256
+ - **Role**
257
+ - **Knowledge**
258
+ - **Public**
259
+ - **Private**
260
+ - **Protected**
261
+ - **Instruments**
262
+ - **Actions**
263
+
264
+ #### Book language
265
+
266
+ - **Book file**
267
+ - **Section**
268
+ - **Heading**
269
+ - **Description**
270
+ - **Command**
271
+ - **Block**
272
+ - **Return statement**
273
+ - **Comment**
274
+ - **Import**
275
+ - **Scope**
276
+
277
+ #### 💯 Core concepts
160
278
 
161
279
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
162
280
  - [📯 Pipeline](https://github.com/webgptorg/promptbook/discussions/64)
@@ -169,7 +287,7 @@ The following glossary is used to clarify certain concepts:
169
287
  - [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
170
288
  - [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
171
289
 
172
- ### Advanced concepts
290
+ ##### Advanced concepts
173
291
 
174
292
  - [📚 Knowledge (Retrieval-augmented generation)](https://github.com/webgptorg/promptbook/discussions/41)
175
293
  - [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
@@ -184,6 +302,15 @@ The following glossary is used to clarify certain concepts:
184
302
  - [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
185
303
  - [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
186
304
 
305
+
306
+
307
+ ### Terms specific to Promptbook TypeScript implementation
308
+
309
+ - Anonymous mode
310
+ - Application mode
311
+
312
+
313
+
187
314
  ## 🔌 Usage in Typescript / Javascript
188
315
 
189
316
  - [Simple usage](./examples/usage/simple-script)
@@ -1,4 +1,4 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { ANTHROPIC_CLAUDE_MODELS } from '../llm-providers/anthropic-claude/anthropic-claude-models';
3
3
  import { AnthropicClaudeExecutionTools } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionTools';
4
4
  import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
@@ -6,7 +6,7 @@ import type { AnthropicClaudeExecutionToolsDirectOptions } from '../llm-provider
6
6
  import type { AnthropicClaudeExecutionToolsProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
7
7
  import { createAnthropicClaudeExecutionTools } from '../llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools';
8
8
  import { _AnthropicClaudeRegistration } from '../llm-providers/anthropic-claude/register-constructor';
9
- export { PROMPTBOOK_VERSION };
9
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
10
10
  export { ANTHROPIC_CLAUDE_MODELS };
11
11
  export { AnthropicClaudeExecutionTools };
12
12
  export type { AnthropicClaudeExecutionToolsOptions };
@@ -1,9 +1,9 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { AzureOpenAiExecutionTools } from '../llm-providers/azure-openai/AzureOpenAiExecutionTools';
3
3
  import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions';
4
4
  import { createAzureOpenAiExecutionTools } from '../llm-providers/azure-openai/createAzureOpenAiExecutionTools';
5
5
  import { _AzureOpenAiRegistration } from '../llm-providers/azure-openai/register-constructor';
6
- export { PROMPTBOOK_VERSION };
6
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
7
7
  export { AzureOpenAiExecutionTools };
8
8
  export type { AzureOpenAiExecutionToolsOptions };
9
9
  export { createAzureOpenAiExecutionTools };
@@ -1,9 +1,9 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { SimplePromptInterfaceTools } from '../dialogs/simple-prompt/SimplePromptInterfaceTools';
3
3
  import { $provideScrapersForBrowser } from '../scrapers/_common/register/$provideScrapersForBrowser';
4
4
  import { getLocalStorage } from '../storage/local-storage/getLocalStorage';
5
5
  import { getSessionStorage } from '../storage/local-storage/getSessionStorage';
6
- export { PROMPTBOOK_VERSION };
6
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
7
7
  export { SimplePromptInterfaceTools };
8
8
  export { $provideScrapersForBrowser };
9
9
  export { getLocalStorage };
@@ -1,4 +1,4 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { _CLI } from '../cli/main';
3
3
  import { _AnthropicClaudeMetadataRegistration } from '../llm-providers/anthropic-claude/register-configuration';
4
4
  import { _AnthropicClaudeRegistration } from '../llm-providers/anthropic-claude/register-constructor';
@@ -18,7 +18,7 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
18
18
  import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
19
19
  import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
20
20
  import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
21
- export { PROMPTBOOK_VERSION };
21
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
22
22
  export { _CLI };
23
23
  export { _AnthropicClaudeMetadataRegistration };
24
24
  export { _AnthropicClaudeRegistration };
@@ -1,4 +1,4 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { collectionToJson } from '../collection/collectionToJson';
3
3
  import { createCollectionFromJson } from '../collection/constructors/createCollectionFromJson';
4
4
  import { createCollectionFromPromise } from '../collection/constructors/createCollectionFromPromise';
@@ -91,7 +91,7 @@ import type { ExecutionReportStringOptions } from '../types/execution-report/Exe
91
91
  import { ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
92
92
  import { MODEL_VARIANTS } from '../types/ModelVariant';
93
93
  import { EXPECTATION_UNITS } from '../types/PipelineJson/Expectations';
94
- export { PROMPTBOOK_VERSION };
94
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
95
95
  export { collectionToJson };
96
96
  export { createCollectionFromJson };
97
97
  export { createCollectionFromPromise };
@@ -1,8 +1,8 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { createDocumentScraper } from '../scrapers/document/createDocumentScraper';
3
3
  import { DocumentScraper } from '../scrapers/document/DocumentScraper';
4
4
  import { _DocumentScraperRegistration } from '../scrapers/document/register-constructor';
5
- export { PROMPTBOOK_VERSION };
5
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
6
6
  export { createDocumentScraper };
7
7
  export { DocumentScraper };
8
8
  export { _DocumentScraperRegistration };
@@ -1,8 +1,8 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { JavascriptEvalExecutionTools } from '../scripting/javascript/JavascriptEvalExecutionTools';
3
3
  import { JavascriptExecutionTools } from '../scripting/javascript/JavascriptExecutionTools';
4
4
  import { POSTPROCESSING_FUNCTIONS } from '../scripting/javascript/postprocessing-functions';
5
- export { PROMPTBOOK_VERSION };
5
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
6
6
  export { JavascriptEvalExecutionTools };
7
7
  export { JavascriptExecutionTools };
8
8
  export { POSTPROCESSING_FUNCTIONS };
@@ -1,6 +1,6 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { MockedEchoLlmExecutionTools } from '../llm-providers/mocked/MockedEchoLlmExecutionTools';
3
3
  import { MockedFackedLlmExecutionTools } from '../llm-providers/mocked/MockedFackedLlmExecutionTools';
4
- export { PROMPTBOOK_VERSION };
4
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
5
5
  export { MockedEchoLlmExecutionTools };
6
6
  export { MockedFackedLlmExecutionTools };
@@ -1,6 +1,6 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { LangtailExecutionTools } from '../llm-providers/langtail/LangtailExecutionTools';
3
3
  import type { LangtailExecutionToolsOptions } from '../llm-providers/langtail/LangtailExecutionToolsOptions';
4
- export { PROMPTBOOK_VERSION };
4
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
5
5
  export { LangtailExecutionTools };
6
6
  export type { LangtailExecutionToolsOptions };
@@ -1,8 +1,8 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { createLegacyDocumentScraper } from '../scrapers/document-legacy/createLegacyDocumentScraper';
3
3
  import { LegacyDocumentScraper } from '../scrapers/document-legacy/LegacyDocumentScraper';
4
4
  import { _LegacyDocumentScraperRegistration } from '../scrapers/document-legacy/register-constructor';
5
- export { PROMPTBOOK_VERSION };
5
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
6
6
  export { createLegacyDocumentScraper };
7
7
  export { LegacyDocumentScraper };
8
8
  export { _LegacyDocumentScraperRegistration };
@@ -1,4 +1,4 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { extractBlock } from '../postprocessing/utils/extractBlock';
3
3
  import { extractJsonBlock } from '../postprocessing/utils/extractJsonBlock';
4
4
  import { createMarkdownScraper } from '../scrapers/markdown/createMarkdownScraper';
@@ -21,7 +21,7 @@ import { parseMarkdownSection } from '../utils/markdown/parseMarkdownSection';
21
21
  import { removeContentComments } from '../utils/markdown/removeContentComments';
22
22
  import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormatting';
23
23
  import { splitMarkdownIntoSections } from '../utils/markdown/splitMarkdownIntoSections';
24
- export { PROMPTBOOK_VERSION };
24
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
25
25
  export { extractBlock };
26
26
  export { extractJsonBlock };
27
27
  export { createMarkdownScraper };
@@ -1,4 +1,4 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { createCollectionFromDirectory } from '../collection/constructors/createCollectionFromDirectory';
3
3
  import { $provideExecutablesForNode } from '../executables/$provideExecutablesForNode';
4
4
  import { $provideExecutionToolsForNode } from '../execution/utils/$provideExecutionToolsForNode';
@@ -9,7 +9,7 @@ import { $provideScrapersForNode } from '../scrapers/_common/register/$provideSc
9
9
  import { FileCacheStorage } from '../storage/file-cache-storage/FileCacheStorage';
10
10
  import { $execCommand } from '../utils/execCommand/$execCommand';
11
11
  import { $execCommands } from '../utils/execCommand/$execCommands';
12
- export { PROMPTBOOK_VERSION };
12
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
13
13
  export { createCollectionFromDirectory };
14
14
  export { $provideExecutablesForNode };
15
15
  export { $provideExecutionToolsForNode };
@@ -1,4 +1,4 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { createOpenAiAssistantExecutionTools } from '../llm-providers/openai/createOpenAiAssistantExecutionTools';
3
3
  import { createOpenAiExecutionTools } from '../llm-providers/openai/createOpenAiExecutionTools';
4
4
  import { OPENAI_MODELS } from '../llm-providers/openai/openai-models';
@@ -8,7 +8,7 @@ import { OpenAiExecutionTools } from '../llm-providers/openai/OpenAiExecutionToo
8
8
  import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions';
9
9
  import { _OpenAiRegistration } from '../llm-providers/openai/register-constructor';
10
10
  import { _OpenAiAssistantRegistration } from '../llm-providers/openai/register-constructor';
11
- export { PROMPTBOOK_VERSION };
11
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
12
12
  export { createOpenAiAssistantExecutionTools };
13
13
  export { createOpenAiExecutionTools };
14
14
  export { OPENAI_MODELS };
@@ -1,8 +1,8 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { createPdfScraper } from '../scrapers/pdf/createPdfScraper';
3
3
  import { PdfScraper } from '../scrapers/pdf/PdfScraper';
4
4
  import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
5
- export { PROMPTBOOK_VERSION };
5
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
6
6
  export { createPdfScraper };
7
7
  export { PdfScraper };
8
8
  export { _PdfScraperRegistration };
@@ -1,8 +1,8 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import type { RemoteLlmExecutionToolsOptions } from '../llm-providers/remote/interfaces/RemoteLlmExecutionToolsOptions';
3
3
  import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions';
4
4
  import { RemoteLlmExecutionTools } from '../llm-providers/remote/RemoteLlmExecutionTools';
5
- export { PROMPTBOOK_VERSION };
5
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
6
6
  export type { RemoteLlmExecutionToolsOptions };
7
7
  export type { RemoteServerOptions };
8
8
  export { RemoteLlmExecutionTools };
@@ -1,6 +1,6 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions';
3
3
  import { startRemoteServer } from '../llm-providers/remote/startRemoteServer';
4
- export { PROMPTBOOK_VERSION };
4
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
5
5
  export type { RemoteServerOptions };
6
6
  export { startRemoteServer };
@@ -1,4 +1,4 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { renderPromptbookMermaid } from '../conversion/prettify/renderPipelineMermaidOptions';
3
3
  import { extractParameterNamesFromTemplate } from '../conversion/utils/extractParameterNamesFromTemplate';
4
4
  import { extractVariables } from '../conversion/utils/extractVariables';
@@ -69,7 +69,7 @@ import { isUrlOnPrivateNetwork } from '../utils/validators/url/isUrlOnPrivateNet
69
69
  import { isValidPipelineUrl } from '../utils/validators/url/isValidPipelineUrl';
70
70
  import { isValidUrl } from '../utils/validators/url/isValidUrl';
71
71
  import { isValidUuid } from '../utils/validators/uuid/isValidUuid';
72
- export { PROMPTBOOK_VERSION };
72
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
73
73
  export { renderPromptbookMermaid };
74
74
  export { extractParameterNamesFromTemplate };
75
75
  export { extractVariables };
@@ -1,8 +1,8 @@
1
- import { PROMPTBOOK_VERSION } from '../version';
1
+ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { createWebsiteScraper } from '../scrapers/website/createWebsiteScraper';
3
3
  import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
4
4
  import { WebsiteScraper } from '../scrapers/website/WebsiteScraper';
5
- export { PROMPTBOOK_VERSION };
5
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
6
6
  export { createWebsiteScraper };
7
7
  export { _WebsiteScraperRegistration };
8
8
  export { WebsiteScraper };
@@ -7,7 +7,6 @@ import type { Command as Program } from 'commander';
7
7
  export declare function initializeMakeCommand(program: Program): void;
8
8
  /**
9
9
  * TODO: [🥃][main] !!! Allow `ptbk make` without configuring any llm tools
10
- * TODO: Maybe remove this command - "about" command should be enough?
11
10
  * TODO: [0] DRY Javascript and typescript - Maybe make ONLY typescript and for javascript just remove types
12
11
  * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
13
12
  * TODO: [🖇] What about symlinks? Maybe flag --follow-symlinks
@@ -0,0 +1,13 @@
1
+ import type { Command as Program } from 'commander';
2
+ /**
3
+ * Initializes `run` command for Promptbook CLI utilities
4
+ *
5
+ * @private internal function of `promptbookCli`
6
+ */
7
+ export declare function initializeRunCommand(program: Program): void;
8
+ /**
9
+ * TODO: [🧠] Pass `maxExecutionAttempts`, `csvSettings`
10
+ * TODO: [🥃][main] !!! Allow `ptbk run` without configuring any llm tools
11
+ * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
12
+ * TODO: [🖇] What about symlinks? Maybe flag --follow-symlinks
13
+ */
@@ -5,6 +5,7 @@
5
5
  */
6
6
  export declare function promptbookCli(): Promise<void>;
7
7
  /**
8
+ * TODO: [🧠] Maybe `run` command the default, instead of `ptbk run ./foo.ptbk.md` -> `ptbk ./foo.ptbk.md`
8
9
  * TODO: [🥠] Do not export, its just for CLI script
9
10
  * TODO: [🕌] When more functionalities, rename
10
11
  * Note: 11:11
@@ -1,2 +1,5 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ /**
3
+ * Note: Purpose of this file !!!!!!! vs other place
4
+ */
5
+ import '../../_packages/cli.index.ts';
@@ -1,11 +1,11 @@
1
1
  import type { string_semantic_version } from '../../types/typeAliases';
2
2
  /**
3
- * Parsed PROMPTBOOK_VERSION command
3
+ * Parsed BOOK_VERSION command
4
4
  *
5
- * @see ./promptbookVersionCommandParser.ts for more details
5
+ * @see ./bookVersionCommandParser.ts for more details
6
6
  * @private within the commands folder
7
7
  */
8
- export type PromptbookVersionCommand = {
9
- readonly type: 'PROMPTBOOK_VERSION';
8
+ export type BookVersionCommand = {
9
+ readonly type: 'BOOK_VERSION';
10
10
  readonly promptbookVersion: string_semantic_version;
11
11
  };
@@ -0,0 +1,9 @@
1
+ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser';
2
+ import type { BookVersionCommand } from './BookVersionCommand';
3
+ /**
4
+ * Parses the BOOK_VERSION command
5
+ *
6
+ * @see `documentationUrl` for more details
7
+ * @private within the commands folder
8
+ */
9
+ export declare const bookVersionCommandParser: PipelineHeadCommandParser<BookVersionCommand>;
@@ -169,7 +169,7 @@ export type CommandParserInput = {
169
169
  /**
170
170
  * @@@
171
171
  *
172
- * @example 'PROMPTBOOK_VERSION_0_62_0'
172
+ * @example 'PROMPTBOOK_ENGINE_VERSION_0_62_0'
173
173
  * @example 'FOREACH_LIST_LINE_CUSTOMERS_CUSTOMER'
174
174
  */
175
175
  readonly normalized: string_name & string_SCREAMING_CASE;
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @private internal index of `parseCommand`
5
5
  */
6
- export declare const COMMANDS: readonly [import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./TEMPLATE/TemplateCommand").TemplateCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./EXPECT/ExpectCommand").ExpectCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./FORMAT/FormatCommand").FormatCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./JOKER/JokerCommand").JokerCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./MODEL/ModelCommand").ModelCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PARAMETER/ParameterCommand").ParameterCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./POSTPROCESS/PostprocessCommand").PostprocessCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./PROMPTBOOK_VERSION/PromptbookVersionCommand").PromptbookVersionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./URL/UrlCommand").UrlCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./KNOWLEDGE/KnowledgeCommand").KnowledgeCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_ACTION/ActionCommand").ActionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_INSTRUMENT/InstrumentCommand").InstrumentCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PERSONA/PersonaCommand").PersonaCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./FOREACH/ForeachCommand").ForeachCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./_BOILERPLATE/BoilerplateCommand").BoilerplateCommand>];
6
+ export declare const COMMANDS: readonly [import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./TEMPLATE/TemplateCommand").TemplateCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./EXPECT/ExpectCommand").ExpectCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./FORMAT/FormatCommand").FormatCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./JOKER/JokerCommand").JokerCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./MODEL/ModelCommand").ModelCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PARAMETER/ParameterCommand").ParameterCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./POSTPROCESS/PostprocessCommand").PostprocessCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./BOOK_VERSION/BookVersionCommand").BookVersionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./URL/UrlCommand").UrlCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./KNOWLEDGE/KnowledgeCommand").KnowledgeCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_ACTION/ActionCommand").ActionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_INSTRUMENT/InstrumentCommand").InstrumentCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PERSONA/PersonaCommand").PersonaCommand>, import("./_common/types/CommandParser").PipelineTemplateCommandParser<import("./FOREACH/ForeachCommand").ForeachCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./_BOILERPLATE/BoilerplateCommand").BoilerplateCommand>];
@@ -1,6 +1,17 @@
1
1
  import type { string_semantic_version } from './types/typeAliases';
2
2
  /**
3
- * The version of the Promptbook library
3
+ * The version of the Book language
4
+ *
5
+ * @see https://github.com/webgptorg/book
4
6
  */
5
- export declare const PROMPTBOOK_VERSION: string_promptbook_version;
7
+ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
8
+ /**
9
+ * The version of the Promptbook engine
10
+ *
11
+ * @see https://github.com/webgptorg/promptbook
12
+ */
13
+ export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
6
14
  export type string_promptbook_version = string_semantic_version;
15
+ /**
16
+ * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
17
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.73.0",
3
+ "version": "0.74.0-2",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -51,6 +51,6 @@
51
51
  ],
52
52
  "typings": "./esm/typings/src/_packages/types.index.d.ts",
53
53
  "peerDependencies": {
54
- "@promptbook/core": "0.73.0"
54
+ "@promptbook/core": "0.74.0-2"
55
55
  }
56
56
  }
@@ -1,9 +0,0 @@
1
- import type { PipelineHeadCommandParser } from '../_common/types/CommandParser';
2
- import type { PromptbookVersionCommand } from './PromptbookVersionCommand';
3
- /**
4
- * Parses the PROMPTBOOK_VERSION command
5
- *
6
- * @see `documentationUrl` for more details
7
- * @private within the commands folder
8
- */
9
- export declare const promptbookVersionCommandParser: PipelineHeadCommandParser<PromptbookVersionCommand>;