@promptbook/components 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.
- package/README.md +36 -77
- package/esm/index.es.js +873 -244
- package/esm/index.es.js.map +1 -1
- package/esm/typings/servers.d.ts +6 -0
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +4 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +10 -3
- package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +11 -1
- package/esm/typings/src/book-2.0/agent-source/communication-samples.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.blocks.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.import.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSource.import.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.blocks.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.d.ts +40 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.test.d.ts +1 -0
- package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +8 -0
- package/esm/typings/src/commitments/_base/CommitmentDefinition.d.ts +8 -0
- package/esm/typings/src/commitments/index.d.ts +11 -2
- package/esm/typings/src/config.d.ts +1 -0
- package/esm/typings/src/import-plugins/$fileImportPlugins.d.ts +7 -0
- package/esm/typings/src/import-plugins/AgentFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/import-plugins/FileImportPlugin.d.ts +24 -0
- package/esm/typings/src/import-plugins/JsonFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/import-plugins/TextFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +2 -2
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +9 -2
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +3 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +10 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +6 -1
- package/esm/typings/src/types/ModelRequirements.d.ts +6 -12
- package/esm/typings/src/utils/execCommand/$execCommandNormalizeOptions.d.ts +2 -3
- package/esm/typings/src/utils/execCommand/ExecCommandOptions.d.ts +7 -1
- package/esm/typings/src/utils/organization/keepImported.d.ts +9 -0
- package/esm/typings/src/utils/organization/keepTypeImported.d.ts +0 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +873 -244
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -201,19 +201,20 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
201
201
|
|
|
202
202
|
## 📖 The Book Whitepaper
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
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.
|
|
205
205
|
|
|
206
|
-
The main challenge
|
|
206
|
+
The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
|
|
207
207
|
|
|
208
|
-
Promptbook
|
|
208
|
+
In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
|
|
209
209
|
|
|
210
210
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
211
211
|
|
|
212
|
-
**<ins>Paul Smith
|
|
212
|
+
**<ins>Paul Smith</ins>**<br/>
|
|
213
213
|
<br/>
|
|
214
214
|
**PERSONA** You are a company lawyer.<br/>
|
|
215
215
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
216
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
216
|
+
**RULE** You are knowledgeable, professional, and detail-oriented.<br/>
|
|
217
|
+
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/>
|
|
217
218
|
|
|
218
219
|
</td></tr></table>
|
|
219
220
|
|
|
@@ -223,7 +224,9 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
223
224
|
|
|
224
225
|
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.
|
|
225
226
|
|
|
226
|
-
You can look at it as prompting (or writing a system message), but decorated by **commitments**.
|
|
227
|
+
You can look at it as "prompting" _(or writing a system message)_, but decorated by **commitments**.
|
|
228
|
+
|
|
229
|
+
**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.
|
|
227
230
|
|
|
228
231
|
#### `Persona` commitment
|
|
229
232
|
|
|
@@ -234,8 +237,6 @@ Personas define the character of your AI persona, its role, and how it should in
|
|
|
234
237
|
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
235
238
|
<br/>
|
|
236
239
|
**PERSONA** You are a company lawyer.<br/>
|
|
237
|
-
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
238
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
239
240
|
|
|
240
241
|
</td></tr></table>
|
|
241
242
|
|
|
@@ -255,7 +256,7 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
|
|
|
255
256
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
256
257
|
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
257
258
|
<br/>
|
|
258
|
-
**KNOWLEDGE**
|
|
259
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
259
260
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
260
261
|
|
|
261
262
|
</td></tr></table>
|
|
@@ -277,14 +278,14 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
277
278
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
278
279
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
279
280
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
280
|
-
**KNOWLEDGE**
|
|
281
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
281
282
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
282
283
|
|
|
283
284
|
</td></tr></table>
|
|
284
285
|
|
|
285
|
-
#### `
|
|
286
|
+
#### `Team` commitment
|
|
286
287
|
|
|
287
|
-
|
|
288
|
+
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.
|
|
288
289
|
|
|
289
290
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
290
291
|
|
|
@@ -297,81 +298,36 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
297
298
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
298
299
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
299
300
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
300
|
-
**KNOWLEDGE**
|
|
301
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
301
302
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
302
|
-
|
|
303
|
+
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/>
|
|
303
304
|
|
|
304
305
|
</td></tr></table>
|
|
305
306
|
|
|
306
|
-
[Read more about the language](./BLUEPRINT.md)
|
|
307
|
-
|
|
308
|
-
<div style="page-break-after: always;"></div>
|
|
309
|
-
|
|
310
|
-
### Where to use your AI agent in book
|
|
311
|
-
|
|
312
|
-
Books can be useful in various applications and scenarios. Here are some examples:
|
|
313
|
-
|
|
314
|
-
#### Chat apps:
|
|
315
307
|
|
|
316
|
-
Create your own chat shopping assistant and place it in your eShop.
|
|
317
|
-
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.
|
|
318
308
|
|
|
319
|
-
|
|
309
|
+
### Promptbook Ecosystem
|
|
320
310
|
|
|
321
|
-
|
|
311
|
+
!!!@@@
|
|
322
312
|
|
|
323
|
-
####
|
|
324
|
-
|
|
325
|
-
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.
|
|
326
|
-
|
|
327
|
-
This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
|
|
328
|
-
|
|
329
|
-
They will work the same as you are used to, but with your specific rules written in book.
|
|
330
|
-
|
|
331
|
-
#### Internal Expertise
|
|
332
|
-
|
|
333
|
-
Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
|
|
334
|
-
|
|
335
|
-
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.
|
|
336
|
-
|
|
337
|
-
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.
|
|
338
|
-
|
|
339
|
-
Even works in no-code platforms!
|
|
340
|
-
|
|
341
|
-
<div style="page-break-after: always;"></div>
|
|
313
|
+
#### Promptbook Server
|
|
342
314
|
|
|
343
|
-
|
|
315
|
+
!!!@@@
|
|
344
316
|
|
|
345
|
-
|
|
317
|
+
#### Promptbook Engine
|
|
346
318
|
|
|
347
|
-
|
|
319
|
+
!!!@@@
|
|
348
320
|
|
|
349
|
-
We have written ai asistant in book who can help you with writing your first book.
|
|
350
321
|
|
|
351
|
-
#### Your AI twin
|
|
352
322
|
|
|
353
|
-
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.
|
|
354
323
|
|
|
355
|
-
#### AI persona workpool
|
|
356
324
|
|
|
357
|
-
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.
|
|
358
325
|
|
|
359
326
|
|
|
360
327
|
|
|
361
328
|
|
|
362
329
|
|
|
363
330
|
|
|
364
|
-
## 🚀 Get started
|
|
365
|
-
|
|
366
|
-
Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
|
|
367
|
-
|
|
368
|
-
- [Hello Book](https://github.com/webgptorg/hello-world)
|
|
369
|
-
- [Hello Book in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
370
|
-
- [Hello Book in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
331
|
|
|
376
332
|
|
|
377
333
|
## 💜 The Promptbook Project
|
|
@@ -387,33 +343,32 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
387
343
|
</thead>
|
|
388
344
|
<tbody>
|
|
389
345
|
<tr>
|
|
390
|
-
<td><a href="https://
|
|
346
|
+
<td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
|
|
391
347
|
<td>
|
|
392
|
-
|
|
393
|
-
<hr>
|
|
394
|
-
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
348
|
+
Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
|
|
395
349
|
</td>
|
|
396
350
|
</tr>
|
|
397
351
|
<tr>
|
|
398
|
-
<td><a href="https://github.com/webgptorg/
|
|
352
|
+
<td><a href="https://github.com/webgptorg/book">Book language</a></td>
|
|
399
353
|
<td>
|
|
400
|
-
|
|
354
|
+
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.
|
|
355
|
+
<hr>
|
|
356
|
+
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
401
357
|
</td>
|
|
402
358
|
</tr>
|
|
403
359
|
<tr>
|
|
404
|
-
<td><a href="https://promptbook
|
|
360
|
+
<td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
|
|
405
361
|
<td>
|
|
406
|
-
Promptbook
|
|
362
|
+
Promptbook engine can run AI agents based on Book language.
|
|
363
|
+
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>
|
|
364
|
+
Agent Server is based on Promptbook Engine.
|
|
407
365
|
</td>
|
|
408
366
|
</tr>
|
|
367
|
+
|
|
409
368
|
</tbody>
|
|
410
369
|
</table>
|
|
411
370
|
|
|
412
|
-
Hello world examples:
|
|
413
371
|
|
|
414
|
-
- [Hello world](https://github.com/webgptorg/hello-world)
|
|
415
|
-
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
416
|
-
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
417
372
|
|
|
418
373
|
### 🌐 Community & Social Media
|
|
419
374
|
|
|
@@ -471,6 +426,8 @@ Join our growing community of developers and users:
|
|
|
471
426
|
|
|
472
427
|
|
|
473
428
|
|
|
429
|
+
|
|
430
|
+
|
|
474
431
|
## 📚 Documentation
|
|
475
432
|
|
|
476
433
|
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
@@ -547,6 +504,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
547
504
|
|
|
548
505
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
549
506
|
|
|
507
|
+
|
|
508
|
+
|
|
550
509
|
### 💯 Core concepts
|
|
551
510
|
|
|
552
511
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|