@promptbook/wizard 0.112.0 → 0.113.0-0

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 (30) hide show
  1. package/README.md +45 -29
  2. package/esm/index.es.js +114 -1
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/_packages/core.index.d.ts +22 -0
  5. package/esm/src/_packages/types.index.d.ts +2 -0
  6. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
  7. package/esm/src/book-2.0/agent-source/agentSourceVisibility.d.ts +97 -0
  8. package/esm/src/book-2.0/agent-source/agentSourceVisibility.test.d.ts +1 -0
  9. package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
  10. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +6 -0
  11. package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +2 -1
  12. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +21 -1
  13. package/esm/src/commitments/META_VISIBILITY/META_VISIBILITY.d.ts +27 -0
  14. package/esm/src/commitments/index.d.ts +2 -1
  15. package/esm/src/version.d.ts +1 -1
  16. package/package.json +2 -2
  17. package/umd/index.umd.js +114 -1
  18. package/umd/index.umd.js.map +1 -1
  19. package/umd/src/_packages/core.index.d.ts +22 -0
  20. package/umd/src/_packages/types.index.d.ts +2 -0
  21. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
  22. package/umd/src/book-2.0/agent-source/agentSourceVisibility.d.ts +97 -0
  23. package/umd/src/book-2.0/agent-source/agentSourceVisibility.test.d.ts +1 -0
  24. package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
  25. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +6 -0
  26. package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +2 -1
  27. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +21 -1
  28. package/umd/src/commitments/META_VISIBILITY/META_VISIBILITY.d.ts +27 -0
  29. package/umd/src/commitments/index.d.ts +2 -1
  30. package/umd/src/version.d.ts +1 -1
package/README.md CHANGED
@@ -41,14 +41,17 @@ Non-interactive mode takes defaults from command-line options. When `--openai-ap
41
41
  sudo curl -fsSL https://raw.githubusercontent.com/webgptorg/promptbook/refs/heads/main/other/vps/install.sh | bash -s -- \
42
42
  --non-interactive \
43
43
  --yes-i-understand-that-script-should-be-run-on-fresh-server \
44
- --domain s24.ptbk.io \
45
- --openai-api-key sk-proj-abcdef \
46
- --sentry-dsn https://abc@def.ingest.de.sentry.io/123 \
44
+ --domain my-server.com \
45
+ --openai-api-key sk-proj-xxx \
47
46
  --admin-password xxx
48
47
  ```
49
48
 
50
49
 
51
50
 
51
+ <blockquote style="color: #ff8811">
52
+ <b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
53
+ </blockquote>
54
+
52
55
  ## 📦 Package `@promptbook/wizard`
53
56
 
54
57
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
@@ -92,7 +95,7 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
92
95
 
