@promptbook/node 0.114.0-25 → 0.114.0-26
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 +18 -9
- package/esm/index.es.js.map +1 -1
- package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
- package/esm/src/commitments/index.d.ts +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +18 -9
- package/umd/index.umd.js.map +1 -1
- package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
- package/umd/src/commitments/index.d.ts +1 -1
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -30,7 +30,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
30
30
|
* @generated
|
|
31
31
|
* @see https://github.com/webgptorg/promptbook
|
|
32
32
|
*/
|
|
33
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
33
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-26';
|
|
34
34
|
/**
|
|
35
35
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
36
36
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -27931,29 +27931,36 @@ class UseUserLocationCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
27931
27931
|
/**
|
|
27932
27932
|
* `WRITING RULES` commitment definition.
|
|
27933
27933
|
*
|
|
27934
|
-
*
|
|
27935
|
-
* rather than task-solving behavior.
|
|
27934
|
+
* The `WRITING RULES`/`WRITING RULE` commitment adds constraints that apply strictly to writing style
|
|
27935
|
+
* and presentation rather than task-solving behavior.
|
|
27936
|
+
*
|
|
27937
|
+
* Example usage in agent source:
|
|
27938
|
+
*
|
|
27939
|
+
* ```book
|
|
27940
|
+
* WRITING RULES Keep every response under 120 words
|
|
27941
|
+
* WRITING RULE Always end the message with an emoji
|
|
27942
|
+
* ```
|
|
27936
27943
|
*
|
|
27937
27944
|
* @private [🪔] Maybe export the commitments through some package
|
|
27938
27945
|
*/
|
|
27939
27946
|
class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
|
|
27940
|
-
constructor() {
|
|
27941
|
-
super(
|
|
27947
|
+
constructor(type = 'WRITING RULES') {
|
|
27948
|
+
super(type);
|
|
27942
27949
|
}
|
|
27943
27950
|
/**
|
|
27944
|
-
* Short one-line description of `WRITING RULES`.
|
|
27951
|
+
* Short one-line description of `WRITING RULES`/`WRITING RULE`.
|
|
27945
27952
|
*/
|
|
27946
27953
|
get description() {
|
|
27947
27954
|
return 'Add writing-only constraints such as tone, length, formatting, or emoji usage.';
|
|
27948
27955
|
}
|
|
27949
27956
|
/**
|
|
27950
|
-
* Icon for `WRITING RULES`.
|
|
27957
|
+
* Icon for `WRITING RULES`/`WRITING RULE`.
|
|
27951
27958
|
*/
|
|
27952
27959
|
get icon() {
|
|
27953
27960
|
return '📝';
|
|
27954
27961
|
}
|
|
27955
27962
|
/**
|
|
27956
|
-
* Markdown documentation for `WRITING RULES
|
|
27963
|
+
* Markdown documentation for `WRITING RULES`/`WRITING RULE` commitment.
|
|
27957
27964
|
*/
|
|
27958
27965
|
get documentation() {
|
|
27959
27966
|
return spaceTrim$1(`
|
|
@@ -27963,6 +27970,7 @@ class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
27963
27970
|
|
|
27964
27971
|
## Key aspects
|
|
27965
27972
|
|
|
27973
|
+
- All writing rules are treated equally regardless of singular/plural form.
|
|
27966
27974
|
- Use it for writing-only constraints such as tone, formatting, length, emoji usage, punctuation, or reading level.
|
|
27967
27975
|
- Do **not** use it for problem-solving behavior, policy, tool usage, or decision-making logic. Use \`RULE\` for that.
|
|
27968
27976
|
- Newer writing-rules blocks override conflicting earlier writing-rules blocks.
|
|
@@ -28161,7 +28169,8 @@ const COMMITMENT_REGISTRY = [
|
|
|
28161
28169
|
new LanguageCommitmentDefinition('LANGUAGE'),
|
|
28162
28170
|
new LanguageCommitmentDefinition('LANGUAGES'),
|
|
28163
28171
|
new WritingSampleCommitmentDefinition(),
|
|
28164
|
-
new WritingRulesCommitmentDefinition(),
|
|
28172
|
+
new WritingRulesCommitmentDefinition('WRITING RULES'),
|
|
28173
|
+
new WritingRulesCommitmentDefinition('WRITING RULE'),
|
|
28165
28174
|
new SampleCommitmentDefinition('SAMPLE'),
|
|
28166
28175
|
new SampleCommitmentDefinition('EXAMPLE'),
|
|
28167
28176
|
new FormatCommitmentDefinition('FORMAT'),
|