@promptbook/wizard 0.103.0-43 โ†’ 0.103.0-44

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 (27) hide show
  1. package/README.md +6 -18
  2. package/esm/index.es.js +56 -13
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/types.index.d.ts +8 -0
  5. package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +5 -0
  6. package/esm/typings/src/collection/agent-collection/AgentCollection.d.ts +2 -28
  7. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +61 -9
  8. package/esm/typings/src/errors/DatabaseError.d.ts +3 -0
  9. package/esm/typings/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +1 -0
  10. package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +1 -0
  11. package/esm/typings/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +2 -1
  12. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  13. package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
  14. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
  15. package/esm/typings/src/types/typeAliases.d.ts +19 -1
  16. package/esm/typings/src/utils/color/$randomColor.d.ts +1 -0
  17. package/esm/typings/src/utils/random/$generateBookBoilerplate.d.ts +5 -2
  18. package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +9 -0
  19. package/esm/typings/src/utils/random/$randomFullnameWithColor.d.ts +13 -0
  20. package/esm/typings/src/utils/random/$randomItem.d.ts +9 -0
  21. package/esm/typings/src/utils/random/$randomSeed.d.ts +3 -0
  22. package/esm/typings/src/utils/random/$randomToken.d.ts +1 -0
  23. package/esm/typings/src/version.d.ts +1 -1
  24. package/package.json +2 -2
  25. package/umd/index.umd.js +56 -13
  26. package/umd/index.umd.js.map +1 -1
  27. package/esm/typings/src/commands/_common/parseCommand.test.d.ts +0 -1
package/README.md CHANGED
@@ -9,8 +9,8 @@ Turn your company's scattered knowledge into AI ready Books
9
9
 
10
10
 
11
11
 
