Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@promptbook/node

Package Overview
Dependencies
Maintainers
0
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@promptbook/node - npm Package Compare versions

Comparing version 0.61.0-9 to 0.61.0-10

esm/typings/src/errors/VersionMismatch.d.ts

144

esm/typings/promptbook-collection/index.d.ts

@@ -16,2 +16,3 @@ declare const _default: ({

blockType: string;
personaName: null;
modelRequirements: {

@@ -24,15 +25,60 @@ modelVariant: string;

}[];
knowledge: {
name: string;
title: string;
content: string;
keywords: string[];
index: {
modelName: string;
position: number[];
}[];
sources: {
title: string;
href: string;
}[];
knowledgeSources: never[];
knowledgePieces: never[];
personas: never[];
preparations: {
id: number;
date: string;
promptbookVersion: string;
modelUsage: {
price: {
value: number;
};
input: {
tokensCount: {
value: number;
};
charactersCount: {
value: number;
};
wordsCount: {
value: number;
};
sentencesCount: {
value: number;
};
linesCount: {
value: number;
};
paragraphsCount: {
value: number;
};
pagesCount: {
value: number;
};
};
output: {
tokensCount: {
value: number;
};
charactersCount: {
value: number;
};
wordsCount: {
value: number;
};
sentencesCount: {
value: number;
};
linesCount: {
value: number;
};
paragraphsCount: {
value: number;
};
pagesCount: {
value: number;
};
};
};
}[];

@@ -61,2 +107,3 @@ sourceFile: string;

};
personaName: null;
modelRequirements: {

@@ -69,15 +116,60 @@ modelVariant: string;

}[];
knowledge: {
name: string;
title: string;
content: string;
keywords: string[];
index: {
modelName: string;
position: number[];
}[];
sources: {
title: string;
href: string;
}[];
knowledgeSources: never[];
knowledgePieces: never[];
personas: never[];
preparations: {
id: number;
date: string;
promptbookVersion: string;
modelUsage: {
price: {
value: number;
};
input: {
tokensCount: {
value: number;
};
charactersCount: {
value: number;
};
wordsCount: {
value: number;
};
sentencesCount: {
value: number;
};
linesCount: {
value: number;
};
paragraphsCount: {
value: number;
};
pagesCount: {
value: number;
};
};
output: {
tokensCount: {
value: number;
};
charactersCount: {
value: number;
};
wordsCount: {
value: number;
};
sentencesCount: {
value: number;
};
linesCount: {
value: number;
};
paragraphsCount: {
value: number;
};
pagesCount: {
value: number;
};
};
};
}[];

@@ -84,0 +176,0 @@ sourceFile: string;

@@ -20,2 +20,3 @@ import { collectionToJson } from '../collection/collectionToJson';

import { UnexpectedError } from '../errors/UnexpectedError';
import { VersionMismatch } from '../errors/VersionMismatch';
import { ExpectError } from '../errors/_ExpectError';

@@ -33,2 +34,4 @@ import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';

import { joinLlmExecutionTools } from '../llm-providers/multiple/joinLlmExecutionTools';
import { preparePipeline } from '../prepare/preparePipeline';
import { unpreparePipeline } from '../prepare/unpreparePipeline';
import type { ExecutionReportStringOptions } from '../types/execution-report/ExecutionReportStringOptions';

@@ -44,4 +47,5 @@ import { ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';

export { pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, validatePipeline };
export { preparePipeline, unpreparePipeline };
export { createPipelineExecutor, joinLlmExecutionTools };
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
export { CollectionError, ExpectError, NotFoundError, ParsingError, PipelineExecutionError, PipelineLogicError, ReferenceError, UnexpectedError, };
export { CollectionError, ExpectError, NotFoundError, ParsingError, PipelineExecutionError, PipelineLogicError, ReferenceError, UnexpectedError, VersionMismatch, };

8

esm/typings/src/_packages/types.index.d.ts

@@ -15,6 +15,8 @@ import type { PipelineCollection } from '../collection/PipelineCollection';

import { EXPECTATION_UNITS } from '../types/PipelineJson/Expectations';
import { KnowledgeJson } from '../types/PipelineJson/KnowledgeJson';
import { KnowledgePiecePreparedJson } from '../types/PipelineJson/KnowledgePieceJson';
import { KnowledgeSourceJson, KnowledgeSourcePreparedJson } from '../types/PipelineJson/KnowledgeSourceJson';
import type { LlmTemplateJson } from '../types/PipelineJson/LlmTemplateJson';
import { MaterialKnowledgePieceJson } from '../types/PipelineJson/MaterialKnowledgePieceJson';
import { PersonaJson, PersonaPreparedJson } from '../types/PipelineJson/PersonaJson';
import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
import { PreparationJson } from '../types/PipelineJson/PreparationJson';
import type { PromptDialogJson } from '../types/PipelineJson/PromptDialogJson';

@@ -36,5 +38,5 @@ import type { PromptTemplateJson } from '../types/PipelineJson/PromptTemplateJson';

export { EXPECTATION_UNITS };
export type { AvailableModel, BlockType, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgeJson, LlmExecutionTools, LlmTemplateJson, MaterialKnowledgePieceJson, ModelRequirements, ModelVariant, Parameters, PipelineCollection, PipelineExecutor, PipelineJson, PipelineString, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_version, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid, string_semantic_version as string_version, };
export type { AvailableModel, BlockType, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgePiecePreparedJson, KnowledgeSourceJson, KnowledgeSourcePreparedJson, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, PersonaJson, PersonaPreparedJson, PipelineCollection, PipelineExecutor, PipelineJson, PipelineString, PreparationJson, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_version, string_script, string_semantic_version, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid, };
/**
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
*/

@@ -57,3 +57,3 @@ import { spaceTrim } from 'spacetrim';

export { extractBlock, // <- [🌻] + maybe export through `@promptbook/markdown-utils`
extractParameters, extractVariables, isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl as isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻]
extractParameters, extractVariables, isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻]
removeEmojis, removeQuotes, replaceParameters, spaceTrim, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };

@@ -60,0 +60,0 @@ export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords };

@@ -32,3 +32,3 @@ import type { PipelineStringToJsonOptions } from '../../conversion/pipelineStringToJson';

*/
isCrashOnError?: boolean;
isCrashedOnError?: boolean;
};

@@ -35,0 +35,0 @@ /**

@@ -12,3 +12,3 @@ import type { string_url } from '../../types/typeAliases';

*/
isVerbose?: boolean;
readonly isVerbose?: boolean;
/**

@@ -19,3 +19,3 @@ * If true, directory will be scanned only when needed not during the construction

*/
isLazyLoaded?: boolean;
readonly isLazyLoaded?: boolean;
};

@@ -22,0 +22,0 @@ /**

@@ -7,2 +7,2 @@ /**

* TODO: !!! Remove this file
*/
*/

