@promptbook/core 0.69.0-10 → 0.69.0-12

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/umd/index.umd.js CHANGED
@@ -16,7 +16,7 @@
16
16
  /**
17
17
  * The version of the Promptbook library
18
18
  */
19
- var PROMPTBOOK_VERSION = '0.69.0-9';
19
+ var PROMPTBOOK_VERSION = '0.69.0-11';
20
20
  // TODO: !!!! List here all the versions and annotate + put into script
21
21
 
22
22
  /*! *****************************************************************************
@@ -753,6 +753,19 @@
753
753
  */
754
754
  var DEFAULT_REMOTE_URL_PATH = '/promptbook/socket.io';
755
755
  // <- TODO: [🧜‍♂️]
756
+ /**
757
+ * @@@
758
+ *
759
+ * @public exported from `@promptbook/core`
760
+ */
761
+ var DEFAULT_CSV_SETTINGS = {
762
+ header: true,
763
+ delimiter: ',',
764
+ quoteChar: '"',
765
+ newline: '\n',
766
+ skipEmptyLines: true,
767
+ // encoding: 'utf8'
768
+ };
756
769
  /**
757
770
  * @@@
758
771
  *
@@ -1824,7 +1837,7 @@
1824
1837
  });
1825
1838
  }
1826
1839
 
1827
- var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.69.0-9",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",resultingParameterName:"knowledgePieces",dependentParameterNames:["knowledgeContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",promptbookVersion:"0.69.0-9",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",resultingParameterName:"keywords",dependentParameterNames:["knowledgePieceContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",promptbookVersion:"0.69.0-9",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Title should be concise and clear\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",resultingParameterName:"title",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",promptbookVersion:"0.69.0-9",parameters:[{name:"availableModelNames",description:"List of available model names separated by comma (,)",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"make-model-requirements",title:"Make modelRequirements",content:"You are experienced AI engineer, you need to create virtual assistant.\nWrite\n\n## Sample\n\n```json\n{\n\"modelName\": \"gpt-4o\",\n\"systemMessage\": \"You are experienced AI engineer and helpfull assistant.\",\n\"temperature\": 0.7\n}\n```\n\n## Instructions\n\n- Your output format is JSON object\n- Write just the JSON object, no other text should be present\n- It contains the following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nPick from the following models:\n\n- {availableModelNames}\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",resultingParameterName:"modelRequirements",format:"JSON",dependentParameterNames:["availableModelNames","personaDescription"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-persona.ptbk.md"}];
1840
+ var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.ptbk.md",promptbookVersion:"0.69.0-11",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",resultingParameterName:"knowledgePieces",dependentParameterNames:["knowledgeContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-from-markdown.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.ptbk.md",promptbookVersion:"0.69.0-11",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",resultingParameterName:"keywords",dependentParameterNames:["knowledgePieceContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-keywords.ptbk.md"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.ptbk.md",promptbookVersion:"0.69.0-11",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"knowledge",title:"Knowledge",content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Title should be concise and clear\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",resultingParameterName:"title",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-knowledge-title.ptbk.md"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.ptbk.md",promptbookVersion:"0.69.0-11",parameters:[{name:"availableModelNames",description:"List of available model names separated by comma (,)",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],templates:[{templateType:"PROMPT_TEMPLATE",name:"make-model-requirements",title:"Make modelRequirements",content:"You are experienced AI engineer, you need to create virtual assistant.\nWrite\n\n## Sample\n\n```json\n{\n\"modelName\": \"gpt-4o\",\n\"systemMessage\": \"You are experienced AI engineer and helpfull assistant.\",\n\"temperature\": 0.7\n}\n```\n\n## Instructions\n\n- Your output format is JSON object\n- Write just the JSON object, no other text should be present\n- It contains the following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nPick from the following models:\n\n- {availableModelNames}\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",resultingParameterName:"modelRequirements",format:"JSON",dependentParameterNames:["availableModelNames","personaDescription"]}],knowledgeSources:[],knowledgePieces:[],personas:[],preparations:[],sourceFile:"./promptbook-collection/prepare-persona.ptbk.md"}];
1828
1841
 
1829
1842
  var defaultDiacriticsRemovalMap = [
1830
1843
  {
@@ -2944,57 +2957,61 @@
2944
2957
  var CsvFormatDefinition = {
2945
2958
  formatName: 'CSV',
2946
2959
  aliases: ['SPREADSHEET', 'TABLE'],
2947
- isValid: function (value, schema) {
2960
+ isValid: function (value, settings, schema) {
2961
+ // TODO: !!!!!! Implement CSV validation
2948
2962
  TODO_USE(value /* <- TODO: Use value here */);
