@promptbook/browser 0.112.0-44 → 0.112.0-45

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 (29) hide show
  1. package/esm/index.es.js +50 -22
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/src/avatars/Avatar.d.ts +7 -0
  4. package/esm/src/avatars/avatarRenderingUtils.d.ts +117 -0
  5. package/esm/src/avatars/index.d.ts +6 -0
  6. package/esm/src/avatars/renderAvatarVisual.d.ts +9 -0
  7. package/esm/src/avatars/types/AvatarDefinition.d.ts +20 -0
  8. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +96 -0
  9. package/esm/src/avatars/visuals/avatarVisualRegistry.d.ts +16 -0
  10. package/esm/src/avatars/visuals/minecraftAvatarVisual.d.ts +7 -0
  11. package/esm/src/avatars/visuals/octopusAvatarVisual.d.ts +7 -0
  12. package/esm/src/avatars/visuals/pixelArtAvatarVisual.d.ts +7 -0
  13. package/esm/src/commitments/STYLE/STYLE.d.ts +9 -2
  14. package/esm/src/version.d.ts +1 -1
  15. package/package.json +2 -2
  16. package/umd/index.umd.js +50 -22
  17. package/umd/index.umd.js.map +1 -1
  18. package/umd/src/avatars/Avatar.d.ts +7 -0
  19. package/umd/src/avatars/avatarRenderingUtils.d.ts +117 -0
  20. package/umd/src/avatars/index.d.ts +6 -0
  21. package/umd/src/avatars/renderAvatarVisual.d.ts +9 -0
  22. package/umd/src/avatars/types/AvatarDefinition.d.ts +20 -0
  23. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +96 -0
  24. package/umd/src/avatars/visuals/avatarVisualRegistry.d.ts +16 -0
  25. package/umd/src/avatars/visuals/minecraftAvatarVisual.d.ts +7 -0
  26. package/umd/src/avatars/visuals/octopusAvatarVisual.d.ts +7 -0
  27. package/umd/src/avatars/visuals/pixelArtAvatarVisual.d.ts +7 -0
  28. package/umd/src/commitments/STYLE/STYLE.d.ts +9 -2
  29. package/umd/src/version.d.ts +1 -1
package/esm/index.es.js CHANGED
@@ -29,7 +29,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
29
29
  * @generated
30
30
  * @see https://github.com/webgptorg/promptbook
31
31
  */
