@promptbook/node 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.
- package/esm/index.es.js +50 -22
- package/esm/index.es.js.map +1 -1
- package/esm/src/avatars/Avatar.d.ts +7 -0
- package/esm/src/avatars/avatarRenderingUtils.d.ts +117 -0
- package/esm/src/avatars/index.d.ts +6 -0
- package/esm/src/avatars/renderAvatarVisual.d.ts +9 -0
- package/esm/src/avatars/types/AvatarDefinition.d.ts +20 -0
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +96 -0
- package/esm/src/avatars/visuals/avatarVisualRegistry.d.ts +16 -0
- package/esm/src/avatars/visuals/minecraftAvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/octopusAvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/pixelArtAvatarVisual.d.ts +7 -0
- package/esm/src/commitments/STYLE/STYLE.d.ts +9 -2
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +50 -22
- package/umd/index.umd.js.map +1 -1
- package/umd/src/avatars/Avatar.d.ts +7 -0
- package/umd/src/avatars/avatarRenderingUtils.d.ts +117 -0
- package/umd/src/avatars/index.d.ts +6 -0
- package/umd/src/avatars/renderAvatarVisual.d.ts +9 -0
- package/umd/src/avatars/types/AvatarDefinition.d.ts +20 -0
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +96 -0
- package/umd/src/avatars/visuals/avatarVisualRegistry.d.ts +16 -0
- package/umd/src/avatars/visuals/minecraftAvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/octopusAvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/pixelArtAvatarVisual.d.ts +7 -0
- package/umd/src/commitments/STYLE/STYLE.d.ts +9 -2
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -35,7 +35,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
35
35
|
* @generated
|
|
36
36
|
* @see https://github.com/webgptorg/promptbook
|
|
37
37
|
*/
|
|
38
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
38
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-45';
|
|
39
39
|
/**
|
|
40
40
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
41
41
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -14777,7 +14777,7 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
14777
14777
|
DELETE Casual conversational style
|
|
14778
14778
|
REMOVE All emoji usage
|
|
14779
14779
|
GOAL Provide professional business communications
|
|
14780
|
-
|
|
14780
|
+
WRITING RULES Use formal language and proper business etiquette
|
|
14781
14781
|
\`\`\`
|
|
14782
14782
|
|
|
14783
14783
|
\`\`\`book
|
|
@@ -14788,7 +14788,7 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
14788
14788
|
DISCARD Technical jargon explanations
|
|
14789
14789
|
CANCEL Advanced troubleshooting procedures
|
|
14790
14790
|
GOAL Help users with simple, easy-to-follow solutions
|
|
14791
|
-
|
|
14791
|
+
WRITING RULES Use plain language that anyone can understand
|
|
14792
14792
|
\`\`\`
|
|
14793
14793
|
|
|
14794
14794
|
\`\`\`book
|
|
@@ -14805,11 +14805,11 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
14805
14805
|
Concise Information Provider
|
|
14806
14806
|
|
|
14807
14807
|
PERSONA You are a helpful assistant who provides detailed explanations
|
|
14808
|
-
|
|
14808
|
+
WRITING RULES Include examples, analogies, and comprehensive context
|
|
14809
14809
|
CANCEL Detailed explanation style
|
|
14810
14810
|
DISCARD Examples and analogies
|
|
14811
14811
|
GOAL Provide brief, direct answers without unnecessary elaboration
|
|
14812
|
-
|
|
14812
|
+
WRITING RULES Be concise and to the point
|
|
14813
14813
|
\`\`\`
|
|
14814
14814
|
`);
|
|
14815
14815
|
}
|
|
@@ -14993,7 +14993,7 @@ class FormatCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
14993
14993
|
PERSONA You are a data analysis expert
|
|
14994
14994
|
FORMAT Present results in structured tables
|
|
14995
14995
|
FORMAT Include confidence scores for all predictions
|
|
14996
|
-
|
|
14996
|
+
WRITING RULES Be concise and precise in explanations
|
|
14997
14997
|
\`\`\`
|
|
14998
14998
|
`);
|
|
14999
14999
|
}
|
|
@@ -15387,7 +15387,7 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
15387
15387
|
|
|
15388
15388
|
GOAL Help students understand mathematical concepts clearly
|
|
15389
15389
|
GOAL Ensure all explanations are age-appropriate and accessible
|
|
15390
|
-
|
|
15390
|
+
WRITING RULES Use simple language and provide step-by-step explanations
|
|
15391
15391
|
\`\`\`
|
|
15392
15392
|
|
|
15393
15393
|
\`\`\`book
|
|
@@ -15801,7 +15801,7 @@ class KnowledgeCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
15801
15801
|
KNOWLEDGE Academic research requires careful citation and verification
|
|
15802
15802
|
KNOWLEDGE https://example.com/research-guidelines.pdf
|
|
15803
15803
|
ACTION Can help with literature reviews and data analysis
|
|
15804
|
-
|
|
15804
|
+
WRITING RULES Present information in clear, academic format
|
|
15805
15805
|
\`\`\`
|
|
15806
15806
|
`);
|
|
15807
15807
|
}
|
|
@@ -17552,7 +17552,7 @@ class MetaImageCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
17552
17552
|
|
|
17553
17553
|
META IMAGE https://example.com/professional-avatar.jpg
|
|
17554
17554
|
PERSONA You are a professional business assistant
|
|
17555
|
-
|
|
17555
|
+
WRITING RULES Maintain a formal and courteous tone
|
|
17556
17556
|
\`\`\`
|
|
17557
17557
|
|
|
17558
17558
|
\`\`\`book
|
|
@@ -17560,7 +17560,7 @@ class MetaImageCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
17560
17560
|
|
|
17561
17561
|
META IMAGE /assets/creative-bot-avatar.png
|
|
17562
17562
|
PERSONA You are a creative and inspiring assistant
|
|
17563
|
-
|
|
17563
|
+
WRITING RULES Be enthusiastic and encouraging
|
|
17564
17564
|
ACTION Can help with brainstorming and ideation
|
|
17565
17565
|
\`\`\`
|
|
17566
17566
|
`);
|
|
@@ -17719,7 +17719,7 @@ class MetaLinkCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
17719
17719
|
META LINK https://twitter.com/devhandle
|
|
17720
17720
|
PERSONA You are an experienced open source developer
|
|
17721
17721
|
ACTION Can help with code reviews and architecture decisions
|
|
17722
|
-
|
|
17722
|
+
WRITING RULES Be direct and technical in explanations
|
|
17723
17723
|
\`\`\`
|
|
17724
17724
|
`);
|
|
17725
17725
|
}
|
|
@@ -17925,7 +17925,7 @@ class ModelCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
17925
17925
|
MODEL TEMPERATURE 0.8
|
|
17926
17926
|
MODEL TOP_P 0.9
|
|
17927
17927
|
MODEL MAX_TOKENS 2048
|
|
17928
|
-
|
|
17928
|
+
WRITING RULES Be imaginative and expressive
|
|
17929
17929
|
ACTION Can help with storytelling and character development
|
|
17930
17930
|
\`\`\`
|
|
17931
17931
|
|
|
@@ -18137,7 +18137,7 @@ class NoteCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
18137
18137
|
NOTE Uses RAG for accessing latest research papers
|
|
18138
18138
|
PERSONA You are a knowledgeable research assistant
|
|
18139
18139
|
ACTION Can help with literature reviews and citations
|
|
18140
|
-
|
|
18140
|
+
WRITING RULES Present information in academic format
|
|
18141
18141
|
\`\`\`
|
|
18142
18142
|
`);
|
|
18143
18143
|
}
|
|
@@ -18431,7 +18431,7 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
18431
18431
|
RULE Always ask for clarification if the user's request is ambiguous
|
|
18432
18432
|
RULE Be polite and professional in all interactions
|
|
18433
18433
|
RULES Never provide medical or legal advice
|
|
18434
|
-
|
|
18434
|
+
WRITING RULES Maintain a friendly and helpful tone
|
|
18435
18435
|
\`\`\`
|
|
18436
18436
|
|
|
18437
18437
|
\`\`\`book
|
|
@@ -18700,8 +18700,8 @@ class ScenarioCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
18700
18700
|
/**
|
|
18701
18701
|
* STYLE commitment definition
|
|
18702
18702
|
*
|
|
18703
|
-
*
|
|
18704
|
-
*
|
|
18703
|
+
* Deprecated legacy writing-style commitment kept for backward compatibility.
|
|
18704
|
+
* New books should prefer `WRITING RULES` for writing-only constraints.
|
|
18705
18705
|
*
|
|
18706
18706
|
* Example usage in agent source:
|
|
18707
18707
|
*
|
|
@@ -18720,7 +18720,16 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
18720
18720
|
* Short one-line description of STYLE.
|
|
18721
18721
|
*/
|
|
18722
18722
|
get description() {
|
|
18723
|
-
return '
|
|
18723
|
+
return 'Deprecated legacy writing-style commitment. Prefer `WRITING RULES` for new books.';
|
|
18724
|
+
}
|
|
18725
|
+
/**
|
|
18726
|
+
* Optional UI/docs-only deprecation metadata.
|
|
18727
|
+
*/
|
|
18728
|
+
get deprecation() {
|
|
18729
|
+
return {
|
|
18730
|
+
message: 'Use `WRITING RULES` for writing-only constraints such as tone, length, formatting, or emoji usage.',
|
|
18731
|
+
replacedBy: ['WRITING RULES'],
|
|
18732
|
+
};
|
|
18724
18733
|
}
|
|
18725
18734
|
/**
|
|
18726
18735
|
* Icon for this commitment.
|
|
@@ -18735,15 +18744,34 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
18735
18744
|
return spaceTrim$1(`
|
|
18736
18745
|
# ${this.type}
|
|
18737
18746
|
|
|
18738
|
-
|
|
18747
|
+
Deprecated legacy commitment for writing and presentation instructions.
|
|
18748
|
+
|
|
18749
|
+
## Migration
|
|
18750
|
+
|
|
18751
|
+
- Existing \`${this.type}\` books still parse and compile.
|
|
18752
|
+
- New books should prefer \`WRITING RULES\`.
|
|
18753
|
+
- Use \`WRITING SAMPLE\` when you want to anchor voice by example instead of stating constraints directly.
|
|
18754
|
+
- The plural alias \`STYLES\` is the same legacy commitment family.
|
|
18739
18755
|
|
|
18740
18756
|
## Key aspects
|
|
18741
18757
|
|
|
18742
|
-
-
|
|
18758
|
+
- \`${this.type}\` remains functional for backward compatibility only.
|
|
18743
18759
|
- Later style instructions can override earlier ones.
|
|
18744
18760
|
- Style affects both tone and presentation format.
|
|
18745
18761
|
|
|
18746
|
-
##
|
|
18762
|
+
## Preferred replacement
|
|
18763
|
+
|
|
18764
|
+
\`\`\`book
|
|
18765
|
+
Technical Writer
|
|
18766
|
+
|
|
18767
|
+
GOAL Help the user understand technical topics with practical, accurate guidance.
|
|
18768
|
+
WRITING RULES Write in a professional but friendly tone.
|
|
18769
|
+
WRITING RULES Use bullet points for lists.
|
|
18770
|
+
WRITING RULES Always provide code examples when explaining programming concepts.
|
|
18771
|
+
FORMAT Use markdown formatting with clear headings
|
|
18772
|
+
\`\`\`
|
|
18773
|
+
|
|
18774
|
+
## Legacy compatibility examples
|
|
18747
18775
|
|
|
18748
18776
|
\`\`\`book
|
|
18749
18777
|
Technical Writer
|
|
@@ -19484,7 +19512,7 @@ class TemplateCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
19484
19512
|
|
|
19485
19513
|
PERSONA You are a helpful customer support representative
|
|
19486
19514
|
TEMPLATE Always structure your response with: 1) Acknowledgment, 2) Solution, 3) Follow-up question
|
|
19487
|
-
|
|
19515
|
+
WRITING RULES Be professional and empathetic
|
|
19488
19516
|
\`\`\`
|
|
19489
19517
|
|
|
19490
19518
|
\`\`\`book
|
|
@@ -19928,7 +19956,7 @@ class UseBrowserCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
19928
19956
|
|
|
19929
19957
|
PERSONA You are a news analyst who stays up-to-date with current events
|
|
19930
19958
|
USE BROWSER
|
|
19931
|
-
|
|
19959
|
+
WRITING RULES Present news in a balanced and objective manner
|
|
19932
19960
|
ACTION Can search for and summarize news articles
|
|
19933
19961
|
\`\`\`
|
|
19934
19962
|
|