@promptbook/types 0.86.0-6 → 0.86.5

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.
package/README.md CHANGED
@@ -5,8 +5,8 @@
5
5
 
6
6
 
7
7
 
8
- [![NPM Version of ![Promptbook logo - cube with letters P and B](./other/design/logo-h1.png) Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
9
- [![Quality of package ![Promptbook logo - cube with letters P and B](./other/design/logo-h1.png) Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
8
+ [![NPM Version of ![Promptbook logo - cube with letters P and B](./design/logo-h1.png) Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
9
+ [![Quality of package ![Promptbook logo - cube with letters P and B](./design/logo-h1.png) Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
10
10
  [![Known Vulnerabilities](https://snyk.io/test/github/webgptorg/promptbook/badge.svg)](https://snyk.io/test/github/webgptorg/promptbook)
11
11
  [![Issues](https://img.shields.io/github/issues/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/issues)
12
12
 
@@ -17,18 +17,12 @@
17
17
  ## 🌟 New Features
18
18
 
19
19
  - 📂 We have plugin for [VSCode](https://github.com/webgptorg/book-extension) to support `.book` file extension
20
+ - 🐳 Available [Docker image](https://hub.docker.com/r/hejny/promptbook/)
20
21
  - 💫 Support of [`o3-mini` model by OpenAI](https://openai.com/index/openai-o3-mini/)
21
22
  - 🐋 **Support of [DeepSeek models](https://www.npmjs.com/package/@promptbook/deepseek)**
22
- - 💙 Working [the **Book** language v1.0.0](https://github.com/webgptorg/book)
23
- - 🖤 Run books from CLI - `npx ptbk run path/to/your/book`
24
- - 📚 Support of `.docx`, `.doc` and `.pdf` documents as knowledge
25
23
 
26
24
 
27
25
 
28
- <blockquote style="color: #ff8811">
29
- <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>.
30
- </blockquote>
31
-
32
26
  ## 📦 Package `@promptbook/types`
33
27
 
34
28
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
@@ -85,6 +79,8 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
85
79
 
86
80
  During the computer revolution, we have seen [multiple generations of computer languages](https://github.com/webgptorg/promptbook/discussions/180), from the physical rewiring of the vacuum tubes through low-level machine code to the high-level languages like Python or JavaScript. And now, we're on the edge of the **next revolution**!
87
81
 
82
+
83
+
88
84
  It's a revolution of writing software in **plain human language** that is understandable and executable by both humans and machines – and it's going to change everything!
89
85
 
90
86
  The incredible growth in power of microprocessors and the Moore's Law have been the driving force behind the ever-more powerful languages, and it's been an amazing journey! Similarly, the large language models (like GPT or Claude) are the next big thing in language technology, and they're set to transform the way we interact with computers.
@@ -142,34 +138,41 @@ We also have a community of developers and users of **Promptbook**:
142
138
  - [Landing page `ptbk.io`](https://ptbk.io)
143
139
  - [Github discussions](https://github.com/webgptorg/promptbook/discussions)
144
140
  - [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
145
- - [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
141
+ - [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
146
142
 
147
143
  And **Promptbook.studio** branded socials:
148
144
 
145
+
146
+
149
147
  - [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
150
148
 
149
+
150
+
151
151
  And **Promptujeme** sub-brand:
152
152
 
153
- _/Subbrand for Czech clients/_
153
+ */Subbrand for Czech clients/*
154
+
155
+
154
156
 
155
157
  - [Promptujeme.cz](https://www.promptujeme.cz/)
156
158
  - [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
157
159
 
160
+
158
161
  And **Promptbook.city** branded socials:
159
162
 
160
- _/Sub-brand for images and graphics generated via Promptbook prompting/_
163
+ */Sub-brand for images and graphics generated via Promptbook prompting/*
161
164
 
162
165
  - [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
163
- - [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
166
+ - [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
164
167
 
165
168
 
166
169
 
167
- ## 💙 Book language _(for prompt-engineer)_
168
170
 
169
171
 
170
172
 
173
+ ## 💙 The Book language
174
+
171
175
 
172
- ## 💙 The blueprint of book language
173
176
 
174
177
  Following is the documentation and blueprint of the Book language.
175
178
 
@@ -178,6 +181,11 @@ Following is the documentation and blueprint of the Book language.
178
181
  ```markdown
179
182
  # 🌟 My first Book
180
183
 
184
+ - BOOK VERSION 1.0.0
185
+ - URL https://promptbook.studio/my-first-book/
186
+
187
+ # Write an article
188
+
181
189
  - PERSONA Jane, marketing specialist with prior experience in writing articles about technology and artificial intelligence
182
190
  - KNOWLEDGE https://ptbk.io
183
191
  - KNOWLEDGE ./promptbook.pdf
@@ -190,59 +198,31 @@ Following is the documentation and blueprint of the Book language.
190
198
  -> {article}
191
199
  ```
192
200
 
193
- ### Goals and principles of book language
194
-
195
- 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.
196
-
197
- It has file with `.book.md` or `.book` extension with `UTF-8` non BOM encoding.
198
-
199
- 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.
200
-
201
- But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
202
-
203
- ### Structure
204
-
205
- Book is divided into sections. Each section starts with heading. The language itself is not sensitive to the type of heading _(`h1`, `h2`, `h3`, ...)_ but it is recommended to use `h1` for header section and `h2` for other sections.
206
-
207
- ### Header
208
-
209
- Header is the first section of the book. It contains metadata about the pipeline. It is recommended to use `h1` heading for header section but it is not required.
210
-
211
- ### Parameter
201
+ ### **What:** Workflows, Tasks and Parameters
212
202
 
213
- Foo bar
203
+ - [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
214
204
 
215
- #### Parameter names
205
+ ### **Who:** Personas
216
206
 
217
- Reserved words:
207
+ - [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
218
208
 
219
- - _each command_ like `PERSONA`, `EXPECT`, `KNOWLEDGE`, etc.
220
- - `content`
221
- - `context`
222
- - `knowledge`
223
- - `examples`
224
- - `modelName`
225
- - `currentDate`
209
+ ### **How:** Knowledge, Instruments and Actions
226
210
 
227
- #### Parameter notation
211
+ - [KNOWLEDGE](https://github.com/webgptorg/promptbook/blob/main/documents/commands/KNOWLEDGE.md)
212
+ - [INSTRUMENT](https://github.com/webgptorg/promptbook/blob/main/documents/commands/INSTRUMENT.md)
213
+ - [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md)
228
214
 
229
- ### Task
215
+ ### General principles of book language
230
216
 
231
- ### Task type
217
+ Book language is based on markdown. It is subset of markdown. It is designed to be easy to read and write. It is designed to be understandable by both humans and machines and without specific knowledge of the language.
232
218
 
233
- Todo todo
219
+ The file has `.book` extension. It uses `UTF-8` non BOM encoding.
234
220
 
235
- ### Command
221
+ Book has two variants: flat - which is just a prompt with no structure, and full - which has a structure with tasks, commands and prompts.
236
222
 
237
- Todo todo
238
-
239
- ### Block
240
-
241
- Todo todo
242
-
243
- ### Return parameter
223
+ 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.
244
224
 
245
- ### Examples
225
+ But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
246
226
 
247
227
 
248
228
 
@@ -288,6 +268,7 @@ Or you can install them separately:
288
268
  - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Usefull templates and examples of books which can be used as a starting point
289
269
  - **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
290
270
  - ⭐ **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
271
+ - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
291
272
 
292
273
 
293
274
 
@@ -296,6 +277,11 @@ Or you can install them separately:
296
277
 
297
278
  ## 📚 Dictionary
298
279
 
280
+
281
+
282
+
283
+
284
+
299
285
  ### 📚 Dictionary
300
286
 
301
287
  The following glossary is used to clarify certain concepts:
@@ -311,6 +297,8 @@ The following glossary is used to clarify certain concepts:
311
297
  - **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.
312
298
  - **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.
313
299
 
300
+
301
+
314
302
  _Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
315
303
 
316
304
  #### Promptbook core
@@ -371,6 +359,8 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
371
359
  - [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
372
360
  - [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
373
361
 
362
+
363
+
374
364
  ### Terms specific to Promptbook TypeScript implementation
375
365
 
376
366
  - Anonymous mode
@@ -450,7 +440,7 @@ See [TODO.md](./TODO.md)
450
440
  <div style="display: flex; align-items: center; gap: 20px;">
451
441
 
452
442
  <a href="https://promptbook.studio/">
453
- <img src="./other/design/promptbook-studio-logo.png" alt="Partner 3" height="100">
443
+ <img src="./design/promptbook-studio-logo.png" alt="Partner 3" height="100">
454
444
  </a>
455
445
 
456
446
  <a href="https://technologickainkubace.org/en/about-technology-incubation/about-the-project/">
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ts-node
2
+ /**
3
+ * Note: [🔺] Purpose of this file is to test the CLI in development environment
4
+ */
5
+ export {};
@@ -13,7 +13,7 @@ import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions
13
13
  * @param pipelineString {Promptbook} in string markdown format (.book.md)
14
14
  * @param tools - Tools for the preparation and scraping - if not provided together with `llm`, the preparation will be skipped
15
15
  * @param options - Options and tools for the compilation
16
- * @returns {Promptbook} compiled in JSON format (.book.json)
16
+ * @returns {Promptbook} compiled in JSON format (.bookc)
17
17
  * @throws {ParseError} if the promptbook string is not valid
18
18
  * @public exported from `@promptbook/core`
19
19
  */
@@ -11,7 +11,7 @@ import type { RemoteClientOptions } from '../remote-server/types/RemoteClientOpt
11
11
  *
12
12
  * @param pipelineString {Promptbook} in string markdown format (.book.md)
13
13
  * @param options - Configuration of the remote server
14
- * @returns {Promptbook} compiled in JSON format (.book.json)
14
+ * @returns {Promptbook} compiled in JSON format (.bookc)
15
15
  * @throws {ParseError} if the promptbook string is not valid
16
16
  * @public exported from `@promptbook/remote-client`
17
17
  */
@@ -12,7 +12,7 @@ import type { PipelineString } from '../pipeline/PipelineString';
12
12
  * Note: This function acts as compilation process
13
13
  *
14
14
  * @param pipelineString {Promptbook} in string markdown format (.book.md)
15
- * @returns {Promptbook} compiled in JSON format (.book.json)
15
+ * @returns {Promptbook} compiled in JSON format (.bookc)
16
16
  * @throws {ParseError} if the promptbook string is not valid
17
17
  * @public exported from `@promptbook/core`
18
18
  */
@@ -4,7 +4,7 @@ import type { PipelineString } from '../pipeline/PipelineString';
4
4
  * Converts promptbook in JSON format to string format
5
5
  *
6
6
  * @deprecated TODO: [🥍][🧠] Backup original files in `PipelineJson` same as in Promptbook.studio
7
- * @param pipelineJson Promptbook in JSON format (.book.json)
7
+ * @param pipelineJson Promptbook in JSON format (.bookc)
8
8
  * @returns Promptbook in string format (.book.md)
9
9
  * @public exported from `@promptbook/core`
10
10
  */
@@ -2,7 +2,7 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
2
2
  import type { PipelineString } from '../../pipeline/PipelineString';
3
3
  import type { string_json } from '../../types/typeAliases';
4
4
  /**
5
- * Import the pipeline.book or pipeline.book.json file
5
+ * Import the pipeline.book or pipeline.bookc file
6
6
  *
7
7
  * Note: Using here custom import to work in jest tests
8
8
  * Note: Using sync version is 💩 in the production code, but it's ok here in tests
@@ -11,19 +11,19 @@ import type { string_json } from '../../types/typeAliases';
11
11
  * @private internal function of tests
12
12
  */
13
13
  export declare function importPipelineWithoutPreparation(path: `${string}.book`): PipelineString;
14
- export declare function importPipelineWithoutPreparation(path: `${string}.book.json`): PipelineJson;
14
+ export declare function importPipelineWithoutPreparation(path: `${string}.bookc`): PipelineJson;
15
15
  /**
16
- * Import the pipeline.book.json file as parsed JSON
16
+ * Import the pipeline.bookc file as parsed JSON
17
17
  *
18
18
  * @private internal function of tests
19
19
  */
20
- export declare function importPipelineJson(path: `${string}.book.json`): PipelineJson;
20
+ export declare function importPipelineJson(path: `${string}.bookc`): PipelineJson;
21
21
  /**
22
- * Import the pipeline.book.json file as string
22
+ * Import the pipeline.bookc file as string
23
23
  *
24
24
  * @private internal function of tests
25
25
  */
26
- export declare function importPipelineJsonAsString(path: `${string}.book.json`): string_json<PipelineJson>;
26
+ export declare function importPipelineJsonAsString(path: `${string}.bookc`): string_json<PipelineJson>;
27
27
  /**
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
29
29
  * Note: [⚫] Code in this file should never be published in any package
@@ -18,5 +18,5 @@ export type PreparationJson = {
18
18
  /**
19
19
  * TODO: [🍙] Make some standard order of json properties
20
20
  * TODO: Maybe put here used `modelName`
21
- * TODO: [🍥] When using `date` it changes all examples .book.json files each time so until some more elegant solution omit the time from prepared pipeline
21
+ * TODO: [🍥] When using `date` it changes all examples .bookc files each time so until some more elegant solution omit the time from prepared pipeline
22
22
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.86.0-6",
3
+ "version": "0.86.5",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -45,6 +45,6 @@
45
45
  "homepage": "https://ptbk.io/",
46
46
  "typings": "./esm/typings/src/_packages/types.index.d.ts",
47
47
  "peerDependencies": {
48
- "@promptbook/core": "0.86.0-6"
48
+ "@promptbook/core": "0.86.5"
49
49
  }
50
50
  }