@@ -8,9 +8,9 @@ import type { string_markdown_text } from '../../../types/typeAliases';

}> = {
name: string_name & string_SCREAMING_CASE;
aliasNames?: Array<string_name & string_SCREAMING_CASE>;
deprecatedNames?: Array<string_name & string_SCREAMING_CASE>;
usagePlaces: Array<CommandUsagePlace>;
description: string_markdown_text;
discussionUrl: `https://github.com/webgptorg/promptbook/discussions/${number | '@@'}`;
examples: Array<string_markdown_text>;
readonly name: string_name & string_SCREAMING_CASE;
readonly aliasNames?: Array<string_name & string_SCREAMING_CASE>;
readonly deprecatedNames?: Array<string_name & string_SCREAMING_CASE>;
readonly usagePlaces: Array<CommandUsagePlace>;
readonly description: string_markdown_text;
readonly discussionUrl: `https://github.com/webgptorg/promptbook/discussions/${number | '@@'}`;
readonly examples: Array<string_markdown_text>;
/**

@@ -22,7 +22,7 @@ * @throws {ParsingError} if the parsing fails

export type CommandParserInput = {
usagePlace: CommandUsagePlace;
raw: string_markdown_text;
rawArgs: string_markdown_text;
normalized: string_name & string_SCREAMING_CASE;
args: Array<string_name & string_SCREAMING_CASE>;
readonly usagePlace: CommandUsagePlace;
readonly raw: string_markdown_text;
readonly rawArgs: string_markdown_text;
readonly normalized: string_name & string_SCREAMING_CASE;
readonly args: Array<string_name & string_SCREAMING_CASE>;
};

@@ -29,0 +29,0 @@ /**

import type { ModelRequirements } from '../../types/ModelRequirements';
import type { TODO } from '../../types/typeAliases';
import type { TODO } from '../../utils/organization/TODO';
/**

@@ -4,0 +4,0 @@ * Parsed MODEL command

@@ -0,1 +1,3 @@

import type { string_name } from '../../types/typeAliases';
import type { string_persona_description } from '../../types/typeAliases';
/**

@@ -9,4 +11,4 @@ * Parsed PERSONA command

readonly type: 'PERSONA';
personaName: string;
personaDescription: string | null;
readonly personaName: string_name;
readonly personaDescription: string_persona_description | null;
};

@@ -10,2 +10,6 @@ /**

/**
* The maximum number of (LLM) tasks running in parallel
*/
export declare const MAX_PARALLEL_COUNT = 5;
/**
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`

@@ -12,0 +16,0 @@ */

@@ -5,16 +5,19 @@ import type { LlmExecutionTools } from '../execution/LlmExecutionTools';

/**
* Options for pipelineStringToJson
* Options for `pipelineStringToJson`
*/
export type PipelineStringToJsonOptions = {
/**
* Tools for processing required for knowledge processing *(not for actual execution)*
* Tools for processing required for preparation of knowledge *(not for actual execution)*
*
* Note: If you provide `null`, the knowledge will not be prepared
*/
llmTools?: LlmExecutionTools;
readonly llmTools: LlmExecutionTools | null;
};
/**
* Compile promptbook from string (markdown) format to JSON format
* Compile pipeline from string (markdown) format to JSON format
*
* Note: There are two similar functions:
* Note: There are 3 similar functions:
* - `pipelineStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
* - `pipelineStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
* - `preparePipeline` - just one step in the compilation process
*

@@ -21,0 +24,0 @@ * @param pipelineString {Promptbook} in string markdown format (.ptbk.md)

import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
import type { PipelineString } from '../types/PipelineString';
/**
* Compile promptbook from string (markdown) format to JSON format synchronously
* Compile pipeline from string (markdown) format to JSON format synchronously
*
* Note: There are two similar functions:
* Note: There are 3 similar functions:
* - `pipelineStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
* - `pipelineStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
* - `preparePipeline` - just one step in the compilation process
*
* @param pipelineString {Promptbook} in string markdown format (.ptbk.md)
* @param options - Options and tools for the compilation
* @returns {Promptbook} compiled in JSON format (.ptbk.json)

@@ -13,0 +13,0 @@ * @throws {ParsingError} if the promptbook string is not valid

@@ -8,7 +8,7 @@ /**

*/
isGraphAdded?: boolean;
readonly isGraphAdded?: boolean;
/**
* If true, the string is prettifyed as markdown
*/
isPrettifyed?: boolean;
readonly isPrettifyed?: boolean;
};

@@ -8,11 +8,11 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';

*/
pipeline: PipelineJson;
readonly pipeline: PipelineJson;
/**
* Original parameter name that should be replaced
*/
oldParameterName: string_name;
readonly oldParameterName: string_name;
/**
* New parameter name that should replace the original parameter name
*/
newParameterName: string_name;
readonly newParameterName: string_name;
};

@@ -19,0 +19,0 @@ /**

@@ -12,3 +12,3 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';

*/
export declare function importPipeline(path: `${string}.ptbk.md`): PipelineString;
export declare function importPipeline(path: `${string}.ptbk.json`): PipelineJson;
export declare function importPipelineWithoutPreparation(path: `${string}.ptbk.md`): PipelineString;
export declare function importPipelineWithoutPreparation(path: `${string}.ptbk.json`): PipelineJson;

@@ -13,3 +13,3 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';

/**
* Options for creating a pipeline executor
* Options for `createPipelineExecutor`
*/

@@ -39,2 +39,3 @@ interface CreatePipelineExecutorOptions {

/**
* TODO: [🪂] Pass maxParallelCount here
* TODO: [🧠] When not meet expectations in PROMPT_DIALOG, make some way to tell the user

@@ -41,0 +42,0 @@ * TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json

@@ -19,15 +19,15 @@ import type { Promisable } from 'type-fest';

*/
isSuccessful: boolean;
readonly isSuccessful: boolean;
/**
* Added usage of whole execution, detailed usage is aviable in `executionReport`
*/
usage: PromptResultUsage;
readonly usage: PromptResultUsage;
/**
* Errors that occured during the execution, details are aviable in `executionReport`
*/
errors: Array<Error>;
readonly errors: Array<Error>;
/**
* The report of the execution with all details
*/
executionReport: ExecutionReportJson;
readonly executionReport: ExecutionReportJson;
/**

@@ -38,3 +38,3 @@ * Result parameters of the execution

*/
outputParameters: Record<string_name, string>;
readonly outputParameters: Record<string_name, string>;
}>;

@@ -41,0 +41,0 @@ };

@@ -50,11 +50,11 @@ import type { KebabCase } from 'type-fest';

*/
start: string_date_iso8601;
readonly start: string_date_iso8601;
/**
* First token generated
*/
firstToken?: string_date_iso8601;
readonly firstToken?: string_date_iso8601;
/**
* End of the execution
*/
complete: string_date_iso8601;
readonly complete: string_date_iso8601;
};

@@ -103,7 +103,7 @@ /**

*/
value: number_usd & (number_positive | 0);
readonly value: number_usd & (number_positive | 0);
/**
* Is the value uncertain
*/
isUncertain?: true;
readonly isUncertain?: true;
};

@@ -110,0 +110,0 @@ /**

@@ -19,3 +19,3 @@ import type { ScriptLanguage } from '../types/ScriptLanguage';

*/
scriptLanguage: ScriptLanguage;
readonly scriptLanguage: ScriptLanguage;
/**

@@ -26,3 +26,3 @@ * Parameters for the script

*/
parameters: Record<string_name, string>;
readonly parameters: Record<string_name, string>;
/**

@@ -36,3 +36,3 @@ * The content of the script to execute

*/
script: string_script;
readonly script: string_script;
};

@@ -39,0 +39,0 @@ /**

export type TranslatorOptions = {
from?: string;
to: string;
readonly from?: string;
readonly to: string;
};

@@ -24,3 +24,3 @@ import type { number_integer } from '../types/typeAliases';

*/
promptTitle: string;
readonly promptTitle: string;
/**

@@ -32,11 +32,11 @@ * Prompt message

*/
promptMessage: string;
readonly promptMessage: string;
/**
* Default value for the input/textarea
*/
defaultValue: string | null;
readonly defaultValue: string | null;
/**
* Placeholder for the input/textarea
*/
placeholder?: string;
readonly placeholder?: string;
/**

@@ -47,3 +47,3 @@ * Priority of the prompt

*/
priority: number_integer & number_positive;
readonly priority: number_integer & number_positive;
};

@@ -8,3 +8,3 @@ import type { Promisable } from 'type-fest';

*/
inParallelCount?: number;
readonly maxParallelCount?: number;
};

@@ -11,0 +11,0 @@ /**

@@ -11,2 +11,2 @@ import type { FormatDefinition } from '../_common/FormatDefinition';

* TODO: [🍓] In `CsvFormatDefinition` implement `extractValues`
*/
*/

@@ -15,2 +15,2 @@ import type { FormatDefinition } from '../_common/FormatDefinition';

* TODO: [🍓] In `JsonFormatDefinition` implement `extractValues`
*/
*/

@@ -13,2 +13,2 @@ import type { FormatDefinition } from '../_common/FormatDefinition';

* TODO: [🍓] In `ListFormatDefinition` implement `extractValues`
*/
*/

@@ -5,3 +5,3 @@ import type { Promisable } from 'type-fest';