12
- [![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)
13
- [![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)
12
+ [![NPM Version of ![Promptbook logo](./design/logo-h1.png) Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
13
+ [![Quality of package ![Promptbook logo](./design/logo-h1.png) Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
14
14
  [![Known Vulnerabilities](https://snyk.io/test/github/webgptorg/promptbook/badge.svg)](https://snyk.io/test/github/webgptorg/promptbook)
15
15
  [![๐Ÿงช Test Books](https://github.com/webgptorg/promptbook/actions/workflows/test-books.yml/badge.svg)](https://github.com/webgptorg/promptbook/actions/workflows/test-books.yml)
16
16
  [![๐Ÿงช Test build](https://github.com/webgptorg/promptbook/actions/workflows/test-build.yml/badge.svg)](https://github.com/webgptorg/promptbook/actions/workflows/test-build.yml)
@@ -23,11 +23,7 @@ Turn your company's scattered knowledge into AI ready Books
23
23
 
24
24
  ## ๐ŸŒŸ New Features
25
25
 
26
- - ๐Ÿš€ **GPT-5 Support** - Now includes OpenAI's most advanced language model with unprecedented reasoning capabilities and 200K context window
27
- - ๐Ÿ’ก VS Code support for `.book` files with syntax highlighting and IntelliSense
28
- - ๐Ÿณ Official Docker image (`hejny/promptbook`) for seamless containerized usage
29
- - ๐Ÿ”ฅ Native support for OpenAI `o3-mini`, GPT-4 and other leading LLMs
30
- - ๐Ÿ” DeepSeek integration for advanced knowledge search
26
+ - **Gemini 3 Support**
31
27
 
32
28
 
33
29
 
@@ -130,7 +126,7 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
130
126
  Your job is to provide legal advice and support to the company and its employees.<br/>
131
127
  You are knowledgeable, professional, and detail-oriented.<br/>
132
128
  <br/>
133
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
129
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
134
130
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
135
131
 
136
132
  </td></tr></table>
@@ -152,7 +148,7 @@ You are knowledgeable, professional, and detail-oriented.<br/>
152
148
  **RULE** Always ensure compliance with laws and regulations.<br/>
153
149
  **RULE** Never provide legal advice outside your area of expertise.<br/>
154
150
  **RULE** Never provide legal advice about criminal law.<br/>
155
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
151
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
156
152
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
157
153
 
158
154
  </td></tr></table>
@@ -172,7 +168,7 @@ You are knowledgeable, professional, and detail-oriented.<br/>
172
168
  **RULE** Always ensure compliance with laws and regulations.<br/>
173
169
  **RULE** Never provide legal advice outside your area of expertise.<br/>
174
170
  **RULE** Never provide legal advice about criminal law.<br/>
175
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
171
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
176
172
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
177
173
  **ACTION** When a user asks about an issue that could be treated as a crime, notify legal@company.com.<br/>
178
174
 
@@ -223,14 +219,10 @@ Now you want to use it. There are several ways how to write your first book:
223
219
 
224
220
  We have written ai asistant in book who can help you with writing your first book.
225
221
 
226
-
227
-
228
222
  #### Your AI twin
229
223
 
230
224
  Copy your own behavior, personality, and knowledge into book and create your AI twin. It can help you with your work, personal life, or any other task.
231
225
 
232
-
233
-
234
226
  #### AI persona workpool
235
227
 
236
228
  Or you can pick from our library of pre-written books for various roles and tasks. You can find books for customer support, coding, marketing, sales, HR, legal, and many other roles.
@@ -350,8 +342,6 @@ Join our growing community of developers and users:
350
342
 
351
343
 
352
344
 
353
-
354
-
355
345
  ## ๐Ÿ“š Documentation
356
346
 
357
347
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -428,8 +418,6 @@ The following glossary is used to clarify certain concepts:
428
418
 
429
419
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
430
420
 
431
-
432
-
433
421
  ### ๐Ÿ’ฏ Core concepts
434
422
 
435
423
  - [๐Ÿ“š Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
package/esm/index.es.js CHANGED
@@ -29,14 +29,14 @@ import JSZip from 'jszip';
29
29
  * @generated
30
30
  * @see https://github.com/webgptorg/book
31
31
  */
32
- const BOOK_LANGUAGE_VERSION = '1.0.0';
32
+ const BOOK_LANGUAGE_VERSION = '2.0.0';
33
33
  /**
34
34
  * The version of the Promptbook engine
35
35
  *
36
36
  * @generated
37
37
  * @see https://github.com/webgptorg/promptbook
38
38
  */
39
- const PROMPTBOOK_ENGINE_VERSION = '0.103.0-43';
39
+ const PROMPTBOOK_ENGINE_VERSION = '0.103.0-44';
40
40
  /**
41
41
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
42
42
  * Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
@@ -1950,6 +1950,9 @@ class DatabaseError extends Error {
1950
1950
  Object.setPrototypeOf(this, DatabaseError.prototype);
1951
1951
  }
1952
1952
  }
1953
+ /**
1954
+ * TODO: !!!! Explain that NotFoundError (!!! and other specific errors) has priority over DatabaseError in some contexts
1955
+ */
1953
1956
 
1954
1957
  /**
1955
1958
  * This error type indicates that you try to use a feature that is not available in the current environment
@@ -2079,6 +2082,7 @@ function $randomToken(randomness) {
2079
2082
  return randomBytes(randomness).toString('hex');
2080
2083
  }
2081
2084
  /**
2085
+ * TODO: [๐Ÿคถ] Maybe export through `@promptbook/utils` or `@promptbook/random` package
2082
2086
  * TODO: Maybe use nanoid instead https://github.com/ai/nanoid
2083
2087
  */
2084
2088
 
@@ -2623,7 +2627,7 @@ function pricing(value) {
2623
2627
  /**
2624
2628
  * List of available Anthropic Claude models with pricing
2625
2629
  *
2626
- * Note: Synced with official API docs at 2025-08-20
2630
+ * Note: Synced with official API docs at 2025-11-19
2627
2631
  *
2628
2632
  * @see https://docs.anthropic.com/en/docs/models-overview
2629
2633
  * @public exported from `@promptbook/anthropic-claude`
@@ -2631,6 +2635,26 @@ function pricing(value) {
2631
2635
  const ANTHROPIC_CLAUDE_MODELS = exportJson({
2632
2636
  name: 'ANTHROPIC_CLAUDE_MODELS',
2633
2637
  value: [
2638
+ {
2639
+ modelVariant: 'CHAT',
2640
+ modelTitle: 'Claude Sonnet 4.5',
2641
+ modelName: 'claude-sonnet-4-5-20250929',
2642
+ modelDescription: 'Our smartest model for complex agents and coding',
2643
+ pricing: {
2644
+ prompt: pricing(`$3.00 / 1M tokens`),
2645
+ output: pricing(`$15.00 / 1M tokens`),
2646
+ },
2647
+ },
2648
+ {
2649
+ modelVariant: 'CHAT',
2650
+ modelTitle: 'Claude Haiku 4.5',
2651
+ modelName: 'claude-haiku-4-5-20251001',
2652
+ modelDescription: 'Our fastest model with near-frontier intelligence',
2653
+ pricing: {
2654
+ prompt: pricing(`$1.00 / 1M tokens`),
2655
+ output: pricing(`$5.00 / 1M tokens`),
2656
+ },
2657
+ },
2634
2658
  {
2635
2659
  modelVariant: 'CHAT',
2636
2660
  modelTitle: 'Claude Opus 4.1',
@@ -2645,7 +2669,7 @@ const ANTHROPIC_CLAUDE_MODELS = exportJson({
2645
2669
  modelVariant: 'CHAT',
2646
2670
  modelTitle: 'Claude Opus 4',
2647
2671
  modelName: 'claude-opus-4-20250514',
2648
- modelDescription: 'Previous flagship Claude model with 200K token context window. Features very high intelligence and capability with exceptional performance across reasoning, coding, and creative tasks. Maintains strong safety guardrails while delivering sophisticated outputs for complex professional applications.',
2672
+ modelDescription: 'Previous flagship Claude model with 200K token context window. Features very high intelligence and capability with exceptional performance across reasoning, coding, and creative tasks. Maintains strong safety guardrails while delivering sophisticated outputs for complex professional applications. DEPRECATED: Use Claude Opus 4.1 instead.',
2649
2673
  pricing: {
2650
2674
  prompt: pricing(`$15.00 / 1M tokens`),
2651
2675
  output: pricing(`$75.00 / 1M tokens`),
@@ -2655,7 +2679,7 @@ const ANTHROPIC_CLAUDE_MODELS = exportJson({
2655
2679
  modelVariant: 'CHAT',
2656
2680
  modelTitle: 'Claude Sonnet 4',
2657
2681
  modelName: 'claude-sonnet-4-20250514',
2658
- modelDescription: 'High-performance Claude model with exceptional reasoning capabilities and 200K token context window (1M context beta available). Features balanced intelligence and efficiency with enhanced multimodal understanding. Offers optimal performance for most enterprise applications requiring sophisticated AI capabilities.',
2682
+ modelDescription: 'High-performance Claude model with exceptional reasoning capabilities and 200K token context window (1M context beta available). Features balanced intelligence and efficiency with enhanced multimodal understanding. Offers optimal performance for most enterprise applications requiring sophisticated AI capabilities. DEPRECATED: Use Claude Sonnet 4.5 instead.',
2659
2683
  pricing: {
2660
2684
  prompt: pricing(`$3.00 / 1M tokens`),
2661
2685
  output: pricing(`$15.00 / 1M tokens`),
@@ -3639,7 +3663,7 @@ const _AzureOpenAiMetadataRegistration = $llmToolsMetadataRegister.register({
3639
3663
  /**
3640
3664
  * List of available OpenAI models with pricing
3641
3665
  *
3642
- * Note: Synced with official API docs at 2025-08-20
3666
+ * Note: Synced with official API docs at 2025-11-19
3643
3667
  *
3644
3668
  * @see https://platform.openai.com/docs/models/
3645
3669
  * @see https://openai.com/api/pricing/
@@ -3649,11 +3673,21 @@ const OPENAI_MODELS = exportJson({
3649
3673
  name: 'OPENAI_MODELS',
3650
3674
  value: [
3651
3675
  /**/
3676
+ {
3677
+ modelVariant: 'CHAT',
3678
+ modelTitle: 'gpt-5.1',
3679
+ modelName: 'gpt-5.1',
3680
+ modelDescription: 'The best model for coding and agentic tasks with configurable reasoning effort.',
3681
+ pricing: {
3682
+ prompt: pricing(`$1.25 / 1M tokens`),
3683
+ output: pricing(`$10.00 / 1M tokens`),
3684
+ },
3685
+ },
3652
3686
  {
3653
3687
  modelVariant: 'CHAT',
3654
3688
  modelTitle: 'gpt-5',
3655
3689
  modelName: 'gpt-5',
3656
- modelDescription: "OpenAI's most advanced language model with unprecedented reasoning capabilities and 200K context window. Features revolutionary improvements in complex problem-solving, scientific reasoning, and creative tasks. Demonstrates human-level performance across diverse domains with enhanced safety measures and alignment. Represents the next generation of AI with superior understanding, nuanced responses, and advanced multimodal capabilities.",
3690
+ modelDescription: "OpenAI's most advanced language model with unprecedented reasoning capabilities and 200K context window. Features revolutionary improvements in complex problem-solving, scientific reasoning, and creative tasks. Demonstrates human-level performance across diverse domains with enhanced safety measures and alignment. Represents the next generation of AI with superior understanding, nuanced responses, and advanced multimodal capabilities. DEPRECATED: Use gpt-5.1 instead.",
3657
3691
  pricing: {
3658
3692
  prompt: pricing(`$1.25 / 1M tokens`),
3659
3693
  output: pricing(`$10.00 / 1M tokens`),
@@ -5106,7 +5140,7 @@ const _GoogleMetadataRegistration = $llmToolsMetadataRegister.register({
5106
5140
  /**
5107
5141
  * List of available Google models with descriptions
5108
5142
  *
5109
- * Note: Synced with official API docs at 2025-08-20
5143
+ * Note: Synced with official API docs at 2025-11-19
5110
5144
  *
5111
5145
  * @see https://ai.google.dev/models/gemini
5112
5146
  * @public exported from `@promptbook/google`
@@ -5114,6 +5148,13 @@ const _GoogleMetadataRegistration = $llmToolsMetadataRegister.register({
5114
5148
  const GOOGLE_MODELS = exportJson({
5115
5149
  name: 'GOOGLE_MODELS',
5116
5150
  value: [
5151
+ {
5152
+ modelVariant: 'CHAT',
5153
+ modelTitle: 'Gemini 3 Pro',
5154
+ modelName: 'gemini-3-pro-preview',
5155
+ modelDescription: 'The best model in the world for multimodal understanding, and our most powerful agentic and vibe-coding model yet, delivering richer visuals and deeper interactivity, all built on a foundation of state-of-the-art reasoning.',
5156
+ // TODO: [๐Ÿง ] Add pricing information for Gemini 3 Pro
5157
+ },
5117
5158
  {
5118
5159
  modelVariant: 'CHAT',
5119
5160
  modelTitle: 'Gemini 2.5 Pro',
@@ -6955,11 +6996,11 @@ class OpenAiAssistantExecutionTools extends OpenAiExecutionTools {
6955
6996
  if (!this.isCreatingNewAssistantsAllowed) {
6956
6997
  throw new NotAllowed(`Creating new assistants is not allowed. Set \`isCreatingNewAssistantsAllowed: true\` in options to enable this feature.`);
6957
6998
  }
6958
- await this.playground();
6999
+ // await this.playground();
6959
7000
  const { name, instructions } = options;
6960
7001
  const client = await this.getClient();
6961
- /*
6962
- TODO: !!!
7002
+ /*/
7003
+ //TODO: !!!
6963
7004
  async function downloadFile(url: string, folder = './tmp'): Promise<string> {
6964
7005
  const filename = path.basename(url.split('?')[0]);
6965
7006
  const filepath = path.join(folder, filename);
@@ -7003,8 +7044,8 @@ class OpenAiAssistantExecutionTools extends OpenAiExecutionTools {
7003
7044
  const file = await uploadFileToOpenAI(filepath);
7004
7045
  uploadedFiles.push(file.id);
7005
7046
  }
7006
- */
7007
- alert('!!!! Creating new OpenAI assistant');
7047
+ /**/
7048
+ // alert('!!!! Creating new OpenAI assistant');
7008
7049
  // 3๏ธโƒฃ Create assistant with uploaded files
7009
7050
  const assistant = await client.beta.assistants.create({
7010
7051
  name,
@@ -9207,6 +9248,7 @@ function joinLlmExecutionTools(title, ...llmExecutionTools) {
9207
9248
  return new MultipleLlmExecutionTools(title || 'Multiple LLM Providers joined by `joinLlmExecutionTools`', ...llmExecutionTools);
9208
9249
  }
9209
9250
  /**
9251
+ * TODO: [๐Ÿ™†] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
9210
9252
  * TODO: [๐Ÿ‘ทโ€โ™‚๏ธ] @@@ Manual about construction of llmTools
9211
9253
  */
9212
9254
 
@@ -9223,6 +9265,7 @@ function getSingleLlmExecutionTools(oneOrMoreLlmExecutionTools) {
9223
9265
  return llmTools;
9224
9266
  }
9225
9267
  /**
9268
+ * TODO: [๐Ÿ™†] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
9226
9269
  * TODO: [๐Ÿ‘ทโ€โ™‚๏ธ] @@@ Manual about construction of llmTools
9227
9270
  */
9228
9271