@promptbook/markdown-utils 0.112.0-69 → 0.112.0-70

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.
Files changed (27) hide show
  1. package/esm/index.es.js +28 -26
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  4. package/esm/src/avatars/visuals/avatar3dProjectionShared.d.ts +141 -0
  5. package/esm/src/avatars/visuals/octopus3dAvatarVisual.d.ts +7 -0
  6. package/esm/src/cli/cli-commands/agent/agentProjectPaths.d.ts +2 -2
  7. package/esm/src/cli/cli-commands/agent/initializeAgentRunnerCommand.d.ts +22 -0
  8. package/esm/src/cli/cli-commands/agent/runMultiple.d.ts +10 -0
  9. package/esm/src/cli/cli-commands/agent.d.ts +3 -2
  10. package/esm/src/cli/other/install.test.d.ts +1 -0
  11. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +1 -1
  12. package/esm/src/commitments/WALLET/WALLET.d.ts +1 -1
  13. package/esm/src/version.d.ts +1 -1
  14. package/package.json +1 -1
  15. package/umd/index.umd.js +28 -26
  16. package/umd/index.umd.js.map +1 -1
  17. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  18. package/umd/src/avatars/visuals/avatar3dProjectionShared.d.ts +141 -0
  19. package/umd/src/avatars/visuals/octopus3dAvatarVisual.d.ts +7 -0
  20. package/umd/src/cli/cli-commands/agent/agentProjectPaths.d.ts +2 -2
  21. package/umd/src/cli/cli-commands/agent/initializeAgentRunnerCommand.d.ts +22 -0
  22. package/umd/src/cli/cli-commands/agent/runMultiple.d.ts +10 -0
  23. package/umd/src/cli/cli-commands/agent.d.ts +3 -2
  24. package/umd/src/cli/other/install.test.d.ts +1 -0
  25. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +1 -1
  26. package/umd/src/commitments/WALLET/WALLET.d.ts +1 -1
  27. package/umd/src/version.d.ts +1 -1
package/esm/index.es.js CHANGED
@@ -23,7 +23,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
23
23
  * @generated
24
24
  * @see https://github.com/webgptorg/promptbook
25
25
  */
26
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-69';
26
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-70';
27
27
  /**
28
28
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
29
29
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1715,11 +1715,11 @@ function prettifyMarkdown(content) {
1715
1715
  */
1716
1716
  function pipelineJsonToString(pipelineJson) {
1717
1717
  const { title, pipelineUrl, bookVersion, description, parameters, tasks } = pipelineJson;
1718
- let pipelineString = `# ${title}`;
1719
- if (description) {
1720
- pipelineString += '\n\n';
1721
- pipelineString += description;
1722
- }
1718
+ let pipelineString = spaceTrim$1((block) => `
1719
+ # ${title}
1720
+
1721
+ ${block(description || '')}
1722
+ `);
1723
1723
  const commands = [];
1724
1724
  if (pipelineUrl) {
1725
1725
  commands.push(`PIPELINE URL ${pipelineUrl}`);
@@ -1735,20 +1735,17 @@ function pipelineJsonToString(pipelineJson) {
1735
1735
  for (const parameter of parameters.filter(({ isOutput }) => isOutput)) {
1736
1736
  commands.push(`OUTPUT PARAMETER ${taskParameterJsonToString(parameter)}`);
1737
1737
  }
1738
- pipelineString += '\n\n';
1739
- pipelineString += commands.map((command) => `- ${command}`).join('\n');
1738
+ pipelineString = spaceTrim$1((block) => `
1739
+ ${block(pipelineString)}
1740
+
1741
+ ${block(commands.map((command) => `- ${command}`).join('\n'))}
1742
+ `);
1740
1743
  for (const task of tasks) {
1741
1744
  const {
1742
1745
  /* Note: Not using:> name, */
1743
1746
  title, description,
1744
1747
  /* Note: dependentParameterNames, */
1745
1748
  jokerParameterNames: jokers, taskType, content, postprocessingFunctionNames: postprocessing, expectations, format, resultingParameterName, } = task;
1746
- pipelineString += '\n\n';
1747
- pipelineString += `## ${title}`;
1748
- if (description) {
1749
- pipelineString += '\n\n';
1750
- pipelineString += description;
1751
- }
1752
1749
  const commands = [];
1753
1750
  let contentLanguage = 'text';
1754
1751
  if (taskType === 'PROMPT_TASK') {
@@ -1811,18 +1808,23 @@ function pipelineJsonToString(pipelineJson) {
1811
1808
  commands.push(`FORMAT JSON`);
1812
1809
  }
1813
1810
  } /* not else */
1814
- pipelineString += '\n\n';
1815
- pipelineString += commands.map((command) => `- ${command}`).join('\n');
1816
- pipelineString += '\n\n';
1817
- pipelineString += '```' + contentLanguage;
1818
- pipelineString += '\n';
1819
- pipelineString += spaceTrim$1(content);
1820
- // <- TODO: [main] !!3 Escape
1821
- // <- TODO: [🧠] Some clear strategy how to spaceTrim the blocks
1822
- pipelineString += '\n';
1823
- pipelineString += '```';
1824
- pipelineString += '\n\n';
1825
- pipelineString += `\`-> {${resultingParameterName}}\``; // <- TODO: [main] !!3 If the parameter here has description, add it and use taskParameterJsonToString
1811
+ pipelineString = spaceTrim$1((block) => `
1812
+ ${block(pipelineString)}
1813
+
1814
+ ## ${title}
1815
+
1816
+ ${block(description || '')}
1817
+
1818
+ ${block(commands.map((command) => `- ${command}`).join('\n'))}
1819
+
1820
+ \`\`\`${contentLanguage}
1821
+ ${block(spaceTrim$1(content))}
1822
+ \`\`\`
1823
+
1824
+ \`-> {${resultingParameterName}}\`
1825
+ `); // <- TODO: [main] !!3 If the parameter here has description, add it and use taskParameterJsonToString
1826
+ // <- TODO: [main] !!3 Escape
1827
+ // <- TODO: [🧠] Some clear strategy how to spaceTrim the blocks
1826
1828
  }
1827
1829
  return validatePipelineString(pipelineString);
1828
1830
  }