@promptbook/core 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 +923 -325
- 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 +923 -324
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -322,19 +322,20 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
322
322
|
|
|
323
323
|
## 📖 The Book Whitepaper
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
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.
|
|
326
326
|
|
|
327
|
-
The main challenge
|
|
327
|
+
The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
|
|
328
328
|
|
|
329
|
-
Promptbook
|
|
329
|
+
In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
|
|
330
330
|
|
|
331
331
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
332
332
|
|
|
333
|
-
**<ins>Paul Smith
|
|
333
|
+
**<ins>Paul Smith</ins>**<br/>
|
|
334
334
|
<br/>
|
|
335
335
|
**PERSONA** You are a company lawyer.<br/>
|
|
336
336
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
337
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
337
|
+
**RULE** You are knowledgeable, professional, and detail-oriented.<br/>
|
|
338
|
+
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/>
|
|
338
339
|
|
|
339
340
|
</td></tr></table>
|
|
340
341
|
|
|
@@ -344,7 +345,9 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
344
345
|
|
|
345
346
|
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.
|
|
346
347
|
|
|
347
|
-
You can look at it as prompting (or writing a system message), but decorated by **commitments**.
|
|
348
|
+
You can look at it as "prompting" _(or writing a system message)_, but decorated by **commitments**.
|
|
349
|
+
|
|
350
|
+
**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.
|
|
348
351
|
|
|
349
352
|
#### `Persona` commitment
|
|
350
353
|
|
|
@@ -355,8 +358,6 @@ Personas define the character of your AI persona, its role, and how it should in
|
|
|
355
358
|
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
356
359
|
<br/>
|
|
357
360
|
**PERSONA** You are a company lawyer.<br/>
|
|
358
|
-
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
359
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
360
361
|
|
|
361
362
|
</td></tr></table>
|
|
362
363
|
|
|
@@ -376,7 +377,7 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
|
|
|
376
377
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
377
378
|
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
378
379
|
<br/>
|
|
379
|
-
**KNOWLEDGE**
|
|
380
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
380
381
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
381
382
|
|
|
382
383
|
</td></tr></table>
|
|
@@ -398,14 +399,14 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
398
399
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
399
400
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
400
401
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
401
|
-
**KNOWLEDGE**
|
|
402
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
402
403
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
403
404
|
|
|
404
405
|
</td></tr></table>
|
|
405
406
|
|
|
406
|
-
#### `
|
|
407
|
+
#### `Team` commitment
|
|
407
408
|
|
|
408
|
-
|
|
409
|
+
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.
|
|
409
410
|
|
|
410
411
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
411
412
|
|
|
@@ -418,81 +419,36 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
418
419
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
419
420
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
420
421
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
421
|
-
**KNOWLEDGE**
|
|
422
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
422
423
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
423
|
-
|
|
424
|
+
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/>
|
|
424
425
|
|
|
425
426
|
</td></tr></table>
|
|
426
427
|
|
|
427
|
-
[Read more about the language](./BLUEPRINT.md)
|
|
428
|
-
|
|
429
|
-
<div style="page-break-after: always;"></div>
|
|
430
|
-
|
|
431
|
-
### Where to use your AI agent in book
|
|
432
|
-
|
|
433
|
-
Books can be useful in various applications and scenarios. Here are some examples:
|
|
434
|
-
|
|
435
|
-
#### Chat apps:
|
|
436
428
|
|
|
437
|
-
Create your own chat shopping assistant and place it in your eShop.
|
|
438
|
-
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.
|
|
439
429
|
|
|
440
|
-
|
|
430
|
+
### Promptbook Ecosystem
|
|
441
431
|
|
|
442
|
-
|
|
432
|
+
!!!@@@
|
|
443
433
|
|
|
444
|
-
####
|
|
445
|
-
|
|
446
|
-
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.
|
|
447
|
-
|
|
448
|
-
This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
|
|
449
|
-
|
|
450
|
-
They will work the same as you are used to, but with your specific rules written in book.
|
|
451
|
-
|
|
452
|
-
#### Internal Expertise
|
|
453
|
-
|
|
454
|
-
Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
|
|
455
|
-
|
|
456
|
-
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.
|
|
457
|
-
|
|
458
|
-
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.
|
|
459
|
-
|
|
460
|
-
Even works in no-code platforms!
|
|
461
|
-
|
|
462
|
-
<div style="page-break-after: always;"></div>
|
|
434
|
+
#### Promptbook Server
|
|
463
435
|
|
|
464
|
-
|
|
436
|
+
!!!@@@
|
|
465
437
|
|
|
466
|
-
|
|
438
|
+
#### Promptbook Engine
|
|
467
439
|
|
|
468
|
-
|
|
440
|
+
!!!@@@
|
|
469
441
|
|
|
470
|
-
We have written ai asistant in book who can help you with writing your first book.
|
|
471
442
|
|
|
472
|
-
#### Your AI twin
|
|
473
443
|
|
|
474
|
-
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.
|
|
475
444
|
|
|
476
|
-
#### AI persona workpool
|
|
477
445
|
|
|
478
|
-
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.
|
|
479
446
|
|
|
480
447
|
|
|
481
448
|
|
|
482
449
|
|
|
483
450
|
|
|
484
451
|
|
|
485
|
-
## 🚀 Get started
|
|
486
|
-
|
|
487
|
-
Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
|
|
488
|
-
|
|
489
|
-
- [Hello Book](https://github.com/webgptorg/hello-world)
|
|
490
|
-
- [Hello Book in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
491
|
-
- [Hello Book in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
452
|
|
|
497
453
|
|
|
498
454
|
## 💜 The Promptbook Project
|
|
@@ -508,33 +464,32 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
508
464
|
</thead>
|
|
509
465
|
<tbody>
|
|
510
466
|
<tr>
|
|
511
|
-
<td><a href="https://
|
|
467
|
+
<td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
|
|
512
468
|
<td>
|
|
513
|
-
|
|
514
|
-
<hr>
|
|
515
|
-
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
469
|
+
Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
|
|
516
470
|
</td>
|
|
517
471
|
</tr>
|
|
518
472
|
<tr>
|
|
519
|
-
<td><a href="https://github.com/webgptorg/
|
|
473
|
+
<td><a href="https://github.com/webgptorg/book">Book language</a></td>
|
|
520
474
|
<td>
|
|
521
|
-
|
|
475
|
+
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.
|
|
476
|
+
<hr>
|
|
477
|
+
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
522
478
|
</td>
|
|
523
479
|
</tr>
|
|
524
480
|
<tr>
|
|
525
|
-
<td><a href="https://promptbook
|
|
481
|
+
<td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
|
|
526
482
|
<td>
|
|
527
|
-
Promptbook
|
|
483
|
+
Promptbook engine can run AI agents based on Book language.
|
|
484
|
+
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>
|
|
485
|
+
Agent Server is based on Promptbook Engine.
|
|
528
486
|
</td>
|
|
529
487
|
</tr>
|
|
488
|
+
|
|
530
489
|
</tbody>
|
|
531
490
|
</table>
|
|
532
491
|
|
|
533
|
-
Hello world examples:
|
|
534
492
|
|
|
535
|
-
- [Hello world](https://github.com/webgptorg/hello-world)
|
|
536
|
-
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
537
|
-
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
538
493
|
|
|
539
494
|
### 🌐 Community & Social Media
|
|
540
495
|
|
|
@@ -592,6 +547,8 @@ Join our growing community of developers and users:
|
|
|
592
547
|
|
|
593
548
|
|
|
594
549
|
|
|
550
|
+
|
|
551
|
+
|
|
595
552
|
## 📚 Documentation
|
|
596
553
|
|
|
597
554
|
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
@@ -668,6 +625,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
668
625
|
|
|
669
626
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
670
627
|
|
|
628
|
+
|
|
629
|
+
|
|
671
630
|
### 💯 Core concepts
|
|
672
631
|
|
|
673
632
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|