@promptbook/browser 0.63.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +702 -0
- package/esm/index.es.js +220 -0
- package/esm/index.es.js.map +1 -0
- package/esm/typings/promptbook-collection/index.d.ts +252 -0
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +6 -0
- package/esm/typings/src/_packages/azure-openai.index.d.ts +6 -0
- package/esm/typings/src/_packages/browser.index.d.ts +6 -0
- package/esm/typings/src/_packages/cli.index.d.ts +4 -0
- package/esm/typings/src/_packages/core.index.d.ts +124 -0
- package/esm/typings/src/_packages/execute-javascript.index.d.ts +8 -0
- package/esm/typings/src/_packages/fake-llm.index.d.ts +6 -0
- package/esm/typings/src/_packages/langtail.index.d.ts +6 -0
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +36 -0
- package/esm/typings/src/_packages/node.index.d.ts +8 -0
- package/esm/typings/src/_packages/openai.index.d.ts +8 -0
- package/esm/typings/src/_packages/remote-client.index.d.ts +8 -0
- package/esm/typings/src/_packages/remote-server.index.d.ts +6 -0
- package/esm/typings/src/_packages/types.index.d.ts +462 -0
- package/esm/typings/src/_packages/utils.index.d.ts +130 -0
- package/esm/typings/src/cli/cli-commands/hello.d.ts +10 -0
- package/esm/typings/src/cli/cli-commands/make.d.ts +10 -0
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +10 -0
- package/esm/typings/src/cli/main.d.ts +12 -0
- package/esm/typings/src/cli/promptbookCli.d.ts +10 -0
- package/esm/typings/src/collection/PipelineCollection.d.ts +25 -0
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +38 -0
- package/esm/typings/src/collection/collectionToJson.d.ts +13 -0
- package/esm/typings/src/collection/collectionToJson.test.d.ts +7 -0
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +48 -0
- package/esm/typings/src/collection/constructors/createCollectionFromDirectory.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +13 -0
- package/esm/typings/src/collection/constructors/createCollectionFromJson.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.d.ts +23 -0
- package/esm/typings/src/collection/constructors/createCollectionFromPromise.test.d.ts +1 -0
- package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +29 -0
- package/esm/typings/src/collection/constructors/createSubcollection.d.ts +13 -0
- package/esm/typings/src/commands/BLOCK/BlockCommand.d.ts +11 -0
- package/esm/typings/src/commands/BLOCK/BlockTypes.d.ts +15 -0
- package/esm/typings/src/commands/BLOCK/blockCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/BLOCK/blockCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +14 -0
- package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +9 -0
- package/esm/typings/src/commands/EXPECT/ExpectFormatCommand.d.ts +7 -0
- package/esm/typings/src/commands/EXPECT/expectCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/JOKER/JokerCommand.d.ts +11 -0
- package/esm/typings/src/commands/JOKER/jokerCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/JOKER/jokerCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +11 -0
- package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/MODEL/ModelCommand.d.ts +13 -0
- package/esm/typings/src/commands/MODEL/modelCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/MODEL/modelCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PARAMETER/ParameterCommand.d.ts +15 -0
- package/esm/typings/src/commands/PARAMETER/parameterCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PERSONA/PersonaCommand.d.ts +13 -0
- package/esm/typings/src/commands/PERSONA/personaCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PERSONA/personaCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +11 -0
- package/esm/typings/src/commands/POSTPROCESS/postprocessCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts +11 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/URL/UrlCommand.d.ts +10 -0
- package/esm/typings/src/commands/URL/urlCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/URL/urlCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/X_ACTION/ActionCommand.d.ts +9 -0
- package/esm/typings/src/commands/X_ACTION/actionCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/X_ACTION/actionCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +9 -0
- package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +9 -0
- package/esm/typings/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +10 -0
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +13 -0
- package/esm/typings/src/commands/_common/parseCommand.d.ts +12 -0
- package/esm/typings/src/commands/_common/parseCommand.test.d.ts +1 -0
- package/esm/typings/src/commands/_common/types/Command.d.ts +6 -0
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +64 -0
- package/esm/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +9 -0
- package/esm/typings/src/commands/index.d.ts +4 -0
- package/esm/typings/src/config.d.ts +87 -0
- package/esm/typings/src/config.test.d.ts +4 -0
- package/esm/typings/src/conversion/pipelineJsonToString.d.ts +16 -0
- package/esm/typings/src/conversion/pipelineStringToJson.d.ts +38 -0
- package/esm/typings/src/conversion/pipelineStringToJson.test.d.ts +1 -0
- package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +29 -0
- package/esm/typings/src/conversion/pipelineStringToJsonSync.test.d.ts +1 -0
- package/esm/typings/src/conversion/prettify/PrettifyOptions.d.ts +13 -0
- package/esm/typings/src/conversion/prettify/prettifyPipelineString.d.ts +12 -0
- package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +27 -0
- package/esm/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +14 -0
- package/esm/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/extractVariables.d.ts +14 -0
- package/esm/typings/src/conversion/utils/extractVariables.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/renameParameter.d.ts +26 -0
- package/esm/typings/src/conversion/utils/renameParameter.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +16 -0
- package/esm/typings/src/conversion/utils/stringifyPipelineJson.test.d.ts +1 -0
- package/esm/typings/src/conversion/utils/titleToName.d.ts +9 -0
- package/esm/typings/src/conversion/utils/titleToName.test.d.ts +1 -0
- package/esm/typings/src/conversion/validation/_importPipeline.d.ts +22 -0
- package/esm/typings/src/conversion/validation/pipelineStringToJson-syntaxErrors.test.d.ts +1 -0
- package/esm/typings/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +4 -0
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +37 -0
- package/esm/typings/src/conversion/validation/validatePipeline.test.d.ts +1 -0
- package/esm/typings/src/errors/CollectionError.d.ts +9 -0
- package/esm/typings/src/errors/EnvironmentMismatchError.d.ts +9 -0
- package/esm/typings/src/errors/LimitReachedError.d.ts +9 -0
- package/esm/typings/src/errors/NotFoundError.d.ts +9 -0
- package/esm/typings/src/errors/NotYetImplementedError.d.ts +9 -0
- package/esm/typings/src/errors/ParsingError.d.ts +9 -0
- package/esm/typings/src/errors/PipelineExecutionError.d.ts +9 -0
- package/esm/typings/src/errors/PipelineLogicError.d.ts +9 -0
- package/esm/typings/src/errors/ReferenceError.d.ts +9 -0
- package/esm/typings/src/errors/UnexpectedError.d.ts +9 -0
- package/esm/typings/src/errors/VersionMismatchError.d.ts +10 -0
- package/esm/typings/src/errors/_ExpectError.d.ts +10 -0
- package/esm/typings/src/execution/CommonExecutionToolsOptions.d.ts +10 -0
- package/esm/typings/src/execution/EmbeddingVector.d.ts +8 -0
- package/esm/typings/src/execution/ExecutionTools.d.ts +33 -0
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +72 -0
- package/esm/typings/src/execution/PipelineExecutor.d.ts +64 -0
- package/esm/typings/src/execution/PromptResult.d.ts +99 -0
- package/esm/typings/src/execution/PromptResultUsage.d.ts +29 -0
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +39 -0
- package/esm/typings/src/execution/UncertainNumber.d.ts +18 -0
- package/esm/typings/src/execution/UserInterfaceTools.d.ts +46 -0
- package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +12 -0
- package/esm/typings/src/execution/createPipelineExecutor.d.ts +71 -0
- package/esm/typings/src/execution/embeddingVectorToString.d.ts +7 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +4 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +9 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +5 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +4 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +7 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +1 -0
- package/esm/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +5 -0
- package/esm/typings/src/execution/utils/addUsage.d.ts +65 -0
- package/esm/typings/src/execution/utils/addUsage.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +27 -0
- package/esm/typings/src/execution/utils/checkExpectations.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/computeUsageCounts.d.ts +10 -0
- package/esm/typings/src/execution/utils/forEachAsync.d.ts +19 -0
- package/esm/typings/src/execution/utils/uncertainNumber.d.ts +9 -0
- package/esm/typings/src/execution/utils/usageToHuman.d.ts +17 -0
- package/esm/typings/src/execution/utils/usageToHuman.test.d.ts +1 -0
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +12 -0
- package/esm/typings/src/execution/utils/usageToWorktime.test.d.ts +1 -0
- package/esm/typings/src/expectations/drafts/isDomainNameFree.d.ts +6 -0
- package/esm/typings/src/expectations/drafts/isGithubNameFree.d.ts +6 -0
- package/esm/typings/src/formats/_common/FormatDefinition.d.ts +70 -0
- package/esm/typings/src/formats/csv/ListFormatDefinition.d.ts +12 -0
- package/esm/typings/src/formats/index.d.ts +4 -0
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +16 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +6 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.test.d.ts +1 -0
- package/esm/typings/src/formats/list/ListFormatDefinition.d.ts +14 -0
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +16 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +17 -0
- package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +14 -0
- package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +22 -0
- package/esm/typings/src/knowledge/dialogs/user-interface-execution-tools.test.d.ts +1 -0
- package/esm/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +37 -0
- package/esm/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +18 -0
- package/esm/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.test.d.ts +1 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/playground/markdown-knowledge-playground.d.ts +2 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +14 -0
- package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +4 -0
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +13 -0
- package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +37 -0
- package/esm/typings/src/llm-providers/_common/getLlmToolsForCli.d.ts +20 -0
- package/esm/typings/src/llm-providers/_common/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +21 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +29 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +16 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +19 -0
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +15 -0
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countTotalUsage.d.ts +17 -0
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +36 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +52 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +12 -0
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +22 -0
- package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +6 -0
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +50 -0
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +36 -0
- package/esm/typings/src/llm-providers/azure-openai/playground/playground.d.ts +5 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +17 -0
- package/esm/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +13 -0
- package/esm/typings/src/llm-providers/langtail/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +36 -0
- package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +40 -0
- package/esm/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +14 -0
- package/esm/typings/src/llm-providers/mocked/test/fakeTextToExpectations.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/mocked/test/faked-completion.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/mocked/test/joker.test.d.ts +4 -0
- package/esm/typings/src/llm-providers/mocked/test/mocked-chat.test.d.ts +5 -0
- package/esm/typings/src/llm-providers/mocked/test/mocked-completion.test.d.ts +4 -0
- package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +54 -0
- package/esm/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +21 -0
- package/esm/typings/src/llm-providers/multiple/playground/playground.d.ts +2 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +68 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +20 -0
- package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +14 -0
- package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/computeUsage.d.ts +16 -0
- package/esm/typings/src/llm-providers/openai/computeUsage.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +29 -0
- package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +5 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +56 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +26 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Error.d.ts +11 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Progress.d.ts +12 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Request.d.ts +17 -0
- package/esm/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Response.d.ts +12 -0
- package/esm/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +37 -0
- package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +21 -0
- package/esm/typings/src/personas/preparePersona.d.ts +15 -0
- package/esm/typings/src/personas/preparePersona.test.d.ts +1 -0
- package/esm/typings/src/postprocessing/utils/extractBlock.d.ts +17 -0
- package/esm/typings/src/prepare/PrepareOptions.d.ts +22 -0
- package/esm/typings/src/prepare/isPipelinePrepared.d.ts +15 -0
- package/esm/typings/src/prepare/isPipelinePrepared.test.d.ts +1 -0
- package/esm/typings/src/prepare/preparePipeline.d.ts +16 -0
- package/esm/typings/src/prepare/prepareTemplates.d.ts +32 -0
- package/esm/typings/src/prepare/unpreparePipeline.d.ts +12 -0
- package/esm/typings/src/scripting/_test/custom-function-async.test.ts.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function-missing.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function-with-dependencies.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/custom-function.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/postprocessing.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/script-execution-errors.test.d.ts +1 -0
- package/esm/typings/src/scripting/_test/script-execution-tools.test.d.ts +1 -0
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +22 -0
- package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
- package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +8 -0
- package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +26 -0
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +51 -0
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +12 -0
- package/esm/typings/src/scripting/javascript/utils/unknownToString.d.ts +8 -0
- package/esm/typings/src/scripting/python/PythonExecutionTools.d.ts +16 -0
- package/esm/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +16 -0
- package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +24 -0
- package/esm/typings/src/storage/_common/PromptbookStorage.test-type.d.ts +5 -0
- package/esm/typings/src/storage/files-storage/FilesStorage.d.ts +31 -0
- package/esm/typings/src/storage/files-storage/FilesStorageOptions.d.ts +10 -0
- package/esm/typings/src/storage/files-storage/utils/nameToSubfolderPath.d.ts +7 -0
- package/esm/typings/src/storage/files-storage/utils/nameToSubfolderPath.test.d.ts +1 -0
- package/esm/typings/src/storage/local-storage/getLocalStorage.d.ts +10 -0
- package/esm/typings/src/storage/local-storage/getSessionStorage.d.ts +10 -0
- package/esm/typings/src/storage/memory/MemoryStorage.d.ts +33 -0
- package/esm/typings/src/storage/utils/PrefixStorage.d.ts +25 -0
- package/esm/typings/src/storage/utils/makePromptbookStorageFromWebStorage.d.ts +11 -0
- package/esm/typings/src/types/Arrayable.d.ts +10 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +102 -0
- package/esm/typings/src/types/ModelVariant.d.ts +14 -0
- package/esm/typings/src/types/PipelineJson/Expectations.d.ts +32 -0
- package/esm/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +70 -0
- package/esm/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +27 -0
- package/esm/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +25 -0
- package/esm/typings/src/types/PipelineJson/PersonaJson.d.ts +41 -0
- package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +87 -0
- package/esm/typings/src/types/PipelineJson/PreparationJson.d.ts +22 -0
- package/esm/typings/src/types/PipelineJson/PromptDialogJson.d.ts +13 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +13 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +96 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +36 -0
- package/esm/typings/src/types/PipelineJson/ScriptJson.d.ts +19 -0
- package/esm/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +12 -0
- package/esm/typings/src/types/PipelineString.d.ts +12 -0
- package/esm/typings/src/types/Prompt.d.ts +108 -0
- package/esm/typings/src/types/ScriptLanguage.d.ts +9 -0
- package/esm/typings/src/types/TaskProgress.d.ts +43 -0
- package/esm/typings/src/types/execution-report/ExecutionReportJson.d.ts +58 -0
- package/esm/typings/src/types/execution-report/ExecutionReportString.d.ts +16 -0
- package/esm/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +25 -0
- package/esm/typings/src/types/execution-report/config.d.ts +8 -0
- package/esm/typings/src/types/execution-report/countWorkingDuration.d.ts +7 -0
- package/esm/typings/src/types/execution-report/countWorkingDuration.test.d.ts +1 -0
- package/esm/typings/src/types/execution-report/executionReportJsonToString.d.ts +13 -0
- package/esm/typings/src/types/typeAliasEmoji.d.ts +9 -0
- package/esm/typings/src/types/typeAliases.d.ts +586 -0
- package/esm/typings/src/utils/FromtoItems.d.ts +19 -0
- package/esm/typings/src/utils/arrayableToArray.d.ts +11 -0
- package/esm/typings/src/utils/arrayableToArray.test.d.ts +1 -0
- package/esm/typings/src/utils/currentDate.d.ts +8 -0
- package/esm/typings/src/utils/deepClone.d.ts +10 -0
- package/esm/typings/src/utils/deepFreeze.d.ts +22 -0
- package/esm/typings/src/utils/emojis.d.ts +23 -0
- package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +7 -0
- package/esm/typings/src/utils/expectation-counters/countCharacters.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countLines.d.ts +7 -0
- package/esm/typings/src/utils/expectation-counters/countLines.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countPages.d.ts +7 -0
- package/esm/typings/src/utils/expectation-counters/countPages.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +7 -0
- package/esm/typings/src/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +13 -0
- package/esm/typings/src/utils/expectation-counters/countSentences.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/countWords.d.ts +7 -0
- package/esm/typings/src/utils/expectation-counters/countWords.test.d.ts +1 -0
- package/esm/typings/src/utils/expectation-counters/index.d.ts +8 -0
- package/esm/typings/src/utils/extractParameterNames.d.ts +10 -0
- package/esm/typings/src/utils/extractParameterNames.test.d.ts +1 -0
- package/esm/typings/src/utils/formatNumber.d.ts +6 -0
- package/esm/typings/src/utils/formatNumber.test.d.ts +1 -0
- package/esm/typings/src/utils/getCurrentIsoDate.d.ts +7 -0
- package/esm/typings/src/utils/isRunningInWhatever.d.ts +18 -0
- package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +14 -0
- package/esm/typings/src/utils/markdown/addAutoGeneratedSection.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +38 -0
- package/esm/typings/src/utils/markdown/createMarkdownChart.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/createMarkdownTable.d.ts +11 -0
- package/esm/typings/src/utils/markdown/createMarkdownTable.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +11 -0
- package/esm/typings/src/utils/markdown/escapeMarkdownBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown-real.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +34 -0
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +15 -0
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +20 -0
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/flattenMarkdown.d.ts +17 -0
- package/esm/typings/src/utils/markdown/flattenMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/parseMarkdownSection.d.ts +34 -0
- package/esm/typings/src/utils/markdown/parseMarkdownSection.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/prettifyMarkdown.d.ts +9 -0
- package/esm/typings/src/utils/markdown/prettifyMarkdown.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/removeContentComments.d.ts +10 -0
- package/esm/typings/src/utils/markdown/removeContentComments.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +9 -0
- package/esm/typings/src/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +15 -0
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +12 -0
- package/esm/typings/src/utils/normalization/IKeywords.d.ts +21 -0
- package/esm/typings/src/utils/normalization/capitalize.d.ts +6 -0
- package/esm/typings/src/utils/normalization/capitalize.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/decapitalize.d.ts +6 -0
- package/esm/typings/src/utils/normalization/decapitalize.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/isValidKeyword.d.ts +10 -0
- package/esm/typings/src/utils/normalization/isValidKeyword.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +9 -0
- package/esm/typings/src/utils/normalization/nameToUriPart.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +9 -0
- package/esm/typings/src/utils/normalization/nameToUriParts.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +18 -0
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +17 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +26 -0
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +22 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +17 -0
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeWhitespaces.d.ts +4 -0
- package/esm/typings/src/utils/normalization/normalizeWhitespaces.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/parseKeywords.d.ts +16 -0
- package/esm/typings/src/utils/normalization/parseKeywords.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/parseKeywordsFromString.d.ts +9 -0
- package/esm/typings/src/utils/normalization/parseKeywordsFromString.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +11 -0
- package/esm/typings/src/utils/normalization/removeDiacritics.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +10 -0
- package/esm/typings/src/utils/normalization/searchKeywords.test.d.ts +1 -0
- package/esm/typings/src/utils/organization/TODO_USE.d.ts +12 -0
- package/esm/typings/src/utils/organization/TODO_any.d.ts +6 -0
- package/esm/typings/src/utils/organization/TODO_object.d.ts +6 -0
- package/esm/typings/src/utils/organization/TODO_unknown.d.ts +6 -0
- package/esm/typings/src/utils/organization/___.d.ts +6 -0
- package/esm/typings/src/utils/organization/just.d.ts +14 -0
- package/esm/typings/src/utils/organization/keepUnused.d.ts +16 -0
- package/esm/typings/src/utils/organization/really_any.d.ts +6 -0
- package/esm/typings/src/utils/organization/really_unknown.d.ts +6 -0
- package/esm/typings/src/utils/parseNumber.d.ts +16 -0
- package/esm/typings/src/utils/parseNumber.test.d.ts +1 -0
- package/esm/typings/src/utils/random/randomSeed.d.ts +8 -0
- package/esm/typings/src/utils/removeEmojis.d.ts +8 -0
- package/esm/typings/src/utils/removeEmojis.test.d.ts +1 -0
- package/esm/typings/src/utils/removeQuotes.d.ts +14 -0
- package/esm/typings/src/utils/removeQuotes.test.d.ts +1 -0
- package/esm/typings/src/utils/replaceParameters.d.ts +12 -0
- package/esm/typings/src/utils/replaceParameters.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/difference.d.ts +10 -0
- package/esm/typings/src/utils/sets/difference.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/intersection.d.ts +7 -0
- package/esm/typings/src/utils/sets/intersection.test.d.ts +1 -0
- package/esm/typings/src/utils/sets/union.d.ts +7 -0
- package/esm/typings/src/utils/sets/union.test.d.ts +1 -0
- package/esm/typings/src/utils/trimCodeBlock.d.ts +9 -0
- package/esm/typings/src/utils/trimCodeBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +9 -0
- package/esm/typings/src/utils/trimEndOfCodeBlock.test.d.ts +1 -0
- package/esm/typings/src/utils/unwrapResult.d.ts +37 -0
- package/esm/typings/src/utils/unwrapResult.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/email/isValidEmail.d.ts +6 -0
- package/esm/typings/src/utils/validators/email/isValidEmail.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/filePath/isValidFilePath.d.ts +9 -0
- package/esm/typings/src/utils/validators/filePath/isValidFilePath.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +10 -0
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +15 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +12 -0
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +11 -0
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +13 -0
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +15 -0
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +13 -0
- package/esm/typings/src/utils/validators/url/isValidUrl.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/uuid/isValidUuid.d.ts +8 -0
- package/esm/typings/src/utils/validators/uuid/isValidUuid.test.d.ts +1 -0
- package/esm/typings/src/version.d.ts +8 -0
- package/package.json +53 -0
- package/umd/index.umd.js +230 -0
- package/umd/index.umd.js.map +1 -0
- package/umd/typings/promptbook-collection/index.d.ts +252 -0
- package/umd/typings/src/_packages/anthropic-claude.index.d.ts +6 -0
- package/umd/typings/src/_packages/azure-openai.index.d.ts +6 -0
- package/umd/typings/src/_packages/browser.index.d.ts +6 -0
- package/umd/typings/src/_packages/cli.index.d.ts +4 -0
- package/umd/typings/src/_packages/core.index.d.ts +124 -0
- package/umd/typings/src/_packages/execute-javascript.index.d.ts +8 -0
- package/umd/typings/src/_packages/fake-llm.index.d.ts +6 -0
- package/umd/typings/src/_packages/langtail.index.d.ts +6 -0
- package/umd/typings/src/_packages/markdown-utils.index.d.ts +36 -0
- package/umd/typings/src/_packages/node.index.d.ts +8 -0
- package/umd/typings/src/_packages/openai.index.d.ts +8 -0
- package/umd/typings/src/_packages/remote-client.index.d.ts +8 -0
- package/umd/typings/src/_packages/remote-server.index.d.ts +6 -0
- package/umd/typings/src/_packages/types.index.d.ts +462 -0
- package/umd/typings/src/_packages/utils.index.d.ts +130 -0
- package/umd/typings/src/cli/cli-commands/hello.d.ts +10 -0
- package/umd/typings/src/cli/cli-commands/make.d.ts +10 -0
- package/umd/typings/src/cli/cli-commands/prettify.d.ts +10 -0
- package/umd/typings/src/cli/main.d.ts +12 -0
- package/umd/typings/src/cli/promptbookCli.d.ts +10 -0
- package/umd/typings/src/collection/PipelineCollection.d.ts +25 -0
- package/umd/typings/src/collection/SimplePipelineCollection.d.ts +38 -0
- package/umd/typings/src/collection/collectionToJson.d.ts +13 -0
- package/umd/typings/src/collection/collectionToJson.test.d.ts +7 -0
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +48 -0
- package/umd/typings/src/collection/constructors/createCollectionFromDirectory.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromJson.d.ts +13 -0
- package/umd/typings/src/collection/constructors/createCollectionFromJson.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.d.ts +23 -0
- package/umd/typings/src/collection/constructors/createCollectionFromPromise.test.d.ts +1 -0
- package/umd/typings/src/collection/constructors/createCollectionFromUrl.d.ts +29 -0
- package/umd/typings/src/collection/constructors/createSubcollection.d.ts +13 -0
- package/umd/typings/src/commands/BLOCK/BlockCommand.d.ts +11 -0
- package/umd/typings/src/commands/BLOCK/BlockTypes.d.ts +15 -0
- package/umd/typings/src/commands/BLOCK/blockCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/BLOCK/blockCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/EXPECT/ExpectAmountCommand.d.ts +14 -0
- package/umd/typings/src/commands/EXPECT/ExpectCommand.d.ts +9 -0
- package/umd/typings/src/commands/EXPECT/ExpectFormatCommand.d.ts +7 -0
- package/umd/typings/src/commands/EXPECT/expectCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/EXPECT/expectCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/JOKER/JokerCommand.d.ts +11 -0
- package/umd/typings/src/commands/JOKER/jokerCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/JOKER/jokerCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +11 -0
- package/umd/typings/src/commands/KNOWLEDGE/knowledgeCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/MODEL/ModelCommand.d.ts +13 -0
- package/umd/typings/src/commands/MODEL/modelCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/MODEL/modelCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PARAMETER/ParameterCommand.d.ts +15 -0
- package/umd/typings/src/commands/PARAMETER/parameterCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PARAMETER/parameterCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PERSONA/PersonaCommand.d.ts +13 -0
- package/umd/typings/src/commands/PERSONA/personaCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PERSONA/personaCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/POSTPROCESS/PostprocessCommand.d.ts +11 -0
- package/umd/typings/src/commands/POSTPROCESS/postprocessCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/PromptbookVersionCommand.d.ts +11 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/PROMPTBOOK_VERSION/promptbookVersionCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/URL/UrlCommand.d.ts +10 -0
- package/umd/typings/src/commands/URL/urlCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/URL/urlCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/X_ACTION/ActionCommand.d.ts +9 -0
- package/umd/typings/src/commands/X_ACTION/actionCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/X_ACTION/actionCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +9 -0
- package/umd/typings/src/commands/X_INSTRUMENT/instrumentCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +9 -0
- package/umd/typings/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +10 -0
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +13 -0
- package/umd/typings/src/commands/_common/parseCommand.d.ts +12 -0
- package/umd/typings/src/commands/_common/parseCommand.test.d.ts +1 -0
- package/umd/typings/src/commands/_common/types/Command.d.ts +6 -0
- package/umd/typings/src/commands/_common/types/CommandParser.d.ts +64 -0
- package/umd/typings/src/commands/_common/types/CommandUsagePlaces.d.ts +9 -0
- package/umd/typings/src/commands/index.d.ts +4 -0
- package/umd/typings/src/config.d.ts +87 -0
- package/umd/typings/src/config.test.d.ts +4 -0
- package/umd/typings/src/conversion/pipelineJsonToString.d.ts +16 -0
- package/umd/typings/src/conversion/pipelineStringToJson.d.ts +38 -0
- package/umd/typings/src/conversion/pipelineStringToJson.test.d.ts +1 -0
- package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +29 -0
- package/umd/typings/src/conversion/pipelineStringToJsonSync.test.d.ts +1 -0
- package/umd/typings/src/conversion/prettify/PrettifyOptions.d.ts +13 -0
- package/umd/typings/src/conversion/prettify/prettifyPipelineString.d.ts +12 -0
- package/umd/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +27 -0
- package/umd/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +14 -0
- package/umd/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/extractVariables.d.ts +14 -0
- package/umd/typings/src/conversion/utils/extractVariables.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/renameParameter.d.ts +26 -0
- package/umd/typings/src/conversion/utils/renameParameter.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +16 -0
- package/umd/typings/src/conversion/utils/stringifyPipelineJson.test.d.ts +1 -0
- package/umd/typings/src/conversion/utils/titleToName.d.ts +9 -0
- package/umd/typings/src/conversion/utils/titleToName.test.d.ts +1 -0
- package/umd/typings/src/conversion/validation/_importPipeline.d.ts +22 -0
- package/umd/typings/src/conversion/validation/pipelineStringToJson-syntaxErrors.test.d.ts +1 -0
- package/umd/typings/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +4 -0
- package/umd/typings/src/conversion/validation/validatePipeline.d.ts +37 -0
- package/umd/typings/src/conversion/validation/validatePipeline.test.d.ts +1 -0
- package/umd/typings/src/errors/CollectionError.d.ts +9 -0
- package/umd/typings/src/errors/EnvironmentMismatchError.d.ts +9 -0
- package/umd/typings/src/errors/LimitReachedError.d.ts +9 -0
- package/umd/typings/src/errors/NotFoundError.d.ts +9 -0
- package/umd/typings/src/errors/NotYetImplementedError.d.ts +9 -0
- package/umd/typings/src/errors/ParsingError.d.ts +9 -0
- package/umd/typings/src/errors/PipelineExecutionError.d.ts +9 -0
- package/umd/typings/src/errors/PipelineLogicError.d.ts +9 -0
- package/umd/typings/src/errors/ReferenceError.d.ts +9 -0
- package/umd/typings/src/errors/UnexpectedError.d.ts +9 -0
- package/umd/typings/src/errors/VersionMismatchError.d.ts +10 -0
- package/umd/typings/src/errors/_ExpectError.d.ts +10 -0
- package/umd/typings/src/execution/CommonExecutionToolsOptions.d.ts +10 -0
- package/umd/typings/src/execution/EmbeddingVector.d.ts +8 -0
- package/umd/typings/src/execution/ExecutionTools.d.ts +33 -0
- package/umd/typings/src/execution/LlmExecutionTools.d.ts +72 -0
- package/umd/typings/src/execution/PipelineExecutor.d.ts +64 -0
- package/umd/typings/src/execution/PromptResult.d.ts +99 -0
- package/umd/typings/src/execution/PromptResultUsage.d.ts +29 -0
- package/umd/typings/src/execution/ScriptExecutionTools.d.ts +39 -0
- package/umd/typings/src/execution/UncertainNumber.d.ts +18 -0
- package/umd/typings/src/execution/UserInterfaceTools.d.ts +46 -0
- package/umd/typings/src/execution/assertsExecutionSuccessful.d.ts +12 -0
- package/umd/typings/src/execution/createPipelineExecutor.d.ts +71 -0
- package/umd/typings/src/execution/embeddingVectorToString.d.ts +7 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +4 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +9 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +5 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +11 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +4 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +7 -0
- package/umd/typings/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.test.d.ts +1 -0
- package/umd/typings/src/execution/translation/automatic-translate/translateMessages.d.ts +5 -0
- package/umd/typings/src/execution/utils/addUsage.d.ts +65 -0
- package/umd/typings/src/execution/utils/addUsage.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/checkExpectations.d.ts +27 -0
- package/umd/typings/src/execution/utils/checkExpectations.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/computeUsageCounts.d.ts +10 -0
- package/umd/typings/src/execution/utils/forEachAsync.d.ts +19 -0
- package/umd/typings/src/execution/utils/uncertainNumber.d.ts +9 -0
- package/umd/typings/src/execution/utils/usageToHuman.d.ts +17 -0
- package/umd/typings/src/execution/utils/usageToHuman.test.d.ts +1 -0
- package/umd/typings/src/execution/utils/usageToWorktime.d.ts +12 -0
- package/umd/typings/src/execution/utils/usageToWorktime.test.d.ts +1 -0
- package/umd/typings/src/expectations/drafts/isDomainNameFree.d.ts +6 -0
- package/umd/typings/src/expectations/drafts/isGithubNameFree.d.ts +6 -0
- package/umd/typings/src/formats/_common/FormatDefinition.d.ts +70 -0
- package/umd/typings/src/formats/csv/ListFormatDefinition.d.ts +12 -0
- package/umd/typings/src/formats/index.d.ts +4 -0
- package/umd/typings/src/formats/json/JsonFormatDefinition.d.ts +16 -0
- package/umd/typings/src/formats/json/utils/isValidJsonString.d.ts +6 -0
- package/umd/typings/src/formats/json/utils/isValidJsonString.test.d.ts +1 -0
- package/umd/typings/src/formats/list/ListFormatDefinition.d.ts +14 -0
- package/umd/typings/src/formats/xml/XmlFormatDefinition.d.ts +16 -0
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +17 -0
- package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +14 -0
- package/umd/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +22 -0
- package/umd/typings/src/knowledge/dialogs/user-interface-execution-tools.test.d.ts +1 -0
- package/umd/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +37 -0
- package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +18 -0
- package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.test.d.ts +1 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/playground/markdown-knowledge-playground.d.ts +2 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +14 -0
- package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.test.d.ts +4 -0
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +13 -0
- package/umd/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +37 -0
- package/umd/typings/src/llm-providers/_common/getLlmToolsForCli.d.ts +20 -0
- package/umd/typings/src/llm-providers/_common/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +21 -0
- package/umd/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +29 -0
- package/umd/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +16 -0
- package/umd/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +19 -0
- package/umd/typings/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +15 -0
- package/umd/typings/src/llm-providers/_common/utils/count-total-usage/countTotalUsage.d.ts +17 -0
- package/umd/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +36 -0
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +52 -0
- package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +12 -0
- package/umd/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +22 -0
- package/umd/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +6 -0
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +50 -0
- package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +36 -0
- package/umd/typings/src/llm-providers/azure-openai/playground/playground.d.ts +5 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +17 -0
- package/umd/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +13 -0
- package/umd/typings/src/llm-providers/langtail/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +36 -0
- package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +40 -0
- package/umd/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +14 -0
- package/umd/typings/src/llm-providers/mocked/test/fakeTextToExpectations.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/mocked/test/faked-completion.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/mocked/test/joker.test.d.ts +4 -0
- package/umd/typings/src/llm-providers/mocked/test/mocked-chat.test.d.ts +5 -0
- package/umd/typings/src/llm-providers/mocked/test/mocked-completion.test.d.ts +4 -0
- package/umd/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +54 -0
- package/umd/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +21 -0
- package/umd/typings/src/llm-providers/multiple/playground/playground.d.ts +2 -0
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +68 -0
- package/umd/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +20 -0
- package/umd/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +14 -0
- package/umd/typings/src/llm-providers/openai/computeOpenaiUsage.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/openai/computeUsage.d.ts +16 -0
- package/umd/typings/src/llm-providers/openai/computeUsage.test.d.ts +1 -0
- package/umd/typings/src/llm-providers/openai/openai-models.d.ts +29 -0
- package/umd/typings/src/llm-providers/openai/playground/playground.d.ts +5 -0
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +56 -0
- package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +26 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Error.d.ts +11 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Progress.d.ts +12 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Request.d.ts +17 -0
- package/umd/typings/src/llm-providers/remote/interfaces/Promptbook_Server_Response.d.ts +12 -0
- package/umd/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +37 -0
- package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +21 -0
- package/umd/typings/src/personas/preparePersona.d.ts +15 -0
- package/umd/typings/src/personas/preparePersona.test.d.ts +1 -0
- package/umd/typings/src/postprocessing/utils/extractBlock.d.ts +17 -0
- package/umd/typings/src/prepare/PrepareOptions.d.ts +22 -0
- package/umd/typings/src/prepare/isPipelinePrepared.d.ts +15 -0
- package/umd/typings/src/prepare/isPipelinePrepared.test.d.ts +1 -0
- package/umd/typings/src/prepare/preparePipeline.d.ts +16 -0
- package/umd/typings/src/prepare/prepareTemplates.d.ts +32 -0
- package/umd/typings/src/prepare/unpreparePipeline.d.ts +12 -0
- package/umd/typings/src/scripting/_test/custom-function-async.test.ts.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function-missing.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function-with-dependencies.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/custom-function.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/postprocessing.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/script-execution-errors.test.d.ts +1 -0
- package/umd/typings/src/scripting/_test/script-execution-tools.test.d.ts +1 -0
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +22 -0
- package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +4 -0
- package/umd/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +8 -0
- package/umd/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +26 -0
- package/umd/typings/src/scripting/javascript/postprocessing-functions.d.ts +51 -0
- package/umd/typings/src/scripting/javascript/utils/preserve.d.ts +12 -0
- package/umd/typings/src/scripting/javascript/utils/unknownToString.d.ts +8 -0
- package/umd/typings/src/scripting/python/PythonExecutionTools.d.ts +16 -0
- package/umd/typings/src/scripting/typescript/TypescriptExecutionTools.d.ts +16 -0
- package/umd/typings/src/storage/_common/PromptbookStorage.d.ts +24 -0
- package/umd/typings/src/storage/_common/PromptbookStorage.test-type.d.ts +5 -0
- package/umd/typings/src/storage/files-storage/FilesStorage.d.ts +31 -0
- package/umd/typings/src/storage/files-storage/FilesStorageOptions.d.ts +10 -0
- package/umd/typings/src/storage/files-storage/utils/nameToSubfolderPath.d.ts +7 -0
- package/umd/typings/src/storage/files-storage/utils/nameToSubfolderPath.test.d.ts +1 -0
- package/umd/typings/src/storage/local-storage/getLocalStorage.d.ts +10 -0
- package/umd/typings/src/storage/local-storage/getSessionStorage.d.ts +10 -0
- package/umd/typings/src/storage/memory/MemoryStorage.d.ts +33 -0
- package/umd/typings/src/storage/utils/PrefixStorage.d.ts +25 -0
- package/umd/typings/src/storage/utils/makePromptbookStorageFromWebStorage.d.ts +11 -0
- package/umd/typings/src/types/Arrayable.d.ts +10 -0
- package/umd/typings/src/types/ModelRequirements.d.ts +102 -0
- package/umd/typings/src/types/ModelVariant.d.ts +14 -0
- package/umd/typings/src/types/PipelineJson/Expectations.d.ts +32 -0
- package/umd/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +70 -0
- package/umd/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +27 -0
- package/umd/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +25 -0
- package/umd/typings/src/types/PipelineJson/PersonaJson.d.ts +41 -0
- package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +87 -0
- package/umd/typings/src/types/PipelineJson/PreparationJson.d.ts +22 -0
- package/umd/typings/src/types/PipelineJson/PromptDialogJson.d.ts +13 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateJson.d.ts +13 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +96 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +36 -0
- package/umd/typings/src/types/PipelineJson/ScriptJson.d.ts +19 -0
- package/umd/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +12 -0
- package/umd/typings/src/types/PipelineString.d.ts +12 -0
- package/umd/typings/src/types/Prompt.d.ts +108 -0
- package/umd/typings/src/types/ScriptLanguage.d.ts +9 -0
- package/umd/typings/src/types/TaskProgress.d.ts +43 -0
- package/umd/typings/src/types/execution-report/ExecutionReportJson.d.ts +58 -0
- package/umd/typings/src/types/execution-report/ExecutionReportString.d.ts +16 -0
- package/umd/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +25 -0
- package/umd/typings/src/types/execution-report/config.d.ts +8 -0
- package/umd/typings/src/types/execution-report/countWorkingDuration.d.ts +7 -0
- package/umd/typings/src/types/execution-report/countWorkingDuration.test.d.ts +1 -0
- package/umd/typings/src/types/execution-report/executionReportJsonToString.d.ts +13 -0
- package/umd/typings/src/types/typeAliasEmoji.d.ts +9 -0
- package/umd/typings/src/types/typeAliases.d.ts +586 -0
- package/umd/typings/src/utils/FromtoItems.d.ts +19 -0
- package/umd/typings/src/utils/arrayableToArray.d.ts +11 -0
- package/umd/typings/src/utils/arrayableToArray.test.d.ts +1 -0
- package/umd/typings/src/utils/currentDate.d.ts +8 -0
- package/umd/typings/src/utils/deepClone.d.ts +10 -0
- package/umd/typings/src/utils/deepFreeze.d.ts +22 -0
- package/umd/typings/src/utils/emojis.d.ts +23 -0
- package/umd/typings/src/utils/expectation-counters/countCharacters.d.ts +7 -0
- package/umd/typings/src/utils/expectation-counters/countCharacters.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countLines.d.ts +7 -0
- package/umd/typings/src/utils/expectation-counters/countLines.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countPages.d.ts +7 -0
- package/umd/typings/src/utils/expectation-counters/countPages.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countParagraphs.d.ts +7 -0
- package/umd/typings/src/utils/expectation-counters/countParagraphs.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countSentences.d.ts +13 -0
- package/umd/typings/src/utils/expectation-counters/countSentences.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/countWords.d.ts +7 -0
- package/umd/typings/src/utils/expectation-counters/countWords.test.d.ts +1 -0
- package/umd/typings/src/utils/expectation-counters/index.d.ts +8 -0
- package/umd/typings/src/utils/extractParameterNames.d.ts +10 -0
- package/umd/typings/src/utils/extractParameterNames.test.d.ts +1 -0
- package/umd/typings/src/utils/formatNumber.d.ts +6 -0
- package/umd/typings/src/utils/formatNumber.test.d.ts +1 -0
- package/umd/typings/src/utils/getCurrentIsoDate.d.ts +7 -0
- package/umd/typings/src/utils/isRunningInWhatever.d.ts +18 -0
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +14 -0
- package/umd/typings/src/utils/markdown/addAutoGeneratedSection.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +38 -0
- package/umd/typings/src/utils/markdown/createMarkdownChart.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +11 -0
- package/umd/typings/src/utils/markdown/createMarkdownTable.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +11 -0
- package/umd/typings/src/utils/markdown/escapeMarkdownBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown-real.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +34 -0
- package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +15 -0
- package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +20 -0
- package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/flattenMarkdown.d.ts +17 -0
- package/umd/typings/src/utils/markdown/flattenMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/parseMarkdownSection.d.ts +34 -0
- package/umd/typings/src/utils/markdown/parseMarkdownSection.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/prettifyMarkdown.d.ts +9 -0
- package/umd/typings/src/utils/markdown/prettifyMarkdown.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/removeContentComments.d.ts +10 -0
- package/umd/typings/src/utils/markdown/removeContentComments.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +9 -0
- package/umd/typings/src/utils/markdown/removeMarkdownFormatting.test.d.ts +1 -0
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +15 -0
- package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +12 -0
- package/umd/typings/src/utils/normalization/IKeywords.d.ts +21 -0
- package/umd/typings/src/utils/normalization/capitalize.d.ts +6 -0
- package/umd/typings/src/utils/normalization/capitalize.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/decapitalize.d.ts +6 -0
- package/umd/typings/src/utils/normalization/decapitalize.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/isValidKeyword.d.ts +10 -0
- package/umd/typings/src/utils/normalization/isValidKeyword.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriPart.d.ts +9 -0
- package/umd/typings/src/utils/normalization/nameToUriPart.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/nameToUriParts.d.ts +9 -0
- package/umd/typings/src/utils/normalization/nameToUriParts.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +18 -0
- package/umd/typings/src/utils/normalization/normalize-to-kebab-case.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +17 -0
- package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +26 -0
- package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +22 -0
- package/umd/typings/src/utils/normalization/normalizeTo_camelCase.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +17 -0
- package/umd/typings/src/utils/normalization/normalizeTo_snake_case.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/normalizeWhitespaces.d.ts +4 -0
- package/umd/typings/src/utils/normalization/normalizeWhitespaces.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/parseKeywords.d.ts +16 -0
- package/umd/typings/src/utils/normalization/parseKeywords.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.d.ts +9 -0
- package/umd/typings/src/utils/normalization/parseKeywordsFromString.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/removeDiacritics.d.ts +11 -0
- package/umd/typings/src/utils/normalization/removeDiacritics.test.d.ts +1 -0
- package/umd/typings/src/utils/normalization/searchKeywords.d.ts +10 -0
- package/umd/typings/src/utils/normalization/searchKeywords.test.d.ts +1 -0
- package/umd/typings/src/utils/organization/TODO_USE.d.ts +12 -0
- package/umd/typings/src/utils/organization/TODO_any.d.ts +6 -0
- package/umd/typings/src/utils/organization/TODO_object.d.ts +6 -0
- package/umd/typings/src/utils/organization/TODO_unknown.d.ts +6 -0
- package/umd/typings/src/utils/organization/___.d.ts +6 -0
- package/umd/typings/src/utils/organization/just.d.ts +14 -0
- package/umd/typings/src/utils/organization/keepUnused.d.ts +16 -0
- package/umd/typings/src/utils/organization/really_any.d.ts +6 -0
- package/umd/typings/src/utils/organization/really_unknown.d.ts +6 -0
- package/umd/typings/src/utils/parseNumber.d.ts +16 -0
- package/umd/typings/src/utils/parseNumber.test.d.ts +1 -0
- package/umd/typings/src/utils/random/randomSeed.d.ts +8 -0
- package/umd/typings/src/utils/removeEmojis.d.ts +8 -0
- package/umd/typings/src/utils/removeEmojis.test.d.ts +1 -0
- package/umd/typings/src/utils/removeQuotes.d.ts +14 -0
- package/umd/typings/src/utils/removeQuotes.test.d.ts +1 -0
- package/umd/typings/src/utils/replaceParameters.d.ts +12 -0
- package/umd/typings/src/utils/replaceParameters.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/difference.d.ts +10 -0
- package/umd/typings/src/utils/sets/difference.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/intersection.d.ts +7 -0
- package/umd/typings/src/utils/sets/intersection.test.d.ts +1 -0
- package/umd/typings/src/utils/sets/union.d.ts +7 -0
- package/umd/typings/src/utils/sets/union.test.d.ts +1 -0
- package/umd/typings/src/utils/trimCodeBlock.d.ts +9 -0
- package/umd/typings/src/utils/trimCodeBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/trimEndOfCodeBlock.d.ts +9 -0
- package/umd/typings/src/utils/trimEndOfCodeBlock.test.d.ts +1 -0
- package/umd/typings/src/utils/unwrapResult.d.ts +37 -0
- package/umd/typings/src/utils/unwrapResult.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/email/isValidEmail.d.ts +6 -0
- package/umd/typings/src/utils/validators/email/isValidEmail.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.d.ts +9 -0
- package/umd/typings/src/utils/validators/filePath/isValidFilePath.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +10 -0
- package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +15 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +12 -0
- package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +11 -0
- package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +13 -0
- package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +15 -0
- package/umd/typings/src/utils/validators/url/isValidPipelineUrl.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/url/isValidUrl.d.ts +13 -0
- package/umd/typings/src/utils/validators/url/isValidUrl.test.d.ts +1 -0
- package/umd/typings/src/utils/validators/uuid/isValidUuid.d.ts +8 -0
- package/umd/typings/src/utils/validators/uuid/isValidUuid.test.d.ts +1 -0
- package/umd/typings/src/version.d.ts +8 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
|
|
2
|
+
import type { ExecutionTools } from './ExecutionTools';
|
|
3
|
+
import type { PipelineExecutor } from './PipelineExecutor';
|
|
4
|
+
type CreatePipelineExecutorSettings = {
|
|
5
|
+
/**
|
|
6
|
+
* When executor does not satisfy expectations it will be retried this amount of times
|
|
7
|
+
*
|
|
8
|
+
* @default MAX_EXECUTION_ATTEMPTS
|
|
9
|
+
*/
|
|
10
|
+
readonly maxExecutionAttempts?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Maximum number of tasks running in parallel
|
|
13
|
+
*
|
|
14
|
+
* @default MAX_PARALLEL_COUNT
|
|
15
|
+
*/
|
|
16
|
+
readonly maxParallelCount?: number;
|
|
17
|
+
/**
|
|
18
|
+
* If true, the preparation logs additional information
|
|
19
|
+
*
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
readonly isVerbose?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* If you pass fully prepared pipeline, this does not matter
|
|
25
|
+
*
|
|
26
|
+
* Otherwise:
|
|
27
|
+
* If false or not set, warning is shown when pipeline is not prepared
|
|
28
|
+
* If true, warning is suppressed
|
|
29
|
+
*
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
readonly isNotPreparedWarningSupressed?: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Options for `createPipelineExecutor`
|
|
36
|
+
*/
|
|
37
|
+
interface CreatePipelineExecutorOptions {
|
|
38
|
+
/**
|
|
39
|
+
* The pipeline to be executed
|
|
40
|
+
*/
|
|
41
|
+
readonly pipeline: PipelineJson;
|
|
42
|
+
/**
|
|
43
|
+
* The execution tools to be used during the execution of the pipeline
|
|
44
|
+
*/
|
|
45
|
+
readonly tools: ExecutionTools;
|
|
46
|
+
/**
|
|
47
|
+
* Optional settings for the pipeline executor
|
|
48
|
+
*/
|
|
49
|
+
readonly settings?: Partial<CreatePipelineExecutorSettings>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Creates executor function from pipeline and execution tools.
|
|
53
|
+
*
|
|
54
|
+
* @returns The executor function
|
|
55
|
+
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
56
|
+
* @public exported from `@promptbook/core`
|
|
57
|
+
*/
|
|
58
|
+
export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
|
|
59
|
+
export {};
|
|
60
|
+
/**
|
|
61
|
+
* TODO: Use isVerbose here (not only pass to `preparePipeline`)
|
|
62
|
+
* TODO: [🧠][🌳] Use here `countTotalUsage` and put preparation and prepared pipiline to report
|
|
63
|
+
* TODO: [🪂] Use maxParallelCount here (not only pass to `preparePipeline`)
|
|
64
|
+
* TODO: [♈] Probbably move expectations from templates to parameters
|
|
65
|
+
* TODO: [🧠] When not meet expectations in PROMPT_DIALOG, make some way to tell the user
|
|
66
|
+
* TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
|
|
67
|
+
* Note: CreatePipelineExecutorOptions are just connected to PipelineExecutor so do not extract to types folder
|
|
68
|
+
* TODO: [🧠][3] transparent = (report intermediate parameters) / opaque execution = (report only output parameters) progress reporting mode
|
|
69
|
+
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
70
|
+
* TODO: [🧠][💷] `assertsExecutionSuccessful` should be the method of `PipelineExecutor` result BUT maybe NOT to preserve pure JSON object
|
|
71
|
+
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
+
/**
|
|
3
|
+
* This will wrap an automatic translator and log each translation into the console
|
|
4
|
+
*/
|
|
5
|
+
export declare class DebugAutomaticTranslator implements AutomaticTranslator {
|
|
6
|
+
private readonly automaticTranslator;
|
|
7
|
+
constructor(automaticTranslator: AutomaticTranslator);
|
|
8
|
+
translate(message: string): Promise<string>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AutomaticTranslator } from './AutomaticTranslator';
|
|
2
|
+
import type { TranslatorOptions } from './TranslatorOptions';
|
|
3
|
+
interface LindatAutomaticTranslatorOptions extends TranslatorOptions {
|
|
4
|
+
apiUrl?: URL;
|
|
5
|
+
}
|
|
6
|
+
export declare class LindatAutomaticTranslator implements AutomaticTranslator {
|
|
7
|
+
private readonly options;
|
|
8
|
+
constructor(options: LindatAutomaticTranslatorOptions);
|
|
9
|
+
translate(message: string): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AutomaticTranslator } from './automatic-translators/AutomaticTranslator';
|
|
2
|
+
import type { TranslatorOptions } from './automatic-translators/TranslatorOptions';
|
|
3
|
+
export declare function translateMessages({ automaticTranslator, from, to, }: {
|
|
4
|
+
automaticTranslator: AutomaticTranslator;
|
|
5
|
+
} & TranslatorOptions): Promise<void>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { PromptResultUsage } from '../PromptResultUsage';
|
|
2
|
+
/**
|
|
3
|
+
* @@@
|
|
4
|
+
*
|
|
5
|
+
* @public exported from `@promptbook/core`
|
|
6
|
+
*/
|
|
7
|
+
export declare const ZERO_USAGE: import("type-fest/source/readonly-deep").ReadonlyObjectDeep<{
|
|
8
|
+
readonly price: {
|
|
9
|
+
readonly value: 0;
|
|
10
|
+
};
|
|
11
|
+
readonly input: {
|
|
12
|
+
readonly tokensCount: {
|
|
13
|
+
readonly value: 0;
|
|
14
|
+
};
|
|
15
|
+
readonly charactersCount: {
|
|
16
|
+
readonly value: 0;
|
|
17
|
+
};
|
|
18
|
+
readonly wordsCount: {
|
|
19
|
+
readonly value: 0;
|
|
20
|
+
};
|
|
21
|
+
readonly sentencesCount: {
|
|
22
|
+
readonly value: 0;
|
|
23
|
+
};
|
|
24
|
+
readonly linesCount: {
|
|
25
|
+
readonly value: 0;
|
|
26
|
+
};
|
|
27
|
+
readonly paragraphsCount: {
|
|
28
|
+
readonly value: 0;
|
|
29
|
+
};
|
|
30
|
+
readonly pagesCount: {
|
|
31
|
+
readonly value: 0;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly output: {
|
|
35
|
+
readonly tokensCount: {
|
|
36
|
+
readonly value: 0;
|
|
37
|
+
};
|
|
38
|
+
readonly charactersCount: {
|
|
39
|
+
readonly value: 0;
|
|
40
|
+
};
|
|
41
|
+
readonly wordsCount: {
|
|
42
|
+
readonly value: 0;
|
|
43
|
+
};
|
|
44
|
+
readonly sentencesCount: {
|
|
45
|
+
readonly value: 0;
|
|
46
|
+
};
|
|
47
|
+
readonly linesCount: {
|
|
48
|
+
readonly value: 0;
|
|
49
|
+
};
|
|
50
|
+
readonly paragraphsCount: {
|
|
51
|
+
readonly value: 0;
|
|
52
|
+
};
|
|
53
|
+
readonly pagesCount: {
|
|
54
|
+
readonly value: 0;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Function `addUsage` will add multiple usages into one
|
|
60
|
+
*
|
|
61
|
+
* Note: If you provide 0 values, it returns ZERO_USAGE
|
|
62
|
+
*
|
|
63
|
+
* @public exported from `@promptbook/core`
|
|
64
|
+
*/
|
|
65
|
+
export declare function addUsage(...usageItems: Array<PromptResultUsage>): PromptResultUsage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Expectations } from '../../types/PipelineJson/Expectations';
|
|
2
|
+
/**
|
|
3
|
+
* Function checkExpectations will check if the expectations on given value are met
|
|
4
|
+
*
|
|
5
|
+
* Note: There are two simmilar functions:
|
|
6
|
+
* - `checkExpectations` which throws an error if the expectations are not met
|
|
7
|
+
* - `isPassingExpectations` which returns a boolean
|
|
8
|
+
*
|
|
9
|
+
* @throws {ExpectError} if the expectations are not met
|
|
10
|
+
* @returns {void} Nothing
|
|
11
|
+
* @public exported from `@promptbook/core`
|
|
12
|
+
*/
|
|
13
|
+
export declare function checkExpectations(expectations: Expectations, value: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Function checkExpectations will check if the expectations on given value are met
|
|
16
|
+
*
|
|
17
|
+
* Note: There are two simmilar functions:
|
|
18
|
+
* - `checkExpectations` which throws an error if the expectations are not met
|
|
19
|
+
* - `isPassingExpectations` which returns a boolean
|
|
20
|
+
*
|
|
21
|
+
* @returns {boolean} True if the expectations are met
|
|
22
|
+
* @public exported from `@promptbook/core`
|
|
23
|
+
*/
|
|
24
|
+
export declare function isPassingExpectations(expectations: Expectations, value: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* TODO: [💝] Unite object for expecting amount and format
|
|
27
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PromptResultUsageCounts } from '../PromptResultUsage';
|
|
2
|
+
/**
|
|
3
|
+
* Helper of usage compute
|
|
4
|
+
*
|
|
5
|
+
* @param content the content of prompt or response
|
|
6
|
+
* @returns part of PromptResultUsageCounts
|
|
7
|
+
*
|
|
8
|
+
* @private internal util of LlmExecutionTools
|
|
9
|
+
*/
|
|
10
|
+
export declare function computeUsageCounts(content: string): Omit<PromptResultUsageCounts, 'tokensCount'>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
type ForEachAsyncOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Maximum number of tasks running in parallel
|
|
5
|
+
*
|
|
6
|
+
* @default Infinity
|
|
7
|
+
*/
|
|
8
|
+
readonly maxParallelCount?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Async version of Array.forEach
|
|
12
|
+
*
|
|
13
|
+
* @param array - Array to iterate over
|
|
14
|
+
* @param options - Options for the function
|
|
15
|
+
* @param callbackfunction - Function to call for each item
|
|
16
|
+
* @public exported from `@promptbook/utils`
|
|
17
|
+
*/
|
|
18
|
+
export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UncertainNumber } from '../UncertainNumber';
|
|
2
|
+
/**
|
|
3
|
+
* Make UncertainNumber
|
|
4
|
+
*
|
|
5
|
+
* @param value
|
|
6
|
+
*
|
|
7
|
+
* @private utility for initializating UncertainNumber
|
|
8
|
+
*/
|
|
9
|
+
export declare function uncertainNumber(value?: number | typeof NaN | undefined | null): UncertainNumber;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { string_markdown } from '../../types/typeAliases';
|
|
2
|
+
import type { PromptResultUsage } from '../PromptResultUsage';
|
|
3
|
+
/**
|
|
4
|
+
* Function `usageToHuman` will take usage and convert it to human readable report
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/core`
|
|
7
|
+
*/
|
|
8
|
+
export declare function usageToHuman(usage: PromptResultUsage): string_markdown;
|
|
9
|
+
/**
|
|
10
|
+
* TODO: Use "$1" not "1 USD"
|
|
11
|
+
* TODO: Use markdown formatting like "Cost approximately **$1**"
|
|
12
|
+
* TODO: Report in minutes, seconds, days NOT 0.1 hours
|
|
13
|
+
* TODO: [🧠] Maybe make from `uncertainNumberToHuman` separate exported utility
|
|
14
|
+
* TODO: When negligible usage, report "Negligible" or just don't report it
|
|
15
|
+
* TODO: [🧠] Maybe use "~" instead of "approximately"
|
|
16
|
+
* TODO: [🏛] Maybe make some markdown builder
|
|
17
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PromptResultUsage } from '../PromptResultUsage';
|
|
2
|
+
import type { UncertainNumber } from '../UncertainNumber';
|
|
3
|
+
/**
|
|
4
|
+
* Function usageToWorktime will take usage and estimate saved worktime in hours of reading / writing
|
|
5
|
+
*
|
|
6
|
+
* Note: This is an estimate based of theese sources:
|
|
7
|
+
* - https://jecas.cz/doba-cteni
|
|
8
|
+
* - https://www.originalnitonery.cz/blog/psani-vsemi-deseti-se-muzete-naucit-i-sami-doma
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/core`
|
|
11
|
+
*/
|
|
12
|
+
export declare function usageToWorktime(usage: PromptResultUsage): UncertainNumber;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { string_mime_type } from '../../types/typeAliases';
|
|
2
|
+
import type { string_name } from '../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* A format definition is a set of functions that define how to validate, heal and convert response from LLM
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/webgptorg/promptbook/discussions/36
|
|
7
|
+
* @private still an internal experimental
|
|
8
|
+
*/
|
|
9
|
+
export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends string, TSchema extends object> = {
|
|
10
|
+
/**
|
|
11
|
+
* The name of the format used in .ptbk.md files
|
|
12
|
+
*
|
|
13
|
+
* @sample "JSON"
|
|
14
|
+
*/
|
|
15
|
+
readonly name: string_name;
|
|
16
|
+
/**
|
|
17
|
+
* Aliases for the name
|
|
18
|
+
*/
|
|
19
|
+
readonly aliases?: Array<string_name>;
|
|
20
|
+
/**
|
|
21
|
+
* The mime type of the format (if any)
|
|
22
|
+
*
|
|
23
|
+
* @sample "application/json"
|
|
24
|
+
*/
|
|
25
|
+
readonly mimeType?: string_mime_type;
|
|
26
|
+
/**
|
|
27
|
+
* Check if a value is fully valid
|
|
28
|
+
*
|
|
29
|
+
* @param value The value to check, for example "{\"foo\": true}"
|
|
30
|
+
* @param schema Optional schema to do extra validation
|
|
31
|
+
*/
|
|
32
|
+
isValid(value: string, schema?: TSchema): value is TValue;
|
|
33
|
+
/**
|
|
34
|
+
* Check if a first part of a value is valid
|
|
35
|
+
*
|
|
36
|
+
* @see https://github.com/webgptorg/promptbook/discussions/37
|
|
37
|
+
*
|
|
38
|
+
* @param partialValue Partial value to check, for example "{\"foo\": t"
|
|
39
|
+
* @param schema Optional schema to do extra validation
|
|
40
|
+
*/
|
|
41
|
+
canBeValid(partialValue: string, schema?: TSchema): partialValue is TPartialValue;
|
|
42
|
+
/**
|
|
43
|
+
* Heal a value to make it valid if possible
|
|
44
|
+
*
|
|
45
|
+
* Note: This make sense in context of LLMs that often returns slightly invalid values
|
|
46
|
+
* @see https://github.com/webgptorg/promptbook/discussions/31
|
|
47
|
+
*
|
|
48
|
+
* @param value The value to heal, for example "{foo: true}"
|
|
49
|
+
* @param scheme
|
|
50
|
+
* @throws {Error} If the value cannot be healed
|
|
51
|
+
*/
|
|
52
|
+
heal(value: string, scheme?: TSchema): TValue;
|
|
53
|
+
/**
|
|
54
|
+
* Parses just the values and removes structural information
|
|
55
|
+
*
|
|
56
|
+
* Note: This is useful when you want to combine format expectations with counting words, characters,...
|
|
57
|
+
*
|
|
58
|
+
* @param value The value to check, for example "{\"name\": "John Smith"}"
|
|
59
|
+
* @param schema Optional schema
|
|
60
|
+
* @example "{\"name\": "John Smith"}" -> ["John Smith"]
|
|
61
|
+
*/
|
|
62
|
+
extractValues(value: string, schema?: TSchema): Array<string>;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* TODO: [🍓]`name` and `aliases` should be UPPERCASE only and interpreted as case-insensitive (via normalization)
|
|
66
|
+
* TODO: [🍓][👨⚖️] Compute TPartialValue dynamically - PartialString<TValue>
|
|
67
|
+
* TODO: [🍓][🧠] Should execution tools be aviable to heal, canBeValid and isValid?
|
|
68
|
+
* TODO: [🍓][🧠] llm Provider Bindings
|
|
69
|
+
* TODO: [🍓][🔼] Export via some package
|
|
70
|
+
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FormatDefinition } from '../_common/FormatDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Definition for CSV spreadsheet
|
|
4
|
+
*/
|
|
5
|
+
export declare const CsvFormatDefinition: FormatDefinition<string, string, object>;
|
|
6
|
+
/**
|
|
7
|
+
* TODO: [🍓] In `CsvFormatDefinition` implement simple `isValid`
|
|
8
|
+
* TODO: [🍓] In `CsvFormatDefinition` implement partial `canBeValid`
|
|
9
|
+
* TODO: [🍓] In `CsvFormatDefinition` implement `heal
|
|
10
|
+
* TODO: [🍓] In `CsvFormatDefinition` implement `extractValues`
|
|
11
|
+
* TODO: [🏢] Allow to expect something inside CSV objects and other formats
|
|
12
|
+
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormatDefinition } from '../_common/FormatDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Definition for JSON format
|
|
4
|
+
*/
|
|
5
|
+
export declare const JsonFormatDefinition: FormatDefinition<string, string, object>;
|
|
6
|
+
/**
|
|
7
|
+
* TODO: [🧠] Maybe propper instance of object
|
|
8
|
+
* TODO: [0] Make string_serialized_json
|
|
9
|
+
* TODO: [1] Make type for JSON Schema
|
|
10
|
+
* TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
|
|
11
|
+
* TODO: [🍓] In `JsonFormatDefinition` implement simple `isValid`
|
|
12
|
+
* TODO: [🍓] In `JsonFormatDefinition` implement partial `canBeValid`
|
|
13
|
+
* TODO: [🍓] In `JsonFormatDefinition` implement `heal
|
|
14
|
+
* TODO: [🍓] In `JsonFormatDefinition` implement `extractValues`
|
|
15
|
+
* TODO: [🏢] Allow to expect something inside JSON objects and other formats
|
|
16
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FormatDefinition } from '../_common/FormatDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Definition for list of multiple items
|
|
4
|
+
*
|
|
5
|
+
* Note: list is just a string with multiple lines or multiple items separated by comma
|
|
6
|
+
*/
|
|
7
|
+
export declare const ListFormatDefinition: FormatDefinition<string, string, object>;
|
|
8
|
+
/**
|
|
9
|
+
* TODO: [🍓] In `ListFormatDefinition` implement simple `isValid`
|
|
10
|
+
* TODO: [🍓] In `ListFormatDefinition` implement partial `canBeValid`
|
|
11
|
+
* TODO: [🍓] In `ListFormatDefinition` implement `heal
|
|
12
|
+
* TODO: [🍓] In `ListFormatDefinition` implement `extractValues`
|
|
13
|
+
* TODO: [🏢] Allow to expect something inside each item of list and other formats
|
|
14
|
+
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormatDefinition } from '../_common/FormatDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Definition for XML format
|
|
4
|
+
*/
|
|
5
|
+
export declare const XmlFormatDefinition: FormatDefinition<string, string, object>;
|
|
6
|
+
/**
|
|
7
|
+
* TODO: [🧠] Maybe propper instance of object
|
|
8
|
+
* TODO: [0] Make string_serialized_xml
|
|
9
|
+
* TODO: [1] Make type for XML Schema
|
|
10
|
+
* TODO: [🧠] What to use for validating XMLs - XSD,...
|
|
11
|
+
* TODO: [🍓] In `XmlFormatDefinition` implement simple `isValid`
|
|
12
|
+
* TODO: [🍓] In `XmlFormatDefinition` implement partial `canBeValid`
|
|
13
|
+
* TODO: [🍓] In `XmlFormatDefinition` implement `heal
|
|
14
|
+
* TODO: [🍓] In `XmlFormatDefinition` implement `extractValues`
|
|
15
|
+
* TODO: [🏢] Allow to expect something inside XML and other formats
|
|
16
|
+
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools';
|
|
2
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
3
|
+
import type { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOptions';
|
|
4
|
+
/**
|
|
5
|
+
* Delagates the user interaction to a async callback function
|
|
6
|
+
* You need to provide your own implementation of this callback function and its bind to UI.
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/core`
|
|
9
|
+
*/
|
|
10
|
+
export declare class CallbackInterfaceTools implements UserInterfaceTools {
|
|
11
|
+
private readonly options;
|
|
12
|
+
constructor(options: CallbackInterfaceToolsOptions);
|
|
13
|
+
/**
|
|
14
|
+
* Trigger the custom callback function
|
|
15
|
+
*/
|
|
16
|
+
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
|
|
3
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
4
|
+
/**
|
|
5
|
+
* Options for `CallbackInterfaceTools`
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/core`
|
|
8
|
+
*/
|
|
9
|
+
export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & {
|
|
10
|
+
/**
|
|
11
|
+
* The callback function to be called when promptDialog is called
|
|
12
|
+
*/
|
|
13
|
+
callback(prompt: UserInterfaceToolsPromptDialogOptions): Promisable<string>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
|
|
2
|
+
import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools';
|
|
3
|
+
import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
|
|
4
|
+
/**
|
|
5
|
+
* Wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt
|
|
6
|
+
*
|
|
7
|
+
* Warning: It is used for testing and mocking
|
|
8
|
+
* **NOT intended to use in the production** due to its synchronous nature.
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/core`
|
|
11
|
+
*/
|
|
12
|
+
export declare class SimplePromptInterfaceTools implements UserInterfaceTools {
|
|
13
|
+
private readonly options;
|
|
14
|
+
constructor(options?: CommonExecutionToolsOptions);
|
|
15
|
+
/**
|
|
16
|
+
* Trigger window.PROMPT DIALOG
|
|
17
|
+
*/
|
|
18
|
+
promptDialog(options: UserInterfaceToolsPromptDialogOptions): Promise<string>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Note: [🔵] This code should never be published outside of `@promptbook/browser`
|
|
22
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
import type { string_file_path } from '../../../types/typeAliases';
|
|
3
|
+
import type { string_knowledge_source_link } from '../../../types/typeAliases';
|
|
4
|
+
import type { string_markdown } from '../../../types/typeAliases';
|
|
5
|
+
import type { string_markdown_text } from '../../../types/typeAliases';
|
|
6
|
+
import type { string_mime_type } from '../../../types/typeAliases';
|
|
7
|
+
import type { string_mime_type_with_wildcard } from '../../../types/typeAliases';
|
|
8
|
+
import type { string_promptbook_documentation_url } from '../../../types/typeAliases';
|
|
9
|
+
import type { really_unknown } from '../../../utils/organization/really_unknown';
|
|
10
|
+
/**
|
|
11
|
+
* @@@
|
|
12
|
+
*
|
|
13
|
+
* @private still an internal experimental
|
|
14
|
+
*/
|
|
15
|
+
export type Scraper = {
|
|
16
|
+
readonly description: string_markdown_text;
|
|
17
|
+
readonly documentationUrl: string_promptbook_documentation_url;
|
|
18
|
+
readonly examples: Array<string_file_path>;
|
|
19
|
+
readonly mimeTypes: Array<string_mime_type_with_wildcard>;
|
|
20
|
+
scrape(source: ScraperSourceOptions): Promisable<string_markdown>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @@@
|
|
24
|
+
*
|
|
25
|
+
* @private still an internal experimental
|
|
26
|
+
*/
|
|
27
|
+
export type ScraperSourceOptions = {
|
|
28
|
+
readonly source: string_knowledge_source_link;
|
|
29
|
+
readonly mimeType: string_mime_type;
|
|
30
|
+
asJson(): Promise<really_unknown>;
|
|
31
|
+
asText(): Promise<really_unknown>;
|
|
32
|
+
asBlob(): Promise<really_unknown>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* TODO: [🐝] @@@ Annotate all
|
|
36
|
+
* TODO: [🔼] Export via types
|
|
37
|
+
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PrepareOptions } from '../../../prepare/PrepareOptions';
|
|
2
|
+
import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/KnowledgePieceJson';
|
|
3
|
+
import type { KnowledgeSourceJson } from '../../../types/PipelineJson/KnowledgeSourceJson';
|
|
4
|
+
/**
|
|
5
|
+
* Prepares the knowle
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/webgptorg/promptbook/discussions/41
|
|
8
|
+
* @public exported from `@promptbook/core`
|
|
9
|
+
*/
|
|
10
|
+
export declare function prepareKnowledgePieces(knowledgeSources: Array<KnowledgeSourceJson>, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'preparationIds'>>>;
|
|
11
|
+
/**
|
|
12
|
+
* TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
|
|
13
|
+
* Put `knowledgePieces` into `PrepareKnowledgeOptions`
|
|
14
|
+
* TODO: [🪂] More than max things can run in parallel by acident [1,[2a,2b,_],[3a,3b,_]]
|
|
15
|
+
* TODO: [🧠][❎] Do here propper M:N mapping
|
|
16
|
+
* [x] One source can make multiple pieces
|
|
17
|
+
* [ ] One piece can have multiple sources
|
|
18
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PrepareOptions } from '../../../prepare/PrepareOptions';
|
|
2
|
+
import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/KnowledgePieceJson';
|
|
3
|
+
import type { string_markdown } from '../../../types/typeAliases';
|
|
4
|
+
/**
|
|
5
|
+
* @@@
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/core`
|
|
8
|
+
*/
|
|
9
|
+
export declare function prepareKnowledgeFromMarkdown(knowledgeContent: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
|
|
10
|
+
/**
|
|
11
|
+
* TODO: [🐝][🔼] !!! Export via `@promptbook/markdown`
|
|
12
|
+
* TODO: [🪂] Do it in parallel 11:11
|
|
13
|
+
* Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
14
|
+
*/
|