@promptbook/remote-server 0.105.0-3 → 0.105.0-5
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 +37 -5
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/browser.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +12 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +6 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +3 -6
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +9 -0
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +3 -1
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +7 -0
- package/esm/typings/src/search-engines/_index.d.ts +6 -0
- 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/SpeechRecognition.d.ts +58 -0
- package/esm/typings/src/types/typeAliases.d.ts +4 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +37 -5
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -103,19 +103,20 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
103
103
|
|
|
104
104
|
## 📖 The Book Whitepaper
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
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.
|
|
107
107
|
|
|
108
|
-
The main challenge
|
|
108
|
+
The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
|
|
109
109
|
|
|
110
|
-
Promptbook
|
|
110
|
+
In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
|
|
111
111
|
|
|
112
112
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
113
113
|
|
|
114
|
-
**<ins>Paul Smith
|
|
114
|
+
**<ins>Paul Smith</ins>**<br/>
|
|
115
115
|
<br/>
|
|
116
116
|
**PERSONA** You are a company lawyer.<br/>
|
|
117
117
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
118
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
118
|
+
**RULE** You are knowledgeable, professional, and detail-oriented.<br/>
|
|
119
|
+
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/>
|
|
119
120
|
|
|
120
121
|
</td></tr></table>
|
|
121
122
|
|
|
@@ -125,7 +126,9 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
125
126
|
|
|
126
127
|
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.
|
|
127
128
|
|
|
128
|
-
You can look at it as prompting (or writing a system message), but decorated by **commitments**.
|
|
129
|
+
You can look at it as "prompting" _(or writing a system message)_, but decorated by **commitments**.
|
|
130
|
+
|
|
131
|
+
**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.
|
|
129
132
|
|
|
130
133
|
#### `Persona` commitment
|
|
131
134
|
|
|
@@ -136,8 +139,6 @@ Personas define the character of your AI persona, its role, and how it should in
|
|
|
136
139
|
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
137
140
|
<br/>
|
|
138
141
|
**PERSONA** You are a company lawyer.<br/>
|
|
139
|
-
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
140
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
141
142
|
|
|
142
143
|
</td></tr></table>
|
|
143
144
|
|
|
@@ -157,7 +158,7 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
|
|
|
157
158
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
158
159
|
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
159
160
|
<br/>
|
|
160
|
-
**KNOWLEDGE**
|
|
161
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
161
162
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
162
163
|
|
|
163
164
|
</td></tr></table>
|
|
@@ -179,14 +180,14 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
179
180
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
180
181
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
181
182
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
182
|
-
**KNOWLEDGE**
|
|
183
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
183
184
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
184
185
|
|
|
185
186
|
</td></tr></table>
|
|
186
187
|
|
|
187
|
-
#### `
|
|
188
|
+
#### `Team` commitment
|
|
188
189
|
|
|
189
|
-
|
|
190
|
+
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.
|
|
190
191
|
|
|
191
192
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
192
193
|
|
|
@@ -199,81 +200,36 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
199
200
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
200
201
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
201
202
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
202
|
-
**KNOWLEDGE**
|
|
203
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
203
204
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
204
|
-
|
|
205
|
+
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/>
|
|
205
206
|
|
|
206
207
|
</td></tr></table>
|
|
207
208
|
|
|
208
|
-
[Read more about the language](./BLUEPRINT.md)
|
|
209
|
-
|
|
210
|
-
<div style="page-break-after: always;"></div>
|
|
211
|
-
|
|
212
|
-
### Where to use your AI agent in book
|
|
213
|
-
|
|
214
|
-
Books can be useful in various applications and scenarios. Here are some examples:
|
|
215
|
-
|
|
216
|
-
#### Chat apps:
|
|
217
209
|
|
|
218
|
-
Create your own chat shopping assistant and place it in your eShop.
|
|
219
|
-
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.
|
|
220
210
|
|
|
221
|
-
|
|
211
|
+
### Promptbook Ecosystem
|
|
222
212
|
|
|
223
|
-
|
|
213
|
+
!!!@@@
|
|
224
214
|
|
|
225
|
-
####
|
|
226
|
-
|
|
227
|
-
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.
|
|
228
|
-
|
|
229
|
-
This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
|
|
230
|
-
|
|
231
|
-
They will work the same as you are used to, but with your specific rules written in book.
|
|
232
|
-
|
|
233
|
-
#### Internal Expertise
|
|
234
|
-
|
|
235
|
-
Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
|
|
236
|
-
|
|
237
|
-
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.
|
|
238
|
-
|
|
239
|
-
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.
|
|
240
|
-
|
|
241
|
-
Even works in no-code platforms!
|
|
242
|
-
|
|
243
|
-
<div style="page-break-after: always;"></div>
|
|
215
|
+
#### Promptbook Server
|
|
244
216
|
|
|
245
|
-
|
|
217
|
+
!!!@@@
|
|
246
218
|
|
|
247
|
-
|
|
219
|
+
#### Promptbook Engine
|
|
248
220
|
|
|
249
|
-
|
|
221
|
+
!!!@@@
|
|
250
222
|
|
|
251
|
-
We have written ai asistant in book who can help you with writing your first book.
|
|
252
223
|
|
|
253
|
-
#### Your AI twin
|
|
254
224
|
|
|
255
|
-
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.
|
|
256
225
|
|
|
257
|
-
#### AI persona workpool
|
|
258
226
|
|
|
259
|
-
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.
|
|
260
227
|
|
|
261
228
|
|
|
262
229
|
|
|
263
230
|
|
|
264
231
|
|
|
265
232
|
|
|
266
|
-
## 🚀 Get started
|
|
267
|
-
|
|
268
|
-
Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
|
|
269
|
-
|
|
270
|
-
- [Hello Book](https://github.com/webgptorg/hello-world)
|
|
271
|
-
- [Hello Book in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
272
|
-
- [Hello Book in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
233
|
|
|
278
234
|
|
|
279
235
|
## 💜 The Promptbook Project
|
|
@@ -289,33 +245,32 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
289
245
|
</thead>
|
|
290
246
|
<tbody>
|
|
291
247
|
<tr>
|
|
292
|
-
<td><a href="https://
|
|
248
|
+
<td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
|
|
293
249
|
<td>
|
|
294
|
-
|
|
295
|
-
<hr>
|
|
296
|
-
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
250
|
+
Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
|
|
297
251
|
</td>
|
|
298
252
|
</tr>
|
|
299
253
|
<tr>
|
|
300
|
-
<td><a href="https://github.com/webgptorg/
|
|
254
|
+
<td><a href="https://github.com/webgptorg/book">Book language</a></td>
|
|
301
255
|
<td>
|
|
302
|
-
|
|
256
|
+
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.
|
|
257
|
+
<hr>
|
|
258
|
+
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
303
259
|
</td>
|
|
304
260
|
</tr>
|
|
305
261
|
<tr>
|
|
306
|
-
<td><a href="https://promptbook
|
|
262
|
+
<td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
|
|
307
263
|
<td>
|
|
308
|
-
Promptbook
|
|
264
|
+
Promptbook engine can run AI agents based on Book language.
|
|
265
|
+
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>
|
|
266
|
+
Agent Server is based on Promptbook Engine.
|
|
309
267
|
</td>
|
|
310
268
|
</tr>
|
|
269
|
+
|
|
311
270
|
</tbody>
|
|
312
271
|
</table>
|
|
313
272
|
|
|
314
|
-
Hello world examples:
|
|
315
273
|
|
|
316
|
-
- [Hello world](https://github.com/webgptorg/hello-world)
|
|
317
|
-
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
318
|
-
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
319
274
|
|
|
320
275
|
### 🌐 Community & Social Media
|
|
321
276
|
|
|
@@ -373,6 +328,8 @@ Join our growing community of developers and users:
|
|
|
373
328
|
|
|
374
329
|
|
|
375
330
|
|
|
331
|
+
|
|
332
|
+
|
|
376
333
|
## 📚 Documentation
|
|
377
334
|
|
|
378
335
|
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
@@ -449,6 +406,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
449
406
|
|
|
450
407
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
451
408
|
|
|
409
|
+
|
|
410
|
+
|
|
452
411
|
### 💯 Core concepts
|
|
453
412
|
|
|
454
413
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
package/esm/index.es.js
CHANGED
|
@@ -33,7 +33,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
33
33
|
* @generated
|
|
34
34
|
* @see https://github.com/webgptorg/promptbook
|
|
35
35
|
*/
|
|
36
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-
|
|
36
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-5';
|
|
37
37
|
/**
|
|
38
38
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
39
39
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -11716,7 +11716,12 @@ class UseTimeCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
11716
11716
|
description: 'Get the current date and time in ISO 8601 format.',
|
|
11717
11717
|
parameters: {
|
|
11718
11718
|
type: 'object',
|
|
11719
|
-
properties: {
|
|
11719
|
+
properties: {
|
|
11720
|
+
timezone: {
|
|
11721
|
+
type: 'string',
|
|
11722
|
+
description: 'Optional timezone name (e.g. "Europe/Prague", "UTC", "America/New_York").',
|
|
11723
|
+
},
|
|
11724
|
+
},
|
|
11720
11725
|
required: [],
|
|
11721
11726
|
},
|
|
11722
11727
|
},
|
|
@@ -11736,9 +11741,36 @@ class UseTimeCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
11736
11741
|
*/
|
|
11737
11742
|
getToolFunctions() {
|
|
11738
11743
|
return {
|
|
11739
|
-
async get_current_time() {
|
|
11740
|
-
|
|
11741
|
-
|
|
11744
|
+
async get_current_time(args) {
|
|
11745
|
+
var _a;
|
|
11746
|
+
console.log('!!!! [Tool] get_current_time called', { args });
|
|
11747
|
+
const { timezone } = args;
|
|
11748
|
+
if (!timezone) {
|
|
11749
|
+
return new Date().toISOString();
|
|
11750
|
+
}
|
|
11751
|
+
try {
|
|
11752
|
+
// Note: Returning ISO 8601 string but in the requested timezone
|
|
11753
|
+
const formatter = new Intl.DateTimeFormat('en-CA', {
|
|
11754
|
+
timeZone: timezone,
|
|
11755
|
+
year: 'numeric',
|
|
11756
|
+
month: '2-digit',
|
|
11757
|
+
day: '2-digit',
|
|
11758
|
+
hour: '2-digit',
|
|
11759
|
+
minute: '2-digit',
|
|
11760
|
+
second: '2-digit',
|
|
11761
|
+
hour12: false,
|
|
11762
|
+
timeZoneName: 'shortOffset',
|
|
11763
|
+
});
|
|
11764
|
+
const parts = formatter.formatToParts(new Date());
|
|
11765
|
+
const part = (type) => { var _a; return (_a = parts.find((p) => p.type === type)) === null || _a === void 0 ? void 0 : _a.value; };
|
|
11766
|
+
// en-CA format is YYYY-MM-DD
|
|
11767
|
+
const isoString = `${part('year')}-${part('month')}-${part('day')}T${part('hour')}:${part('minute')}:${part('second')}${(_a = part('timeZoneName')) === null || _a === void 0 ? void 0 : _a.replace('GMT', '')}`;
|
|
11768
|
+
return isoString;
|
|
11769
|
+
}
|
|
11770
|
+
catch (error) {
|
|
11771
|
+
// Fallback to UTC if timezone is invalid
|
|
11772
|
+
return new Date().toISOString();
|
|
11773
|
+
}
|
|
11742
11774
|
},
|
|
11743
11775
|
};
|
|
11744
11776
|
}
|