@promptbook/remote-server 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
@@ -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-24';
43
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-25';
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
@@ -12091,10 +12091,10 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
12091
12091
  if (!trimmedContent) {
12092
12092
  return requirements;
12093
12093
  }
12094
- // Create goal section for system message
12094
+ // Add goal to the system message
12095
12095
  const goalSection = `Goal: ${trimmedContent}`;
12096
- // Goals are important directives, so we add them prominently to the system message
12097
- return this.appendToSystemMessage(requirements, goalSection, '\n\n');
12096
+ const requirementsWithGoal = this.appendToSystemMessage(requirements, goalSection, '\n\n');
12097
+ return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
12098
12098
  }
12099
12099
  }
12100
12100
  /**
@@ -15126,15 +15126,7 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
15126
15126
  // Add rule to the system message
15127
15127
  const ruleSection = `Rule: ${trimmedContent}`;
15128
15128
  const requirementsWithRule = this.appendToSystemMessage(requirements, ruleSection, '\n\n');
15129
- const ruleLines = trimmedContent
15130
- .split(/\r?\n/)
15131
- .map((line) => line.trim())
15132
- .filter(Boolean)
15133
- .map((line) => `- ${line}`);
15134
- if (ruleLines.length === 0) {
15135
- return requirementsWithRule;
15136
- }
15137
- return this.appendToPromptSuffix(requirementsWithRule, ruleLines.join('\n'));
15129
+ return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
15138
15130
  }
15139
15131
  }
15140
15132
  /**