@promptbook/browser 0.105.0-1 → 0.105.0-4

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 (39) hide show
  1. package/README.md +36 -77
  2. package/esm/index.es.js +310 -93
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/core.index.d.ts +2 -0
  5. package/esm/typings/src/_packages/types.index.d.ts +4 -0
  6. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +10 -3
  7. package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +11 -1
  8. package/esm/typings/src/book-2.0/agent-source/communication-samples.test.d.ts +1 -0
  9. package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.blocks.test.d.ts +1 -0
  10. package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.import.test.d.ts +1 -0
  11. package/esm/typings/src/book-2.0/agent-source/parseAgentSource.import.test.d.ts +1 -0
  12. package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.blocks.test.d.ts +1 -0
  13. package/esm/typings/src/commitments/USE_TIME/USE_TIME.d.ts +40 -0
  14. package/esm/typings/src/commitments/USE_TIME/USE_TIME.test.d.ts +1 -0
  15. package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +8 -0
  16. package/esm/typings/src/commitments/_base/CommitmentDefinition.d.ts +8 -0
  17. package/esm/typings/src/commitments/index.d.ts +11 -2
  18. package/esm/typings/src/config.d.ts +1 -0
  19. package/esm/typings/src/import-plugins/$fileImportPlugins.d.ts +7 -0
  20. package/esm/typings/src/import-plugins/AgentFileImportPlugin.d.ts +7 -0
  21. package/esm/typings/src/import-plugins/FileImportPlugin.d.ts +24 -0
  22. package/esm/typings/src/import-plugins/JsonFileImportPlugin.d.ts +7 -0
  23. package/esm/typings/src/import-plugins/TextFileImportPlugin.d.ts +7 -0
  24. package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +2 -1
  25. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +2 -2
  26. package/esm/typings/src/llm-providers/agent/Agent.d.ts +9 -2
  27. package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +3 -1
  28. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +10 -0
  29. package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -1
  30. package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +6 -1
  31. package/esm/typings/src/types/ModelRequirements.d.ts +6 -12
  32. package/esm/typings/src/utils/execCommand/$execCommandNormalizeOptions.d.ts +2 -3
  33. package/esm/typings/src/utils/execCommand/ExecCommandOptions.d.ts +7 -1
  34. package/esm/typings/src/utils/organization/keepImported.d.ts +9 -0
  35. package/esm/typings/src/utils/organization/keepTypeImported.d.ts +0 -1
  36. package/esm/typings/src/version.d.ts +1 -1
  37. package/package.json +2 -2
  38. package/umd/index.umd.js +310 -93
  39. package/umd/index.umd.js.map +1 -1
package/README.md CHANGED
@@ -100,19 +100,20 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
100
100
 
101
101
  ## 📖 The Book Whitepaper
102
102
 
103
- For most business applications nowadays, the biggest challenge isn't about the raw capabilities of AI models. Large language models like GPT-5 or Claude-4.1 are extremely capable.
103
+ Nowadays, the biggest challenge for most business applications isn't the raw capabilities of AI models. Large language models such as GPT-5.2 and Claude-4.5 are incredibly capable.
104
104
 
105
- The main challenge is to narrow it down, constrain it, set the proper **context, rules, knowledge, and personality**. There are a lot of tools which can do exactly this. On one side, there are no-code platforms which can launch your agent in seconds. On the other side, there are heavy frameworks like Langchain or Semantic Kernel, which can give you deep control.
105
+ The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
106
106
 
107
- Promptbook takes the best from both worlds. You are defining your AI behavior by simple **books**, which are very explicit. They are automatically enforced, but they are very easy to understand, very easy to write, and very reliable and portable.
107
+ In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
108
108
 
109
109
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
110
110
 
111
- **<ins>Paul Smith & Associés</ins>**<br/>
111
+ **<ins>Paul Smith</ins>**<br/>
112
112
  <br/>
113
113
  **PERSONA** You are a company lawyer.<br/>
114
114
  Your job is to provide legal advice and support to the company and its employees.<br/>
115
- You are knowledgeable, professional, and detail-oriented.<br/>
115
+ **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
116
+ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
116
117
 
