@promptbook/core 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
@@ -28,7 +28,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
28
28
  * @generated
29
29
  * @see https://github.com/webgptorg/promptbook
30
30
  */
31
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-24';
31
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-26';
32
32
  /**
33
33
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
34
34
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -11302,10 +11302,10 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
11302
11302
  if (!trimmedContent) {
11303
11303
  return requirements;
11304
11304
  }
11305
- // Create goal section for system message
11305
+ // Add goal to the system message
11306
11306
  const goalSection = `Goal: ${trimmedContent}`;
11307
- // Goals are important directives, so we add them prominently to the system message
11308
- return this.appendToSystemMessage(requirements, goalSection, '\n\n');
11307
+ const requirementsWithGoal = this.appendToSystemMessage(requirements, goalSection, '\n\n');
11308
+ return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
11309
11309
  }
11310
11310
  }
11311
11311
  /**
@@ -14337,15 +14337,7 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
14337
14337
  // Add rule to the system message
14338
14338
  const ruleSection = `Rule: ${trimmedContent}`;
14339
14339
  const requirementsWithRule = this.appendToSystemMessage(requirements, ruleSection, '\n\n');
14340
- const ruleLines = trimmedContent
14341
- .split(/\r?\n/)
14342
- .map((line) => line.trim())
14343
- .filter(Boolean)
14344
- .map((line) => `- ${line}`);
14345
- if (ruleLines.length === 0) {
14346
- return requirementsWithRule;
14347
- }
14348
- return this.appendToPromptSuffix(requirementsWithRule, ruleLines.join('\n'));
14340
+ return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
14349
14341
  }
14350
14342
  }
14351
14343
  /**