93
96
  Promptbook lets you create **persistent AI agents** that work on real goals for your company. The [**Agents Server**](https://gallery.ptbk.io/) is the heart of the project - a place where your AI agents live, remember context, collaborate in teams, and get things done.
94
97
 
95
- 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.
98
+ Nowadays, the biggest challenge for most business applications isn't the raw capabilities of AI models. Large language models such as Claude Mythos, GPT-5.6 or Kimi K2.7 are incredibly capable.
96
99
 
97
100
  The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
98
101
 
@@ -100,17 +103,20 @@ In Promptbook, you define your agents **using simple Books** - a human-readable
100
103
 
101
104
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
102
105
 
103
- **<ins>Paul Smith</ins>**<br/>
106
+ **<ins>Lawyer</ins>**<br/>
104
107
  <br/>
105
- **PERSONA** You are a company lawyer.<br/>
108
+ GOAL You are a company lawyer.<br/>
106
109
  Your job is to provide legal advice and support to the company and its employees.<br/>
107
- **GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
110
+ Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
111
+ <br/>
108
112
  **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
109
113
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
110
114
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
111
- **USE EMAIL**<br/>
112
- **USE BROWSER**<br/>
113
- **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/>
115
+ <br/>
116
+ USE EMAIL<br/>
117
+ USE BROWSER<br/>
118
+ <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/>
114
120
 
115
121
  </td></tr></table>
116
122
 
@@ -143,12 +149,12 @@ Goals define what the agent should actively work toward. Unlike a chatbot that o
143
149
 
144
150
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
145
151
 
146
- **<ins>Paul Smith & Associés</ins>**<br/>
152
+ **<ins>Company Lawyer</ins>**<br/>
147
153
  <br/>
148
- **PERSONA** You are a company lawyer.<br/>
154
+ GOAL<br/>
149
155
  Your job is to provide legal advice and support to the company and its employees.<br/>
150
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
151
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
156
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
157
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
152
158
 
153
159
  </td></tr></table>
154
160
 
@@ -166,8 +172,8 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
166
172
  <br/>
167
173
  **PERSONA** You are a company lawyer.<br/>
168
174
  Your job is to provide legal advice and support to the company and its employees.<br/>
169
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
170
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
175
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
176
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
171
177
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
172
178
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
173
179
 
@@ -185,8 +191,8 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
185
191
  <br/>
186
192
  **PERSONA** You are a company lawyer.<br/>
187
193
  Your job is to provide legal advice and support to the company and its employees.<br/>
188
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
189
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
194
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
195
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
190
196
  **RULE** Always ensure compliance with local laws and regulations.<br/>
191
197
  **RULE** Never provide legal advice outside your area of expertise.<br/>
192
198
  **RULE** Never provide legal advice about criminal law.<br/>
@@ -207,16 +213,16 @@ These are what turn a chatbot into a persistent agent that actually does work.
207
213
  <br/>
208
214
  **PERSONA** You are a company lawyer.<br/>
209
215
  Your job is to provide legal advice and support to the company and its employees.<br/>
210
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
211
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
216
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
217
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
212
218
  **RULE** Always ensure compliance with local laws and regulations.<br/>
213
219
  **RULE** Never provide legal advice outside your area of expertise.<br/>
214
220
  **RULE** Never provide legal advice about criminal law.<br/>
215
221
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
216
222
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
217
- **USE EMAIL**<br/>
218
- **USE BROWSER**<br/>
219
- **USE SEARCH ENGINE**<br/>
223
+ USE EMAIL<br/>
224
+ USE BROWSER<br/>
225
+ USE SEARCH ENGINE<br/>
220
226
 
221
227
  </td></tr></table>
222
228
 
@@ -230,20 +236,22 @@ Team commitment allows you to define the team structure and advisory fellow memb
230
236
  <br/>
231
237
  **PERSONA** You are a company lawyer.<br/>
232
238
  Your job is to provide legal advice and support to the company and its employees.<br/>
233
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
234
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
239
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
240
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
235
241
  **RULE** Always ensure compliance with local laws and regulations.<br/>
236
242
  **RULE** Never provide legal advice outside your area of expertise.<br/>
237
243
  **RULE** Never provide legal advice about criminal law.<br/>
238
244
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
239
245
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
240
- **USE EMAIL**<br/>
241
- **USE BROWSER**<br/>
242
- **USE SEARCH ENGINE**<br/>
243
- **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/>
246
+ USE EMAIL<br/>
247
+ USE BROWSER<br/>
248
+ USE SEARCH ENGINE<br/>
249
+ 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/>
244
250
 
245
251
  </td></tr></table>
246
252
 
253
+
254
+
247
255
  ### Promptbook Ecosystem
248
256
 
249
257
  Promptbook is an ecosystem of tools centered around the **Agents Server** - a production-ready platform for running persistent AI agents.
@@ -266,6 +274,8 @@ The [Promptbook Engine](https://github.com/webgptorg/promptbook) is the open-sou
266
274
 
267
275
 
268
276
 
277
+
278
+
269
279
  ## 💜 The Promptbook Project
270
280
 
271
281
  Promptbook project is an ecosystem centered around the **Agents Server** - a platform for creating, deploying, and running persistent AI agents. Following is a list of the most important pieces of the project:
@@ -303,6 +313,8 @@ Promptbook project is an ecosystem centered around the **Agents Server** - a pla
303
313
  </tbody>
304
314
  </table>
305
315
 
316
+
317
+
306
318
  ### 🌐 Community & Social Media
307
319
 
308
320
  Join our growing community of developers and users:
@@ -359,6 +371,8 @@ Join our growing community of developers and users:
359
371
 
360
372
 
361
373
 
374
+
375
+
362
376
  ## 📚 Documentation
363
377
 
364
378
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -566,6 +580,8 @@ The following glossary is used to clarify certain concepts:
566
580
 
567
581
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
568
582
 
583
+
584
+
569
585
  ### 💯 Core concepts
570
586
 
571
587
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
package/esm/index.es.js CHANGED
@@ -38,7 +38,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
38
38
  * @generated
39
39
  * @see https://github.com/webgptorg/promptbook
40
40
  */
41
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0';
41
+ const PROMPTBOOK_ENGINE_VERSION = '0.113.0-0';
42
42
  /**
43
43
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
44
44
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -27624,6 +27624,70 @@ class MetaLinkCommitmentDefinition extends BaseCommitmentDefinition {
27624
27624
  }
27625
27625
  // Note: [💞] Ignore a discrepancy between file name and entity name
27626
27626
 
27627
+ /**
27628
+ * META VISIBILITY commitment definition.
27629
+ *
27630
+ * The `META VISIBILITY` commitment stores whether an agent is public, private, or unlisted.
27631
+ * Agents Server mirrors this value into the database for efficient filtering, but the book
27632
+ * commitment remains the editable source of truth.
27633
+ *
27634
+ * @private Metadata-only commitment used by Agents Server.
27635
+ */
27636
+ class MetaVisibilityCommitmentDefinition extends BaseCommitmentDefinition {
27637
+ constructor() {
27638
+ super('META VISIBILITY');
27639
+ }
27640
+ /**
27641
+ * Short one-line description of META VISIBILITY.
27642
+ */
27643
+ get description() {
27644
+ return 'Set whether the agent is private, unlisted, or public.';
27645
+ }
27646
+ /**
27647
+ * Icon for this commitment.
27648
+ */
27649
+ get icon() {
27650
+ return '👁️';
27651
+ }
27652
+ /**
27653
+ * Markdown documentation for META VISIBILITY commitment.
27654
+ */
27655
+ get documentation() {
27656
+ return spaceTrim$1(`
27657
+ # META VISIBILITY
27658
+
27659
+ Sets the agent visibility used by Agents Server.
27660
+
27661
+ ## Allowed values
27662
+
27663
+ - \`PRIVATE\` - accessible only to signed-in users with access.
27664
+ - \`UNLISTED\` - accessible by direct link but hidden from public listings.
27665
+ - \`PUBLIC\` - visible in public listings and accessible by anyone.
27666
+
27667
+ ## Key aspects
27668
+
27669
+ - Does not modify the agent's behavior, system message, or tools.
27670
+ - Whitespace and letter case are normalized when persisted.
27671
+ - If multiple \`META VISIBILITY\` commitments are present, persistence keeps one normalized value.
27672
+ - Agents Server mirrors the value into the database for filtering, but the book is the source of truth.
27673
+
27674
+ ## Example
27675
+
27676
+ \`\`\`book
27677
+ Helpful Assistant
27678
+
27679
+ GOAL Be helpful and friendly.
27680
+ META VISIBILITY PUBLIC
27681
+ \`\`\`
27682
+ `);
27683
+ }
27684
+ applyToAgentModelRequirements(requirements, content) {
27685
+ // META VISIBILITY is metadata only and does not alter model requirements.
27686
+ return requirements;
27687
+ }
27688
+ }
27689
+ // Note: [💞] Ignore a discrepancy between file name and entity name
27690
+
27627
27691
  /**
27628
27692
  * META VOICE commitment definition
27629
27693
  *
@@ -33847,6 +33911,40 @@ class UseSearchEngineCommitmentDefinition extends BaseCommitmentDefinition {
33847
33911
  }
33848
33912
  // Note: [💞] Ignore a discrepancy between file name and entity name
33849
33913
 
33914
+ /**
33915
+ * Supported visibility states for persisted agents.
33916
+ *
33917
+ * @public exported from `@promptbook/core`
33918
+ */
33919
+ const AGENT_VISIBILITY_VALUES = ['PRIVATE', 'UNLISTED', 'PUBLIC'];
33920
+ /**
33921
+ * Returns `true` when the value is one of supported visibility states.
33922
+ *
33923
+ * @param value - Raw value to validate.
33924
+ * @returns Whether the value is a valid `AgentVisibility`.
33925
+ *
33926
+ * @public exported from `@promptbook/core`
33927
+ */
33928
+ function isAgentVisibility(value) {
33929
+ return typeof value === 'string' && AGENT_VISIBILITY_VALUES.includes(value);
33930
+ }
33931
+ /**
33932
+ * Normalizes raw visibility text into a supported value.
33933
+ *
33934
+ * @param value - Raw visibility value.
33935
+ * @returns Normalized visibility, or `null` when invalid.
33936
+ *
33937
+ * @public exported from `@promptbook/core`
33938
+ */
33939
+ function normalizeAgentVisibility(value) {
33940
+ if (typeof value !== 'string') {
33941
+ return null;
33942
+ }
33943
+ const normalized = value.trim().toUpperCase();
33944
+ return isAgentVisibility(normalized) ? normalized : null;
33945
+ }
33946
+ // Note: [💞] Ignore a discrepancy between file name and entity name
33947
+
33850
33948
  /**
33851
33949
  * Maximum allowed source length for create-agent payloads.
33852
33950
  *
@@ -36100,6 +36198,7 @@ const COMMITMENT_REGISTRY = [
36100
36198
  new MetaDomainCommitmentDefinition(),
36101
36199
  new MetaDisclaimerCommitmentDefinition(),
36102
36200
  new MetaInputPlaceholderCommitmentDefinition(),
36201
+ new MetaVisibilityCommitmentDefinition(),
36103
36202
  new MetaCommitmentDefinition(),
36104
36203
  new MetaVoiceCommitmentDefinition(),
36105
36204
  new NoteCommitmentDefinition('NOTE'),
@@ -37453,6 +37552,7 @@ const META_COMMITMENT_APPLIERS = {
37453
37552
  'META COLOR': applyMetaColorContent,
37454
37553
  'META FONT': applyMetaFontContent,
37455
37554
  'META VOICE': applyMetaVoiceContent,
37555
+ 'META VISIBILITY': applyMetaVisibilityContent,
37456
37556
  };
37457
37557
  /**
37458
37558
  * Applies META-style commitments that mutate parsed profile metadata.
@@ -37482,6 +37582,10 @@ function applyGenericMetaCommitment(state, content) {
37482
37582
  applyMetaAvatarContent(state, metaValue);
37483
37583
  return;
37484
37584
  }
37585
+ if (metaTypeRaw.toUpperCase() === 'VISIBILITY') {
37586
+ applyMetaVisibilityContent(state, metaValue);
37587
+ return;
37588
+ }
37485
37589
  const metaType = normalizeTo_camelCase(metaTypeRaw);
37486
37590
  state.meta[metaType] = metaValue;
37487
37591
  }
@@ -37558,6 +37662,15 @@ function applyMetaFontContent(state, content) {
37558
37662
  function applyMetaVoiceContent(state, content) {
37559
37663
  state.meta.voice = spaceTrim$1(content);
37560
37664
  }
37665
+ /**
37666
+ * Applies META VISIBILITY content into the normalized `meta.visibility` field.
37667
+ */
37668
+ function applyMetaVisibilityContent(state, content) {
37669
+ const visibility = normalizeAgentVisibility(content);
37670
+ if (visibility) {
37671
+ state.meta.visibility = visibility;
37672
+ }
37673
+ }
37561
37674
  /**
37562
37675
  * Normalizes the separator in the content
37563
37676
  *