@promptbook/remote-client 0.92.0-24 → 0.92.0-26
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 +31 -27
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +0 -2
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
- package/esm/typings/src/constants.d.ts +8 -2
- package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
- package/esm/typings/src/execution/CommonToolsOptions.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +5 -5
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +5 -3
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
- package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
- package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +9 -6
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
- package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
- package/esm/typings/src/prepare/prepareTasks.d.ts +7 -4
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +2 -1
- package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
- package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
- package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
- package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
- package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
- package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
- package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
- package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
- package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
- package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
- package/esm/typings/src/types/ModelVariant.d.ts +5 -5
- package/esm/typings/src/types/typeAliases.d.ts +8 -6
- package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
- package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
- package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
- package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
- package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
- package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
- package/esm/typings/src/version.d.ts +2 -1
- package/package.json +2 -2
- package/umd/index.umd.js +31 -27
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -20,7 +20,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
20
20
|
* @generated
|
|
21
21
|
* @see https://github.com/webgptorg/promptbook
|
|
22
22
|
*/
|
|
23
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
23
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-26';
|
|
24
24
|
/**
|
|
25
25
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
26
26
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -993,10 +993,10 @@ for (let i = 0; i < defaultDiacriticsRemovalMap.length; i++) {
|
|
|
993
993
|
*/
|
|
994
994
|
|
|
995
995
|
/**
|
|
996
|
-
*
|
|
996
|
+
* Removes diacritic marks (accents) from characters in a string.
|
|
997
997
|
*
|
|
998
|
-
* @param input
|
|
999
|
-
* @returns
|
|
998
|
+
* @param input The string containing diacritics to be normalized.
|
|
999
|
+
* @returns The string with diacritics removed or normalized.
|
|
1000
1000
|
* @public exported from `@promptbook/utils`
|
|
1001
1001
|
*/
|
|
1002
1002
|
function removeDiacritics(input) {
|
|
@@ -1010,10 +1010,10 @@ function removeDiacritics(input) {
|
|
|
1010
1010
|
*/
|
|
1011
1011
|
|
|
1012
1012
|
/**
|
|
1013
|
-
*
|
|
1013
|
+
* Converts a given text to kebab-case format.
|
|
1014
1014
|
*
|
|
1015
|
-
* @param text
|
|
1016
|
-
* @returns
|
|
1015
|
+
* @param text The text to be converted.
|
|
1016
|
+
* @returns The kebab-case formatted string.
|
|
1017
1017
|
* @example 'hello-world'
|
|
1018
1018
|
* @example 'i-love-promptbook'
|
|
1019
1019
|
* @public exported from `@promptbook/utils`
|
|
@@ -2144,10 +2144,10 @@ const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser,
|
|
|
2144
2144
|
*/
|
|
2145
2145
|
|
|
2146
2146
|
/**
|
|
2147
|
-
*
|
|
2147
|
+
* Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
|
|
2148
2148
|
*
|
|
2149
|
-
* @param text
|
|
2150
|
-
* @returns
|
|
2149
|
+
* @param text The text string to be converted to SCREAMING_CASE format.
|
|
2150
|
+
* @returns The normalized text in SCREAMING_CASE format.
|
|
2151
2151
|
* @example 'HELLO_WORLD'
|
|
2152
2152
|
* @example 'I_LOVE_PROMPTBOOK'
|
|
2153
2153
|
* @public exported from `@promptbook/utils`
|
|
@@ -2484,11 +2484,11 @@ const RESERVED_PARAMETER_NAMES = exportJson({
|
|
|
2484
2484
|
*/
|
|
2485
2485
|
|
|
2486
2486
|
/**
|
|
2487
|
-
*
|
|
2487
|
+
* Normalizes a given text to camelCase format.
|
|
2488
2488
|
*
|
|
2489
|
-
* @param text
|
|
2490
|
-
* @param _isFirstLetterCapital
|
|
2491
|
-
* @returns
|
|
2489
|
+
* @param text The text to be normalized.
|
|
2490
|
+
* @param _isFirstLetterCapital Whether the first letter should be capitalized.
|
|
2491
|
+
* @returns The camelCase formatted string.
|
|
2492
2492
|
* @example 'helloWorld'
|
|
2493
2493
|
* @example 'iLovePromptbook'
|
|
2494
2494
|
* @public exported from `@promptbook/utils`
|
|
@@ -2992,7 +2992,7 @@ const GeneratorFormfactorDefinition = {
|
|
|
2992
2992
|
};
|
|
2993
2993
|
|
|
2994
2994
|
/**
|
|
2995
|
-
*
|
|
2995
|
+
* Pipeline interface which is equivalent to `any`
|
|
2996
2996
|
*
|
|
2997
2997
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
2998
2998
|
*
|
|
@@ -3322,8 +3322,7 @@ const jokerCommandParser = {
|
|
|
3322
3322
|
};
|
|
3323
3323
|
|
|
3324
3324
|
/**
|
|
3325
|
-
*
|
|
3326
|
-
*
|
|
3325
|
+
* @see {@link ModelVariant}
|
|
3327
3326
|
* @public exported from `@promptbook/core`
|
|
3328
3327
|
*/
|
|
3329
3328
|
const MODEL_VARIANTS = ['COMPLETION', 'CHAT', 'EMBEDDING' /* <- TODO [🏳] */ /* <- [🤖] */];
|
|
@@ -4328,7 +4327,7 @@ function parseCommandVariant(input) {
|
|
|
4328
4327
|
}
|
|
4329
4328
|
|
|
4330
4329
|
/**
|
|
4331
|
-
*
|
|
4330
|
+
* Extracts the interface (input and output parameters) from a pipeline.
|
|
4332
4331
|
*
|
|
4333
4332
|
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
4334
4333
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
@@ -4361,7 +4360,7 @@ function getPipelineInterface(pipeline) {
|
|
|
4361
4360
|
}
|
|
4362
4361
|
|
|
4363
4362
|
/**
|
|
4364
|
-
*
|
|
4363
|
+
* Checks if two pipeline interfaces are structurally identical.
|
|
4365
4364
|
*
|
|
4366
4365
|
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
4367
4366
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
@@ -4393,10 +4392,11 @@ function isPipelineInterfacesEqual(pipelineInterface1, pipelineInterface2) {
|
|
|
4393
4392
|
}
|
|
4394
4393
|
|
|
4395
4394
|
/**
|
|
4396
|
-
*
|
|
4395
|
+
* Checks if a given pipeline satisfies the requirements of a specified pipeline interface.
|
|
4397
4396
|
*
|
|
4398
4397
|
* @deprecated https://github.com/webgptorg/promptbook/pull/186
|
|
4399
4398
|
* @see https://github.com/webgptorg/promptbook/discussions/171
|
|
4399
|
+
* @returns `true` if the pipeline implements the interface, `false` otherwise.
|
|
4400
4400
|
*
|
|
4401
4401
|
* @public exported from `@promptbook/core`
|
|
4402
4402
|
*/
|
|
@@ -4626,7 +4626,8 @@ function removeMarkdownComments(content) {
|
|
|
4626
4626
|
}
|
|
4627
4627
|
|
|
4628
4628
|
/**
|
|
4629
|
-
*
|
|
4629
|
+
* Utility to determine if a pipeline string is in flat format.
|
|
4630
|
+
* A flat pipeline is a simple text without proper structure (headers, blocks, etc).
|
|
4630
4631
|
*
|
|
4631
4632
|
* @public exported from `@promptbook/editable`
|
|
4632
4633
|
*/
|
|
@@ -4647,7 +4648,10 @@ function isFlatPipeline(pipelineString) {
|
|
|
4647
4648
|
}
|
|
4648
4649
|
|
|
4649
4650
|
/**
|
|
4650
|
-
*
|
|
4651
|
+
* Converts a pipeline structure to its string representation.
|
|
4652
|
+
*
|
|
4653
|
+
* Transforms a flat, simple pipeline into a properly formatted pipeline string
|
|
4654
|
+
* with sections for title, prompt, and return statement.
|
|
4651
4655
|
*
|
|
4652
4656
|
* @public exported from `@promptbook/editable`
|
|
4653
4657
|
*/
|
|
@@ -4704,7 +4708,7 @@ function deflatePipeline(pipelineString) {
|
|
|
4704
4708
|
* Note: It can not work with html syntax and comments
|
|
4705
4709
|
*
|
|
4706
4710
|
* @param markdown any valid markdown
|
|
4707
|
-
* @returns
|
|
4711
|
+
* @returns An array of strings, each representing an individual list item found in the markdown
|
|
4708
4712
|
* @public exported from `@promptbook/markdown-utils`
|
|
4709
4713
|
*/
|
|
4710
4714
|
function extractAllListItemsFromMarkdown(markdown) {
|
|
@@ -4957,11 +4961,11 @@ function flattenMarkdown(markdown) {
|
|
|
4957
4961
|
*/
|
|
4958
4962
|
|
|
4959
4963
|
/**
|
|
4960
|
-
*
|
|
4964
|
+
* Converts a title string into a normalized name.
|
|
4961
4965
|
*
|
|
4962
|
-
* @param value
|
|
4963
|
-
* @returns
|
|
4964
|
-
* @example
|
|
4966
|
+
* @param value The title string to be converted to a name.
|
|
4967
|
+
* @returns A normalized name derived from the input title.
|
|
4968
|
+
* @example 'Hello World!' -> 'hello-world'
|
|
4965
4969
|
* @public exported from `@promptbook/utils`
|
|
4966
4970
|
*/
|
|
4967
4971
|
function titleToName(value) {
|