/**
* Options for CallbackInterfaceTools
* Options for `CallbackInterfaceTools`
*/

@@ -8,0 +8,0 @@ export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & {

@@ -1,26 +0,11 @@

import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
import type { KnowledgeJson } from '../../../types/PipelineJson/KnowledgeJson';
import type { PrepareOptions } from '../../../prepare/PrepareOptions';
import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/KnowledgePieceJson';
import type { string_markdown } from '../../../types/typeAliases';
type PrepareKnowledgeFromMarkdownOptions = {
/**
* The source of the knowledge in markdown format
*/
content: string_markdown;
/**
* The LLM tools to use for the conversion and extraction of knowledge
*
* Note: If you want to use multiple LLMs, you can use `joinLlmExecutionTools` to join them first
*/
llmTools: LlmExecutionTools;
/**
* If true, the preaparation of knowledge logs additional information
*
* @default false
*/
isVerbose?: boolean;
};
export declare function prepareKnowledgeFromMarkdown(options: PrepareKnowledgeFromMarkdownOptions): Promise<KnowledgeJson>;
export {};
/**
* 11:11
* @@@
*/
export declare function prepareKnowledgeFromMarkdown(content: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
/**
* TODO: [🪂] Do it in parallel 11:11
* Note: No need to aggregate usage here, it is done by intercepting the llmTools
*/

@@ -1,19 +0,12 @@

import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
import type { KnowledgeJson } from '../../../types/PipelineJson/KnowledgeJson';
import type { PrepareOptions } from '../../../prepare/PrepareOptions';
import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/KnowledgePieceJson';
import type { string_base64 } from '../../../types/typeAliases';
type PrepareKnowledgeFromPdfOptions = {
/**
* The source of the knowledge in PDF format
*/
content: string_base64;
/**
* The LLM tools to use for the conversion and extraction of knowledge
*/
llmTools: LlmExecutionTools;
};
export declare function prepareKnowledgeFromPdf(options: PrepareKnowledgeFromPdfOptions): Promise<KnowledgeJson>;
export {};
/**
* @@@
*/
export declare function prepareKnowledgeFromPdf(content: string_base64, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
/**
* TODO: [🧺] In future, content can be alse File or Blob BUT for now for wider compatibility its only base64
* @see https://stackoverflow.com/questions/14653349/node-js-cant-create-blobs
* TODO: [🪂] Do it in parallel
*/

@@ -12,4 +12,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools';

pricing?: {
prompt: number_usd;
output: number_usd;
readonly prompt: number_usd;
readonly output: number_usd;
};

@@ -16,0 +16,0 @@ }>;

import type { ClientOptions } from '@anthropic-ai/sdk';
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
/**
* Options for AnthropicClaudeExecutionTools
* Options for `AnthropicClaudeExecutionTools`
*

@@ -6,0 +6,0 @@ * This extends Anthropic's `ClientOptions` with are directly passed to the Anthropic client.

@@ -5,3 +5,3 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';

/**
* Options for AzureOpenAiExecutionTools
* Options for `AzureOpenAiExecutionTools`
*

@@ -16,3 +16,3 @@ * @see https://oai.azure.com/portal/

*/
resourceName: string_name;
readonly resourceName: string_name;
/**

@@ -25,7 +25,7 @@ * The deployment name

*/
deploymentName: string_name;
readonly deploymentName: string_name;
/**
* The API key of the Azure OpenAI resource
*/
apiKey: string_token;
readonly apiKey: string_token;
/**

@@ -37,3 +37,3 @@ * A unique identifier representing your end-user, which can help Azure OpenAI to monitor

*/
user?: string_token;
readonly user?: string_token;
};

@@ -13,4 +13,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools';

pricing?: {
prompt: number_usd;
output: number_usd;
readonly prompt: number_usd;
readonly output: number_usd;
};

@@ -17,0 +17,0 @@ }>;

@@ -5,3 +5,3 @@ import type { ClientOptions } from 'openai';

/**
* Options for OpenAiExecutionTools
* Options for `OpenAiExecutionTools`
*

@@ -8,0 +8,0 @@ * This extends OpenAI's `ClientOptions` with are directly passed to the OpenAI client.

@@ -5,3 +5,3 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';

/**
* Options for RemoteLlmExecutionTools
* Options for `RemoteLlmExecutionTools`
*/

@@ -8,0 +8,0 @@ export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & {

@@ -5,3 +5,3 @@ import type { Promisable } from 'type-fest';

/**
* Options for javascript execution
* Options for `JavascriptExecutionTools`
*/

@@ -8,0 +8,0 @@ export type JavascriptExecutionToolsOptions = CommonExecutionToolsOptions & {

@@ -1,2 +0,2 @@

import type { really_any } from '../../../types/typeAliases';
import type { really_any } from '../../../utils/organization/really_any';
/**

@@ -3,0 +3,0 @@ * Does nothing, but preserves the function in the bundle

@@ -44,7 +44,7 @@ import type { PromptResult } from '../../execution/PromptResult';

*/
prompt: Omit<Prompt, 'pipelineUrl' | 'parameters'>;
readonly prompt: Omit<Prompt, 'pipelineUrl' | 'parameters'>;
/**
* Result of the prompt execution (if not failed during LLM execution)
*/
result?: PromptResult;
readonly result?: PromptResult;
/**

@@ -55,6 +55,6 @@ * The error which occured during LLM execution or during postprocessing or expectation checking

*/
error?: {
message: string;
readonly error?: {
readonly message: string;
};
}>;
};
import type { number_percent } from '../typeAliases';
/**
* Options for generating an execution report string
* Options for `executionReportJsonToString`
*/

@@ -9,7 +9,7 @@ export type ExecutionReportStringOptions = {

*/
taxRate: number_percent;
readonly taxRate: number_percent;
/**
* The width of the charts in the report
*/
chartsWidth: number;
readonly chartsWidth: number;
};

@@ -16,0 +16,0 @@ /**

@@ -40,5 +40,6 @@ import type { string_model_name } from './typeAliases';

/**
* TODO: !!!!! Add and use systemMessage, temprerature, top_k, top_p, presencePenalty, frequencyPenalty, bestOf, n, logitBias, logitBiasType, stop, ... to ModelRequirements
* TODO: Maybe figure out better word than "variant"
* TODO: Add here more requirement options like max context size, max tokens, etc.
* TODO: [👙][🧠] Just selecting gpt3 or gpt4 level of model
* TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
*/

@@ -13,3 +13,4 @@ /**

/**
* TODO: !!!!! Implement samples into parameters
* TODO: Constrain type to Simple key-value object, only string keys and string values and no index signature + only camelCase keys and spaceTrimmed values
*/

@@ -9,9 +9,11 @@ import type { number_integer } from '../typeAliases';

* Note: Expectations are performed after all postprocessing steps
* @see https://github.com/webgptorg/promptbook/discussions/30
*/
export type Expectations = Partial<Record<Lowercase<ExpectationUnit>, {
min?: ExpectationAmount;
max?: ExpectationAmount;
readonly min?: ExpectationAmount;
readonly max?: ExpectationAmount;
}>>;
/**
* Units of text measurement
* @see https://github.com/webgptorg/promptbook/discussions/30
*/

@@ -21,2 +23,3 @@ export declare const EXPECTATION_UNITS: readonly ["CHARACTERS", "WORDS", "SENTENCES", "LINES", "PARAGRAPHS", "PAGES"];

* Unit of text measurement
* @see https://github.com/webgptorg/promptbook/discussions/30
*/

@@ -26,2 +29,3 @@ export type ExpectationUnit = typeof EXPECTATION_UNITS[number];

* Amount of text measurement
* @see https://github.com/webgptorg/promptbook/discussions/30
*/

@@ -28,0 +32,0 @@ export type ExpectationAmount = number_integer & (number_positive | 0);

import type { ModelRequirements } from '../ModelRequirements';
import type { string_name } from '../typeAliases';
import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';

@@ -9,2 +10,6 @@ /**

/**
* Name of the persona who will be responding to this prompt
*/
readonly personaName: string_name | null;
/**
* Requirements for the model

@@ -16,3 +21,5 @@ * - This is required only for blockType PROMPT_TEMPLATE

/**
* TODO: [👙][🧠] Just selecting gpt3 or gpt4 level of modelT
* TODO: [👙][🧠] Maybe add `knowledge`, `actions` and `instruments` to be available granularly for each template
* @see https://github.com/webgptorg/promptbook/discussions/79
* TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
*/

@@ -5,3 +5,8 @@ import type { string_file_path } from '../typeAliases';

import type { string_semantic_version } from '../typeAliases';
import type { KnowledgeJson } from './KnowledgeJson';
import type { KnowledgePiecePreparedJson } from './KnowledgePieceJson';
import type { KnowledgeSourceJson } from './KnowledgeSourceJson';
import type { KnowledgeSourcePreparedJson } from './KnowledgeSourceJson';
import type { PersonaJson } from './PersonaJson';
import type { PersonaPreparedJson } from './PersonaJson';
import type { PreparationJson } from './PreparationJson';
import type { PromptTemplateJson } from './PromptTemplateJson';

@@ -54,4 +59,24 @@ import type { PromptTemplateParameterJson } from './PromptTemplateParameterJson';

* Set of information that are used as external knowledge in the pipeline
*
* @see https://github.com/webgptorg/promptbook/discussions/41
*/
readonly knowledge: KnowledgeJson;
readonly knowledgeSources: Array<KnowledgeSourceJson | KnowledgeSourcePreparedJson>;
/**
* Set of information that are used as external knowledge in the pipeline
*
* @see https://github.com/webgptorg/promptbook/discussions/41
*/
readonly knowledgePieces: Array<KnowledgePiecePreparedJson>;
/**
* List of prepared virtual personas that are used in the pipeline
*
* @see https://github.com/webgptorg/promptbook/discussions/22
*/
readonly personas: Array<PersonaJson | PersonaPreparedJson>;
/**
* List of prepared virtual personas that are used in the pipeline
*
* @see https://github.com/webgptorg/promptbook/discussions/78
*/
readonly preparations: Array<PreparationJson>;
};

