@promptbook/components 0.112.0-44 → 0.112.0-46
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 +1 -1
- 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/avatarVisualRegistry.test.d.ts +1 -0
- package/esm/src/avatars/visuals/fractalAvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/minecraftAvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/octopus2AvatarVisual.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 +3 -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/avatarVisualRegistry.test.d.ts +1 -0
- package/umd/src/avatars/visuals/fractalAvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/minecraftAvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/octopus2AvatarVisual.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/README.md
CHANGED
|
@@ -130,7 +130,7 @@ interface BookEditorProps {
|
|
|
130
130
|
onChange?: (value: string) => void;
|
|
131
131
|
|
|
132
132
|
// Explicit list of commitment keywords to highlight (case-insensitive).
|
|
133
|
-
// If omitted, a default set (PERSONA, KNOWLEDGE, MEMORY, STYLE, RULE, RULES, SAMPLE, EXAMPLE, FORMAT, MODEL, ACTION, META IMAGE, META LINK, NOTE, GOAL, MESSAGE, SCENARIO, DELETE, CANCEL, DISCARD, REMOVE, EXPECT, SCENARIOS, BEHAVIOUR, BEHAVIOURS, AVOID, AVOIDANCE, GOALS, CONTEXT) is used.
|
|
133
|
+
// If omitted, a default set (PERSONA, KNOWLEDGE, MEMORY, STYLE, RULE, RULES, WRITING SAMPLE, WRITING RULES, SAMPLE, EXAMPLE, FORMAT, MODEL, ACTION, META IMAGE, META LINK, NOTE, GOAL, MESSAGE, SCENARIO, DELETE, CANCEL, DISCARD, REMOVE, EXPECT, SCENARIOS, BEHAVIOUR, BEHAVIOURS, AVOID, AVOIDANCE, GOALS, CONTEXT) is used.
|
|
134
134
|
commitmentTypes?: string[];
|
|
135
135
|
}
|
|
136
136
|
```
|
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.112.0-46';
|
|
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
|
|
@@ -6678,7 +6678,7 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
6678
6678
|
DELETE Casual conversational style
|
|
6679
6679
|
REMOVE All emoji usage
|
|
6680
6680
|
GOAL Provide professional business communications
|
|
6681
|
-
|
|
6681
|
+
WRITING RULES Use formal language and proper business etiquette
|
|
6682
6682
|
\`\`\`
|
|
6683
6683
|
|
|
6684
6684
|
\`\`\`book
|
|
@@ -6689,7 +6689,7 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
6689
6689
|
DISCARD Technical jargon explanations
|
|
6690
6690
|
CANCEL Advanced troubleshooting procedures
|
|
6691
6691
|
GOAL Help users with simple, easy-to-follow solutions
|
|
6692
|
-
|
|
6692
|
+
WRITING RULES Use plain language that anyone can understand
|
|
6693
6693
|
\`\`\`
|
|
6694
6694
|
|
|
6695
6695
|
\`\`\`book
|
|
@@ -6706,11 +6706,11 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
6706
6706
|
Concise Information Provider
|
|
6707
6707
|
|
|
6708
6708
|
PERSONA You are a helpful assistant who provides detailed explanations
|
|
6709
|
-
|
|
6709
|
+
WRITING RULES Include examples, analogies, and comprehensive context
|
|
6710
6710
|
CANCEL Detailed explanation style
|
|
6711
6711
|
DISCARD Examples and analogies
|
|
6712
6712
|
GOAL Provide brief, direct answers without unnecessary elaboration
|
|
6713
|
-
|
|
6713
|
+
WRITING RULES Be concise and to the point
|
|
6714
6714
|
\`\`\`
|
|
6715
6715
|
`);
|
|
6716
6716
|
}
|
|
@@ -6894,7 +6894,7 @@ class FormatCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
6894
6894
|
PERSONA You are a data analysis expert
|
|
6895
6895
|
FORMAT Present results in structured tables
|
|
6896
6896
|
FORMAT Include confidence scores for all predictions
|
|
6897
|
-
|
|
6897
|
+
WRITING RULES Be concise and precise in explanations
|
|
6898
6898
|
\`\`\`
|
|
6899
6899
|
`);
|
|
6900
6900
|
}
|
|
@@ -7299,7 +7299,7 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
7299
7299
|
|
|
7300
7300
|
GOAL Help students understand mathematical concepts clearly
|
|
7301
7301
|
GOAL Ensure all explanations are age-appropriate and accessible
|
|
7302
|
-
|
|
7302
|
+
WRITING RULES Use simple language and provide step-by-step explanations
|
|
7303
7303
|
\`\`\`
|
|
7304
7304
|
|
|
7305
7305
|
\`\`\`book
|
|
@@ -7613,7 +7613,7 @@ class KnowledgeCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
7613
7613
|
KNOWLEDGE Academic research requires careful citation and verification
|
|
7614
7614
|
KNOWLEDGE https://example.com/research-guidelines.pdf
|
|
7615
7615
|
ACTION Can help with literature reviews and data analysis
|
|
7616
|
-
|
|
7616
|
+
WRITING RULES Present information in clear, academic format
|
|
7617
7617
|
\`\`\`
|
|
7618
7618
|
`);
|
|
7619
7619
|
}
|
|
@@ -9364,7 +9364,7 @@ class MetaImageCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
9364
9364
|
|
|
9365
9365
|
META IMAGE https://example.com/professional-avatar.jpg
|
|
9366
9366
|
PERSONA You are a professional business assistant
|
|
9367
|
-
|
|
9367
|
+
WRITING RULES Maintain a formal and courteous tone
|
|
9368
9368
|
\`\`\`
|
|
9369
9369
|
|
|
9370
9370
|
\`\`\`book
|
|
@@ -9372,7 +9372,7 @@ class MetaImageCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
9372
9372
|
|
|
9373
9373
|
META IMAGE /assets/creative-bot-avatar.png
|
|
9374
9374
|
PERSONA You are a creative and inspiring assistant
|
|
9375
|
-
|
|
9375
|
+
WRITING RULES Be enthusiastic and encouraging
|
|
9376
9376
|
ACTION Can help with brainstorming and ideation
|
|
9377
9377
|
\`\`\`
|
|
9378
9378
|
`);
|
|
@@ -9531,7 +9531,7 @@ class MetaLinkCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
9531
9531
|
META LINK https://twitter.com/devhandle
|
|
9532
9532
|
PERSONA You are an experienced open source developer
|
|
9533
9533
|
ACTION Can help with code reviews and architecture decisions
|
|
9534
|
-
|
|
9534
|
+
WRITING RULES Be direct and technical in explanations
|
|
9535
9535
|
\`\`\`
|
|
9536
9536
|
`);
|
|
9537
9537
|
}
|
|
@@ -9737,7 +9737,7 @@ class ModelCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
9737
9737
|
MODEL TEMPERATURE 0.8
|
|
9738
9738
|
MODEL TOP_P 0.9
|
|
9739
9739
|
MODEL MAX_TOKENS 2048
|
|
9740
|
-
|
|
9740
|
+
WRITING RULES Be imaginative and expressive
|
|
9741
9741
|
ACTION Can help with storytelling and character development
|
|
9742
9742
|
\`\`\`
|
|
9743
9743
|
|
|
@@ -9949,7 +9949,7 @@ class NoteCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
9949
9949
|
NOTE Uses RAG for accessing latest research papers
|
|
9950
9950
|
PERSONA You are a knowledgeable research assistant
|
|
9951
9951
|
ACTION Can help with literature reviews and citations
|
|
9952
|
-
|
|
9952
|
+
WRITING RULES Present information in academic format
|
|
9953
9953
|
\`\`\`
|
|
9954
9954
|
`);
|
|
9955
9955
|
}
|
|
@@ -10243,7 +10243,7 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
10243
10243
|
RULE Always ask for clarification if the user's request is ambiguous
|
|
10244
10244
|
RULE Be polite and professional in all interactions
|
|
10245
10245
|
RULES Never provide medical or legal advice
|
|
10246
|
-
|
|
10246
|
+
WRITING RULES Maintain a friendly and helpful tone
|
|
10247
10247
|
\`\`\`
|
|
10248
10248
|
|
|
10249
10249
|
\`\`\`book
|
|
@@ -10512,8 +10512,8 @@ class ScenarioCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
10512
10512
|
/**
|
|
10513
10513
|
* STYLE commitment definition
|
|
10514
10514
|
*
|
|
10515
|
-
*
|
|
10516
|
-
*
|
|
10515
|
+
* Deprecated legacy writing-style commitment kept for backward compatibility.
|
|
10516
|
+
* New books should prefer `WRITING RULES` for writing-only constraints.
|
|
10517
10517
|
*
|
|
10518
10518
|
* Example usage in agent source:
|
|
10519
10519
|
*
|
|
@@ -10532,7 +10532,16 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
10532
10532
|
* Short one-line description of STYLE.
|
|
10533
10533
|
*/
|
|
10534
10534
|
get description() {
|
|
10535
|
-
return '
|
|
10535
|
+
return 'Deprecated legacy writing-style commitment. Prefer `WRITING RULES` for new books.';
|
|
10536
|
+
}
|
|
10537
|
+
/**
|
|
10538
|
+
* Optional UI/docs-only deprecation metadata.
|
|
10539
|
+
*/
|
|
10540
|
+
get deprecation() {
|
|
10541
|
+
return {
|
|
10542
|
+
message: 'Use `WRITING RULES` for writing-only constraints such as tone, length, formatting, or emoji usage.',
|
|
10543
|
+
replacedBy: ['WRITING RULES'],
|
|
10544
|
+
};
|
|
10536
10545
|
}
|
|
10537
10546
|
/**
|
|
10538
10547
|
* Icon for this commitment.
|
|
@@ -10547,15 +10556,34 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
10547
10556
|
return spaceTrim$1(`
|
|
10548
10557
|
# ${this.type}
|
|
10549
10558
|
|
|
10550
|
-
|
|
10559
|
+
Deprecated legacy commitment for writing and presentation instructions.
|
|
10560
|
+
|
|
10561
|
+
## Migration
|
|
10562
|
+
|
|
10563
|
+
- Existing \`${this.type}\` books still parse and compile.
|
|
10564
|
+
- New books should prefer \`WRITING RULES\`.
|
|
10565
|
+
- Use \`WRITING SAMPLE\` when you want to anchor voice by example instead of stating constraints directly.
|
|
10566
|
+
- The plural alias \`STYLES\` is the same legacy commitment family.
|
|
10551
10567
|
|
|
10552
10568
|
## Key aspects
|
|
10553
10569
|
|
|
10554
|
-
-
|
|
10570
|
+
- \`${this.type}\` remains functional for backward compatibility only.
|
|
10555
10571
|
- Later style instructions can override earlier ones.
|
|
10556
10572
|
- Style affects both tone and presentation format.
|
|
10557
10573
|
|
|
10558
|
-
##
|
|
10574
|
+
## Preferred replacement
|
|
10575
|
+
|
|
10576
|
+
\`\`\`book
|
|
10577
|
+
Technical Writer
|
|
10578
|
+
|
|
10579
|
+
GOAL Help the user understand technical topics with practical, accurate guidance.
|
|
10580
|
+
WRITING RULES Write in a professional but friendly tone.
|
|
10581
|
+
WRITING RULES Use bullet points for lists.
|
|
10582
|
+
WRITING RULES Always provide code examples when explaining programming concepts.
|
|
10583
|
+
FORMAT Use markdown formatting with clear headings
|
|
10584
|
+
\`\`\`
|
|
10585
|
+
|
|
10586
|
+
## Legacy compatibility examples
|
|
10559
10587
|
|
|
10560
10588
|
\`\`\`book
|
|
10561
10589
|
Technical Writer
|
|
@@ -11296,7 +11324,7 @@ class TemplateCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
11296
11324
|
|
|
11297
11325
|
PERSONA You are a helpful customer support representative
|
|
11298
11326
|
TEMPLATE Always structure your response with: 1) Acknowledgment, 2) Solution, 3) Follow-up question
|
|
11299
|
-
|
|
11327
|
+
WRITING RULES Be professional and empathetic
|
|
11300
11328
|
\`\`\`
|
|
11301
11329
|
|
|
11302
11330
|
\`\`\`book
|
|
@@ -11740,7 +11768,7 @@ class UseBrowserCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
11740
11768
|
|
|
11741
11769
|
PERSONA You are a news analyst who stays up-to-date with current events
|
|
11742
11770
|
USE BROWSER
|
|
11743
|
-
|
|
11771
|
+
WRITING RULES Present news in a balanced and objective manner
|
|
11744
11772
|
ACTION Can search for and summarize news articles
|
|
11745
11773
|
\`\`\`
|
|
11746
11774
|
|