@promptbook/utils 0.112.0-64 → 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.
Files changed (55) hide show
  1. package/esm/index.es.js +50 -2
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/src/_packages/components.index.d.ts +0 -2
  4. package/esm/src/_packages/core.index.d.ts +2 -2
  5. package/esm/src/_packages/types.index.d.ts +0 -2
  6. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  7. package/esm/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
  8. package/esm/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
  9. package/esm/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +27 -0
  10. package/esm/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +25 -0
  11. package/esm/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +10 -0
  12. package/esm/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +14 -0
  13. package/esm/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +43 -0
  14. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +0 -34
  15. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  16. package/esm/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
  17. package/esm/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
  18. package/esm/src/config.d.ts +3 -3
  19. package/esm/src/formfactors/index.d.ts +2 -2
  20. package/esm/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +1 -1
  21. package/esm/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +1 -1
  22. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +0 -4
  23. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +0 -9
  24. package/esm/src/utils/files/getPromptbookTempPath.d.ts +24 -0
  25. package/esm/src/version.d.ts +1 -1
  26. package/package.json +1 -1
  27. package/umd/index.umd.js +49 -1
  28. package/umd/index.umd.js.map +1 -1
  29. package/umd/src/_packages/components.index.d.ts +0 -2
  30. package/umd/src/_packages/core.index.d.ts +2 -2
  31. package/umd/src/_packages/types.index.d.ts +0 -2
  32. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  33. package/umd/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
  34. package/umd/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
  35. package/umd/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +27 -0
  36. package/umd/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +25 -0
  37. package/umd/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +10 -0
  38. package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +14 -0
  39. package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +43 -0
  40. package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts +1 -0
  41. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +0 -34
  42. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  43. package/umd/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
  44. package/umd/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
  45. package/umd/src/config.d.ts +3 -3
  46. package/umd/src/formfactors/index.d.ts +2 -2
  47. package/umd/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +1 -1
  48. package/umd/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +1 -1
  49. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +0 -4
  50. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +0 -9
  51. package/umd/src/utils/files/getPromptbookTempPath.d.ts +24 -0
  52. package/umd/src/utils/files/getPromptbookTempPath.test.d.ts +1 -0
  53. package/umd/src/version.d.ts +1 -1
  54. /package/esm/src/{commitments/KNOWLEDGE/KNOWLEDGE.test.d.ts → book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts} +0 -0
  55. /package/{umd/src/commitments/KNOWLEDGE/KNOWLEDGE.test.d.ts → esm/src/utils/files/getPromptbookTempPath.test.d.ts} +0 -0
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-64';
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.