@@ -58,0 +83,0 @@ /**

import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
/**
* Template for prompt to user
*
* @see https://github.com/webgptorg/promptbook/discussions/76
*/

@@ -5,0 +7,0 @@ export interface PromptDialogJson extends PromptTemplateJsonCommon {

@@ -1,2 +0,2 @@

import type { ___ } from '../typeAliases';
import type { ___ } from '../../utils/organization/___';
import type { LlmTemplateJson } from './LlmTemplateJson';

@@ -3,0 +3,0 @@ import type { PromptDialogJson } from './PromptDialogJson';

@@ -18,3 +18,3 @@ import type { BlockType } from '../../commands/BLOCK/BlockTypes';

* - It must be unique across the pipeline
* - It should start uppercase and contain letters and numbers
* - It should start uppercase and can contain letters and numbers
* - The pipelineUrl together with hash and name are used to identify the prompt template in the pipeline

@@ -41,2 +41,4 @@ */

* If theese parameters meet the expectations requirements, they are used instead of executing this prompt template
*
* @see https://github.com/webgptorg/promptbook/discussions/66
*/

@@ -55,2 +57,4 @@ readonly jokers?: Array<string>;

* List of postprocessing steps that are executed after the prompt template
*
* @see https://github.com/webgptorg/promptbook/discussions/31
*/

@@ -64,2 +68,3 @@ readonly postprocessing?: Array<string_javascript_name>;

* Note: Expectations are performed after all postprocessing steps
* @see https://github.com/webgptorg/promptbook/discussions/30
*/

@@ -71,2 +76,3 @@ readonly expectations?: Expectations;

* Note: Expectations are performed after all postprocessing steps
* @see https://github.com/webgptorg/promptbook/discussions/30
* @deprecated [💝]

@@ -73,0 +79,0 @@ */

@@ -5,2 +5,4 @@ import type { ScriptLanguage } from '../ScriptLanguage';

* Template for script execution
*
* @see https://github.com/webgptorg/promptbook/discussions/77
*/

@@ -7,0 +9,0 @@ export interface ScriptJson extends PromptTemplateJsonCommon {

import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
/**
* Template for simple concatenation of strings
*
* @see https://github.com/webgptorg/promptbook/discussions/17
*/

@@ -5,0 +7,0 @@ export interface SimpleTemplateJson extends PromptTemplateJsonCommon {

@@ -84,2 +84,19 @@ /**

/**
* Description of persona
*
* For example `"Skilled copywriter"`
*/
export type string_persona_description = string;
/**
* Source of one knowledge
*
* It can be a link, a relative path to file or direct text
*
* For example `"https://pavolhejny.com/"`
* For example `"./pavol-hejny-cv.pdf"`
* For example `"Pavol Hejný has web https://pavolhejny.com/"`
* For example `"Pavol Hejný is web developer and creator of Promptbook and Collboard"`
*/
export type string_knowledge_source = string_url | string_file_path | string;
/**
* Semantic helper

@@ -433,2 +450,10 @@ *

/**
* Semantic helper for incremental IDs
*/
export type number_id = number_integer & (number_positive | 0);
/**
* Semantic helper for number of rows and columns
*/
export type number_linecol_number = number_integer & number_positive;
/**
* Semantic helper for number of tokens

@@ -467,17 +492,6 @@ */

export type number_terabytes = number_positive;
/**
* Formatting helper to put void to keep longer version of prettier
*/
export type ___ = never;
/**
* Organizational helper to better mark the place where the type is missing
*/
export type TODO = any;
/**
* Organizational helper to mark a place where to really use any
*/
export type really_any = any;
/**
/**.
* TODO: !!! Change "For example" to @example
* TODO: !! Cleanup
* TODO: !! Change to branded types
*/

@@ -8,3 +8,3 @@ /**

*/
title: string;
readonly title: string;
/**

@@ -15,7 +15,7 @@ * The start of the item

*/
from: number;
readonly from: number;
/**
* The end of the item
*/
to: number;
readonly to: number;
}>;

@@ -9,4 +9,4 @@ import type { string_markdown } from '../../types/typeAliases';

export declare function addAutoGeneratedSection(content: string_markdown, options: {
sectionName: string_name;
sectionContent: string_markdown;
readonly sectionName: string_name;
readonly sectionContent: string_markdown;
}): string_markdown;
import type { string_markdown } from '../../types/typeAliases';
import type { FromtoItems } from '../FromtoItems';
/**
* Options for creating a markdown chart
* Options for `CreateMarkdownChartOptions`
*/
/**
* Options for creating a markdown chart.
*/
type CreateMarkdownChartOptions = {

@@ -13,19 +10,19 @@ /**

*/
nameHeader: string;
readonly nameHeader: string;
/**
* The header for the second column - the value of the item
*/
valueHeader: string;
readonly valueHeader: string;
/**
* The items to be charted
*/
items: FromtoItems;
readonly items: FromtoItems;
/**
* The width of the chart in squares
*/
width: number;
readonly width: number;
/**
* The name of the unit shown in the chart
*/
unitName: string;
readonly unitName: string;
};

@@ -32,0 +29,0 @@ /**

@@ -9,7 +9,7 @@ import type { string_markdown } from '../../types/typeAliases';

*/
language: string | null;
readonly language: string | null;
/**
* Content of the code block (unescaped)
*/
content: string;
readonly content: string;
};

@@ -16,0 +16,0 @@ /**

@@ -11,11 +11,11 @@ import type { string_markdown_section } from '../../types/typeAliases';

*/
title: string_markdown_text;
readonly title: string_markdown_text;
/**
* Level of the section like h1, h2, h3, h4, h5, h6
*/
level: 1 | 2 | 3 | 4 | 5 | 6;
readonly level: 1 | 2 | 3 | 4 | 5 | 6;
/**
* Content of the section with markdown formatting, blocks, lists, etc.
*/
content: string_markdown_section_content;
readonly content: string_markdown_section_content;
};

