@promptbook/utils 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 +50 -2
- package/esm/index.es.js.map +1 -1
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/esm/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/esm/src/config.d.ts +3 -3
- package/esm/src/utils/files/getPromptbookTempPath.d.ts +24 -0
- package/esm/src/utils/files/getPromptbookTempPath.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +49 -1
- package/umd/index.umd.js.map +1 -1
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/umd/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/umd/src/config.d.ts +3 -3
- package/umd/src/utils/files/getPromptbookTempPath.d.ts +24 -0
- package/umd/src/utils/files/getPromptbookTempPath.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spaceTrim as spaceTrim$1 } from 'spacetrim';
|
|
2
|
-
import { basename } from 'path';
|
|
2
|
+
import { posix, basename } from 'path';
|
|
3
3
|
import { randomBytes } from 'crypto';
|
|
4
4
|
import { SHA256 } from 'crypto-js';
|
|
5
5
|
import hexEncoder from 'crypto-js/enc-hex';
|
|
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
18
18
|
* @generated
|
|
19
19
|
* @see https://github.com/webgptorg/promptbook
|
|
20
20
|
*/
|
|
21
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
21
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-66';
|
|
22
22
|
/**
|
|
23
23
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
24
24
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -937,6 +937,29 @@ function saturate(amount) {
|
|
|
937
937
|
}
|
|
938
938
|
// TODO: Maybe implement by mix+hsl
|
|
939
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
|
+
|
|
940
963
|
/**
|
|
941
964
|
* Name for the Promptbook
|
|
942
965
|
*
|
|
@@ -1031,6 +1054,31 @@ const VALUE_STRINGS = {
|
|
|
1031
1054
|
* @public exported from `@promptbook/utils`
|
|
1032
1055
|
*/
|
|
1033
1056
|
const SMALL_NUMBER = 0.001;
|
|
1057
|
+
// <- TODO: [🕝] Make also `AGENTS_DIRNAME_ALTERNATIVES`
|
|
1058
|
+
/**
|
|
1059
|
+
* Where to store the temporary downloads
|
|
1060
|
+
*
|
|
1061
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1062
|
+
*
|
|
1063
|
+
* @public exported from `@promptbook/core`
|
|
1064
|
+
*/
|
|
1065
|
+
getPromptbookTempPath('download-cache');
|
|
1066
|
+
/**
|
|
1067
|
+
* Where to store the cache of executions for promptbook CLI
|
|
1068
|
+
*
|
|
1069
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1070
|
+
*
|
|
1071
|
+
* @public exported from `@promptbook/core`
|
|
1072
|
+
*/
|
|
1073
|
+
getPromptbookTempPath('execution-cache');
|
|
1074
|
+
/**
|
|
1075
|
+
* Where to store the scrape cache
|
|
1076
|
+
*
|
|
1077
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1078
|
+
*
|
|
1079
|
+
* @public exported from `@promptbook/core`
|
|
1080
|
+
*/
|
|
1081
|
+
getPromptbookTempPath('scrape-cache');
|
|
1034
1082
|
// <- TODO: [🧜♂️]
|
|
1035
1083
|
/**
|
|
1036
1084
|
* Default settings for parsing and generating CSV files in Promptbook.
|