@promptbook/cli 0.112.0-24 → 0.112.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 CHANGED
@@ -57,7 +57,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
57
57
  * @generated
58
58
  * @see https://github.com/webgptorg/promptbook
59
59
  */
60
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-24';
60
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-26';
61
61
  /**
62
62
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
63
63
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -17742,10 +17742,10 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
17742
17742
  if (!trimmedContent) {
17743
17743
  return requirements;
17744
17744
  }
17745
- // Create goal section for system message
17745
+ // Add goal to the system message
17746
17746
  const goalSection = `Goal: ${trimmedContent}`;
17747
- // Goals are important directives, so we add them prominently to the system message
17748
- return this.appendToSystemMessage(requirements, goalSection, '\n\n');
17747
+ const requirementsWithGoal = this.appendToSystemMessage(requirements, goalSection, '\n\n');
17748
+ return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
17749
17749
  }
17750
17750
  }
17751
17751
  /**
@@ -20777,15 +20777,7 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
20777
20777
  // Add rule to the system message
20778
20778
  const ruleSection = `Rule: ${trimmedContent}`;
20779
20779
  const requirementsWithRule = this.appendToSystemMessage(requirements, ruleSection, '\n\n');
20780
- const ruleLines = trimmedContent
20781
- .split(/\r?\n/)
20782
- .map((line) => line.trim())
20783
- .filter(Boolean)
20784
- .map((line) => `- ${line}`);
20785
- if (ruleLines.length === 0) {
20786
- return requirementsWithRule;
20787
- }
20788
- return this.appendToPromptSuffix(requirementsWithRule, ruleLines.join('\n'));
20780
+ return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
20789
20781
  }
20790
20782
  }
20791
20783
  /**