@@ -22,0 +22,0 @@ /**

{
"name": "@promptbook/node",
"version": "0.61.0-9",
"version": "0.61.0-10",
"description": "Supercharge your use of large language models",

@@ -52,3 +52,3 @@ "private": false,

"peerDependencies": {
"@promptbook/core": "0.61.0-9"
"@promptbook/core": "0.61.0-10"
},

@@ -55,0 +55,0 @@ "main": "./umd/index.umd.js",

@@ -16,2 +16,3 @@ declare const _default: ({

blockType: string;
personaName: null;
modelRequirements: {

@@ -24,15 +25,60 @@ modelVariant: string;

}[];
knowledge: {
name: string;
title: string;
content: string;
keywords: string[];
index: {
modelName: string;
position: number[];
}[];
sources: {
title: string;
href: string;
}[];
knowledgeSources: never[];
knowledgePieces: never[];
personas: never[];
preparations: {
id: number;
date: string;
promptbookVersion: string;
modelUsage: {
price: {
value: number;
};
input: {
tokensCount: {
value: number;
};
charactersCount: {
value: number;
};
wordsCount: {
value: number;
};
sentencesCount: {
value: number;
};
linesCount: {
value: number;
};
paragraphsCount: {
value: number;
};
pagesCount: {
value: number;
};
};
output: {
tokensCount: {
value: number;
};
charactersCount: {
value: number;
};
wordsCount: {
value: number;
};
sentencesCount: {
value: number;
};
linesCount: {
value: number;
};
paragraphsCount: {
value: number;
};
pagesCount: {
value: number;
};
};
};
}[];

@@ -61,2 +107,3 @@ sourceFile: string;

};
personaName: null;
modelRequirements: {

@@ -69,15 +116,60 @@ modelVariant: string;

}[];
knowledge: {
name: string;
title: string;
content: string;
keywords: string[];
index: {
modelName: string;
position: number[];
}[];
sources: {
title: string;
href: string;
}[];
knowledgeSources: never[];
knowledgePieces: never[];
personas: never[];
preparations: {
id: number;
date: string;
promptbookVersion: string;
modelUsage: {
price: {
value: number;
};
input: {
tokensCount: {
value: number;
};
charactersCount: {
value: number;
};
wordsCount: {
value: number;
};
sentencesCount: {
value: number;
};
linesCount: {
value: number;
};
paragraphsCount: {
value: number;
};
pagesCount: {
value: number;
};
};
output: {
tokensCount: {
value: number;
};
charactersCount: {
value: number;
};
wordsCount: {
value: number;
};
sentencesCount: {
value: number;
};
linesCount: {
value: number;
};
paragraphsCount: {
value: number;
};
pagesCount: {
value: number;
};
};
};
}[];

@@ -84,0 +176,0 @@ sourceFile: string;

@@ -20,2 +20,3 @@ import { collectionToJson } from '../collection/collectionToJson';

import { UnexpectedError } from '../errors/UnexpectedError';
import { VersionMismatch } from '../errors/VersionMismatch';
import { ExpectError } from '../errors/_ExpectError';

@@ -33,2 +34,4 @@ import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';

import { joinLlmExecutionTools } from '../llm-providers/multiple/joinLlmExecutionTools';
import { preparePipeline } from '../prepare/preparePipeline';
import { unpreparePipeline } from '../prepare/unpreparePipeline';
import type { ExecutionReportStringOptions } from '../types/execution-report/ExecutionReportStringOptions';

@@ -44,4 +47,5 @@ import { ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';

export { pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, validatePipeline };
export { preparePipeline, unpreparePipeline };
export { createPipelineExecutor, joinLlmExecutionTools };
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
export { CollectionError, ExpectError, NotFoundError, ParsingError, PipelineExecutionError, PipelineLogicError, ReferenceError, UnexpectedError, };
export { CollectionError, ExpectError, NotFoundError, ParsingError, PipelineExecutionError, PipelineLogicError, ReferenceError, UnexpectedError, VersionMismatch, };

@@ -15,6 +15,8 @@ import type { PipelineCollection } from '../collection/PipelineCollection';

import { EXPECTATION_UNITS } from '../types/PipelineJson/Expectations';
import { KnowledgeJson } from '../types/PipelineJson/KnowledgeJson';
import { KnowledgePiecePreparedJson } from '../types/PipelineJson/KnowledgePieceJson';
import { KnowledgeSourceJson, KnowledgeSourcePreparedJson } from '../types/PipelineJson/KnowledgeSourceJson';
import type { LlmTemplateJson } from '../types/PipelineJson/LlmTemplateJson';
import { MaterialKnowledgePieceJson } from '../types/PipelineJson/MaterialKnowledgePieceJson';
import { PersonaJson, PersonaPreparedJson } from '../types/PipelineJson/PersonaJson';
import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
import { PreparationJson } from '../types/PipelineJson/PreparationJson';
import type { PromptDialogJson } from '../types/PipelineJson/PromptDialogJson';

@@ -36,5 +38,5 @@ import type { PromptTemplateJson } from '../types/PipelineJson/PromptTemplateJson';

export { EXPECTATION_UNITS };
export type { AvailableModel, BlockType, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgeJson, LlmExecutionTools, LlmTemplateJson, MaterialKnowledgePieceJson, ModelRequirements, ModelVariant, Parameters, PipelineCollection, PipelineExecutor, PipelineJson, PipelineString, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_version, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid, string_semantic_version as string_version, };
export type { AvailableModel, BlockType, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgePiecePreparedJson, KnowledgeSourceJson, KnowledgeSourcePreparedJson, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, PersonaJson, PersonaPreparedJson, PipelineCollection, PipelineExecutor, PipelineJson, PipelineString, PreparationJson, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_version, string_script, string_semantic_version, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid, };
/**
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
*/

@@ -57,3 +57,3 @@ import { spaceTrim } from 'spacetrim';

export { extractBlock, // <- [🌻] + maybe export through `@promptbook/markdown-utils`
extractParameters, extractVariables, isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl as isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻]
extractParameters, extractVariables, isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻]
removeEmojis, removeQuotes, replaceParameters, spaceTrim, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };

@@ -60,0 +60,0 @@ export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords };

@@ -32,3 +32,3 @@ import type { PipelineStringToJsonOptions } from '../../conversion/pipelineStringToJson';

*/
isCrashOnError?: boolean;
isCrashedOnError?: boolean;
};

@@ -35,0 +35,0 @@ /**

@@ -12,3 +12,3 @@ import type { string_url } from '../../types/typeAliases';

*/
isVerbose?: boolean;
readonly isVerbose?: boolean;
/**

@@ -19,3 +19,3 @@ * If true, directory will be scanned only when needed not during the construction

*/
isLazyLoaded?: boolean;
readonly isLazyLoaded?: boolean;
};

@@ -22,0 +22,0 @@ /**

@@ -7,2 +7,2 @@ /**

* TODO: !!! Remove this file
*/
*/

