@promptbook/editable 0.112.0-65 → 0.112.0-66

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
@@ -1,4 +1,5 @@
1
1
  import { spaceTrim as spaceTrim$1 } from 'spacetrim';
2
+ import { posix } from 'path';
2
3
  import { parse, unparse } from 'papaparse';
3
4
  import { SHA256 } from 'crypto-js';
4
5
  import hexEncoder from 'crypto-js/enc-hex';
@@ -17,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
17
18
  * @generated
18
19
  * @see https://github.com/webgptorg/promptbook
19
20
  */
20
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-65';
21
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-66';
21
22
  /**
22
23
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
23
24
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -936,6 +937,29 @@ function saturate(amount) {
936
937
  }
937
938
  // TODO: Maybe implement by mix+hsl
938
939
 
940
+ /**
941
+ * Relative directory name without the `./` prefix for Git ignore rules and glob patterns.
942
+ *
943
+ * @private internal utility for Promptbook-owned temp files
944
+ */
945
+ const PROMPTBOOK_TEMP_DIRECTORY_NAME = '.promptbook';
946
+ /**
947
+ * Builds one project-relative path inside the shared Promptbook working directory.
948
+ *
949
+ * @private internal utility for Promptbook-owned temp files
950
+ */
951
+ function getPromptbookTempPath(...pathSegments) {
952
+ return `./${getPromptbookTempPosixPath(...pathSegments)}`;
953
+ }
954
+ /**
955
+ * Builds one POSIX path fragment inside the shared Promptbook working directory for globs and generated text files.
956
+ *
957
+ * @private internal utility for Promptbook-owned temp files
958
+ */
959
+ function getPromptbookTempPosixPath(...pathSegments) {
960
+ return posix.join(PROMPTBOOK_TEMP_DIRECTORY_NAME, ...pathSegments);
961
+ }
962
+
939
963
  /**
940
964
  * Returns the same value that is passed as argument.
941
965
  * No side effects.
@@ -1043,6 +1067,31 @@ const DEFAULT_BOOK_OUTPUT_PARAMETER_NAME = 'result';
1043
1067
  * @private within the repository - too low-level in comparison with other `MAX_...`
1044
1068
  */
1045
1069
  const LOOP_LIMIT = 1000;
1070
+ // <- TODO: [🕝] Make also `AGENTS_DIRNAME_ALTERNATIVES`
1071
+ /**
1072
+ * Where to store the temporary downloads
1073
+ *
1074
+ * Note: When the folder does not exist, it is created recursively
1075
+ *
1076
+ * @public exported from `@promptbook/core`
1077
+ */
1078
+ getPromptbookTempPath('download-cache');
1079
+ /**
1080
+ * Where to store the cache of executions for promptbook CLI
1081
+ *
1082
+ * Note: When the folder does not exist, it is created recursively
1083
+ *
1084
+ * @public exported from `@promptbook/core`
1085
+ */
1086
+ getPromptbookTempPath('execution-cache');
1087
+ /**
1088
+ * Where to store the scrape cache
1089
+ *
1090
+ * Note: When the folder does not exist, it is created recursively
1091
+ *
1092
+ * @public exported from `@promptbook/core`
1093
+ */
1094
+ getPromptbookTempPath('scrape-cache');
1046
1095
  // <- TODO: [🧜‍♂️]
1047
1096
  /**
1048
1097
  * Default settings for parsing and generating CSV files in Promptbook.