@promptbook/remote-server 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/remote-server`
53
56
 
54
57
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
@@ -123,7 +126,7 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
123
126
 
124
127
  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.
125
128
 
126
- 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.
129
+ 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.
127
130
 
128
131
  The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
129
132
 
@@ -131,17 +134,20 @@ In Promptbook, you define your agents **using simple Books** - a human-readable
131
134
 
132
135
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
133
136
 
134
- **<ins>Paul Smith</ins>**<br/>
137
+ **<ins>Lawyer</ins>**<br/>
135
138
  <br/>
136
- **PERSONA** You are a company lawyer.<br/>
139
+ GOAL You are a company lawyer.<br/>
137
140
  Your job is to provide legal advice and support to the company and its employees.<br/>
138
- **GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
141
+ Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
142
+ <br/>
139
143
  **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
140
144
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
141
145
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
142
- **USE EMAIL**<br/>
143
- **USE BROWSER**<br/>
144
- **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/>
146
+ <br/>
147
+ USE EMAIL<br/>
148
+ USE BROWSER<br/>
149
+ <br/>
150
+ 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/>
145
151
 
146
152
  </td></tr></table>
147
153
 
@@ -174,12 +180,12 @@ Goals define what the agent should actively work toward. Unlike a chatbot that o
174
180
 
175
181
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
176
182
 
177
- **<ins>Paul Smith & Associés</ins>**<br/>
183
+ **<ins>Company Lawyer</ins>**<br/>
178
184
  <br/>
179
- **PERSONA** You are a company lawyer.<br/>
185
+ GOAL<br/>
180
186
  Your job is to provide legal advice and support to the company and its employees.<br/>
181
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
182
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
187
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
188
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
183
189
 
184
190
  </td></tr></table>
185
191
 
@@ -197,8 +203,8 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
197
203
  <br/>
198
204
  **PERSONA** You are a company lawyer.<br/>
199
205
  Your job is to provide legal advice and support to the company and its employees.<br/>
200
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
201
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
206
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
207
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
202
208
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
203
209
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
204
210
 
@@ -216,8 +222,8 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
216
222
  <br/>
217
223
  **PERSONA** You are a company lawyer.<br/>
218
224
  Your job is to provide legal advice and support to the company and its employees.<br/>
219
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
220
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
225
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
226
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
221
227
  **RULE** Always ensure compliance with local laws and regulations.<br/>
222
228
  **RULE** Never provide legal advice outside your area of expertise.<br/>
223
229
  **RULE** Never provide legal advice about criminal law.<br/>
@@ -238,16 +244,16 @@ These are what turn a chatbot into a persistent agent that actually does work.
238
244
  <br/>
239
245
  **PERSONA** You are a company lawyer.<br/>
240
246
  Your job is to provide legal advice and support to the company and its employees.<br/>
241
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
242
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
247
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
248
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
243
249
  **RULE** Always ensure compliance with local laws and regulations.<br/>
244
250
  **RULE** Never provide legal advice outside your area of expertise.<br/>
245
251
  **RULE** Never provide legal advice about criminal law.<br/>
246
252
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
247
253
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
248
- **USE EMAIL**<br/>
249
- **USE BROWSER**<br/>
250
- **USE SEARCH ENGINE**<br/>
254
+ USE EMAIL<br/>
255
+ USE BROWSER<br/>
256
+ USE SEARCH ENGINE<br/>
251
257
 
252
258
  </td></tr></table>
253
259
 
@@ -261,20 +267,22 @@ Team commitment allows you to define the team structure and advisory fellow memb
261
267
  <br/>
262
268
  **PERSONA** You are a company lawyer.<br/>
263
269
  Your job is to provide legal advice and support to the company and its employees.<br/>
264
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
265
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
270
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
271
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
266
272
  **RULE** Always ensure compliance with local laws and regulations.<br/>
267
273
  **RULE** Never provide legal advice outside your area of expertise.<br/>
268
274
  **RULE** Never provide legal advice about criminal law.<br/>
269
275
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
270
276
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
271
- **USE EMAIL**<br/>
272
- **USE BROWSER**<br/>
273
- **USE SEARCH ENGINE**<br/>
274
- **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/>
277
+ USE EMAIL<br/>
278
+ USE BROWSER<br/>
279
+ USE SEARCH ENGINE<br/>
280
+ 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/>
275
281
 
276
282
  </td></tr></table>
277
283
 
284
+
285
+
278
286
  ### Promptbook Ecosystem
279
287
 
280
288
  Promptbook is an ecosystem of tools centered around the **Agents Server** - a production-ready platform for running persistent AI agents.
@@ -297,6 +305,8 @@ The [Promptbook Engine](https://github.com/webgptorg/promptbook) is the open-sou
297
305
 
298
306
 
299
307
 
308
+
309
+
300
310
  ## 💜 The Promptbook Project
301
311
 
302
312
  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:
@@ -334,6 +344,8 @@ Promptbook project is an ecosystem centered around the **Agents Server** - a pla
334
344
  </tbody>
335
345
  </table>
336
346
 
347
+
348
+
337
349
  ### 🌐 Community & Social Media
338
350
 
339
351
  Join our growing community of developers and users:
@@ -390,6 +402,8 @@ Join our growing community of developers and users:
390
402
 
391
403
 
392
404
 
405
+
406
+
393
407
  ## 📚 Documentation
394
408
 
395
409
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -597,6 +611,8 @@ The following glossary is used to clarify certain concepts:
597
611
 
598
612
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
599
613
 
614
+
615
+
600
616
  ### 💯 Core concepts
601
617
 
602
618
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
package/esm/index.es.js CHANGED
@@ -40,7 +40,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
40
40
  * @generated
41
41
  * @see https://github.com/webgptorg/promptbook
42
42
  */
43
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0';
43
+ const PROMPTBOOK_ENGINE_VERSION = '0.113.0-0';
44
44
  /**
45
45
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
46
46
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -19768,6 +19768,70 @@ class MetaLinkCommitmentDefinition extends BaseCommitmentDefinition {
19768
19768
  }
19769
19769
  // Note: [💞] Ignore a discrepancy between file name and entity name
19770
19770
 
19771
+ /**
19772
+ * META VISIBILITY commitment definition.
19773
+ *
19774
+ * The `META VISIBILITY` commitment stores whether an agent is public, private, or unlisted.
19775
+ * Agents Server mirrors this value into the database for efficient filtering, but the book
19776
+ * commitment remains the editable source of truth.
19777
+ *
19778
+ * @private Metadata-only commitment used by Agents Server.
19779
+ */
19780
+ class MetaVisibilityCommitmentDefinition extends BaseCommitmentDefinition {
19781
+ constructor() {
19782
+ super('META VISIBILITY');
19783
+ }
19784
+ /**
19785
+ * Short one-line description of META VISIBILITY.
19786
+ */
19787
+ get description() {
19788
+ return 'Set whether the agent is private, unlisted, or public.';
19789
+ }
19790
+ /**
19791
+ * Icon for this commitment.
19792
+ */
19793
+ get icon() {
19794
+ return '👁️';
19795
+ }
19796
+ /**
19797
+ * Markdown documentation for META VISIBILITY commitment.
19798
+ */
19799
+ get documentation() {
19800
+ return spaceTrim$1(`
19801
+ # META VISIBILITY
19802
+
19803
+ Sets the agent visibility used by Agents Server.
19804
+
19805
+ ## Allowed values
19806
+
19807
+ - \`PRIVATE\` - accessible only to signed-in users with access.
19808
+ - \`UNLISTED\` - accessible by direct link but hidden from public listings.
19809
+ - \`PUBLIC\` - visible in public listings and accessible by anyone.
19810
+
19811
+ ## Key aspects
19812
+
19813
+ - Does not modify the agent's behavior, system message, or tools.
19814
+ - Whitespace and letter case are normalized when persisted.
19815
+ - If multiple \`META VISIBILITY\` commitments are present, persistence keeps one normalized value.
19816
+ - Agents Server mirrors the value into the database for filtering, but the book is the source of truth.
19817
+
19818
+ ## Example
19819
+
19820
+ \`\`\`book
19821
+ Helpful Assistant
19822
+
19823
+ GOAL Be helpful and friendly.
19824
+ META VISIBILITY PUBLIC
19825
+ \`\`\`
19826
+ `);
19827
+ }
19828
+ applyToAgentModelRequirements(requirements, content) {
19829
+ // META VISIBILITY is metadata only and does not alter model requirements.
19830
+ return requirements;
19831
+ }
19832
+ }
19833
+ // Note: [💞] Ignore a discrepancy between file name and entity name
19834
+
19771
19835
  /**
19772
19836
  * META VOICE commitment definition
19773
19837
  *
@@ -26154,6 +26218,40 @@ class UseSearchEngineCommitmentDefinition extends BaseCommitmentDefinition {
26154
26218
  }
26155
26219
  // Note: [💞] Ignore a discrepancy between file name and entity name
26156
26220
 
26221
+ /**
26222
+ * Supported visibility states for persisted agents.
26223
+ *
26224
+ * @public exported from `@promptbook/core`
26225
+ */
26226
+ const AGENT_VISIBILITY_VALUES = ['PRIVATE', 'UNLISTED', 'PUBLIC'];
26227
+ /**
26228
+ * Returns `true` when the value is one of supported visibility states.
26229
+ *
26230
+ * @param value - Raw value to validate.
26231
+ * @returns Whether the value is a valid `AgentVisibility`.
26232
+ *
26233
+ * @public exported from `@promptbook/core`
26234
+ */
26235
+ function isAgentVisibility(value) {
26236
+ return typeof value === 'string' && AGENT_VISIBILITY_VALUES.includes(value);
26237
+ }
26238
+ /**
26239
+ * Normalizes raw visibility text into a supported value.
26240
+ *
26241
+ * @param value - Raw visibility value.
26242
+ * @returns Normalized visibility, or `null` when invalid.
26243
+ *
26244
+ * @public exported from `@promptbook/core`
26245
+ */
26246
+ function normalizeAgentVisibility(value) {
26247
+ if (typeof value !== 'string') {
26248
+ return null;
26249
+ }
26250
+ const normalized = value.trim().toUpperCase();
26251
+ return isAgentVisibility(normalized) ? normalized : null;
26252
+ }
26253
+ // Note: [💞] Ignore a discrepancy between file name and entity name
26254
+
26157
26255
  /**
26158
26256
  * Maximum allowed source length for create-agent payloads.
26159
26257
  *
@@ -28454,6 +28552,7 @@ const COMMITMENT_REGISTRY = [
28454
28552
  new MetaDomainCommitmentDefinition(),
28455
28553
  new MetaDisclaimerCommitmentDefinition(),
28456
28554
  new MetaInputPlaceholderCommitmentDefinition(),
28555
+ new MetaVisibilityCommitmentDefinition(),
28457
28556
  new MetaCommitmentDefinition(),
28458
28557
  new MetaVoiceCommitmentDefinition(),
28459
28558
  new NoteCommitmentDefinition('NOTE'),
@@ -33496,6 +33595,7 @@ const META_COMMITMENT_APPLIERS = {
33496
33595
  'META COLOR': applyMetaColorContent,
33497
33596
  'META FONT': applyMetaFontContent,
33498
33597
  'META VOICE': applyMetaVoiceContent,
33598
+ 'META VISIBILITY': applyMetaVisibilityContent,
33499
33599
  };
33500
33600
  /**
33501
33601
  * Applies META-style commitments that mutate parsed profile metadata.
@@ -33525,6 +33625,10 @@ function applyGenericMetaCommitment(state, content) {
33525
33625
  applyMetaAvatarContent(state, metaValue);
33526
33626
  return;
33527
33627
  }
33628
+ if (metaTypeRaw.toUpperCase() === 'VISIBILITY') {
33629
+ applyMetaVisibilityContent(state, metaValue);
33630
+ return;
33631
+ }
33528
33632
  const metaType = normalizeTo_camelCase(metaTypeRaw);
33529
33633
  state.meta[metaType] = metaValue;
33530
33634
  }
@@ -33601,6 +33705,15 @@ function applyMetaFontContent(state, content) {
33601
33705
  function applyMetaVoiceContent(state, content) {
33602
33706
  state.meta.voice = spaceTrim$1(content);
33603
33707
  }
33708
+ /**
33709
+ * Applies META VISIBILITY content into the normalized `meta.visibility` field.
33710
+ */
33711
+ function applyMetaVisibilityContent(state, content) {
33712
+ const visibility = normalizeAgentVisibility(content);
33713
+ if (visibility) {
33714
+ state.meta.visibility = visibility;
33715
+ }
33716
+ }
33604
33717
  /**
33605
33718
  * Normalizes the separator in the content
33606
33719
  *