117
118
  </td></tr></table>
118
119
 
@@ -122,7 +123,9 @@ You are knowledgeable, professional, and detail-oriented.<br/>
122
123
 
123
124
  We have created a language called **Book**, which allows you to write AI agents in their native language and create your own AI persona. Book provides a guide to define all the traits and commitments.
124
125
 
125
- You can look at it as prompting (or writing a system message), but decorated by **commitments**.
126
+ You can look at it as "prompting" _(or writing a system message)_, but decorated by **commitments**.
127
+
128
+ **Commitments** are special syntax elements that define contracts between you and the AI agent. They are transformed by Promptbook Engine into low-level parameters like which model to use, its temperature, system message, RAG index, MCP servers, and many other parameters. For some commitments _(for example `RULE` commitment)_ Promptbook Engine can even create adversary agents and extra checks to enforce the rules.
126
129
 
127
130
  #### `Persona` commitment
128
131
 
@@ -133,8 +136,6 @@ Personas define the character of your AI persona, its role, and how it should in
133
136
  **<ins>Paul Smith & Associés</ins>**<br/>
134
137
  <br/>
135
138
  **PERSONA** You are a company lawyer.<br/>
136
- Your job is to provide legal advice and support to the company and its employees.<br/>
137
- You are knowledgeable, professional, and detail-oriented.<br/>
138
139
 
139
140
  </td></tr></table>
140
141
 
@@ -154,7 +155,7 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
154
155
  Your job is to provide legal advice and support to the company and its employees.<br/>
155
156
  You are knowledgeable, professional, and detail-oriented.<br/>
156
157
  <br/>
157
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
158
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
158
159
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
159
160
 
160
161
  </td></tr></table>
@@ -176,14 +177,14 @@ You are knowledgeable, professional, and detail-oriented.<br/>
176
177
  **RULE** Always ensure compliance with laws and regulations.<br/>
177
178
  **RULE** Never provide legal advice outside your area of expertise.<br/>
178
179
  **RULE** Never provide legal advice about criminal law.<br/>
179
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
180
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
180
181
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
181
182
 
182
183
  </td></tr></table>
183
184
 
184
- #### `Action` commitment
185
+ #### `Team` commitment
185
186
 
186
- Action Commitment allows you to define specific actions that the AI can take during interactions. This can include things like posting on a social media platform, sending emails, creating calendar events, or interacting with your internal systems.
187
+ Team commitment allows you to define the team structure and advisory fellow members the AI can consult with. This allows the AI to simulate collaboration and consultation with other experts, enhancing the quality of its responses.
187
188
 
188
189
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
189
190
 
@@ -196,81 +197,36 @@ You are knowledgeable, professional, and detail-oriented.<br/>
196
197
  **RULE** Always ensure compliance with laws and regulations.<br/>
197
198
  **RULE** Never provide legal advice outside your area of expertise.<br/>
198
199
  **RULE** Never provide legal advice about criminal law.<br/>
199
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
200
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
200
201
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
201
- **ACTION** When a user asks about an issue that could be treated as a crime, notify legal@company.com.<br/>
202
+ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
202
203
 
203
204
  </td></tr></table>
204
205
 
205
- [Read more about the language](./BLUEPRINT.md)
206
-
207
- <div style="page-break-after: always;"></div>
208
-
209
- ### Where to use your AI agent in book
210
-
211
- Books can be useful in various applications and scenarios. Here are some examples:
212
-
213
- #### Chat apps:
214
206
 
215
- Create your own chat shopping assistant and place it in your eShop.
216
- You will be able to answer customer questions, help them find products, and provide personalized recommendations. Everything is tightly controlled by the book you have written.
217
207
 
218
- #### Reply Agent:
208
+ ### Promptbook Ecosystem
219
209
 
220
- Create your own AI agent, which will look at your emails and reply to them. It can even create drafts for you to review before sending.
210
+ !!!@@@
221
211
 