@@ -8,9 +8,9 @@ import type { string_markdown_text } from '../../../types/typeAliases';

}> = {
name: string_name & string_SCREAMING_CASE;
aliasNames?: Array<string_name & string_SCREAMING_CASE>;
deprecatedNames?: Array<string_name & string_SCREAMING_CASE>;
usagePlaces: Array<CommandUsagePlace>;
description: string_markdown_text;
discussionUrl: `https://github.com/webgptorg/promptbook/discussions/${number | '@@'}`;
examples: Array<string_markdown_text>;
readonly name: string_name & string_SCREAMING_CASE;
readonly aliasNames?: Array<string_name & string_SCREAMING_CASE>;
readonly deprecatedNames?: Array<string_name & string_SCREAMING_CASE>;
readonly usagePlaces: Array<CommandUsagePlace>;
readonly description: string_markdown_text;
readonly discussionUrl: `https://github.com/webgptorg/promptbook/discussions/${number | '@@'}`;
readonly examples: Array<string_markdown_text>;
/**

@@ -22,7 +22,7 @@ * @throws {ParsingError} if the parsing fails

export type CommandParserInput = {
usagePlace: CommandUsagePlace;
raw: string_markdown_text;
rawArgs: string_markdown_text;
normalized: string_name & string_SCREAMING_CASE;
args: Array<string_name & string_SCREAMING_CASE>;
readonly usagePlace: CommandUsagePlace;
readonly raw: string_markdown_text;
readonly rawArgs: string_markdown_text;
readonly normalized: string_name & string_SCREAMING_CASE;
readonly args: Array<string_name & string_SCREAMING_CASE>;
};

@@ -29,0 +29,0 @@ /**

import type { ModelRequirements } from '../../types/ModelRequirements';
import type { TODO } from '../../types/typeAliases';
import type { TODO } from '../../utils/organization/TODO';
/**

@@ -4,0 +4,0 @@ * Parsed MODEL command

@@ -0,1 +1,3 @@

import type { string_name } from '../../types/typeAliases';
import type { string_persona_description } from '../../types/typeAliases';
/**

@@ -9,4 +11,4 @@ * Parsed PERSONA command

readonly type: 'PERSONA';
personaName: string;
personaDescription: string | null;
readonly personaName: string_name;
readonly personaDescription: string_persona_description | null;
};

@@ -10,2 +10,6 @@ /**

/**
* The maximum number of (LLM) tasks running in parallel
*/
export declare const MAX_PARALLEL_COUNT = 5;
/**
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`

@@ -12,0 +16,0 @@ */

@@ -5,16 +5,19 @@ import type { LlmExecutionTools } from '../execution/LlmExecutionTools';

/**
* Options for pipelineStringToJson
* Options for `pipelineStringToJson`
*/
export type PipelineStringToJsonOptions = {
/**
* Tools for processing required for knowledge processing *(not for actual execution)*
* Tools for processing required for preparation of knowledge *(not for actual execution)*
*
* Note: If you provide `null`, the knowledge will not be prepared
*/
llmTools?: LlmExecutionTools;
readonly llmTools: LlmExecutionTools | null;
};
/**
* Compile promptbook from string (markdown) format to JSON format
* Compile pipeline from string (markdown) format to JSON format
*
* Note: There are two similar functions:
* Note: There are 3 similar functions:
* - `pipelineStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
* - `pipelineStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
* - `preparePipeline` - just one step in the compilation process
*

@@ -21,0 +24,0 @@ * @param pipelineString {Promptbook} in string markdown format (.ptbk.md)

import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
import type { PipelineString } from '../types/PipelineString';
/**
* Compile promptbook from string (markdown) format to JSON format synchronously
* Compile pipeline from string (markdown) format to JSON format synchronously
*
* Note: There are two similar functions:
* Note: There are 3 similar functions:
* - `pipelineStringToJson` **(preferred)** - which propperly compiles the promptbook and use embedding for external knowledge
* - `pipelineStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
* - `preparePipeline` - just one step in the compilation process
*
* @param pipelineString {Promptbook} in string markdown format (.ptbk.md)
* @param options - Options and tools for the compilation
* @returns {Promptbook} compiled in JSON format (.ptbk.json)

@@ -13,0 +13,0 @@ * @throws {ParsingError} if the promptbook string is not valid

@@ -8,7 +8,7 @@ /**

*/
isGraphAdded?: boolean;
readonly isGraphAdded?: boolean;
/**
* If true, the string is prettifyed as markdown
*/
isPrettifyed?: boolean;
readonly isPrettifyed?: boolean;
};

@@ -8,11 +8,11 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';

*/
pipeline: PipelineJson;
readonly pipeline: PipelineJson;
/**
* Original parameter name that should be replaced
*/
oldParameterName: string_name;
readonly oldParameterName: string_name;
/**
* New parameter name that should replace the original parameter name
*/
newParameterName: string_name;
readonly newParameterName: string_name;
};

@@ -19,0 +19,0 @@ /**

@@ -12,3 +12,3 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';

*/
export declare function importPipeline(path: `${string}.ptbk.md`): PipelineString;
export declare function importPipeline(path: `${string}.ptbk.json`): PipelineJson;
export declare function importPipelineWithoutPreparation(path: `${string}.ptbk.md`): PipelineString;
export declare function importPipelineWithoutPreparation(path: `${string}.ptbk.json`): PipelineJson;

@@ -13,3 +13,3 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';

/**
* Options for creating a pipeline executor
* Options for `createPipelineExecutor`
*/

@@ -39,2 +39,3 @@ interface CreatePipelineExecutorOptions {

/**
* TODO: [🪂] Pass maxParallelCount here
* TODO: [🧠] When not meet expectations in PROMPT_DIALOG, make some way to tell the user

@@ -41,0 +42,0 @@ * TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json

@@ -19,15 +19,15 @@ import type { Promisable } from 'type-fest';

*/
isSuccessful: boolean;
readonly isSuccessful: boolean;
/**
* Added usage of whole execution, detailed usage is aviable in `executionReport`
*/
usage: PromptResultUsage;
readonly usage: PromptResultUsage;
/**
* Errors that occured during the execution, details are aviable in `executionReport`
*/
errors: Array<Error>;
readonly errors: Array<Error>;
/**
* The report of the execution with all details
*/
executionReport: ExecutionReportJson;
readonly executionReport: ExecutionReportJson;
/**

@@ -38,3 +38,3 @@ * Result parameters of the execution

*/
outputParameters: Record<string_name, string>;
readonly outputParameters: Record<string_name, string>;
}>;

@@ -41,0 +41,0 @@ };

@@ -50,11 +50,11 @@ import type { KebabCase } from 'type-fest';

*/
start: string_date_iso8601;
readonly start: string_date_iso8601;
/**
* First token generated
*/
firstToken?: string_date_iso8601;
readonly firstToken?: string_date_iso8601;
/**
* End of the execution
*/
complete: string_date_iso8601;
readonly complete: string_date_iso8601;
};

@@ -103,7 +103,7 @@ /**

*/
value: number_usd & (number_positive | 0);
readonly value: number_usd & (number_positive | 0);
/**
* Is the value uncertain
*/
isUncertain?: true;
readonly isUncertain?: true;
};

@@ -110,0 +110,0 @@ /**

@@ -19,3 +19,3 @@ import type { ScriptLanguage } from '../types/ScriptLanguage';

*/
scriptLanguage: ScriptLanguage;
readonly scriptLanguage: ScriptLanguage;
/**

@@ -26,3 +26,3 @@ * Parameters for the script

*/
parameters: Record<string_name, string>;
readonly parameters: Record<string_name, string>;
/**

@@ -36,3 +36,3 @@ * The content of the script to execute

*/
script: string_script;
readonly script: string_script;
};

@@ -39,0 +39,0 @@ /**

export type TranslatorOptions = {
from?: string;
to: string;
readonly from?: string;
readonly to: string;
};

@@ -24,3 +24,3 @@ import type { number_integer } from '../types/typeAliases';

*/
promptTitle: string;
readonly promptTitle: string;
/**

@@ -32,11 +32,11 @@ * Prompt message

*/
promptMessage: string;
readonly promptMessage: string;
/**
* Default value for the input/textarea
*/
defaultValue: string | null;
readonly defaultValue: string | null;
/**
* Placeholder for the input/textarea
*/
placeholder?: string;
readonly placeholder?: string;
/**

@@ -47,3 +47,3 @@ * Priority of the prompt

*/
priority: number_integer & number_positive;
readonly priority: number_integer & number_positive;
};

@@ -8,3 +8,3 @@ import type { Promisable } from 'type-fest';

*/
inParallelCount?: number;
readonly maxParallelCount?: number;
};

@@ -11,0 +11,0 @@ /**

@@ -11,2 +11,2 @@ import type { FormatDefinition } from '../_common/FormatDefinition';

* TODO: [🍓] In `CsvFormatDefinition` implement `extractValues`
*/
*/

@@ -15,2 +15,2 @@ import type { FormatDefinition } from '../_common/FormatDefinition';

* TODO: [🍓] In `JsonFormatDefinition` implement `extractValues`
*/
*/

@@ -13,2 +13,2 @@ import type { FormatDefinition } from '../_common/FormatDefinition';

* TODO: [🍓] In `ListFormatDefinition` implement `extractValues`
*/
*/

@@ -5,3 +5,3 @@ import type { Promisable } from 'type-fest';

