@promptbook/core 0.89.0-6 → 0.89.0-8
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 +45 -12
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +8 -4
- package/esm/typings/src/_packages/remote-client.index.d.ts +0 -2
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/cli/common/$addGlobalOptionsToCommand.d.ts +7 -0
- package/esm/typings/src/cli/common/$provideLlmToolsForCli.d.ts +15 -0
- package/esm/typings/src/config.d.ts +15 -8
- package/esm/typings/src/errors/0-index.d.ts +3 -0
- package/esm/typings/src/errors/AuthenticationError.d.ts +9 -0
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizzardOrCli.d.ts +34 -1
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/register-configuration.d.ts +1 -1
- package/esm/typings/src/remote-server/types/RemoteClientOptions.d.ts +2 -10
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +60 -3
- package/package.json +1 -1
- package/umd/index.umd.js +48 -13
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-
|
|
30
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-8';
|
|
31
31
|
/**
|
|
32
32
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
33
33
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -572,6 +572,7 @@ const DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200;
|
|
|
572
572
|
*/
|
|
573
573
|
const DEFAULT_BOOKS_DIRNAME = './books';
|
|
574
574
|
// <- TODO: [🕝] Make also `BOOKS_DIRNAME_ALTERNATIVES`
|
|
575
|
+
// TODO: !!!!!! Just .promptbook dir, hardocode others
|
|
575
576
|
/**
|
|
576
577
|
* Where to store the temporary downloads
|
|
577
578
|
*
|
|
@@ -596,6 +597,27 @@ const DEFAULT_EXECUTION_CACHE_DIRNAME = './.promptbook/execution-cache';
|
|
|
596
597
|
* @public exported from `@promptbook/core`
|
|
597
598
|
*/
|
|
598
599
|
const DEFAULT_SCRAPE_CACHE_DIRNAME = './.promptbook/scrape-cache';
|
|
600
|
+
/**
|
|
601
|
+
* Id of application for the CLI when using remote server
|
|
602
|
+
*
|
|
603
|
+
* @public exported from `@promptbook/core`
|
|
604
|
+
*/
|
|
605
|
+
const CLI_APP_ID = 'cli';
|
|
606
|
+
/**
|
|
607
|
+
* Id of application for the playground
|
|
608
|
+
*
|
|
609
|
+
* @public exported from `@promptbook/core`
|
|
610
|
+
*/
|
|
611
|
+
const PLAYGROUND_APP_ID = 'playground';
|
|
612
|
+
/*
|
|
613
|
+
TODO: [🌃]
|
|
614
|
+
/**
|
|
615
|
+
* Id of application for the wizzard when using remote server
|
|
616
|
+
*
|
|
617
|
+
* @public exported from `@promptbook/core`
|
|
618
|
+
* /
|
|
619
|
+
ex-port const WIZZARD_APP_ID: string_app_id = 'wizzard';
|
|
620
|
+
*/
|
|
599
621
|
/**
|
|
600
622
|
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
|
|
601
623
|
*
|
|
@@ -616,13 +638,7 @@ const MOMENT_ARG_THRESHOLDS = {
|
|
|
616
638
|
*
|
|
617
639
|
* @public exported from `@promptbook/core`
|
|
618
640
|
*/
|
|
619
|
-
const
|
|
620
|
-
/**
|
|
621
|
-
* @@@
|
|
622
|
-
*
|
|
623
|
-
* @public exported from `@promptbook/core`
|
|
624
|
-
*/
|
|
625
|
-
const DEFAULT_REMOTE_URL_PATH = '/promptbook/socket.io';
|
|
641
|
+
const DEFAULT_REMOTE_SERVER_URL = 'https://api.pavolhejny.com/promptbook';
|
|
626
642
|
// <- TODO: [🧜♂️]
|
|
627
643
|
/**
|
|
628
644
|
* @@@
|
|
@@ -674,7 +690,7 @@ const IS_PIPELINE_LOGIC_VALIDATED = just(
|
|
|
674
690
|
true);
|
|
675
691
|
/**
|
|
676
692
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
677
|
-
* TODO: [🧠][🧜♂️] Maybe join
|
|
693
|
+
* TODO: [🧠][🧜♂️] Maybe join remoteServerUrl and path into single value
|
|
678
694
|
*/
|
|
679
695
|
|
|
680
696
|
/**
|
|
@@ -1893,6 +1909,19 @@ class CsvFormatError extends AbstractFormatError {
|
|
|
1893
1909
|
}
|
|
1894
1910
|
}
|
|
1895
1911
|
|
|
1912
|
+
/**
|
|
1913
|
+
* AuthenticationError is thrown from login function which is dependency of remote server
|
|
1914
|
+
*
|
|
1915
|
+
* @public exported from `@promptbook/core`
|
|
1916
|
+
*/
|
|
1917
|
+
class AuthenticationError extends Error {
|
|
1918
|
+
constructor(message) {
|
|
1919
|
+
super(message);
|
|
1920
|
+
this.name = 'AuthenticationError';
|
|
1921
|
+
Object.setPrototypeOf(this, AuthenticationError.prototype);
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1896
1925
|
/**
|
|
1897
1926
|
* This error indicates that the pipeline collection cannot be propperly loaded
|
|
1898
1927
|
*
|
|
@@ -2021,6 +2050,7 @@ const COMMON_JAVASCRIPT_ERRORS = {
|
|
|
2021
2050
|
TypeError,
|
|
2022
2051
|
URIError,
|
|
2023
2052
|
AggregateError,
|
|
2053
|
+
AuthenticationError,
|
|
2024
2054
|
/*
|
|
2025
2055
|
Note: Not widely supported
|
|
2026
2056
|
> InternalError,
|
|
@@ -2220,6 +2250,10 @@ function serializeError(error) {
|
|
|
2220
2250
|
|
|
2221
2251
|
Cannot serialize error with name "${name}"
|
|
2222
2252
|
|
|
2253
|
+
Authors of Promptbook probably forgot to add this error into the list of errors:
|
|
2254
|
+
https://github.com/webgptorg/promptbook/blob/main/src/errors/0-index.ts
|
|
2255
|
+
|
|
2256
|
+
|
|
2223
2257
|
${block(stack || message)}
|
|
2224
2258
|
|
|
2225
2259
|
`));
|
|
@@ -10167,8 +10201,7 @@ const _AnthropicClaudeMetadataRegistration = $llmToolsMetadataRegister.register(
|
|
|
10167
10201
|
options: {
|
|
10168
10202
|
apiKey: 'sk-ant-api03-',
|
|
10169
10203
|
isProxied: true,
|
|
10170
|
-
|
|
10171
|
-
path: DEFAULT_REMOTE_URL_PATH,
|
|
10204
|
+
remoteServerUrl: DEFAULT_REMOTE_SERVER_URL,
|
|
10172
10205
|
},
|
|
10173
10206
|
};
|
|
10174
10207
|
},
|
|
@@ -10863,5 +10896,5 @@ class PrefixStorage {
|
|
|
10863
10896
|
}
|
|
10864
10897
|
}
|
|
10865
10898
|
|
|
10866
|
-
export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, AbstractFormatError, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateError, BoilerplateFormfactorDefinition, CLAIM, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CsvFormatDefinition, CsvFormatError, DEFAULT_BOOKS_DIRNAME, DEFAULT_BOOK_OUTPUT_PARAMETER_NAME, DEFAULT_BOOK_TITLE, DEFAULT_CSV_SETTINGS, DEFAULT_DOWNLOAD_CACHE_DIRNAME, DEFAULT_EXECUTION_CACHE_DIRNAME, DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_PROMPT_TASK_TITLE,
|
|
10899
|
+
export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, AbstractFormatError, AuthenticationError, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateError, BoilerplateFormfactorDefinition, CLAIM, CLI_APP_ID, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CsvFormatDefinition, CsvFormatError, DEFAULT_BOOKS_DIRNAME, DEFAULT_BOOK_OUTPUT_PARAMETER_NAME, DEFAULT_BOOK_TITLE, DEFAULT_CSV_SETTINGS, DEFAULT_DOWNLOAD_CACHE_DIRNAME, DEFAULT_EXECUTION_CACHE_DIRNAME, DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_PROMPT_TASK_TITLE, DEFAULT_REMOTE_SERVER_URL, DEFAULT_SCRAPE_CACHE_DIRNAME, DEFAULT_TASK_TITLE, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, ImageGeneratorFormfactorDefinition, KnowledgeScrapeError, LOGO_DARK_SRC, LOGO_LIGHT_SRC, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NAME, NonTaskSectionTypes, NotFoundError, NotYetImplementedError, ORDER_OF_PIPELINE_JSON, PLAYGROUND_APP_ID, PROMPTBOOK_ENGINE_VERSION, PROMPTBOOK_ERRORS, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, RESERVED_PARAMETER_NAMES, SET_IS_VERBOSE, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatDefinition, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UNCERTAIN_ZERO_VALUE, UnexpectedError, ZERO_USAGE, ZERO_VALUE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _BoilerplateScraperMetadataRegistration, _DeepseekMetadataRegistration, _DocumentScraperMetadataRegistration, _GoogleMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _MarkitdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, book, cacheLlmTools, collectionToJson, compilePipeline, countUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, extractParameterNamesFromTask, getPipelineInterface, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, isValidPipelineString, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, parsePipeline, pipelineJsonToString, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline, validatePipelineString };
|
|
10867
10900
|
//# sourceMappingURL=index.es.js.map
|