32
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-44';
32
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-45';
33
33
  /**
34
34
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
35
35
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1744,7 +1744,7 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
1744
1744
  DELETE Casual conversational style
1745
1745
  REMOVE All emoji usage
1746
1746
  GOAL Provide professional business communications
1747
- STYLE Use formal language and proper business etiquette
1747
+ WRITING RULES Use formal language and proper business etiquette
1748
1748
  \`\`\`
1749
1749
 
1750
1750
  \`\`\`book
@@ -1755,7 +1755,7 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
1755
1755
  DISCARD Technical jargon explanations
1756
1756
  CANCEL Advanced troubleshooting procedures
1757
1757
  GOAL Help users with simple, easy-to-follow solutions
1758
- STYLE Use plain language that anyone can understand
1758
+ WRITING RULES Use plain language that anyone can understand
1759
1759
  \`\`\`
1760
1760
 
1761
1761
  \`\`\`book
@@ -1772,11 +1772,11 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
1772
1772
  Concise Information Provider
1773
1773
 
1774
1774
  PERSONA You are a helpful assistant who provides detailed explanations
1775
- STYLE Include examples, analogies, and comprehensive context
1775
+ WRITING RULES Include examples, analogies, and comprehensive context
1776
1776
  CANCEL Detailed explanation style
1777
1777
  DISCARD Examples and analogies
1778
1778
  GOAL Provide brief, direct answers without unnecessary elaboration
1779
- STYLE Be concise and to the point
1779
+ WRITING RULES Be concise and to the point
1780
1780
  \`\`\`
1781
1781
  `);
1782
1782
  }
@@ -1960,7 +1960,7 @@ class FormatCommitmentDefinition extends BaseCommitmentDefinition {
1960
1960
  PERSONA You are a data analysis expert
1961
1961
  FORMAT Present results in structured tables
1962
1962
  FORMAT Include confidence scores for all predictions
1963
- STYLE Be concise and precise in explanations
1963
+ WRITING RULES Be concise and precise in explanations
1964
1964
  \`\`\`
1965
1965
  `);
1966
1966
  }
@@ -6526,7 +6526,7 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
6526
6526
 
6527
6527
  GOAL Help students understand mathematical concepts clearly
6528
6528
  GOAL Ensure all explanations are age-appropriate and accessible
6529
- STYLE Use simple language and provide step-by-step explanations
6529
+ WRITING RULES Use simple language and provide step-by-step explanations
6530
6530
  \`\`\`
6531
6531
 
6532
6532
  \`\`\`book
@@ -6940,7 +6940,7 @@ class KnowledgeCommitmentDefinition extends BaseCommitmentDefinition {
6940
6940
  KNOWLEDGE Academic research requires careful citation and verification
6941
6941
  KNOWLEDGE https://example.com/research-guidelines.pdf
6942
6942
  ACTION Can help with literature reviews and data analysis
6943
- STYLE Present information in clear, academic format
6943
+ WRITING RULES Present information in clear, academic format
6944
6944
  \`\`\`
6945
6945
  `);
6946
6946
  }
@@ -8691,7 +8691,7 @@ class MetaImageCommitmentDefinition extends BaseCommitmentDefinition {
8691
8691
 
8692
8692
  META IMAGE https://example.com/professional-avatar.jpg
8693
8693
  PERSONA You are a professional business assistant
8694
- STYLE Maintain a formal and courteous tone
8694
+ WRITING RULES Maintain a formal and courteous tone
8695
8695
  \`\`\`
8696
8696
 
8697
8697
  \`\`\`book
@@ -8699,7 +8699,7 @@ class MetaImageCommitmentDefinition extends BaseCommitmentDefinition {
8699
8699
 
8700
8700
  META IMAGE /assets/creative-bot-avatar.png
8701
8701
  PERSONA You are a creative and inspiring assistant
8702
- STYLE Be enthusiastic and encouraging
8702
+ WRITING RULES Be enthusiastic and encouraging
8703
8703
  ACTION Can help with brainstorming and ideation
8704
8704
  \`\`\`
8705
8705
  `);
@@ -8858,7 +8858,7 @@ class MetaLinkCommitmentDefinition extends BaseCommitmentDefinition {
8858
8858
  META LINK https://twitter.com/devhandle
8859
8859
  PERSONA You are an experienced open source developer
8860
8860
  ACTION Can help with code reviews and architecture decisions
8861
- STYLE Be direct and technical in explanations
8861
+ WRITING RULES Be direct and technical in explanations
8862
8862
  \`\`\`
8863
8863
  `);
8864
8864
  }
@@ -9064,7 +9064,7 @@ class ModelCommitmentDefinition extends BaseCommitmentDefinition {
9064
9064
  MODEL TEMPERATURE 0.8
9065
9065
  MODEL TOP_P 0.9
9066
9066
  MODEL MAX_TOKENS 2048
9067
- STYLE Be imaginative and expressive
9067
+ WRITING RULES Be imaginative and expressive
9068
9068
  ACTION Can help with storytelling and character development
9069
9069
  \`\`\`
9070
9070
 
@@ -9276,7 +9276,7 @@ class NoteCommitmentDefinition extends BaseCommitmentDefinition {
9276
9276
  NOTE Uses RAG for accessing latest research papers
9277
9277
  PERSONA You are a knowledgeable research assistant
9278
9278
  ACTION Can help with literature reviews and citations
9279
- STYLE Present information in academic format
9279
+ WRITING RULES Present information in academic format
9280
9280
  \`\`\`
9281
9281
  `);
9282
9282
  }
@@ -9570,7 +9570,7 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
9570
9570
  RULE Always ask for clarification if the user's request is ambiguous
9571
9571
  RULE Be polite and professional in all interactions
9572
9572
  RULES Never provide medical or legal advice
9573
- STYLE Maintain a friendly and helpful tone
9573
+ WRITING RULES Maintain a friendly and helpful tone
9574
9574
  \`\`\`
9575
9575
 
9576
9576
  \`\`\`book
@@ -9839,8 +9839,8 @@ class ScenarioCommitmentDefinition extends BaseCommitmentDefinition {
9839
9839
  /**
9840
9840
  * STYLE commitment definition
9841
9841
  *
9842
- * The STYLE commitment defines how the agent should format and present its responses.
9843
- * This includes tone, writing style, formatting preferences, and communication patterns.
9842
+ * Deprecated legacy writing-style commitment kept for backward compatibility.
9843
+ * New books should prefer `WRITING RULES` for writing-only constraints.
9844
9844
  *
9845
9845
  * Example usage in agent source:
9846
9846
  *
@@ -9859,7 +9859,16 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
9859
9859
  * Short one-line description of STYLE.
9860
9860
  */