/**
* Options for CallbackInterfaceTools
* Options for `CallbackInterfaceTools`
*/

@@ -8,0 +8,0 @@ export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & {

@@ -1,26 +0,11 @@

import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
import type { KnowledgeJson } from '../../../types/PipelineJson/KnowledgeJson';
import type { PrepareOptions } from '../../../prepare/PrepareOptions';
import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/KnowledgePieceJson';
import type { string_markdown } from '../../../types/typeAliases';
type PrepareKnowledgeFromMarkdownOptions = {
/**
* The source of the knowledge in markdown format
*/
content: string_markdown;
/**
* The LLM tools to use for the conversion and extraction of knowledge
*
* Note: If you want to use multiple LLMs, you can use `joinLlmExecutionTools` to join them first
*/
llmTools: LlmExecutionTools;
/**
* If true, the preaparation of knowledge logs additional information
*
* @default false
*/
isVerbose?: boolean;
};
export declare function prepareKnowledgeFromMarkdown(options: PrepareKnowledgeFromMarkdownOptions): Promise<KnowledgeJson>;
export {};
/**
* 11:11
* @@@
*/
export declare function prepareKnowledgeFromMarkdown(content: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
/**
* TODO: [🪂] Do it in parallel 11:11
* Note: No need to aggregate usage here, it is done by intercepting the llmTools
*/

@@ -1,19 +0,12 @@

import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
import type { KnowledgeJson } from '../../../types/PipelineJson/KnowledgeJson';
import type { PrepareOptions } from '../../../prepare/PrepareOptions';
import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/KnowledgePieceJson';
import type { string_base64 } from '../../../types/typeAliases';
type PrepareKnowledgeFromPdfOptions = {
/**
* The source of the knowledge in PDF format
*/
content: string_base64;
/**
* The LLM tools to use for the conversion and extraction of knowledge
*/
llmTools: LlmExecutionTools;
};
export declare function prepareKnowledgeFromPdf(options: PrepareKnowledgeFromPdfOptions): Promise<KnowledgeJson>;
export {};
/**
* @@@
*/
export declare function prepareKnowledgeFromPdf(content: string_base64, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
/**
* TODO: [🧺] In future, content can be alse File or Blob BUT for now for wider compatibility its only base64
* @see https://stackoverflow.com/questions/14653349/node-js-cant-create-blobs
* TODO: [🪂] Do it in parallel
*/

@@ -12,4 +12,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools';

pricing?: {
prompt: number_usd;
output: number_usd;
readonly prompt: number_usd;
readonly output: number_usd;
};

@@ -16,0 +16,0 @@ }>;

import type { ClientOptions } from '@anthropic-ai/sdk';
import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
/**
* Options for AnthropicClaudeExecutionTools
* Options for `AnthropicClaudeExecutionTools`
*

@@ -6,0 +6,0 @@ * This extends Anthropic's `ClientOptions` with are directly passed to the Anthropic client.

@@ -5,3 +5,3 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';

/**
* Options for AzureOpenAiExecutionTools
* Options for `AzureOpenAiExecutionTools`
*

@@ -16,3 +16,3 @@ * @see https://oai.azure.com/portal/

*/
resourceName: string_name;
readonly resourceName: string_name;
/**

@@ -25,7 +25,7 @@ * The deployment name

*/
deploymentName: string_name;
readonly deploymentName: string_name;
/**
* The API key of the Azure OpenAI resource
*/
apiKey: string_token;
readonly apiKey: string_token;
/**

@@ -37,3 +37,3 @@ * A unique identifier representing your end-user, which can help Azure OpenAI to monitor

*/
user?: string_token;
readonly user?: string_token;
};

@@ -13,4 +13,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools';

pricing?: {
prompt: number_usd;
output: number_usd;
readonly prompt: number_usd;
readonly output: number_usd;
};

@@ -17,0 +17,0 @@ }>;

@@ -5,3 +5,3 @@ import type { ClientOptions } from 'openai';

/**
* Options for OpenAiExecutionTools
* Options for `OpenAiExecutionTools`
*

@@ -8,0 +8,0 @@ * This extends OpenAI's `ClientOptions` with are directly passed to the OpenAI client.

@@ -5,3 +5,3 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';

/**
* Options for RemoteLlmExecutionTools
* Options for `RemoteLlmExecutionTools`
*/

@@ -8,0 +8,0 @@ export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & {

@@ -5,3 +5,3 @@ import type { Promisable } from 'type-fest';

/**
* Options for javascript execution
* Options for `JavascriptExecutionTools`
*/

@@ -8,0 +8,0 @@ export type JavascriptExecutionToolsOptions = CommonExecutionToolsOptions & {

@@ -1,2 +0,2 @@

import type { really_any } from '../../../types/typeAliases';
import type { really_any } from '../../../utils/organization/really_any';
/**

@@ -3,0 +3,0 @@ * Does nothing, but preserves the function in the bundle

@@ -44,7 +44,7 @@ import type { PromptResult } from '../../execution/PromptResult';

*/
prompt: Omit<Prompt, 'pipelineUrl' | 'parameters'>;
readonly prompt: Omit<Prompt, 'pipelineUrl' | 'parameters'>;
/**
* Result of the prompt execution (if not failed during LLM execution)
*/
result?: PromptResult;
readonly result?: PromptResult;
/**

@@ -55,6 +55,6 @@ * The error which occured during LLM execution or during postprocessing or expectation checking

*/
error?: {
message: string;
readonly error?: {
readonly message: string;
};
}>;
};
import type { number_percent } from '../typeAliases';
/**
* Options for generating an execution report string
* Options for `executionReportJsonToString`
*/

@@ -9,7 +9,7 @@ export type ExecutionReportStringOptions = {

*/
taxRate: number_percent;
readonly taxRate: number_percent;
/**
* The width of the charts in the report
*/
chartsWidth: number;
readonly chartsWidth: number;
};

@@ -16,0 +16,0 @@ /**

@@ -40,5 +40,6 @@ import type { string_model_name } from './typeAliases';

/**
* TODO: !!!!! Add and use systemMessage, temprerature, top_k, top_p, presencePenalty, frequencyPenalty, bestOf, n, logitBias, logitBiasType, stop, ... to ModelRequirements
* TODO: Maybe figure out better word than "variant"
* TODO: Add here more requirement options like max context size, max tokens, etc.
* TODO: [👙][🧠] Just selecting gpt3 or gpt4 level of model
* TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
*/

@@ -13,3 +13,4 @@ /**

/**
* TODO: !!!!! Implement samples into parameters
* TODO: Constrain type to Simple key-value object, only string keys and string values and no index signature + only camelCase keys and spaceTrimmed values
*/

@@ -9,9 +9,11 @@ import type { number_integer } from '../typeAliases';

* Note: Expectations are performed after all postprocessing steps
* @see https://github.com/webgptorg/promptbook/discussions/30
*/
export type Expectations = Partial<Record<Lowercase<ExpectationUnit>, {
min?: ExpectationAmount;
max?: ExpectationAmount;
readonly min?: ExpectationAmount;
readonly max?: ExpectationAmount;
}>>;
/**
* Units of text measurement
* @see https://github.com/webgptorg/promptbook/discussions/30
*/

@@ -21,2 +23,3 @@ export declare const EXPECTATION_UNITS: readonly ["CHARACTERS", "WORDS", "SENTENCES", "LINES", "PARAGRAPHS", "PAGES"];

* Unit of text measurement
* @see https://github.com/webgptorg/promptbook/discussions/30
*/

@@ -26,2 +29,3 @@ export type ExpectationUnit = typeof EXPECTATION_UNITS[number];

* Amount of text measurement
* @see https://github.com/webgptorg/promptbook/discussions/30
*/

@@ -28,0 +32,0 @@ export type ExpectationAmount = number_integer & (number_positive | 0);

import type { ModelRequirements } from '../ModelRequirements';
import type { string_name } from '../typeAliases';
import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';

@@ -9,2 +10,6 @@ /**

/**
* Name of the persona who will be responding to this prompt
*/
readonly personaName: string_name | null;
/**
* Requirements for the model

@@ -16,3 +21,5 @@ * - This is required only for blockType PROMPT_TEMPLATE

/**
* TODO: [👙][🧠] Just selecting gpt3 or gpt4 level of modelT
* TODO: [👙][🧠] Maybe add `knowledge`, `actions` and `instruments` to be available granularly for each template
* @see https://github.com/webgptorg/promptbook/discussions/79
* TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
*/

@@ -5,3 +5,8 @@ import type { string_file_path } from '../typeAliases';

import type { string_semantic_version } from '../typeAliases';
import type { KnowledgeJson } from './KnowledgeJson';
import type { KnowledgePiecePreparedJson } from './KnowledgePieceJson';
import type { KnowledgeSourceJson } from './KnowledgeSourceJson';
import type { KnowledgeSourcePreparedJson } from './KnowledgeSourceJson';
import type { PersonaJson } from './PersonaJson';
import type { PersonaPreparedJson } from './PersonaJson';
import type { PreparationJson } from './PreparationJson';
import type { PromptTemplateJson } from './PromptTemplateJson';

@@ -54,4 +59,24 @@ import type { PromptTemplateParameterJson } from './PromptTemplateParameterJson';

* Set of information that are used as external knowledge in the pipeline
*
* @see https://github.com/webgptorg/promptbook/discussions/41
*/
readonly knowledge: KnowledgeJson;
readonly knowledgeSources: Array<KnowledgeSourceJson | KnowledgeSourcePreparedJson>;
/**
* Set of information that are used as external knowledge in the pipeline
*
* @see https://github.com/webgptorg/promptbook/discussions/41
*/
readonly knowledgePieces: Array<KnowledgePiecePreparedJson>;
/**
* List of prepared virtual personas that are used in the pipeline
*
* @see https://github.com/webgptorg/promptbook/discussions/22
*/
readonly personas: Array<PersonaJson | PersonaPreparedJson>;
/**
* List of prepared virtual personas that are used in the pipeline
*
* @see https://github.com/webgptorg/promptbook/discussions/78
*/
readonly preparations: Array<PreparationJson>;
};