2963
+ TODO_USE(settings /* <- TODO: Use settings here */);
2949
2964
  TODO_USE(schema /* <- TODO: Use schema here */);
2950
2965
  return true;
2951
2966
  },
2952
- canBeValid: function (partialValue, schema) {
2967
+ canBeValid: function (partialValue, settings, schema) {
2953
2968
  TODO_USE(partialValue /* <- TODO: Use partialValue here */);
2969
+ TODO_USE(settings /* <- TODO: Use settings here */);
2954
2970
  TODO_USE(schema /* <- TODO: Use schema here */);
2955
2971
  return true;
2956
2972
  },
2957
- heal: function (value, schema) {
2973
+ heal: function (value, settings, schema) {
2958
2974
  TODO_USE(value /* <- TODO: Use partialValue here */);
2975
+ TODO_USE(settings /* <- TODO: Use settings here */);
2959
2976
  TODO_USE(schema /* <- TODO: Use schema here */);
2960
2977
  throw new Error('Not implemented');
2961
2978
  },
2962
2979
  subvalueDefinitions: [
2963
2980
  {
2964
2981
  subvalueName: 'ROW',
2965
- mapValues: function (value, mapCallback) {
2982
+ mapValues: function (value, settings, mapCallback) {
2966
2983
  return __awaiter(this, void 0, void 0, function () {
2967
2984
  var csv, mappedData;
2985
+ var _this = this;
2968
2986
  return __generator(this, function (_a) {
2969
2987
  switch (_a.label) {
2970
2988
  case 0:
2971
- csv = papaparse.parse(value, {
2972
- header: true,
2973
- delimiter: ',',
2974
- quoteChar: '"',
2975
- newline: '\r\n',
2976
- skipEmptyLines: true,
2977
- // encoding: 'utf8',
2978
- // <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
2979
- // <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
2980
- });
2989
+ csv = papaparse.parse(value, settings);
2981
2990
  if (csv.errors.length !== 0) {
2982
2991
  throw new ParseError(// <- TODO: !!!!!! Split PipelineParseError and FormatParseError -> CsvParseError
2983
2992
  spaceTrim__default["default"](function (block) { return "\n CSV parsing error\n\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n "); }));
2984
2993
  }
2985
- return [4 /*yield*/, Promise.all(csv.data.map(function (row, index) { /*not await */ return mapCallback(row, index); }))];
2994
+ return [4 /*yield*/, Promise.all(csv.data.map(function (row, index) { return __awaiter(_this, void 0, void 0, function () {
2995
+ var _a;
2996
+ var _b;
2997
+ return __generator(this, function (_c) {
2998
+ switch (_c.label) {
2999
+ case 0:
3000
+ _a = [__assign({}, row)];
3001
+ _b = {};
3002
+ // <- TODO: !!!!!! Dynamic new column name and position
3003
+ // <- TODO: !!!!!! Check name collisions
3004
+ return [4 /*yield*/, mapCallback(row, index)];
3005
+ case 1: return [2 /*return*/, (__assign.apply(void 0, _a.concat([(_b.newColumn =
3006
+ // <- TODO: !!!!!! Dynamic new column name and position
3007
+ // <- TODO: !!!!!! Check name collisions
3008
+ _c.sent(), _b)])))];
3009
+ }
3010
+ });
3011
+ }); }))];
2986
3012
  case 1:
2987
3013
  mappedData = _a.sent();
2988
- return [2 /*return*/, papaparse.unparse(mappedData, {
2989
- header: true,
2990
- delimiter: ',',
2991
- quoteChar: '"',
2992
- newline: '\r\n',
2993
- skipEmptyLines: true,
2994
- // encoding: 'utf8',
2995
- // <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
2996
- // <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
2997
- })];
3014
+ return [2 /*return*/, papaparse.unparse(mappedData, settings)];
2998
3015
  }
2999
3016
  });
3000
3017
  });
@@ -3002,23 +3019,14 @@
3002
3019
  },
3003
3020
  {
3004
3021
  subvalueName: 'CELL',
3005
- mapValues: function (value, mapCallback) {
3022
+ mapValues: function (value, settings, mapCallback) {
3006
3023
  return __awaiter(this, void 0, void 0, function () {
3007
3024
  var csv, mappedData;
3008
3025
  var _this = this;
3009
3026
  return __generator(this, function (_a) {
3010
3027
  switch (_a.label) {
3011
3028
  case 0:
3012
- csv = papaparse.parse(value, {
3013
- header: true,
3014
- delimiter: ',',
3015
- quoteChar: '"',
3016
- newline: '\r\n',
3017
- skipEmptyLines: true,
3018
- // encoding: 'utf8',
3019
- // <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
3020
- // <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
3021
- });
3029
+ csv = papaparse.parse(value, settings);
3022
3030
  if (csv.errors.length !== 0) {
3023
3031
  throw new ParseError(// <- TODO: !!!!!! Split PipelineParseError and FormatParseError -> CsvParseError
3024
3032
  spaceTrim__default["default"](function (block) { return "\n CSV parsing error\n\n ".concat(block(csv.errors.map(function (error) { return error.message; }).join('\n\n')), "\n "); }));
@@ -3041,16 +3049,7 @@
3041
3049
  }); }))];
3042
3050
  case 1:
3043
3051
  mappedData = _a.sent();
3044
- return [2 /*return*/, papaparse.unparse(mappedData, {
3045
- header: true,
3046
- delimiter: ',',
3047
- quoteChar: '"',
3048
- newline: '\r\n',
3049
- skipEmptyLines: true,
3050
- // encoding: 'utf8',
3051
- // <- TODO: !!!!!! DEFAULT_CSV_OPTIONS
3052
- // <- TODO: [🧠] How to define parsing options for formats, its different concept than schema
3053
- })];
3052
+ return [2 /*return*/, papaparse.unparse(mappedData, settings)];
3054
3053
  }
3055
3054
  });
3056
3055
  });
@@ -3095,17 +3094,20 @@
3095
3094
  var JsonFormatDefinition = {
3096
3095
  formatName: 'JSON',
3097
3096
  mimeType: 'application/json',
3098
- isValid: function (value, schema) {
3097
+ isValid: function (value, settings, schema) {
3099
3098
  TODO_USE(schema /* <- TODO: Use schema here */);
3099
+ TODO_USE(settings /* <- TODO: Use settings here */);
3100
3100
  return isValidJsonString(value);
3101
3101
  },
3102
- canBeValid: function (partialValue, schema) {
3102
+ canBeValid: function (partialValue, settings, schema) {
3103
3103
  TODO_USE(partialValue /* <- TODO: Use partialValue here */);
3104
+ TODO_USE(settings /* <- TODO: Use settings here */);
3104
3105
  TODO_USE(schema /* <- TODO: Use schema here */);
3105
3106
  return true;
3106
3107
  },
3107
- heal: function (value, schema) {
3108
+ heal: function (value, settings, schema) {
3108
3109
  TODO_USE(value /* <- TODO: Use partialValue here */);
3110
+ TODO_USE(settings /* <- TODO: Use settings here */);
3109
3111
  TODO_USE(schema /* <- TODO: Use schema here */);
3110
3112
  throw new Error('Not implemented');
3111
3113
  },
@@ -3114,7 +3116,7 @@
3114
3116
  /**
3115
3117
  * TODO: [🧠] Maybe propper instance of object
3116
3118
  * TODO: [0] Make string_serialized_json
3117
- * TODO: [1] Make type for JSON Schema
3119
+ * TODO: [1] Make type for JSON Settings and Schema
3118
3120
  * TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
3119
3121
  * TODO: [🍓] In `JsonFormatDefinition` implement simple `isValid`
3120
3122
  * TODO: [🍓] In `JsonFormatDefinition` implement partial `canBeValid`
@@ -3144,7 +3146,7 @@
3144
3146
  subvalueDefinitions: [
3145
3147
  {
3146
3148
  subvalueName: 'LINE',
3147
- mapValues: function (value, mapCallback) {
3149
+ mapValues: function (value, settings, mapCallback) {
3148
3150
  return __awaiter(this, void 0, void 0, function () {
3149
3151
  var lines, mappedLines;
3150
3152
  return __generator(this, function (_a) {
@@ -3170,6 +3172,7 @@
3170
3172
  ],
3171
3173
  };
3172
3174
  /**
3175
+ * TODO: [1] Make type for XML Text and Schema
3173
3176
  * TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages aviable as subvalues
3174
3177
  * TODO: [🍓] In `TextFormatDefinition` implement simple `isValid`
3175
3178
  * TODO: [🍓] In `TextFormatDefinition` implement partial `canBeValid`
@@ -3186,18 +3189,21 @@
3186
3189
  var XmlFormatDefinition = {
3187
3190
  formatName: 'XML',
3188
3191
  mimeType: 'application/xml',
3189
- isValid: function (value, schema) {
3192
+ isValid: function (value, settings, schema) {
3190
3193
  TODO_USE(value /* <- TODO: Use value here */);
3194
+ TODO_USE(settings /* <- TODO: Use settings here */);
3191
3195
  TODO_USE(schema /* <- TODO: Use schema here */);
3192
3196
  return true;
3193
3197
  },
3194
- canBeValid: function (partialValue, schema) {
3198
+ canBeValid: function (partialValue, settings, schema) {
3195
3199
  TODO_USE(partialValue /* <- TODO: Use partialValue here */);
3200
+ TODO_USE(settings /* <- TODO: Use settings here */);
3196
3201
  TODO_USE(schema /* <- TODO: Use schema here */);
3197
3202
  return true;
3198
3203
  },
3199
- heal: function (value, schema) {
3204
+ heal: function (value, settings, schema) {
3200
3205
  TODO_USE(value /* <- TODO: Use partialValue here */);
3206
+ TODO_USE(settings /* <- TODO: Use settings here */);
3201
3207
  TODO_USE(schema /* <- TODO: Use schema here */);
3202
3208
  throw new Error('Not implemented');
3203
3209
  },
@@ -3206,7 +3212,7 @@
3206
3212
  /**
3207
3213
  * TODO: [🧠] Maybe propper instance of object
3208
3214
  * TODO: [0] Make string_serialized_xml
3209
- * TODO: [1] Make type for XML Schema
3215
+ * TODO: [1] Make type for XML Settings and Schema
3210
3216
  * TODO: [🧠] What to use for validating XMLs - XSD,...
3211
3217
  * TODO: [🍓] In `XmlFormatDefinition` implement simple `isValid`
3212
3218
  * TODO: [🍓] In `XmlFormatDefinition` implement partial `canBeValid`
@@ -4046,12 +4052,12 @@
4046
4052
  */
4047
4053
  function executeFormatCells(options) {
4048
4054
  return __awaiter(this, void 0, void 0, function () {
4049
- var template, jokerParameterNames, parameters, priority, pipelineIdentification, parameterValue, formatDefinition, subvalueDefinition, resultString;
4055
+ var template, jokerParameterNames, parameters, priority, pipelineIdentification, settings, parameterValue, formatDefinition, subvalueDefinition, formatSettings, resultString;
4050
4056
  var _this = this;
4051
4057
  return __generator(this, function (_a) {
4052
4058
  switch (_a.label) {
4053
4059
  case 0:
4054
- template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority, pipelineIdentification = options.pipelineIdentification;
4060
+ template = options.template, jokerParameterNames = options.jokerParameterNames, parameters = options.parameters, priority = options.priority, pipelineIdentification = options.pipelineIdentification, settings = options.settings;
4055
4061
  if (template.foreach === undefined) {
4056
4062
  return [2 /*return*/, /* not await */ executeAttempts(options)];
4057
4063
  }
@@ -4080,7 +4086,11 @@
4080
4086
  .map(function (subvalueName) { return "- ".concat(subvalueName); })
4081
4087
  .join('\n')), "\n\n [\u26F7] This should never happen because cell name should be validated during parsing\n\n ").concat(block(pipelineIdentification), "\n "); }));
4082
4088
  }
4083
- return [4 /*yield*/, subvalueDefinition.mapValues(parameterValue, function (subparameters, index) { return __awaiter(_this, void 0, void 0, function () {
4089
+ if (formatDefinition.formatName === 'CSV') {
4090
+ formatSettings = settings.csvSettings;
4091
+ // <- TODO: !!!!!! More universal, make simmilar pattern for other formats for example \n vs \r\n in text
4092
+ }
4093
+ return [4 /*yield*/, subvalueDefinition.mapValues(parameterValue, formatSettings, function (subparameters, index) { return __awaiter(_this, void 0, void 0, function () {
4084
4094
  var mappedParameters, allSubparameters, subresultString;
4085
4095
  return __generator(this, function (_a) {
4086
4096
  switch (_a.label) {
@@ -4715,7 +4725,7 @@
4715
4725
  function createPipelineExecutor(options) {
4716
4726
  var _this = this;
4717
4727
  var pipeline = options.pipeline, tools = options.tools, _a = options.settings, settings = _a === void 0 ? {} : _a;
4718
- var _b = settings.maxExecutionAttempts, maxExecutionAttempts = _b === void 0 ? MAX_EXECUTION_ATTEMPTS : _b, _c = settings.maxParallelCount, maxParallelCount = _c === void 0 ? MAX_PARALLEL_COUNT : _c, _d = settings.isVerbose, isVerbose = _d === void 0 ? IS_VERBOSE : _d, _e = settings.isNotPreparedWarningSupressed, isNotPreparedWarningSupressed = _e === void 0 ? false : _e;
4728
+ var _b = settings.maxExecutionAttempts, maxExecutionAttempts = _b === void 0 ? MAX_EXECUTION_ATTEMPTS : _b, _c = settings.maxParallelCount, maxParallelCount = _c === void 0 ? MAX_PARALLEL_COUNT : _c, _d = settings.csvSettings, csvSettings = _d === void 0 ? DEFAULT_CSV_SETTINGS : _d, _e = settings.isVerbose, isVerbose = _e === void 0 ? IS_VERBOSE : _e, _f = settings.isNotPreparedWarningSupressed, isNotPreparedWarningSupressed = _f === void 0 ? false : _f;
4719
4729
  validatePipeline(pipeline);
4720
4730
  var pipelineIdentification = (function () {
4721
4731
  // Note: This is a 😐 implementation of [🚞]
@@ -4750,6 +4760,7 @@
4750
4760
  settings: {
4751
4761
  maxExecutionAttempts: maxExecutionAttempts,
4752
4762
  maxParallelCount: maxParallelCount,
4763
+ csvSettings: csvSettings,
4753
4764
  isVerbose: isVerbose,
4754
4765
  isNotPreparedWarningSupressed: isNotPreparedWarningSupressed,
4755
4766
  },
@@ -7480,7 +7491,7 @@
7480
7491
  function extractOneBlockFromMarkdown(markdown) {
7481
7492
  var codeBlocks = extractAllBlocksFromMarkdown(markdown);
7482
7493
  if (codeBlocks.length !== 1) {
7483
- throw new ParseError(spaceTrim__default["default"](function (block) { return "\n There should be exactly 1 code block, found ".concat(codeBlocks.length, " code blocks\n\n ").concat(block(codeBlocks.map(function (block, i) { return "Block ".concat(i + 1, ":\n").concat(block.content); }).join('\n\n\n')), "\n "); }));
7494
+ throw new ParseError(spaceTrim__default["default"](function (block) { return "\n There should be exactly 1 code block in template, found ".concat(codeBlocks.length, " code blocks\n\n ").concat(block(codeBlocks.map(function (block, i) { return "Block ".concat(i + 1, ":\n").concat(block.content); }).join('\n\n\n')), "\n "); }));
7484
7495
  }
7485
7496
  return codeBlocks[0];
7486
7497
  }
@@ -8244,7 +8255,7 @@
8244
8255
  var value = _a.value, isUncertain = _a.isUncertain;
8245
8256
  return "".concat(isUncertain ? 'approximately ' : '').concat(Math.round(value * 100) / 100);
8246
8257
  };
8247
- if (usage.price.value > 0.1
8258
+ if (usage.price.value > 0.01
8248
8259
  // <- TODO: [🍓][🧞‍♂️][👩🏽‍🤝‍🧑🏻] Configure negligible value - default value to config + value to `UsageToHumanSettings`
8249
8260
  ) {
8250
8261
  reportItems.push("Cost ".concat(uncertainNumberToHuman(usage.price), " USD"));
@@ -8253,7 +8264,8 @@
8253
8264
  reportItems.push("Negligible cost");
8254
8265
  }
8255
8266
  var worktime = usageToWorktime(usage);
8256
- if (worktime.value > 0.5
8267
+ if (worktime.value >
8268
+ 1 / 60
8257
8269
  // <- TODO: [🍓][🧞‍♂️][👩🏽‍🤝‍🧑🏻]
8258
8270
  ) {
8259
8271
  reportItems.push("Saved ".concat(uncertainNumberToHuman(usageToWorktime(usage)), " hours of human time"));
@@ -9217,6 +9229,7 @@
9217
9229
  exports.CallbackInterfaceTools = CallbackInterfaceTools;
9218
9230
  exports.CollectionError = CollectionError;
9219
9231
  exports.CsvFormatDefinition = CsvFormatDefinition;
9232
+ exports.DEFAULT_CSV_SETTINGS = DEFAULT_CSV_SETTINGS;
9220
9233
  exports.DEFAULT_REMOTE_URL = DEFAULT_REMOTE_URL;
9221
9234
  exports.DEFAULT_REMOTE_URL_PATH = DEFAULT_REMOTE_URL_PATH;
9222
9235
  exports.ERRORS = ERRORS;