@promptbook/wizard 0.104.0-8 → 0.104.0-9

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
@@ -36,7 +36,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
36
36
  * @generated
37
37
  * @see https://github.com/webgptorg/promptbook
38
38
  */
39
- const PROMPTBOOK_ENGINE_VERSION = '0.104.0-8';
39
+ const PROMPTBOOK_ENGINE_VERSION = '0.104.0-9';
40
40
  /**
41
41
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
42
42
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -17439,7 +17439,12 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
17439
17439
  };
17440
17440
  }
17441
17441
  // Apply each commitment in order using reduce-like pattern
17442
- for (const commitment of filteredCommitments) {
17442
+ for (let i = 0; i < filteredCommitments.length; i++) {
17443
+ const commitment = filteredCommitments[i];
17444
+ // CLOSED commitment should work only if its the last commitment in the book
17445
+ if (commitment.type === 'CLOSED' && i !== filteredCommitments.length - 1) {
17446
+ continue;
17447
+ }
17443
17448
  const definition = getCommitmentDefinition(commitment.type);
17444
17449
  if (definition) {
17445
17450
  try {