@promptbook/components 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 +1 -1
- 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
|
@@ -39,7 +39,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
39
39
|
* @generated
|
|
40
40
|
* @see https://github.com/webgptorg/promptbook
|
|
41
41
|
*/
|
|
42
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
42
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-26';
|
|
43
43
|
/**
|
|
44
44
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
45
45
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -18033,29 +18033,36 @@ class UseUserLocationCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
18033
18033
|
/**
|
|
18034
18034
|
* `WRITING RULES` commitment definition.
|
|
18035
18035
|
*
|
|
18036
|
-
*
|
|
18037
|
-
* rather than task-solving behavior.
|
|
18036
|
+
* The `WRITING RULES`/`WRITING RULE` commitment adds constraints that apply strictly to writing style
|
|
18037
|
+
* and presentation rather than task-solving behavior.
|
|
18038
|
+
*
|
|
18039
|
+
* Example usage in agent source:
|
|
18040
|
+
*
|
|
18041
|
+
* ```book
|
|
18042
|
+
* WRITING RULES Keep every response under 120 words
|
|
18043
|
+
* WRITING RULE Always end the message with an emoji
|
|
18044
|
+
* ```
|
|
18038
18045
|
*
|
|
18039
18046
|
* @private [🪔] Maybe export the commitments through some package
|
|
18040
18047
|
*/
|
|
18041
18048
|
class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
|
|
18042
|
-
constructor() {
|
|
18043
|
-
super(
|
|
18049
|
+
constructor(type = 'WRITING RULES') {
|
|
18050
|
+
super(type);
|
|
18044
18051
|
}
|
|
18045
18052
|
/**
|
|
18046
|
-
* Short one-line description of `WRITING RULES`.
|
|
18053
|
+
* Short one-line description of `WRITING RULES`/`WRITING RULE`.
|
|
18047
18054
|
*/
|
|
18048
18055
|
get description() {
|
|
18049
18056
|
return 'Add writing-only constraints such as tone, length, formatting, or emoji usage.';
|
|
18050
18057
|
}
|
|
18051
18058
|
/**
|
|
18052
|
-
* Icon for `WRITING RULES`.
|
|
18059
|
+
* Icon for `WRITING RULES`/`WRITING RULE`.
|
|
18053
18060
|
*/
|
|
18054
18061
|
get icon() {
|
|
18055
18062
|
return '📝';
|
|
18056
18063
|
}
|
|
18057
18064
|
/**
|
|
18058
|
-
* Markdown documentation for `WRITING RULES
|
|
18065
|
+
* Markdown documentation for `WRITING RULES`/`WRITING RULE` commitment.
|
|
18059
18066
|
*/
|
|
18060
18067
|
get documentation() {
|
|
18061
18068
|
return spaceTrim$1(`
|
|
@@ -18065,6 +18072,7 @@ class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
18065
18072
|
|
|
18066
18073
|
## Key aspects
|
|
18067
18074
|
|
|
18075
|
+
- All writing rules are treated equally regardless of singular/plural form.
|
|
18068
18076
|
- Use it for writing-only constraints such as tone, formatting, length, emoji usage, punctuation, or reading level.
|
|
18069
18077
|
- Do **not** use it for problem-solving behavior, policy, tool usage, or decision-making logic. Use \`RULE\` for that.
|
|
18070
18078
|
- Newer writing-rules blocks override conflicting earlier writing-rules blocks.
|
|
@@ -18263,7 +18271,8 @@ const COMMITMENT_REGISTRY = [
|
|
|
18263
18271
|
new LanguageCommitmentDefinition('LANGUAGE'),
|
|
18264
18272
|
new LanguageCommitmentDefinition('LANGUAGES'),
|
|
18265
18273
|
new WritingSampleCommitmentDefinition(),
|
|
18266
|
-
new WritingRulesCommitmentDefinition(),
|
|
18274
|
+
new WritingRulesCommitmentDefinition('WRITING RULES'),
|
|
18275
|
+
new WritingRulesCommitmentDefinition('WRITING RULE'),
|
|
18267
18276
|
new SampleCommitmentDefinition('SAMPLE'),
|
|
18268
18277
|
new SampleCommitmentDefinition('EXAMPLE'),
|
|
18269
18278
|
new FormatCommitmentDefinition('FORMAT'),
|