@promptbook/remote-client 0.105.0-1 → 0.105.0-10
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 +3 -2
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/browser.index.d.ts +2 -0
- package/esm/typings/src/_packages/core.index.d.ts +4 -0
- package/esm/typings/src/_packages/types.index.d.ts +16 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +15 -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/book-components/Chat/AgentChat/AgentChatProps.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +15 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +20 -9
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +43 -0
- package/esm/typings/src/commitments/NOTE/NOTE.d.ts +2 -2
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +4 -0
- package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +10 -0
- package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.d.ts +44 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.test.d.ts +1 -0
- package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +14 -0
- package/esm/typings/src/commitments/_base/CommitmentDefinition.d.ts +14 -0
- package/esm/typings/src/commitments/index.d.ts +17 -2
- package/esm/typings/src/config.d.ts +1 -0
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +3 -1
- 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 +14 -2
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +3 -1
- package/esm/typings/src/llm-providers/agent/AgentOptions.d.ts +7 -0
- package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +1 -0
- package/esm/typings/src/llm-providers/agent/RemoteAgentOptions.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +10 -0
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +7 -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/search-engines/SearchEngine.d.ts +1 -1
- package/esm/typings/src/search-engines/_index.d.ts +6 -0
- package/esm/typings/src/search-engines/bing/BingSearchEngine.d.ts +1 -1
- package/esm/typings/src/search-engines/dummy/DummySearchEngine.d.ts +1 -1
- package/esm/typings/src/search-engines/google/GoogleSearchEngine.d.ts +18 -0
- package/esm/typings/src/search-engines/serp/SerpSearchEngine.d.ts +15 -0
- package/esm/typings/src/speech-recognition/BrowserSpeechRecognition.d.ts +21 -0
- package/esm/typings/src/speech-recognition/OpenAiSpeechRecognition.d.ts +32 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +6 -12
- package/esm/typings/src/types/SpeechRecognition.d.ts +58 -0
- package/esm/typings/src/types/typeAliases.d.ts +4 -0
- 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/misc/linguisticHash.d.ts +6 -0
- package/esm/typings/src/utils/misc/linguisticHash.test.d.ts +1 -0
- 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 +2 -2
- package/umd/index.umd.js +3 -2
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -58,19 +58,20 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
58
58
|
|
|
59
59
|
## 📖 The Book Whitepaper
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
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.
|
|
62
62
|
|
|
63
|
-
The main challenge
|
|
63
|
+
The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
|
|
64
64
|
|
|
65
|
-
Promptbook
|
|
65
|
+
In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
|
|
66
66
|
|
|
67
67
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
68
68
|
|
|
69
|
-
**<ins>Paul Smith
|
|
69
|
+
**<ins>Paul Smith</ins>**<br/>
|
|
70
70
|
<br/>
|
|
71
71
|
**PERSONA** You are a company lawyer.<br/>
|
|
72
72
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
73
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
73
|
+
**RULE** You are knowledgeable, professional, and detail-oriented.<br/>
|
|
74
|
+
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/>
|
|
74
75
|
|
|
75
76
|
</td></tr></table>
|
|
76
77
|
|
|
@@ -80,7 +81,9 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
80
81
|
|
|
81
82
|
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.
|
|
82
83
|
|
|
83
|
-
You can look at it as prompting (or writing a system message), but decorated by **commitments**.
|
|
84
|
+
You can look at it as "prompting" _(or writing a system message)_, but decorated by **commitments**.
|
|
85
|
+
|
|
86
|
+
**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.
|
|
84
87
|
|
|
85
88
|
#### `Persona` commitment
|
|
86
89
|
|
|
@@ -91,8 +94,6 @@ Personas define the character of your AI persona, its role, and how it should in
|
|
|
91
94
|
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
92
95
|
<br/>
|
|
93
96
|
**PERSONA** You are a company lawyer.<br/>
|
|
94
|
-
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
95
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
96
97
|
|
|
97
98
|
</td></tr></table>
|
|
98
99
|
|
|
@@ -112,7 +113,7 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
|
|
|
112
113
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
113
114
|
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
114
115
|
<br/>
|
|
115
|
-
**KNOWLEDGE**
|
|
116
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
116
117
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
117
118
|
|
|
118
119
|
</td></tr></table>
|
|
@@ -134,14 +135,14 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
134
135
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
135
136
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
136
137
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
137
|
-
**KNOWLEDGE**
|
|
138
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
138
139
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
139
140
|
|
|
140
141
|
</td></tr></table>
|
|
141
142
|
|
|
142
|
-
#### `
|
|
143
|
+
#### `Team` commitment
|
|
143
144
|
|
|
144
|
-
|
|
145
|
+
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.
|
|
145
146
|
|
|
146
147
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
147
148
|
|
|
@@ -154,81 +155,36 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
154
155
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
155
156
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
156
157
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
157
|
-
**KNOWLEDGE**
|
|
158
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
158
159
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
159
|
-
|
|
160
|
+
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/>
|
|
160
161
|
|
|
161
162
|
</td></tr></table>
|
|
162
163
|
|
|
163
|
-
[Read more about the language](./BLUEPRINT.md)
|
|
164
|
-
|
|
165
|
-
<div style="page-break-after: always;"></div>
|
|
166
|
-
|
|
167
|
-
### Where to use your AI agent in book
|
|
168
|
-
|
|
169
|
-
Books can be useful in various applications and scenarios. Here are some examples:
|
|
170
|
-
|
|
171
|
-
#### Chat apps:
|
|
172
164
|
|
|
173
|
-
Create your own chat shopping assistant and place it in your eShop.
|
|
174
|
-
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.
|
|
175
165
|
|
|
176
|
-
|
|
166
|
+
### Promptbook Ecosystem
|
|
177
167
|
|
|
178
|
-
|
|
168
|
+
!!!@@@
|
|
179
169
|
|
|
180
|
-
####
|
|
181
|
-
|
|
182
|
-
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.
|
|
183
|
-
|
|
184
|
-
This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
|
|
185
|
-
|
|
186
|
-
They will work the same as you are used to, but with your specific rules written in book.
|
|
187
|
-
|
|
188
|
-
#### Internal Expertise
|
|
189
|
-
|
|
190
|
-
Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
|
|
191
|
-
|
|
192
|
-
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.
|
|
193
|
-
|
|
194
|
-
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.
|
|
195
|
-
|
|
196
|
-
Even works in no-code platforms!
|
|
197
|
-
|
|
198
|
-
<div style="page-break-after: always;"></div>
|
|
170
|
+
#### Promptbook Server
|
|
199
171
|
|
|
200
|
-
|
|
172
|
+
!!!@@@
|
|
201
173
|
|
|
202
|
-
|
|
174
|
+
#### Promptbook Engine
|
|
203
175
|
|
|
204
|
-
|
|
176
|
+
!!!@@@
|
|
205
177
|
|
|
206
|
-
We have written ai asistant in book who can help you with writing your first book.
|
|
207
178
|
|
|
208
|
-
#### Your AI twin
|
|
209
179
|
|
|
210
|
-
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.
|
|
211
180
|
|
|
212
|
-
#### AI persona workpool
|
|
213
181
|
|
|
214
|
-
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.
|
|
215
182
|
|
|
216
183
|
|
|
217
184
|
|
|
218
185
|
|
|
219
186
|
|
|
220
187
|
|
|
221
|
-
## 🚀 Get started
|
|
222
|
-
|
|
223
|
-
Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
|
|
224
|
-
|
|
225
|
-
- [Hello Book](https://github.com/webgptorg/hello-world)
|
|
226
|
-
- [Hello Book in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
227
|
-
- [Hello Book in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
188
|
|
|
233
189
|
|
|
234
190
|
## 💜 The Promptbook Project
|
|
@@ -244,33 +200,32 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
244
200
|
</thead>
|
|
245
201
|
<tbody>
|
|
246
202
|
<tr>
|
|
247
|
-
<td><a href="https://
|
|
203
|
+
<td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
|
|
248
204
|
<td>
|
|
249
|
-
|
|
250
|
-
<hr>
|
|
251
|
-
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
205
|
+
Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
|
|
252
206
|
</td>
|
|
253
207
|
</tr>
|
|
254
208
|
<tr>
|
|
255
|
-
<td><a href="https://github.com/webgptorg/
|
|
209
|
+
<td><a href="https://github.com/webgptorg/book">Book language</a></td>
|
|
256
210
|
<td>
|
|
257
|
-
|
|
211
|
+
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.
|
|
212
|
+
<hr>
|
|
213
|
+
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
258
214
|
</td>
|
|
259
215
|
</tr>
|
|
260
216
|
<tr>
|
|
261
|
-
<td><a href="https://promptbook
|
|
217
|
+
<td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
|
|
262
218
|
<td>
|
|
263
|
-
Promptbook
|
|
219
|
+
Promptbook engine can run AI agents based on Book language.
|
|
220
|
+
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>
|
|
221
|
+
Agent Server is based on Promptbook Engine.
|
|
264
222
|
</td>
|
|
265
223
|
</tr>
|
|
224
|
+
|
|
266
225
|
</tbody>
|
|
267
226
|
</table>
|
|
268
227
|
|
|
269
|
-
Hello world examples:
|
|
270
228
|
|
|
271
|
-
- [Hello world](https://github.com/webgptorg/hello-world)
|
|
272
|
-
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
273
|
-
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
274
229
|
|
|
275
230
|
### 🌐 Community & Social Media
|
|
276
231
|
|
|
@@ -328,6 +283,8 @@ Join our growing community of developers and users:
|
|
|
328
283
|
|
|
329
284
|
|
|
330
285
|
|
|
286
|
+
|
|
287
|
+
|
|
331
288
|
## 📚 Documentation
|
|
332
289
|
|
|
333
290
|
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
@@ -404,6 +361,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
404
361
|
|
|
405
362
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
406
363
|
|
|
364
|
+
|
|
365
|
+
|
|
407
366
|
### 💯 Core concepts
|
|
408
367
|
|
|
409
368
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
package/esm/index.es.js
CHANGED
|
@@ -20,7 +20,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
20
20
|
* @generated
|
|
21
21
|
* @see https://github.com/webgptorg/promptbook
|
|
22
22
|
*/
|
|
23
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-
|
|
23
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-10';
|
|
24
24
|
/**
|
|
25
25
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
26
26
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1250,6 +1250,7 @@ const PROMPTBOOK_COLOR = Color.fromString('promptbook');
|
|
|
1250
1250
|
SEPARATOR: Color.fromHex('#cccccc'),
|
|
1251
1251
|
COMMITMENT: Color.fromHex('#DA0F78'),
|
|
1252
1252
|
PARAMETER: Color.fromHex('#8e44ad'),
|
|
1253
|
+
CODE_BLOCK: Color.fromHex('#7700ffff'),
|
|
1253
1254
|
});
|
|
1254
1255
|
// <- TODO: [🧠][🈵] Using `Color` here increases the package size approx 3kb, maybe remove it
|
|
1255
1256
|
/**
|
|
@@ -6755,7 +6756,7 @@ class RemoteLlmExecutionTools {
|
|
|
6755
6756
|
}
|
|
6756
6757
|
}
|
|
6757
6758
|
/**
|
|
6758
|
-
* TODO:
|
|
6759
|
+
* TODO: [🕴] Deprecate pipeline server and all of its components
|
|
6759
6760
|
* TODO: Maybe use `$exportJson`
|
|
6760
6761
|
* TODO: [🧠][🛍] Maybe not `isAnonymous: boolean` BUT `mode: 'ANONYMOUS'|'COLLECTION'`
|
|
6761
6762
|
* TODO: [🍓] Allow to list compatible models with each variant
|