@@ -58,0 +83,0 @@ /**

import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
/**
* Template for prompt to user
*
* @see https://github.com/webgptorg/promptbook/discussions/76
*/

@@ -5,0 +7,0 @@ export interface PromptDialogJson extends PromptTemplateJsonCommon {

@@ -1,2 +0,2 @@

import type { ___ } from '../typeAliases';
import type { ___ } from '../../utils/organization/___';
import type { LlmTemplateJson } from './LlmTemplateJson';

@@ -3,0 +3,0 @@ import type { PromptDialogJson } from './PromptDialogJson';

@@ -18,3 +18,3 @@ import type { BlockType } from '../../commands/BLOCK/BlockTypes';

* - It must be unique across the pipeline
* - It should start uppercase and contain letters and numbers
* - It should start uppercase and can contain letters and numbers
* - The pipelineUrl together with hash and name are used to identify the prompt template in the pipeline

@@ -41,2 +41,4 @@ */

* If theese parameters meet the expectations requirements, they are used instead of executing this prompt template
*
* @see https://github.com/webgptorg/promptbook/discussions/66
*/

@@ -55,2 +57,4 @@ readonly jokers?: Array<string>;

* List of postprocessing steps that are executed after the prompt template
*
* @see https://github.com/webgptorg/promptbook/discussions/31
*/

@@ -64,2 +68,3 @@ readonly postprocessing?: Array<string_javascript_name>;

* Note: Expectations are performed after all postprocessing steps
* @see https://github.com/webgptorg/promptbook/discussions/30
*/

@@ -71,2 +76,3 @@ readonly expectations?: Expectations;

* Note: Expectations are performed after all postprocessing steps
* @see https://github.com/webgptorg/promptbook/discussions/30
* @deprecated [💝]

@@ -73,0 +79,0 @@ */

@@ -5,2 +5,4 @@ import type { ScriptLanguage } from '../ScriptLanguage';

* Template for script execution
*
* @see https://github.com/webgptorg/promptbook/discussions/77
*/

@@ -7,0 +9,0 @@ export interface ScriptJson extends PromptTemplateJsonCommon {

import type { PromptTemplateJsonCommon } from './PromptTemplateJsonCommon';
/**
* Template for simple concatenation of strings
*
* @see https://github.com/webgptorg/promptbook/discussions/17
*/

@@ -5,0 +7,0 @@ export interface SimpleTemplateJson extends PromptTemplateJsonCommon {

@@ -84,2 +84,19 @@ /**

/**
* Description of persona
*
* For example `"Skilled copywriter"`
*/
export type string_persona_description = string;
/**
* Source of one knowledge
*
* It can be a link, a relative path to file or direct text
*
* For example `"https://pavolhejny.com/"`
* For example `"./pavol-hejny-cv.pdf"`
* For example `"Pavol Hejný has web https://pavolhejny.com/"`
* For example `"Pavol Hejný is web developer and creator of Promptbook and Collboard"`
*/
export type string_knowledge_source = string_url | string_file_path | string;
/**
* Semantic helper

@@ -433,2 +450,10 @@ *

/**
* Semantic helper for incremental IDs
*/
export type number_id = number_integer & (number_positive | 0);
/**
* Semantic helper for number of rows and columns
*/
export type number_linecol_number = number_integer & number_positive;
/**
* Semantic helper for number of tokens

@@ -467,17 +492,6 @@ */

export type number_terabytes = number_positive;
/**
* Formatting helper to put void to keep longer version of prettier
*/
export type ___ = never;
/**
* Organizational helper to better mark the place where the type is missing
*/
export type TODO = any;
/**
* Organizational helper to mark a place where to really use any
*/
export type really_any = any;
/**
/**.
* TODO: !!! Change "For example" to @example
* TODO: !! Cleanup
* TODO: !! Change to branded types
*/

@@ -8,3 +8,3 @@ /**

*/
title: string;
readonly title: string;
/**

@@ -15,7 +15,7 @@ * The start of the item

*/
from: number;
readonly from: number;
/**
* The end of the item
*/
to: number;
readonly to: number;
}>;

@@ -9,4 +9,4 @@ import type { string_markdown } from '../../types/typeAliases';

export declare function addAutoGeneratedSection(content: string_markdown, options: {
sectionName: string_name;
sectionContent: string_markdown;
readonly sectionName: string_name;
readonly sectionContent: string_markdown;
}): string_markdown;
import type { string_markdown } from '../../types/typeAliases';
import type { FromtoItems } from '../FromtoItems';
/**
* Options for creating a markdown chart
* Options for `CreateMarkdownChartOptions`
*/
/**
* Options for creating a markdown chart.
*/
type CreateMarkdownChartOptions = {

@@ -13,19 +10,19 @@ /**

*/
nameHeader: string;
readonly nameHeader: string;
/**
* The header for the second column - the value of the item
*/
valueHeader: string;
readonly valueHeader: string;
/**
* The items to be charted
*/
items: FromtoItems;
readonly items: FromtoItems;
/**
* The width of the chart in squares
*/
width: number;
readonly width: number;
/**
* The name of the unit shown in the chart
*/
unitName: string;
readonly unitName: string;
};

@@ -32,0 +29,0 @@ /**

@@ -9,7 +9,7 @@ import type { string_markdown } from '../../types/typeAliases';

*/
language: string | null;
readonly language: string | null;
/**
* Content of the code block (unescaped)
*/
content: string;
readonly content: string;
};

@@ -16,0 +16,0 @@ /**

@@ -11,11 +11,11 @@ import type { string_markdown_section } from '../../types/typeAliases';

*/
title: string_markdown_text;
readonly title: string_markdown_text;
/**
* Level of the section like h1, h2, h3, h4, h5, h6
*/
level: 1 | 2 | 3 | 4 | 5 | 6;
readonly level: 1 | 2 | 3 | 4 | 5 | 6;
/**
* Content of the section with markdown formatting, blocks, lists, etc.
*/
content: string_markdown_section_content;
readonly content: string_markdown_section_content;
};

@@ -22,0 +22,0 @@ /**

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc