@promptbook/node 0.112.0-24 → 0.112.0-25

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 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-24';
38
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-25';
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
@@ -15026,10 +15026,10 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
15026
15026
  if (!trimmedContent) {
15027
15027
  return requirements;
15028
15028
  }
15029
- // Create goal section for system message
15029
+ // Add goal to the system message
15030
15030
  const goalSection = `Goal: ${trimmedContent}`;
15031
- // Goals are important directives, so we add them prominently to the system message
15032
- return this.appendToSystemMessage(requirements, goalSection, '\n\n');
15031
+ const requirementsWithGoal = this.appendToSystemMessage(requirements, goalSection, '\n\n');
15032
+ return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
15033
15033
  }
15034
15034
  }
15035
15035
  /**
@@ -18061,15 +18061,7 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
18061
18061
  // Add rule to the system message
18062
18062
  const ruleSection = `Rule: ${trimmedContent}`;
18063
18063
  const requirementsWithRule = this.appendToSystemMessage(requirements, ruleSection, '\n\n');
18064
- const ruleLines = trimmedContent
18065
- .split(/\r?\n/)
18066
- .map((line) => line.trim())
18067
- .filter(Boolean)
18068
- .map((line) => `- ${line}`);
18069
- if (ruleLines.length === 0) {
18070
- return requirementsWithRule;
18071
- }
18072
- return this.appendToPromptSuffix(requirementsWithRule, ruleLines.join('\n'));
18064
+ return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
18073
18065
  }
18074
18066
  }
18075
18067
  /**