222
- #### Coding Agent:
223
-
224
- Do you love Vibecoding, but the AI code is not always aligned with your coding style and architecture, rules, security, etc.? Create your own coding agent to help enforce your specific coding standards and practices.
225
-
226
- This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
227
-
228
- They will work the same as you are used to, but with your specific rules written in book.
229
-
230
- #### Internal Expertise
231
-
232
- Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
233
-
234
- You can avoid struggle with choosing the best model, its settings like temperature, max tokens, etc., by writing a book agent and using it as your AI expertise.
235
-
236
- Doesn't matter if you do automations, data analysis, customer support, sentiment analysis, classification, or any other task. Your AI agent will be tailored to your specific needs and requirements.
237
-
238
- Even works in no-code platforms!
239
-
240
- <div style="page-break-after: always;"></div>
212
+ #### Promptbook Server
241
213
 
242
- ### How to create your AI agent in book
214
+ !!!@@@
243
215
 
244
- Now you want to use it. There are several ways how to write your first book:
216
+ #### Promptbook Engine
245
217
 
246
- #### From scratch with help from Paul
218
+ !!!@@@
247
219
 
248
- We have written ai asistant in book who can help you with writing your first book.
249
220
 
250
- #### Your AI twin
251
221
 
252
- 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.
253
222
 
254
- #### AI persona workpool
255
223
 
256
- 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.
257
224
 
258
225
 
259
226
 
260
227
 
261
228
 
262
229
 
263
- ## 🚀 Get started
264
-
265
- Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
266
-
267
- - [Hello Book](https://github.com/webgptorg/hello-world)
268
- - [Hello Book in Node.js](https://github.com/webgptorg/hello-world-node-js)
269
- - [Hello Book in Next.js](https://github.com/webgptorg/hello-world-next-js)
270
-
271
-
272
-
273
-
274
230
 
275
231
 
276
232
  ## 💜 The Promptbook Project
@@ -286,33 +242,32 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
286
242
  </thead>
287
243
  <tbody>
288
244
  <tr>
289
- <td><a href="https://github.com/webgptorg/book">Book language</a></td>
245
+ <td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
290
246
  <td>
291
- Book is a human-understandable markup language for writing AI applications such as chatbots, knowledge bases, agents, avarars, translators, automations and more.
292
- <hr>
293
- There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
247
+ Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
294
248
  </td>
295
249
  </tr>
296
250
  <tr>
297
- <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
251
+ <td><a href="https://github.com/webgptorg/book">Book language</a></td>
298
252
  <td>
299
- Promptbook engine can run applications written in Book language. It is released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a> and <a href="https://hub.docker.com/r/hejny/promptbook">Docker HUB</a>
253
+ Human-friendly, high-level language that abstracts away low-level details of AI. It allows to focus on personality, behavior, knowledge, and rules of AI agents rather than on models, parameters, and prompt engineering.
254
+ <hr>
255
+ There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
300
256
  </td>
301
257
  </tr>
302
258
  <tr>
303
- <td><a href="https://promptbook.studio">Promptbook Studio</a></td>
259
+ <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
304
260
  <td>
305
- Promptbook.studio is a web-based editor and runner for book applications. It is still in the experimental MVP stage.
261
+ Promptbook engine can run AI agents based on Book language.
262
+ It is released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a> and <a href="https://hub.docker.com/r/hejny/promptbook">Promptbook Agent Server as Docker Package</a>
263
+ Agent Server is based on Promptbook Engine.
306
264
  </td>
307
265
  </tr>
266
+
308
267
  </tbody>
309
268
  </table>
310
269
 
311
- Hello world examples:
312
270
 
313
- - [Hello world](https://github.com/webgptorg/hello-world)
314
- - [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
315
- - [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
316
271
 
317
272
  ### 🌐 Community & Social Media
318
273
 
@@ -370,6 +325,8 @@ Join our growing community of developers and users:
370
325
 
371
326
 
372
327
 
328
+
329
+
373
330
  ## 📚 Documentation
374
331
 
375
332
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -446,6 +403,8 @@ The following glossary is used to clarify certain concepts:
446
403
 
447
404
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
448
405
 
406
+
407
+
449
408
  ### 💯 Core concepts
450
409
 
451
410
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)