@promptbook/markitdown 0.89.0-15 โ 0.89.0-16
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 +19 -20
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +6 -4
- package/esm/typings/src/_packages/types.index.d.ts +4 -0
- package/esm/typings/src/cli/cli-commands/login.d.ts +0 -1
- package/esm/typings/src/cli/common/$provideLlmToolsForCli.d.ts +16 -3
- package/esm/typings/src/config.d.ts +15 -19
- package/esm/typings/src/errors/PipelineExecutionError.d.ts +1 -1
- package/esm/typings/src/errors/assertsError.d.ts +4 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizzardOrCli.d.ts +10 -1
- package/esm/typings/src/remote-server/socket-types/_subtypes/identificationToPromptbookToken.d.ts +11 -0
- package/esm/typings/src/remote-server/socket-types/_subtypes/promptbookTokenToIdentification.d.ts +10 -0
- package/esm/typings/src/storage/env-storage/$EnvStorage.d.ts +4 -1
- package/esm/typings/src/types/typeAliases.d.ts +12 -0
- package/package.json +2 -2
- package/umd/index.umd.js +19 -20
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -26,7 +26,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
26
26
|
* @generated
|
|
27
27
|
* @see https://github.com/webgptorg/promptbook
|
|
28
28
|
*/
|
|
29
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-
|
|
29
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-16';
|
|
30
30
|
/**
|
|
31
31
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
32
32
|
* Note: [๐] Ignore a discrepancy between file name and entity name
|
|
@@ -89,6 +89,7 @@ const ADMIN_EMAIL = 'pavol@ptbk.io';
|
|
|
89
89
|
* @public exported from `@promptbook/core`
|
|
90
90
|
*/
|
|
91
91
|
const ADMIN_GITHUB_NAME = 'hejny';
|
|
92
|
+
// <- TODO: [๐] Pick the best claim
|
|
92
93
|
/**
|
|
93
94
|
* When the title is not provided, the default title is used
|
|
94
95
|
*
|
|
@@ -161,7 +162,7 @@ const DEFAULT_MAX_PARALLEL_COUNT = 5; // <- TODO: [๐คนโโ๏ธ]
|
|
|
161
162
|
*/
|
|
162
163
|
const DEFAULT_MAX_EXECUTION_ATTEMPTS = 10; // <- TODO: [๐คนโโ๏ธ]
|
|
163
164
|
// <- TODO: [๐] Make also `BOOKS_DIRNAME_ALTERNATIVES`
|
|
164
|
-
// TODO:
|
|
165
|
+
// TODO: Just `.promptbook` in config, hardcode subfolders like `download-cache` or `execution-cache`
|
|
165
166
|
/**
|
|
166
167
|
* Where to store the temporary downloads
|
|
167
168
|
*
|
|
@@ -888,44 +889,42 @@ class WrappedError extends Error {
|
|
|
888
889
|
constructor(whatWasThrown) {
|
|
889
890
|
const tag = `[๐คฎ]`;
|
|
890
891
|
console.error(tag, whatWasThrown);
|
|
891
|
-
super(spaceTrim$1(
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
Note: Look for ${tag} in the console for more details
|
|
895
|
-
!!! Note: \`WrappedError\` indicates that somewhere in the code non-Error object was thrown and it was wrapped
|
|
892
|
+
super(spaceTrim$1(`
|
|
893
|
+
Non-Error object was thrown
|
|
896
894
|
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
895
|
+
Note: Look for ${tag} in the console for more details
|
|
896
|
+
Please report issue on ${ADMIN_EMAIL}
|
|
897
|
+
`));
|
|
900
898
|
this.name = 'WrappedError';
|
|
901
899
|
Object.setPrototypeOf(this, WrappedError.prototype);
|
|
902
900
|
}
|
|
903
901
|
}
|
|
904
902
|
|
|
905
903
|
/**
|
|
906
|
-
*
|
|
904
|
+
* Helper used in catch blocks to assert that the error is an instance of `Error`
|
|
907
905
|
*
|
|
908
|
-
* @param whatWasThrown
|
|
909
|
-
* @returns
|
|
906
|
+
* @param whatWasThrown Any object that was thrown
|
|
907
|
+
* @returns Nothing if the error is an instance of `Error`
|
|
908
|
+
* @throws `WrappedError` or `UnexpectedError` if the error is not standard
|
|
910
909
|
*
|
|
911
910
|
* @private within the repository
|
|
912
911
|
*/
|
|
913
912
|
function assertsError(whatWasThrown) {
|
|
914
|
-
// Case 1:
|
|
913
|
+
// Case 1: Handle error which was rethrown as `WrappedError`
|
|
915
914
|
if (whatWasThrown instanceof WrappedError) {
|
|
916
915
|
const wrappedError = whatWasThrown;
|
|
917
916
|
throw wrappedError;
|
|
918
917
|
}
|
|
919
|
-
// Case 2:
|
|
918
|
+
// Case 2: Handle unexpected errors
|
|
920
919
|
if (whatWasThrown instanceof UnexpectedError) {
|
|
921
920
|
const unexpectedError = whatWasThrown;
|
|
922
921
|
throw unexpectedError;
|
|
923
922
|
}
|
|
924
|
-
// Case 3:
|
|
923
|
+
// Case 3: Handle standard errors - keep them up to consumer
|
|
925
924
|
if (whatWasThrown instanceof Error) {
|
|
926
925
|
return;
|
|
927
926
|
}
|
|
928
|
-
// Case 4:
|
|
927
|
+
// Case 4: Handle non-standard errors - wrap them into `WrappedError` and throw
|
|
929
928
|
throw new WrappedError(whatWasThrown);
|
|
930
929
|
}
|
|
931
930
|
|
|
@@ -2082,7 +2081,7 @@ class PipelineExecutionError extends Error {
|
|
|
2082
2081
|
}
|
|
2083
2082
|
}
|
|
2084
2083
|
/**
|
|
2085
|
-
* TODO:
|
|
2084
|
+
* TODO: [๐ง ][๐] Add id to all errors
|
|
2086
2085
|
*/
|
|
2087
2086
|
|
|
2088
2087
|
/**
|
|
@@ -2435,8 +2434,8 @@ function createTask(options) {
|
|
|
2435
2434
|
updatedAt = new Date();
|
|
2436
2435
|
errors.push(...executionResult.errors);
|
|
2437
2436
|
warnings.push(...executionResult.warnings);
|
|
2438
|
-
// <- TODO:
|
|
2439
|
-
// TODO: [๐ง ]
|
|
2437
|
+
// <- TODO: [๐] Only unique errors and warnings should be added (or filtered)
|
|
2438
|
+
// TODO: [๐ง ] !! errors, warning, isSuccessful are redundant both in `ExecutionTask` and `ExecutionTask.currentValue`
|
|
2440
2439
|
// Also maybe move `ExecutionTask.currentValue.usage` -> `ExecutionTask.usage`
|
|
2441
2440
|
// And delete `ExecutionTask.currentValue.preparedPipeline`
|
|
2442
2441
|
assertsTaskSuccessful(executionResult);
|