9861
9861
  get description() {
9862
- return 'Control the tone and writing style of responses.';
9862
+ return 'Deprecated legacy writing-style commitment. Prefer `WRITING RULES` for new books.';
9863
+ }
9864
+ /**
9865
+ * Optional UI/docs-only deprecation metadata.
9866
+ */
9867
+ get deprecation() {
9868
+ return {
9869
+ message: 'Use `WRITING RULES` for writing-only constraints such as tone, length, formatting, or emoji usage.',
9870
+ replacedBy: ['WRITING RULES'],
9871
+ };
9863
9872
  }
9864
9873
  /**
9865
9874
  * Icon for this commitment.
@@ -9874,15 +9883,34 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
9874
9883
  return spaceTrim$1(`
9875
9884
  # ${this.type}
9876
9885
 
9877
- Defines how the agent should format and present its responses (tone, writing style, formatting).
9886
+ Deprecated legacy commitment for writing and presentation instructions.
9887
+
9888
+ ## Migration
9889
+
9890
+ - Existing \`${this.type}\` books still parse and compile.
9891
+ - New books should prefer \`WRITING RULES\`.
9892
+ - Use \`WRITING SAMPLE\` when you want to anchor voice by example instead of stating constraints directly.
9893
+ - The plural alias \`STYLES\` is the same legacy commitment family.
9878
9894
 
9879
9895
  ## Key aspects
9880
9896
 
9881
- - Both terms work identically and can be used interchangeably.
9897
+ - \`${this.type}\` remains functional for backward compatibility only.
9882
9898
  - Later style instructions can override earlier ones.
9883
9899
  - Style affects both tone and presentation format.
9884
9900
 
9885
- ## Examples
9901
+ ## Preferred replacement
9902
+
9903
+ \`\`\`book
9904
+ Technical Writer
9905
+
9906
+ GOAL Help the user understand technical topics with practical, accurate guidance.
9907
+ WRITING RULES Write in a professional but friendly tone.
9908
+ WRITING RULES Use bullet points for lists.
9909
+ WRITING RULES Always provide code examples when explaining programming concepts.
9910
+ FORMAT Use markdown formatting with clear headings
9911
+ \`\`\`
9912
+
9913
+ ## Legacy compatibility examples
9886
9914
 
9887
9915
  \`\`\`book
9888
9916
  Technical Writer
@@ -10623,7 +10651,7 @@ class TemplateCommitmentDefinition extends BaseCommitmentDefinition {
10623
10651
 
10624
10652
  PERSONA You are a helpful customer support representative
10625
10653
  TEMPLATE Always structure your response with: 1) Acknowledgment, 2) Solution, 3) Follow-up question
10626
- STYLE Be professional and empathetic
10654
+ WRITING RULES Be professional and empathetic
10627
10655
  \`\`\`
10628
10656
 
10629
10657
  \`\`\`book
@@ -11067,7 +11095,7 @@ class UseBrowserCommitmentDefinition extends BaseCommitmentDefinition {
11067
11095
 
11068
11096
  PERSONA You are a news analyst who stays up-to-date with current events
11069
11097
  USE BROWSER
11070
- STYLE Present news in a balanced and objective manner
11098
+ WRITING RULES Present news in a balanced and objective manner
11071
11099
  ACTION Can search for and summarize news articles
11072
11100
  \`\`\`
11073
11101