@promptbook/markitdown 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.
- package/esm/index.es.js +35 -5
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/components.index.d.ts +0 -2
- package/esm/src/_packages/core.index.d.ts +2 -2
- package/esm/src/_packages/types.index.d.ts +0 -2
- 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/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +27 -0
- package/esm/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +25 -0
- package/esm/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +10 -0
- package/esm/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +14 -0
- package/esm/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +43 -0
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +0 -34
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/esm/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
- package/esm/src/config.d.ts +3 -3
- package/esm/src/formfactors/index.d.ts +2 -2
- package/esm/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +1 -1
- package/esm/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +0 -9
- package/esm/src/utils/files/getPromptbookTempPath.d.ts +24 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +38 -8
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/components.index.d.ts +0 -2
- package/umd/src/_packages/core.index.d.ts +2 -2
- package/umd/src/_packages/types.index.d.ts +0 -2
- 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/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +27 -0
- package/umd/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +25 -0
- package/umd/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +10 -0
- package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +14 -0
- package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +43 -0
- package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts +1 -0
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +0 -34
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/umd/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
- package/umd/src/config.d.ts +3 -3
- package/umd/src/formfactors/index.d.ts +2 -2
- package/umd/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +1 -1
- package/umd/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +0 -9
- 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/src/{commitments/KNOWLEDGE/KNOWLEDGE.test.d.ts → book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts} +0 -0
- /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,8 +1,8 @@
|
|
|
1
1
|
import { mkdir, rm, readFile } from 'fs/promises';
|
|
2
2
|
import { spaceTrim as spaceTrim$1 } from 'spacetrim';
|
|
3
|
+
import { posix, basename, join, dirname, isAbsolute } from 'path';
|
|
3
4
|
import { SHA256 } from 'crypto-js';
|
|
4
5
|
import hexEncoder from 'crypto-js/enc-hex';
|
|
5
|
-
import { basename, join, dirname, isAbsolute } from 'path';
|
|
6
6
|
import { randomBytes } from 'crypto';
|
|
7
7
|
import { Subject } from 'rxjs';
|
|
8
8
|
import { forTime } from 'waitasecond';
|
|
@@ -24,7 +24,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
24
24
|
* @generated
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
27
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-66';
|
|
28
28
|
/**
|
|
29
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
30
30
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -961,6 +961,29 @@ function saturate(amount) {
|
|
|
961
961
|
}
|
|
962
962
|
// TODO: Maybe implement by mix+hsl
|
|
963
963
|
|
|
964
|
+
/**
|
|
965
|
+
* Relative directory name without the `./` prefix for Git ignore rules and glob patterns.
|
|
966
|
+
*
|
|
967
|
+
* @private internal utility for Promptbook-owned temp files
|
|
968
|
+
*/
|
|
969
|
+
const PROMPTBOOK_TEMP_DIRECTORY_NAME = '.promptbook';
|
|
970
|
+
/**
|
|
971
|
+
* Builds one project-relative path inside the shared Promptbook working directory.
|
|
972
|
+
*
|
|
973
|
+
* @private internal utility for Promptbook-owned temp files
|
|
974
|
+
*/
|
|
975
|
+
function getPromptbookTempPath(...pathSegments) {
|
|
976
|
+
return `./${getPromptbookTempPosixPath(...pathSegments)}`;
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Builds one POSIX path fragment inside the shared Promptbook working directory for globs and generated text files.
|
|
980
|
+
*
|
|
981
|
+
* @private internal utility for Promptbook-owned temp files
|
|
982
|
+
*/
|
|
983
|
+
function getPromptbookTempPosixPath(...pathSegments) {
|
|
984
|
+
return posix.join(PROMPTBOOK_TEMP_DIRECTORY_NAME, ...pathSegments);
|
|
985
|
+
}
|
|
986
|
+
|
|
964
987
|
/**
|
|
965
988
|
* Returns the same value that is passed as argument.
|
|
966
989
|
* No side effects.
|
|
@@ -1136,7 +1159,6 @@ const DEFAULT_MAX_PARALLEL_COUNT = 5; // <- TODO: [🤹♂️]
|
|
|
1136
1159
|
*/
|
|
1137
1160
|
const DEFAULT_MAX_EXECUTION_ATTEMPTS = 7; // <- TODO: [🤹♂️]
|
|
1138
1161
|
// <- TODO: [🕝] Make also `AGENTS_DIRNAME_ALTERNATIVES`
|
|
1139
|
-
// TODO: Just `.promptbook` in config, hardcode subfolders like `download-cache` or `execution-cache`
|
|
1140
1162
|
/**
|
|
1141
1163
|
* Where to store the temporary downloads
|
|
1142
1164
|
*
|
|
@@ -1144,7 +1166,15 @@ const DEFAULT_MAX_EXECUTION_ATTEMPTS = 7; // <- TODO: [🤹♂️]
|
|
|
1144
1166
|
*
|
|
1145
1167
|
* @public exported from `@promptbook/core`
|
|
1146
1168
|
*/
|
|
1147
|
-
const DEFAULT_DOWNLOAD_CACHE_DIRNAME = '
|
|
1169
|
+
const DEFAULT_DOWNLOAD_CACHE_DIRNAME = getPromptbookTempPath('download-cache');
|
|
1170
|
+
/**
|
|
1171
|
+
* Where to store the cache of executions for promptbook CLI
|
|
1172
|
+
*
|
|
1173
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1174
|
+
*
|
|
1175
|
+
* @public exported from `@promptbook/core`
|
|
1176
|
+
*/
|
|
1177
|
+
getPromptbookTempPath('execution-cache');
|
|
1148
1178
|
/**
|
|
1149
1179
|
* Where to store the scrape cache
|
|
1150
1180
|
*
|
|
@@ -1152,7 +1182,7 @@ const DEFAULT_DOWNLOAD_CACHE_DIRNAME = './.promptbook/download-cache';
|
|
|
1152
1182
|
*
|
|
1153
1183
|
* @public exported from `@promptbook/core`
|
|
1154
1184
|
*/
|
|
1155
|
-
const DEFAULT_SCRAPE_CACHE_DIRNAME = '
|
|
1185
|
+
const DEFAULT_SCRAPE_CACHE_DIRNAME = getPromptbookTempPath('scrape-cache');
|
|
1156
1186
|
// <- TODO: [🧜♂️]
|
|
1157
1187
|
/**
|
|
1158
1188
|
* Default settings for parsing and generating CSV files in Promptbook.
|