@promptbook/utils 0.40.0-0 → 0.40.0-10

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.
Files changed (73) hide show
  1. package/esm/index.es.js +147 -96
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/_packages/core.index.d.ts +6 -2
  4. package/esm/typings/_packages/types.index.d.ts +1 -4
  5. package/esm/typings/_packages/utils.index.d.ts +5 -2
  6. package/esm/typings/config.d.ts +4 -0
  7. package/esm/typings/conversion/{_importPromptbook.d.ts → test/_importPromptbook.d.ts} +2 -2
  8. package/{umd/typings/conversion → esm/typings/conversion/test}/validatePromptbookJson.d.ts +1 -1
  9. package/{umd/typings → esm/typings/conversion}/utils/extractVariables.d.ts +2 -2
  10. package/esm/typings/conversion/utils/parseCommand.d.ts +8 -0
  11. package/{umd/typings → esm/typings/conversion}/utils/parseNumber.d.ts +2 -0
  12. package/esm/typings/errors/ExpectError.d.ts +2 -0
  13. package/esm/typings/errors/NotFoundError.d.ts +1 -1
  14. package/esm/typings/errors/PromptbookExecutionError.d.ts +7 -0
  15. package/esm/typings/errors/PromptbookLogicError.d.ts +7 -0
  16. package/esm/typings/errors/PromptbookReferenceError.d.ts +7 -0
  17. package/esm/typings/errors/PromptbookSyntaxError.d.ts +7 -0
  18. package/esm/typings/errors/UnexpectedError.d.ts +7 -0
  19. package/esm/typings/execution/UserInterfaceTools.d.ts +1 -1
  20. package/esm/typings/execution/createPromptbookExecutor.d.ts +1 -1
  21. package/{umd/typings → esm/typings/execution}/utils/replaceParameters.d.ts +3 -3
  22. package/esm/typings/library/PromptbookLibrary.d.ts +1 -1
  23. package/esm/typings/library/SimplePromptbookLibrary.d.ts +7 -13
  24. package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +7 -0
  25. package/esm/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +16 -0
  26. package/esm/typings/library/constructors/createPromptbookSublibrary.d.ts +6 -0
  27. package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +3 -0
  28. package/package.json +3 -3
  29. package/umd/index.umd.js +147 -96
  30. package/umd/index.umd.js.map +1 -1
  31. package/umd/typings/_packages/core.index.d.ts +6 -2
  32. package/umd/typings/_packages/types.index.d.ts +1 -4
  33. package/umd/typings/_packages/utils.index.d.ts +5 -2
  34. package/umd/typings/config.d.ts +4 -0
  35. package/umd/typings/conversion/{_importPromptbook.d.ts → test/_importPromptbook.d.ts} +2 -2
  36. package/{esm/typings/conversion → umd/typings/conversion/test}/validatePromptbookJson.d.ts +1 -1
  37. package/{esm/typings → umd/typings/conversion}/utils/extractVariables.d.ts +2 -2
  38. package/umd/typings/conversion/utils/parseCommand.d.ts +8 -0
  39. package/{esm/typings → umd/typings/conversion}/utils/parseNumber.d.ts +2 -0
  40. package/umd/typings/errors/ExpectError.d.ts +2 -0
  41. package/umd/typings/errors/NotFoundError.d.ts +1 -1
  42. package/umd/typings/errors/PromptbookExecutionError.d.ts +7 -0
  43. package/umd/typings/errors/PromptbookLogicError.d.ts +7 -0
  44. package/umd/typings/errors/PromptbookReferenceError.d.ts +7 -0
  45. package/umd/typings/errors/PromptbookSyntaxError.d.ts +7 -0
  46. package/umd/typings/errors/UnexpectedError.d.ts +7 -0
  47. package/umd/typings/execution/UserInterfaceTools.d.ts +1 -1
  48. package/umd/typings/execution/createPromptbookExecutor.d.ts +1 -1
  49. package/{esm/typings → umd/typings/execution}/utils/replaceParameters.d.ts +3 -3
  50. package/umd/typings/library/PromptbookLibrary.d.ts +1 -1
  51. package/umd/typings/library/SimplePromptbookLibrary.d.ts +7 -13
  52. package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +7 -0
  53. package/umd/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +16 -0
  54. package/umd/typings/library/constructors/createPromptbookSublibrary.d.ts +6 -0
  55. package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +3 -0
  56. package/esm/typings/conversion/parseCommand.d.ts +0 -6
  57. package/umd/typings/conversion/parseCommand.d.ts +0 -6
  58. /package/esm/typings/conversion/{promptbookStringToJson-syntaxErrors.test.d.ts → test/promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
  59. /package/esm/typings/conversion/{promptbookStringToJson.test.d.ts → test/promptbookStringToJson.test.d.ts} +0 -0
  60. /package/esm/typings/conversion/{validatePromptbookJson-logicErrors.test.d.ts → test/validatePromptbookJson-logicErrors.test.d.ts} +0 -0
  61. /package/esm/typings/conversion/{validatePromptbookJson.test.d.ts → test/validatePromptbookJson.test.d.ts} +0 -0
  62. /package/esm/typings/{utils → conversion/utils}/extractVariables.test.d.ts +0 -0
  63. /package/esm/typings/conversion/{parseCommand.test.d.ts → utils/parseCommand.test.d.ts} +0 -0
  64. /package/esm/typings/{utils → conversion/utils}/parseNumber.test.d.ts +0 -0
  65. /package/esm/typings/{utils → execution/utils}/replaceParameters.test.d.ts +0 -0
  66. /package/umd/typings/conversion/{promptbookStringToJson-syntaxErrors.test.d.ts → test/promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
  67. /package/umd/typings/conversion/{promptbookStringToJson.test.d.ts → test/promptbookStringToJson.test.d.ts} +0 -0
  68. /package/umd/typings/conversion/{validatePromptbookJson-logicErrors.test.d.ts → test/validatePromptbookJson-logicErrors.test.d.ts} +0 -0
  69. /package/umd/typings/conversion/{validatePromptbookJson.test.d.ts → test/validatePromptbookJson.test.d.ts} +0 -0
  70. /package/umd/typings/{utils → conversion/utils}/extractVariables.test.d.ts +0 -0
  71. /package/umd/typings/conversion/{parseCommand.test.d.ts → utils/parseCommand.test.d.ts} +0 -0
  72. /package/umd/typings/{utils → conversion/utils}/parseNumber.test.d.ts +0 -0
  73. /package/umd/typings/{utils → execution/utils}/replaceParameters.test.d.ts +0 -0
@@ -1,14 +1,18 @@
1
1
  import { promptbookStringToJson } from '../conversion/promptbookStringToJson';
2
- import { validatePromptbookJson } from '../conversion/validatePromptbookJson';
2
+ import { validatePromptbookJson } from '../conversion/test/validatePromptbookJson';
3
3
  import { createPromptbookExecutor } from '../execution/createPromptbookExecutor';
4
4
  import { MockedEchoNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools';
5
5
  import { CallbackInterfaceTools } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools';
6
6
  import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions';
7
7
  import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
8
8
  import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
9
+ import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
10
+ import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
11
+ import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
9
12
  import { ExecutionTypes } from '../types/ExecutionTypes';
10
13
  import { PROMPTBOOK_VERSION } from '../version';
11
- export { ExecutionTypes, PROMPTBOOK_VERSION, SimplePromptbookLibrary };
14
+ export { ExecutionTypes, PROMPTBOOK_VERSION };
15
+ export { SimplePromptbookLibrary, createPromptbookLibraryFromPromise, createPromptbookLibraryFromSources, createPromptbookSublibrary, };
12
16
  export { SimplePromptInterfaceTools };
13
17
  export { promptbookStringToJson, validatePromptbookJson };
14
18
  export { MockedEchoNaturalExecutionTools };
@@ -1,5 +1,3 @@
1
- import { ExpectError } from '../errors/ExpectError';
2
- import { NotFoundError } from '../errors/NotFoundError';
3
1
  import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions';
4
2
  import type { ExecutionTools } from '../execution/ExecutionTools';
5
3
  import type { NaturalExecutionTools } from '../execution/NaturalExecutionTools';
@@ -23,8 +21,7 @@ import type { string_char_emoji } from '../types/typeAliasEmoji';
23
21
  import type { client_id, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, 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_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, 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_version } from '../types/typeAliases';
24
22
  import { FromtoItems } from '../utils/FromtoItems';
25
23
  export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptbookExecutor, PromptbookJson, PromptbookLibrary, PromptbookString, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, 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_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, 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_version, };
26
- export { ExpectError, NotFoundError };
27
24
  /**
28
- * TODO: [🧠] Is this the best package to export custom errors from?
25
+ * TODO: [🧠][🆔] Is this the best package to export custom errors from?
29
26
  * TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
30
27
  */
@@ -1,3 +1,4 @@
1
+ import { parseNumber } from '../conversion/utils/parseNumber';
1
2
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
2
3
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
3
4
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
@@ -14,13 +15,15 @@ import { extractAllListItemsFromMarkdown } from '../utils/markdown/extractAllLis
14
15
  import { extractOneBlockFromMarkdown } from '../utils/markdown/extractOneBlockFromMarkdown';
15
16
  import { removeContentComments } from '../utils/markdown/removeContentComments';
16
17
  import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormatting';
17
- import { parseNumber } from '../utils/parseNumber';
18
18
  import { removeEmojis } from '../utils/removeEmojis';
19
19
  import { removeQuotes } from '../utils/removeQuotes';
20
20
  import { trimCodeBlock } from '../utils/trimCodeBlock';
21
21
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
22
22
  import { unwrapResult } from '../utils/unwrapResult';
23
- export { CountUtils, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
23
+ export { CountUtils, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, assertsExecutionSuccessful, countCharacters, countLines, countPages, countParagraphs, countSentences, countWords, executionReportJsonToString, extractAllBlocksFromMarkdown, // <- [🌻]
24
+ extractAllListItemsFromMarkdown, // <- [🌻]
25
+ extractOneBlockFromMarkdown, // <- [🌻]
26
+ isValidJsonString, parseNumber, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, };
24
27
  /**
25
28
  * TODO: [🧠] Maybe create some indipendent package like `markdown-tools` from both here exported and @private utilities
26
29
  */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The maximum number of iterations for a loops
3
+ */
4
+ export declare const LOOP_LIMIT = 1000;
@@ -1,5 +1,5 @@
1
- import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
- import { PromptbookString } from '../types/PromptbookString';
1
+ import { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
+ import { PromptbookString } from '../../types/PromptbookString';
3
3
  /**
4
4
  * Import the text file
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
1
+ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
2
  /**
3
3
  * Validates PromptbookJson if it is logically valid.
4
4
  *
@@ -1,10 +1,10 @@
1
- import { string_javascript, string_javascript_name } from '../types/typeAliases';
1
+ import { string_javascript, string_javascript_name } from '../../types/typeAliases';
2
2
  /**
3
3
  * Parses the given script and returns the list of all used variables that are not defined in the script
4
4
  *
5
5
  * @param script from which to extract the variables
6
6
  * @returns the list of variable names
7
7
  *
8
- * @private within the library
8
+ * @private within the promptbookStringToJson
9
9
  */
10
10
  export declare function extractVariables(script: string_javascript): Array<string_javascript_name>;
@@ -0,0 +1,8 @@
1
+ import type { Command } from '../../types/Command';
2
+ import type { string_markdown_text } from '../../types/typeAliases';
3
+ /**
4
+ * Parses one line of ul/ol to command
5
+ *
6
+ * @private within the promptbookStringToJson
7
+ */
8
+ export declare function parseCommand(listItem: string_markdown_text): Command;
@@ -3,6 +3,8 @@
3
3
  *
4
4
  * Unlike Number.parseInt, Number.parseFloat it will never ever result in NaN
5
5
  * Note: it also works only with decimal numbers
6
+ *
7
+ * @private within the parseCommand
6
8
  */
7
9
  export declare function parseNumber(value: string | number): number;
8
10
  /**
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error occurs when some expectation is not met in the execution of the pipeline
3
+ *
4
+ * Note: This is a kindof subtype of PromptbookExecutionError
3
5
  */
4
6
  export declare class ExpectError extends Error {
5
7
  readonly name = "ExpectError";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This error !!!
2
+ * This error indicates that the requested resource (for example promptbook in the library ) was not found
3
3
  */
4
4
  export declare class NotFoundError extends Error {
5
5
  readonly name = "NotFoundError";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This error indicates errors during the execution of the promptbook
3
+ */
4
+ export declare class PromptbookExecutionError extends Error {
5
+ readonly name = "PromptbookExecutionError";
6
+ constructor(message: string);
7
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This error indicates that the promptbook object has valid syntax but contains logical errors (like circular dependencies)
3
+ */
4
+ export declare class PromptbookLogicError extends Error {
5
+ readonly name = "PromptbookLogicError";
6
+ constructor(message: string);
7
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This error indicates errors in referencing promptbooks between each other
3
+ */
4
+ export declare class PromptbookReferenceError extends Error {
5
+ readonly name = "PromptbookReferenceError";
6
+ constructor(message: string);
7
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
3
+ */
4
+ export declare class PromptbookSyntaxError extends Error {
5
+ readonly name = "PromptbookSyntaxError";
6
+ constructor(message: string);
7
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This error type indicates that the error should not happen and its last check before crashing with some other error
3
+ */
4
+ export declare class UnexpectedError extends Error {
5
+ readonly name = "UnexpectedError";
6
+ constructor(message: string);
7
+ }
@@ -6,7 +6,7 @@ import { number_integer, number_positive } from '../types/typeAliases';
6
6
  */
7
7
  export type UserInterfaceTools = {
8
8
  /**
9
- * Asks the user to answer a free-text (multiline) question
9
+ * Asks the user to answer a free-text (multi-line) question
10
10
  *
11
11
  * @param options the question to ask
12
12
  * @returns the answer from the user
@@ -1,7 +1,7 @@
1
1
  import { PromptbookJson } from '../_packages/types.index';
2
2
  import { ExecutionTools } from './ExecutionTools';
3
3
  import { PromptbookExecutor } from './PromptbookExecutor';
4
- export type CreatePromptbookExecutorSettings = {
4
+ type CreatePromptbookExecutorSettings = {
5
5
  /**
6
6
  * When executor does not satisfy expectations it will be retried this amount of times
7
7
  *
@@ -1,5 +1,5 @@
1
- import { string_template } from '.././types/typeAliases';
2
- import { Parameters } from '../types/Parameters';
1
+ import { Parameters } from '../../types/Parameters';
2
+ import { string_template } from '../../types/typeAliases';
3
3
  /**
4
4
  * Replaces parameters in template with values from parameters object
5
5
  *
@@ -7,6 +7,6 @@ import { Parameters } from '../types/Parameters';
7
7
  * @param parameters the object with parameters
8
8
  * @returns the template with replaced parameters
9
9
  *
10
- * @private within the library
10
+ * @private within the createPromptbookExecutor
11
11
  */
12
12
  export declare function replaceParameters(template: string_template, parameters: Parameters): string;
@@ -21,5 +21,5 @@ export type PromptbookLibrary = {
21
21
  /**
22
22
  * Checks whether given prompt was defined in any promptbook in the library
23
23
  */
24
- isResponsibleForPrompt(prompt: Prompt): boolean;
24
+ isResponsibleForPrompt(prompt: Prompt): Promisable<boolean>;
25
25
  };
@@ -1,29 +1,23 @@
1
- import { CreatePromptbookExecutorSettings } from '../execution/createPromptbookExecutor';
2
1
  import type { Prompt } from '../types/Prompt';
3
2
  import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
4
- import type { PromptbookString } from '../types/PromptbookString';
5
3
  import type { string_promptbook_url } from '../types/typeAliases';
6
4
  import { PromptbookLibrary } from './PromptbookLibrary';
7
5
  /**
8
6
  * Library of promptbooks that groups together promptbooks for an application.
9
- * This implementation is a very thin wrapper around the Array / Set of promptbooks.
7
+ * This implementation is a very thin wrapper around the Array / Map of promptbooks.
10
8
  *
11
9
  * @see https://github.com/webgptorg/promptbook#promptbook-library
12
10
  */
13
11
  export declare class SimplePromptbookLibrary implements PromptbookLibrary {
14
- private readonly options;
15
- /**
16
- * Constructs Promptbook from any sources
12
+ private library;
13
+ /**!!!
17
14
  *
18
- * Note: During the construction syntax and logic of all sources are validated
19
- * Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended
15
+ * @param promptbooks !!!
20
16
  *
21
- * @param promptbookSources contents of .ptbk.md or .ptbk.json files
22
- * @param settings settings for creating executor functions
23
- * @returns PromptbookLibrary
17
+ * Note: During the construction logic of all promptbooks are validated
18
+ * Note: It is not recommended to use this constructor directly, use `createPromptbookLibraryFromSources` *(or other variant)* instead
24
19
  */
25
- static fromSources(promptbookSources: Record<string_promptbook_url, PromptbookJson | PromptbookString>, settings?: Partial<CreatePromptbookExecutorSettings>): SimplePromptbookLibrary;
26
- private constructor();
20
+ constructor(...promptbooks: Array<PromptbookJson>);
27
21
  /**
28
22
  * Gets all promptbooks in the library
29
23
  */
@@ -0,0 +1,7 @@
1
+ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
+ import { PromptbookString } from '../../types/PromptbookString';
3
+ import { PromptbookLibrary } from '../PromptbookLibrary';
4
+ export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
5
+ /***
6
+ * TODO: !!! Annotate all + all to README and samples
7
+ */
@@ -0,0 +1,16 @@
1
+ import { PromptbookJson, PromptbookString } from '../../_packages/types.index';
2
+ import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
3
+ export declare function createPromptbookLibraryFromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
4
+ /**
5
+ * Constructs Promptbook from any sources
6
+ *
7
+ * Note: During the construction syntax and logic of all sources are validated
8
+ * Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended
9
+ *
10
+ * @param promptbookSources contents of .ptbk.md or .ptbk.json files
11
+ * @param settings settings for creating executor functions
12
+ * @returns PromptbookLibrary
13
+ */
14
+ /***
15
+ * TODO: !!! Annotate all + all to README and samples
16
+ */
@@ -0,0 +1,6 @@
1
+ import type { string_promptbook_url } from '../../types/typeAliases';
2
+ import { PromptbookLibrary } from '../PromptbookLibrary';
3
+ export declare function createPromptbookSublibrary(library: PromptbookLibrary, predicate: (url: string_promptbook_url) => boolean): PromptbookLibrary;
4
+ /***
5
+ * TODO: !!! Annotate all + all to README and samples
6
+ */
@@ -12,3 +12,6 @@ export declare function extractOneBlockFromMarkdown(markdown: string_markdown):
12
12
  language: string | null;
13
13
  content: string;
14
14
  };
15
+ /***
16
+ * TODO: [🌻] !!! Decide of this is internal util, external util OR validator/postprocessor
17
+ */
@@ -1,6 +0,0 @@
1
- import type { string_markdown_text } from '.././types/typeAliases';
2
- import type { Command } from '../types/Command';
3
- /**
4
- * Parses one line of ul/ol to command
5
- */
6
- export declare function parseCommand(listItem: string_markdown_text): Command;
@@ -1,6 +0,0 @@
1
- import type { string_markdown_text } from '.././types/typeAliases';
2
- import type { Command } from '../types/Command';
3
- /**
4
- * Parses one line of ul/ol to command
5
- */
6
- export declare function parseCommand(listItem: string_markdown_text): Command;