@promptbook/markdown-utils 0.112.0-34 → 0.112.0-36
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 +115 -0
- package/esm/index.es.js +281 -321
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/types.index.d.ts +45 -45
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -4
- package/esm/src/book-2.0/agent-source/AgentModelRequirements.d.ts +0 -4
- package/esm/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/createTeamToolName.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/padBook.d.ts +1 -4
- package/esm/src/book-2.0/agent-source/parseAgentSource.d.ts +0 -3
- package/esm/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/parseParameters.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/parseTeamCommitment.d.ts +0 -3
- package/esm/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +8 -3
- package/esm/src/book-2.0/agent-source/string_book.d.ts +1 -0
- package/esm/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +0 -3
- package/esm/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +0 -3
- package/esm/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +0 -3
- package/esm/src/book-components/AvatarProfile/AvatarProfile/AvatarProfileTooltip.d.ts +4 -0
- package/esm/src/book-components/BookEditor/BookEditor.d.ts +0 -3
- package/esm/src/book-components/BookEditor/BookEditorActionbar.d.ts +4 -0
- package/esm/src/book-components/BookEditor/BookEditorMonaco.d.ts +2 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +3 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +1 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoDecorations.d.ts +6 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoDiagnostics.d.ts +9 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +7 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +3 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +24 -0
- package/esm/src/book-components/Chat/AgentChat/AgentChat.d.ts +0 -3
- package/esm/src/book-components/Chat/AgentChip/AgentChip.d.ts +6 -5
- package/esm/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +4 -8
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +2 -3
- package/esm/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +0 -3
- package/esm/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +0 -3
- package/esm/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/chatCssClassNames.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/constants.d.ts +4 -3
- package/esm/src/book-components/Chat/Chat/insertDictationChunk.d.ts +16 -0
- package/esm/src/book-components/Chat/Chat/learnDictationDictionary.d.ts +7 -0
- package/esm/src/book-components/Chat/Chat/refineFinalDictationChunk.d.ts +36 -0
- package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +3 -0
- package/esm/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
- package/esm/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +7 -30
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +20 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +29 -0
- package/esm/src/book-components/Chat/LlmChat/defaults.d.ts +0 -3
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +3 -3
- package/esm/src/book-components/Chat/MockedChat/constants.d.ts +0 -3
- package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +4 -3
- package/esm/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +3 -0
- package/esm/src/book-components/Chat/effects/components/HeartsEffect.d.ts +3 -0
- package/esm/src/book-components/Chat/effects/index.d.ts +0 -4
- package/esm/src/book-components/Chat/effects/utils/detectEffects.d.ts +1 -0
- package/esm/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +4 -4
- package/esm/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -0
- package/esm/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +0 -3
- package/esm/src/book-components/Chat/save/index.d.ts +0 -3
- package/esm/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +1 -0
- package/esm/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +0 -4
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +3 -5
- package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +0 -3
- package/esm/src/book-components/Chat/utils/ExportFormat.d.ts +2 -0
- package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +4 -3
- package/esm/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/exportChatHistory.d.ts +0 -3
- package/esm/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +2 -1
- package/esm/src/book-components/Chat/utils/loadAgentProfile.d.ts +12 -0
- package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +0 -3
- package/esm/src/book-components/Chat/utils/parseImagePrompts.d.ts +1 -3
- package/esm/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +14 -0
- package/esm/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +3 -0
- package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +0 -3
- package/esm/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +3 -3
- package/esm/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +3 -5
- package/esm/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -5
- package/esm/src/book-components/Qr/BrandedQrCode.d.ts +5 -0
- package/esm/src/book-components/Qr/GenericQrCode.d.ts +5 -0
- package/esm/src/book-components/Qr/PromptbookQrCode.d.ts +5 -0
- package/esm/src/book-components/Qr/useQrCode.d.ts +4 -1
- package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +4 -0
- package/esm/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +4 -0
- package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +3 -3
- package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -3
- package/esm/src/book-components/_common/Tooltip/Tooltip.d.ts +3 -0
- package/esm/src/book-components/icons/AboutIcon.d.ts +1 -0
- package/esm/src/book-components/icons/AttachmentIcon.d.ts +4 -0
- package/esm/src/book-components/icons/CameraIcon.d.ts +4 -0
- package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -0
- package/esm/src/book-components/icons/EmailIcon.d.ts +1 -0
- package/esm/src/book-components/icons/MenuIcon.d.ts +1 -3
- package/esm/src/book-components/icons/SaveIcon.d.ts +1 -0
- package/esm/src/book-components/icons/SendIcon.d.ts +0 -3
- package/esm/src/book-components/icons/TeacherIcon.d.ts +1 -0
- package/esm/src/cli/$runPromptbookCli.d.ts +0 -1
- package/esm/src/cli/cli-commands/_boilerplate.d.ts +0 -2
- package/esm/src/cli/cli-commands/about.d.ts +0 -6
- package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +18 -0
- package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +127 -0
- package/esm/src/cli/cli-commands/coder/boilerplateTemplates.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +0 -2
- package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -2
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +10 -2
- package/esm/src/cli/cli-commands/coder/init.d.ts +38 -2
- package/esm/src/cli/cli-commands/coder/run.d.ts +1 -3
- package/esm/src/cli/cli-commands/coder/run.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/verify.d.ts +0 -2
- package/esm/src/cli/cli-commands/coder.d.ts +0 -2
- package/esm/src/cli/cli-commands/common/handleActionErrors.d.ts +4 -0
- package/esm/src/cli/cli-commands/hello.d.ts +0 -5
- package/esm/src/cli/cli-commands/list-models.d.ts +0 -2
- package/esm/src/cli/cli-commands/list-scrapers.d.ts +0 -2
- package/esm/src/cli/cli-commands/login.d.ts +0 -5
- package/esm/src/cli/cli-commands/prettify.d.ts +0 -6
- package/esm/src/cli/cli-commands/run.d.ts +0 -8
- package/esm/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -5
- package/esm/src/cli/cli-commands/start-agents-server.d.ts +0 -2
- package/esm/src/cli/cli-commands/start-pipelines-server.d.ts +0 -5
- package/esm/src/cli/cli-commands/test-command.d.ts +0 -7
- package/esm/src/cli/common/$provideLlmToolsForCli.d.ts +5 -0
- package/esm/src/cli/main.d.ts +0 -2
- package/esm/src/cli/promptbookCli.d.ts +0 -7
- package/esm/src/collection/agent-collection/AgentCollection.d.ts +0 -3
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -6
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +3 -0
- package/esm/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +2 -1
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -5
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +1 -0
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts +4 -3
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +2 -3
- package/esm/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -0
- package/esm/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +0 -3
- package/esm/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -0
- package/esm/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -0
- package/esm/src/commands/EXPECT/ExpectCommand.d.ts +0 -3
- package/esm/src/commands/EXPECT/expectCommandParser.d.ts +3 -2
- package/esm/src/commands/FOREACH/ForeachCommand.d.ts +1 -0
- package/esm/src/commands/FOREACH/foreachCommandParser.d.ts +1 -3
- package/esm/src/commands/FORMAT/formatCommandParser.d.ts +1 -0
- package/esm/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -0
- package/esm/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -0
- package/esm/src/commands/JOKER/JokerCommand.d.ts +1 -0
- package/esm/src/commands/JOKER/jokerCommandParser.d.ts +1 -0
- package/esm/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -0
- package/esm/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -3
- package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +0 -3
- package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.test.d.ts +0 -3
- package/esm/src/commands/MODEL/ModelCommand.d.ts +1 -0
- package/esm/src/commands/MODEL/modelCommandParser.d.ts +1 -0
- package/esm/src/commands/PARAMETER/ParameterCommand.d.ts +1 -0
- package/esm/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -0
- package/esm/src/commands/PERSONA/PersonaCommand.d.ts +1 -0
- package/esm/src/commands/PERSONA/personaCommandParser.d.ts +1 -0
- package/esm/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -0
- package/esm/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -0
- package/esm/src/commands/SECTION/SectionCommand.d.ts +1 -0
- package/esm/src/commands/SECTION/sectionCommandParser.d.ts +1 -0
- package/esm/src/commands/URL/UrlCommand.d.ts +1 -0
- package/esm/src/commands/URL/urlCommandParser.d.ts +1 -0
- package/esm/src/commands/X_ACTION/ActionCommand.d.ts +1 -0
- package/esm/src/commands/X_ACTION/actionCommandParser.d.ts +1 -3
- package/esm/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -0
- package/esm/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -3
- package/esm/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +1 -0
- package/esm/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
- package/esm/src/commands/_common/stringifyCommand.d.ts +1 -1
- package/esm/src/commands/_common/types/CommandParser.d.ts +0 -4
- package/esm/src/commands/index.d.ts +0 -3
- package/esm/src/commitments/ACTION/ACTION.d.ts +0 -3
- package/esm/src/commitments/CLOSED/CLOSED.d.ts +0 -3
- package/esm/src/commitments/CLOSED/CLOSED.test.d.ts +0 -3
- package/esm/src/commitments/COMPONENT/COMPONENT.d.ts +0 -3
- package/esm/src/commitments/DELETE/DELETE.d.ts +0 -3
- package/esm/src/commitments/DICTIONARY/DICTIONARY.d.ts +0 -3
- package/esm/src/commitments/FORMAT/FORMAT.d.ts +0 -3
- package/esm/src/commitments/FROM/FROM.d.ts +0 -3
- package/esm/src/commitments/GOAL/GOAL.d.ts +0 -3
- package/esm/src/commitments/IMPORT/IMPORT.d.ts +0 -3
- package/esm/src/commitments/LANGUAGE/LANGUAGE.d.ts +0 -3
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -3
- package/esm/src/commitments/MESSAGE/MESSAGE.d.ts +0 -3
- package/esm/src/commitments/MESSAGE_SUFFIX/MESSAGE_SUFFIX.d.ts +0 -3
- package/esm/src/commitments/META/META.d.ts +0 -3
- package/esm/src/commitments/META/META_DESCRIPTION.d.ts +0 -3
- package/esm/src/commitments/META_COLOR/META_COLOR.d.ts +0 -3
- package/esm/src/commitments/META_DISCLAIMER/META_DISCLAIMER.d.ts +0 -3
- package/esm/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +0 -3
- package/esm/src/commitments/META_FONT/META_FONT.d.ts +0 -3
- package/esm/src/commitments/META_IMAGE/META_IMAGE.d.ts +0 -3
- package/esm/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +0 -3
- package/esm/src/commitments/META_LINK/META_LINK.d.ts +0 -3
- package/esm/src/commitments/META_VOICE/META_VOICE.d.ts +0 -3
- package/esm/src/commitments/MODEL/MODEL.d.ts +0 -3
- package/esm/src/commitments/OPEN/OPEN.d.ts +0 -3
- package/esm/src/commitments/PERSONA/PERSONA.d.ts +0 -3
- package/esm/src/commitments/RULE/RULE.d.ts +0 -3
- package/esm/src/commitments/SAMPLE/SAMPLE.d.ts +0 -3
- package/esm/src/commitments/SCENARIO/SCENARIO.d.ts +0 -3
- package/esm/src/commitments/TEAM/TEAM.d.ts +0 -3
- package/esm/src/commitments/TEMPLATE/TEMPLATE.d.ts +0 -3
- package/esm/src/commitments/USE/USE.d.ts +0 -3
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +2 -0
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -3
- package/esm/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +4 -5
- package/esm/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +0 -3
- package/esm/src/commitments/USE_CALENDAR/calendarReference.d.ts +0 -3
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -3
- package/esm/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +0 -3
- package/esm/src/commitments/USE_MCP/USE_MCP.d.ts +0 -3
- package/esm/src/commitments/USE_POPUP/USE_POPUP.d.ts +0 -3
- package/esm/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +0 -3
- package/esm/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +0 -3
- package/esm/src/commitments/USE_PROJECT/projectReference.d.ts +0 -3
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -3
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -3
- package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -3
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -3
- package/esm/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +0 -3
- package/esm/src/commitments/WALLET/WALLET.d.ts +0 -3
- package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +0 -3
- package/esm/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +0 -3
- package/esm/src/commitments/_base/createEmptyAgentModelRequirements.d.ts +0 -3
- package/esm/src/commitments/_common/commitmentToolFunctions.d.ts +2 -3
- package/esm/src/commitments/_common/createWritingCommitmentSections.d.ts +2 -3
- package/esm/src/commitments/_common/getAllCommitmentDefinitions.d.ts +1 -0
- package/esm/src/commitments/_common/getAllCommitmentTypes.d.ts +1 -0
- package/esm/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +0 -4
- package/esm/src/commitments/_common/getCommitmentDefinition.d.ts +1 -0
- package/esm/src/commitments/_common/isCommitmentSupported.d.ts +1 -0
- package/esm/src/commitments/_common/toolExecutionEnvelope.d.ts +0 -3
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +3 -3
- package/esm/src/commitments/index.d.ts +0 -4
- package/esm/src/config.test.d.ts +0 -3
- package/esm/src/constants/streaming.d.ts +0 -3
- package/esm/src/constants.d.ts +0 -3
- package/esm/src/conversion/archive/loadArchive.d.ts +0 -1
- package/esm/src/conversion/archive/saveArchive.d.ts +0 -5
- package/esm/src/conversion/compilePipeline.d.ts +2 -7
- package/esm/src/conversion/compilePipelineOnRemoteServer.d.ts +2 -5
- package/esm/src/conversion/parsePipeline.d.ts +1 -11
- package/esm/src/conversion/pipelineJsonToString.d.ts +1 -7
- package/esm/src/conversion/prettify/prettifyPipelineString.d.ts +0 -4
- package/esm/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -7
- package/esm/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -3
- package/esm/src/conversion/validation/_importPipeline.d.ts +6 -2
- package/esm/src/conversion/validation/pipelineStringToJson-parseErrors.test.d.ts +0 -3
- package/esm/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -3
- package/esm/src/conversion/validation/validatePipeline.d.ts +3 -9
- package/esm/src/conversion/validation/validatePipeline.test.d.ts +0 -3
- package/esm/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -2
- package/esm/src/errors/0-BoilerplateError.d.ts +0 -3
- package/esm/src/errors/0-index.d.ts +0 -3
- package/esm/src/errors/DatabaseError.d.ts +0 -3
- package/esm/src/errors/ExpectError.d.ts +2 -1
- package/esm/src/errors/ParseError.d.ts +0 -3
- package/esm/src/errors/PipelineExecutionError.d.ts +0 -3
- package/esm/src/executables/$provideExecutablesForNode.d.ts +0 -5
- package/esm/src/executables/apps/locateLibreoffice.d.ts +0 -2
- package/esm/src/executables/apps/locatePandoc.d.ts +0 -2
- package/esm/src/executables/browsers/locateBrowser.d.ts +0 -1
- package/esm/src/executables/browsers/locateDefaultSystemBrowser.d.ts +0 -1
- package/esm/src/executables/locateApp.d.ts +0 -2
- package/esm/src/executables/platforms/locateAppOnLinux.d.ts +0 -2
- package/esm/src/executables/platforms/locateAppOnMacOs.d.ts +0 -2
- package/esm/src/executables/platforms/locateAppOnWindows.d.ts +0 -2
- package/esm/src/execution/AbstractTaskResult.d.ts +0 -4
- package/esm/src/execution/AvailableModel.d.ts +0 -4
- package/esm/src/execution/CommonToolsOptions.d.ts +0 -5
- package/esm/src/execution/ExecutionTask.d.ts +4 -4
- package/esm/src/execution/FilesystemTools.d.ts +0 -3
- package/esm/src/execution/LlmExecutionTools.d.ts +3 -9
- package/esm/src/execution/LlmExecutionToolsConstructor.d.ts +0 -3
- package/esm/src/execution/PipelineExecutor.d.ts +0 -3
- package/esm/src/execution/PipelineExecutorResult.d.ts +0 -3
- package/esm/src/execution/PromptResult.d.ts +1 -9
- package/esm/src/execution/PromptbookFetch.test-type.d.ts +0 -4
- package/esm/src/execution/ScriptExecutionTools.d.ts +0 -4
- package/esm/src/execution/Usage.d.ts +0 -3
- package/esm/src/execution/UserInterfaceTools.d.ts +3 -0
- package/esm/src/execution/assertsTaskSuccessful.d.ts +1 -3
- package/esm/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +1 -0
- package/esm/src/execution/createPipelineExecutor/20-executeTask.d.ts +0 -3
- package/esm/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -3
- package/esm/src/execution/createPipelineExecutor/getContextForTask.d.ts +1 -0
- package/esm/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +0 -4
- package/esm/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +0 -1
- package/esm/src/execution/execution-report/ExecutionReportJson.d.ts +1 -0
- package/esm/src/execution/execution-report/ExecutionReportString.d.ts +0 -3
- package/esm/src/execution/execution-report/executionReportJsonToString.d.ts +0 -5
- package/esm/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -1
- package/esm/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -1
- package/esm/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -1
- package/esm/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +2 -0
- package/esm/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -3
- package/esm/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
- package/esm/src/execution/utils/checkExpectations.d.ts +2 -5
- package/esm/src/execution/utils/forEachAsync.d.ts +5 -1
- package/esm/src/execution/utils/usage-constants.d.ts +0 -3
- package/esm/src/execution/utils/usageToHuman.d.ts +0 -8
- package/esm/src/execution/utils/validatePromptResult.d.ts +1 -0
- package/esm/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -0
- package/esm/src/formats/_common/FormatParser.d.ts +2 -9
- package/esm/src/formats/_common/FormatSubvalueParser.d.ts +0 -3
- package/esm/src/formats/csv/CsvFormatParser.d.ts +2 -8
- package/esm/src/formats/index.d.ts +0 -3
- package/esm/src/formats/json/JsonFormatParser.d.ts +0 -11
- package/esm/src/formats/text/TextFormatParser.d.ts +0 -9
- package/esm/src/formats/xml/XmlFormatParser.d.ts +0 -11
- package/esm/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +1 -3
- package/esm/src/formfactors/_common/FormfactorDefinition.d.ts +1 -0
- package/esm/src/formfactors/index.d.ts +0 -3
- package/esm/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +0 -5
- package/esm/src/high-level-abstractions/index.d.ts +0 -4
- package/esm/src/high-level-abstractions/quick-chatbot/QuickChatbotHla.d.ts +0 -3
- package/esm/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +2 -3
- package/esm/src/llm-providers/_common/register/$llmToolsRegister.d.ts +2 -3
- package/esm/src/llm-providers/_common/register/$provideEnvFilename.d.ts +0 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +3 -6
- package/esm/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -7
- package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -16
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +0 -4
- package/esm/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +0 -5
- package/esm/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +0 -6
- package/esm/src/llm-providers/_common/register/LlmToolsOptions.d.ts +0 -4
- package/esm/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -0
- package/esm/src/llm-providers/_common/utils/assertUniqueModels.d.ts +0 -3
- package/esm/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -3
- package/esm/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -0
- package/esm/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -4
- package/esm/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -0
- package/esm/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -7
- package/esm/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +4 -0
- package/esm/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +1 -0
- package/esm/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +3 -7
- package/esm/src/llm-providers/_multiple/playground/playground.d.ts +0 -1
- package/esm/src/llm-providers/agent/Agent.d.ts +0 -3
- package/esm/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/agent/RemoteAgent.d.ts +0 -4
- package/esm/src/llm-providers/agent/playground/playground.d.ts +0 -6
- package/esm/src/llm-providers/agent/register-configuration.d.ts +0 -5
- package/esm/src/llm-providers/agent/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -10
- package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +3 -3
- package/esm/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -8
- package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +1 -3
- package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +0 -3
- package/esm/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +0 -7
- package/esm/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -5
- package/esm/src/llm-providers/anthropic-claude/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/anthropic-claude/register-constructor.d.ts +0 -5
- package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -6
- package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
- package/esm/src/llm-providers/azure-openai/createAzureOpenAiExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/azure-openai/playground/playground.d.ts +0 -2
- package/esm/src/llm-providers/azure-openai/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/azure-openai/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +1 -0
- package/esm/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -3
- package/esm/src/llm-providers/deepseek/deepseek-models.d.ts +1 -6
- package/esm/src/llm-providers/deepseek/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/deepseek/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +1 -0
- package/esm/src/llm-providers/google/createGoogleExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/google/google-models.d.ts +1 -6
- package/esm/src/llm-providers/google/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/google/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -5
- package/esm/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -3
- package/esm/src/llm-providers/mocked/test/joker.test.d.ts +0 -3
- package/esm/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -4
- package/esm/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -3
- package/esm/src/llm-providers/ollama/OllamaExecutionTools.d.ts +0 -3
- package/esm/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +1 -0
- package/esm/src/llm-providers/ollama/ollama-models.d.ts +1 -4
- package/esm/src/llm-providers/ollama/playground/playground.d.ts +0 -2
- package/esm/src/llm-providers/ollama/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/ollama/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +10 -0
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -8
- package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -7
- package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +2 -0
- package/esm/src/llm-providers/openai/computeOpenAiUsage.d.ts +1 -3
- package/esm/src/llm-providers/openai/computeOpenAiUsage.test.d.ts +0 -3
- package/esm/src/llm-providers/openai/createOpenAiAssistantExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/openai/createOpenAiExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/esm/src/llm-providers/openai/openai-models.test.d.ts +0 -3
- package/esm/src/llm-providers/openai/playground/playground.d.ts +0 -2
- package/esm/src/llm-providers/openai/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/openai/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -9
- package/esm/src/llm-providers/remote/playground/playground.d.ts +0 -1
- package/esm/src/llm-providers/vercel/playground/playground.d.ts +0 -2
- package/esm/src/other/templates/getBookTemplates.d.ts +2 -5
- package/esm/src/personas/preparePersona.d.ts +1 -7
- package/esm/src/pipeline/PipelineInterface/PipelineInterface.d.ts +1 -0
- package/esm/src/pipeline/PipelineInterface/constants.d.ts +0 -3
- package/esm/src/pipeline/PipelineJson/CommonTaskJson.d.ts +0 -4
- package/esm/src/pipeline/PipelineJson/DialogTaskJson.d.ts +1 -3
- package/esm/src/pipeline/PipelineJson/Expectations.d.ts +4 -3
- package/esm/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +0 -4
- package/esm/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +0 -3
- package/esm/src/pipeline/PipelineJson/PersonaJson.d.ts +0 -3
- package/esm/src/pipeline/PipelineJson/PreparationJson.d.ts +3 -5
- package/esm/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +1 -4
- package/esm/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +1 -3
- package/esm/src/pipeline/book-notation.d.ts +1 -4
- package/esm/src/pipeline/isValidPipelineString.d.ts +1 -3
- package/esm/src/pipeline/isValidPipelineString.test.d.ts +0 -3
- package/esm/src/pipeline/prompt-notation/helpers/ParameterEscaping.d.ts +5 -0
- package/esm/src/pipeline/prompt-notation/helpers/ParameterNaming.d.ts +1 -0
- package/esm/src/pipeline/prompt-notation/helpers/ParameterSection.d.ts +2 -0
- package/esm/src/pipeline/prompt-notation.d.ts +2 -5
- package/esm/src/pipeline/prompt-notation.test.d.ts +0 -3
- package/esm/src/pipeline/validatePipelineString.d.ts +1 -3
- package/esm/src/playground/permanent/_boilerplate.d.ts +0 -1
- package/esm/src/playground/permanent/agent-with-browser-playground.d.ts +0 -1
- package/esm/src/playground/permanent/error-handling-playground.d.ts +0 -1
- package/esm/src/playground/playground.d.ts +0 -2
- package/esm/src/postprocessing/utils/extractBlock.d.ts +2 -1
- package/esm/src/postprocessing/utils/extractJsonBlock.d.ts +2 -5
- package/esm/src/prepare/PrepareAndScrapeOptions.d.ts +0 -4
- package/esm/src/prepare/preparePipeline.d.ts +3 -2
- package/esm/src/prepare/preparePipelineOnRemoteServer.d.ts +2 -5
- package/esm/src/prepare/prepareTasks.d.ts +6 -10
- package/esm/src/prepare/unpreparePipeline.d.ts +1 -5
- package/esm/src/remote-server/RemoteServer.d.ts +3 -0
- package/esm/src/remote-server/openapi.d.ts +3 -4
- package/esm/src/remote-server/socket-types/_subtypes/Identification.d.ts +1 -5
- package/esm/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +0 -3
- package/esm/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +0 -3
- package/esm/src/remote-server/startAgentServer.d.ts +6 -2
- package/esm/src/remote-server/startRemoteServer.d.ts +1 -15
- package/esm/src/remote-server/types/RemoteClientOptions.d.ts +0 -5
- package/esm/src/remote-server/types/RemoteServerOptions.d.ts +10 -4
- package/esm/src/remote-server/ui/ServerApp.d.ts +1 -0
- package/esm/src/remote-server/ui/types.d.ts +3 -0
- package/esm/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +1 -4
- package/esm/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
- package/esm/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/_boilerplate/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/_boilerplate/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/_common/Scraper.d.ts +0 -5
- package/esm/src/scrapers/_common/ScraperIntermediateSource.d.ts +0 -3
- package/esm/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -0
- package/esm/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +0 -2
- package/esm/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -2
- package/esm/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -2
- package/esm/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +0 -3
- package/esm/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +2 -3
- package/esm/src/scrapers/_common/register/$scrapersRegister.d.ts +2 -3
- package/esm/src/scrapers/_common/register/ScraperConstructor.d.ts +0 -3
- package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +0 -7
- package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +0 -3
- package/esm/src/scrapers/_common/utils/promptbookFetch.d.ts +0 -3
- package/esm/src/scrapers/document/DocumentScraper.d.ts +1 -6
- package/esm/src/scrapers/document/DocumentScraper.test.d.ts +0 -3
- package/esm/src/scrapers/document/createDocumentScraper.d.ts +0 -3
- package/esm/src/scrapers/document/playground/document-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/document/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/document/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -6
- package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +0 -3
- package/esm/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +0 -3
- package/esm/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/document-legacy/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/document-legacy/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/markdown/MarkdownScraper.d.ts +1 -4
- package/esm/src/scrapers/markdown/MarkdownScraper.test.d.ts +0 -3
- package/esm/src/scrapers/markdown/createMarkdownScraper.d.ts +0 -3
- package/esm/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/markdown/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/markdown/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -7
- package/esm/src/scrapers/markitdown/createMarkitdownScraper.d.ts +0 -4
- package/esm/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/markitdown/register-constructor.d.ts +0 -5
- package/esm/src/scrapers/markitdown/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/pdf/PdfScraper.d.ts +1 -6
- package/esm/src/scrapers/pdf/createPdfScraper.d.ts +0 -3
- package/esm/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/pdf/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/pdf/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/website/WebsiteScraper.d.ts +1 -6
- package/esm/src/scrapers/website/createWebsiteScraper.d.ts +0 -3
- package/esm/src/scrapers/website/playground/website-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/website/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/website/register-metadata.d.ts +0 -3
- package/esm/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -5
- package/esm/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -3
- package/esm/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
- package/esm/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -3
- package/esm/src/scripting/javascript/postprocessing-functions.d.ts +0 -4
- package/esm/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -3
- package/esm/src/search-engines/SearchEngine.d.ts +3 -0
- package/esm/src/speech-recognition/BrowserSpeechRecognition.d.ts +0 -2
- package/esm/src/speech-recognition/OpenAiSpeechRecognition.d.ts +2 -2
- package/esm/src/storage/_common/PromptbookStorage.d.ts +0 -4
- package/esm/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -4
- package/esm/src/storage/env-storage/$EnvStorage.d.ts +0 -3
- package/esm/src/storage/file-cache-storage/FileCacheStorage.d.ts +0 -2
- package/esm/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -1
- package/esm/src/storage/local-storage/getLocalStorage.d.ts +0 -1
- package/esm/src/storage/local-storage/getSessionStorage.d.ts +0 -1
- package/esm/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +1 -0
- package/esm/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -4
- package/esm/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -3
- package/esm/src/transpilers/formatted-book-in-markdown/register.d.ts +2 -5
- package/esm/src/transpilers/openai-sdk/playground/playground.d.ts +0 -1
- package/esm/src/transpilers/openai-sdk/register.d.ts +2 -5
- package/esm/src/types/Arrayable.d.ts +1 -0
- package/esm/src/types/InputParameters_private.d.ts +4 -2
- package/esm/src/types/IntermediateFilesStrategy.d.ts +0 -3
- package/esm/src/types/LlmCall.d.ts +0 -3
- package/esm/src/types/ModelRequirements.d.ts +1 -0
- package/esm/src/types/ModelVariant.d.ts +3 -0
- package/esm/src/types/Parameters.d.ts +31 -0
- package/esm/src/types/Parameters_private.d.ts +4 -2
- package/esm/src/types/Prompt.d.ts +1 -6
- package/esm/src/types/ReservedParameters_private.d.ts +2 -1
- package/esm/src/types/ToolCall.d.ts +0 -2
- package/esm/src/types/Updatable.d.ts +1 -3
- package/esm/src/types/string_agent_hash_private.d.ts +1 -1
- package/esm/src/types/string_agent_name.d.ts +32 -0
- package/esm/src/types/string_agent_name_in_book_private.d.ts +1 -1
- package/esm/src/types/string_agent_name_private.d.ts +2 -1
- package/esm/src/types/string_agent_permanent_id_private.d.ts +2 -1
- package/esm/src/types/string_business_category_name.d.ts +5 -0
- package/esm/src/types/string_business_category_name_private.d.ts +1 -1
- package/esm/src/types/string_char_private.d.ts +1 -1
- package/esm/src/types/string_chat_prompt_private.d.ts +1 -1
- package/esm/src/types/string_completion_prompt_private.d.ts +1 -1
- package/esm/src/types/string_markdown.d.ts +0 -1
- package/esm/src/types/string_mime_type_private.d.ts +1 -0
- package/esm/src/types/string_model_description_private.d.ts +1 -1
- package/esm/src/types/string_model_name.d.ts +7 -0
- package/esm/src/types/string_model_name_private.d.ts +1 -1
- package/esm/src/types/string_name.d.ts +31 -0
- package/esm/src/types/string_name_private.d.ts +1 -1
- package/esm/src/types/string_page.d.ts +15 -0
- package/esm/src/types/string_page_private.d.ts +1 -1
- package/esm/src/types/string_parameter_name.d.ts +11 -210
- package/esm/src/types/string_parameter_value_private.d.ts +1 -1
- package/esm/src/types/string_persona_description.d.ts +14 -0
- package/esm/src/types/string_persona_description_private.d.ts +1 -1
- package/esm/src/types/string_prompt.d.ts +49 -0
- package/esm/src/types/string_prompt_image_private.d.ts +1 -1
- package/esm/src/types/string_prompt_private.d.ts +1 -1
- package/esm/src/types/string_reserved_parameter_name_private.d.ts +1 -1
- package/esm/src/types/string_sha256.d.ts +2 -2
- package/esm/src/types/string_system_message_private.d.ts +1 -1
- package/esm/src/types/string_template_private.d.ts +1 -1
- package/esm/src/types/string_text_prompt_private.d.ts +1 -1
- package/esm/src/types/string_title.d.ts +8 -0
- package/esm/src/types/string_title_private.d.ts +1 -1
- package/esm/src/types/typeAliasEmoji.d.ts +0 -3
- package/esm/src/types/typeAliases.d.ts +0 -6
- package/esm/src/utils/DEFAULT_THINKING_MESSAGES.d.ts +5 -1
- package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments.d.ts +0 -3
- package/esm/src/utils/chat/constants.d.ts +0 -3
- package/esm/src/utils/clientVersion.d.ts +0 -3
- package/esm/src/utils/color/$randomColor.d.ts +0 -5
- package/esm/src/utils/color/css-colors.d.ts +0 -3
- package/esm/src/utils/color/internal-utils/hslToRgb.d.ts +0 -3
- package/esm/src/utils/color/internal-utils/rgbToHsl.d.ts +0 -3
- package/esm/src/utils/color/operators/ColorTransformer.d.ts +2 -0
- package/esm/src/utils/color/operators/lighten.d.ts +0 -3
- package/esm/src/utils/color/operators/saturate.d.ts +0 -3
- package/esm/src/utils/color/utils/areColorsEqual.d.ts +0 -3
- package/esm/src/utils/color/utils/colorDistance.d.ts +2 -2
- package/esm/src/utils/color/utils/colorHue.d.ts +0 -1
- package/esm/src/utils/color/utils/colorHueDistance.d.ts +0 -1
- package/esm/src/utils/color/utils/colorToDataUrl.d.ts +0 -3
- package/esm/src/utils/database/uniqueConstraint.d.ts +1 -3
- package/esm/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +3 -4
- package/esm/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +0 -3
- package/esm/src/utils/editable/types/PipelineEditableSerialized.d.ts +2 -2
- package/esm/src/utils/editable/utils/renamePipelineParameter.d.ts +4 -3
- package/esm/src/utils/editable/utils/stringifyPipelineJson.d.ts +0 -6
- package/esm/src/utils/environment/$detectRuntimeEnvironment.d.ts +0 -3
- package/esm/src/utils/environment/$getGlobalScope.d.ts +1 -1
- package/esm/src/utils/environment/$isRunningInBrowser.d.ts +0 -3
- package/esm/src/utils/environment/$isRunningInJest.d.ts +0 -3
- package/esm/src/utils/environment/$isRunningInNode.d.ts +0 -3
- package/esm/src/utils/environment/$isRunningInWebWorker.d.ts +0 -3
- package/esm/src/utils/execCommand/$execCommand.d.ts +0 -2
- package/esm/src/utils/execCommand/$execCommands.d.ts +0 -1
- package/esm/src/utils/execCommand/ExecCommandOptions.d.ts +3 -4
- package/esm/src/utils/expectation-counters/constants.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countCharacters.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countLines.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countPages.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countParagraphs.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countSentences.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countWords.d.ts +0 -5
- package/esm/src/utils/expectation-counters/index.d.ts +0 -4
- package/esm/src/utils/files/$induceBookDownload.d.ts +0 -1
- package/esm/src/utils/files/$induceFileDownload.d.ts +0 -1
- package/esm/src/utils/files/ObjectUrl.d.ts +0 -1
- package/esm/src/utils/files/isDirectoryExisting.d.ts +0 -6
- package/esm/src/utils/files/isExecutable.d.ts +0 -4
- package/esm/src/utils/files/isFileExisting.d.ts +0 -5
- package/esm/src/utils/files/listAllFiles.d.ts +1 -5
- package/esm/src/utils/files/readResponseBytes.d.ts +1 -0
- package/esm/src/utils/knowledge/inlineKnowledgeSource.d.ts +11 -6
- package/esm/src/utils/knowledge/simplifyKnowledgeLabel.d.ts +2 -0
- package/esm/src/utils/linguistic-hash/linguisticHash.d.ts +2 -1
- package/esm/src/utils/linguistic-hash/linguisticHashTypes.d.ts +0 -3
- package/esm/src/utils/linguistic-hash/linguisticHashWords.cs.d.ts +0 -3
- package/esm/src/utils/linguistic-hash/linguisticHashWords.en.d.ts +0 -3
- package/esm/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -3
- package/esm/src/utils/markdown/createMarkdownTable.d.ts +0 -3
- package/esm/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -3
- package/esm/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -3
- package/esm/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -0
- package/esm/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -4
- package/esm/src/utils/markdown/humanizeAiText.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextEllipsis.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextEmdashed.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextQuotes.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextSources.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextWhitespace.d.ts +0 -3
- package/esm/src/utils/markdown/prettifyMarkdown.d.ts +4 -2
- package/esm/src/utils/markdown/promptbookifyAiText.d.ts +0 -3
- package/esm/src/utils/markdown/removeMarkdownComments.d.ts +1 -0
- package/esm/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
- package/esm/src/utils/markdown/removeMarkdownLinks.d.ts +1 -0
- package/esm/src/utils/markdown/trimCodeBlock.d.ts +1 -1
- package/esm/src/utils/markdown/trimEndOfCodeBlock.d.ts +1 -1
- package/esm/src/utils/misc/$getCurrentDate.d.ts +1 -0
- package/esm/src/utils/misc/aboutPromptbookInformation.d.ts +3 -3
- package/esm/src/utils/misc/computeHash.d.ts +0 -3
- package/esm/src/utils/misc/debounce.d.ts +2 -0
- package/esm/src/utils/misc/emojis.d.ts +3 -8
- package/esm/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +7 -2
- package/esm/src/utils/misc/parseNumber.d.ts +0 -4
- package/esm/src/utils/misc/xAboutPromptbookInformation.d.ts +3 -4
- package/esm/src/utils/normalization/IKeywords.d.ts +0 -3
- package/esm/src/utils/normalization/nameToUriPart.d.ts +1 -0
- package/esm/src/utils/normalization/nameToUriParts.d.ts +1 -0
- package/esm/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -3
- package/esm/src/utils/normalization/normalizeTo_PascalCase.d.ts +2 -0
- package/esm/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
- package/esm/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -3
- package/esm/src/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
- package/esm/src/utils/normalization/orderJson.d.ts +1 -0
- package/esm/src/utils/normalization/orderJson.test.d.ts +0 -3
- package/esm/src/utils/normalization/parseKeywords.d.ts +1 -4
- package/esm/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
- package/esm/src/utils/normalization/removeDiacritics.d.ts +1 -3
- package/esm/src/utils/normalization/removeEmojis.d.ts +1 -0
- package/esm/src/utils/normalization/removeQuotes.d.ts +1 -0
- package/esm/src/utils/normalization/searchKeywords.d.ts +1 -3
- package/esm/src/utils/normalization/titleToName.d.ts +1 -0
- package/esm/src/utils/normalization/unwrapResult.d.ts +1 -3
- package/esm/src/utils/organization/$sideEffect.d.ts +1 -0
- package/esm/src/utils/organization/TODO_USE.d.ts +1 -0
- package/esm/src/utils/organization/just.d.ts +1 -0
- package/esm/src/utils/organization/keepImported.d.ts +1 -0
- package/esm/src/utils/organization/keepTypeImported.d.ts +1 -0
- package/esm/src/utils/organization/keepUnused.d.ts +1 -0
- package/esm/src/utils/organization/preserve.d.ts +1 -3
- package/esm/src/utils/organization/really_any.d.ts +1 -0
- package/esm/src/utils/organization/spaceTrim.d.ts +3 -2
- package/esm/src/utils/parameters/extractParameterNames.d.ts +1 -0
- package/esm/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -0
- package/esm/src/utils/parameters/templateParameters.d.ts +2 -1
- package/esm/src/utils/parameters/valueToString.d.ts +2 -2
- package/esm/src/utils/random/$generateBookBoilerplate.d.ts +3 -3
- package/esm/src/utils/random/$randomAgentPersona.d.ts +1 -3
- package/esm/src/utils/random/$randomAgentRule.d.ts +1 -3
- package/esm/src/utils/random/$randomFullnameWithColor.d.ts +4 -3
- package/esm/src/utils/random/$randomItem.d.ts +0 -3
- package/esm/src/utils/random/$randomSeed.d.ts +0 -3
- package/esm/src/utils/random/$randomToken.d.ts +2 -5
- package/esm/src/utils/random/EnglishNamePool.d.ts +1 -0
- package/esm/src/utils/serialization/$deepFreeze.d.ts +1 -3
- package/esm/src/utils/serialization/checkSerializableAsJson.d.ts +1 -5
- package/esm/src/utils/serialization/clonePipeline.d.ts +1 -3
- package/esm/src/utils/serialization/deepClone.d.ts +1 -3
- package/esm/src/utils/serialization/exportJson.d.ts +1 -3
- package/esm/src/utils/serialization/isSerializableAsJson.d.ts +0 -5
- package/esm/src/utils/serialization/jsonStringsToJsons.d.ts +1 -4
- package/esm/src/utils/serialization/serializeToPromptbookJavascript.d.ts +3 -3
- package/esm/src/utils/sets/difference.d.ts +1 -3
- package/esm/src/utils/sets/intersection.d.ts +1 -0
- package/esm/src/utils/sets/union.d.ts +1 -0
- package/esm/src/utils/take/classes/TakeChain.d.ts +4 -1
- package/esm/src/utils/take/interfaces/ITakeChain.d.ts +5 -1
- package/esm/src/utils/take/interfaces/Takeable.d.ts +2 -1
- package/esm/src/utils/take/take.d.ts +1 -1
- package/esm/src/utils/validators/filePath/isRootPath.d.ts +1 -3
- package/esm/src/utils/validators/filePath/isRootPath.test.d.ts +0 -3
- package/esm/src/utils/validators/filePath/isValidFilePath.d.ts +1 -3
- package/esm/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -0
- package/esm/src/utils/validators/parameterName/validateParameterName.d.ts +1 -0
- package/esm/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
- package/esm/src/utils/validators/url/extractUrlsFromText.d.ts +1 -0
- package/esm/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
- package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +0 -3
- package/esm/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -3
- package/esm/src/utils/validators/url/normalizeDomainForMatching.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/esm/src/wizard/$getCompiledBook.d.ts +0 -2
- package/esm/src/wizard/wizard.d.ts +1 -2
- package/package.json +1 -1
- package/umd/index.umd.js +281 -321
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/types.index.d.ts +45 -45
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -4
- package/umd/src/book-2.0/agent-source/AgentModelRequirements.d.ts +0 -4
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/createTeamToolName.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/padBook.d.ts +1 -4
- package/umd/src/book-2.0/agent-source/parseAgentSource.d.ts +0 -3
- package/umd/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/parseParameters.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/parseTeamCommitment.d.ts +0 -3
- package/umd/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +8 -3
- package/umd/src/book-2.0/agent-source/string_book.d.ts +1 -0
- package/umd/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +0 -3
- package/umd/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +0 -3
- package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +0 -3
- package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfileTooltip.d.ts +4 -0
- package/umd/src/book-components/BookEditor/BookEditor.d.ts +0 -3
- package/umd/src/book-components/BookEditor/BookEditorActionbar.d.ts +4 -0
- package/umd/src/book-components/BookEditor/BookEditorMonaco.d.ts +2 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +3 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +1 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoDecorations.d.ts +6 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoDiagnostics.d.ts +9 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +7 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +3 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +24 -0
- package/umd/src/book-components/Chat/AgentChat/AgentChat.d.ts +0 -3
- package/umd/src/book-components/Chat/AgentChip/AgentChip.d.ts +6 -5
- package/umd/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +4 -8
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +2 -3
- package/umd/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +0 -3
- package/umd/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +0 -3
- package/umd/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/chatCssClassNames.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/constants.d.ts +4 -3
- package/umd/src/book-components/Chat/Chat/insertDictationChunk.d.ts +16 -0
- package/umd/src/book-components/Chat/Chat/learnDictationDictionary.d.ts +7 -0
- package/umd/src/book-components/Chat/Chat/refineFinalDictationChunk.d.ts +36 -0
- package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +3 -0
- package/umd/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
- package/umd/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +7 -30
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +20 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +29 -0
- package/umd/src/book-components/Chat/LlmChat/defaults.d.ts +0 -3
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +3 -3
- package/umd/src/book-components/Chat/MockedChat/constants.d.ts +0 -3
- package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +4 -3
- package/umd/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +3 -0
- package/umd/src/book-components/Chat/effects/components/HeartsEffect.d.ts +3 -0
- package/umd/src/book-components/Chat/effects/index.d.ts +0 -4
- package/umd/src/book-components/Chat/effects/utils/detectEffects.d.ts +1 -0
- package/umd/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +4 -4
- package/umd/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -0
- package/umd/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +0 -3
- package/umd/src/book-components/Chat/save/index.d.ts +0 -3
- package/umd/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +1 -0
- package/umd/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +0 -4
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +3 -5
- package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +0 -3
- package/umd/src/book-components/Chat/utils/ExportFormat.d.ts +2 -0
- package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +4 -3
- package/umd/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/exportChatHistory.d.ts +0 -3
- package/umd/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +2 -1
- package/umd/src/book-components/Chat/utils/loadAgentProfile.d.ts +12 -0
- package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +0 -3
- package/umd/src/book-components/Chat/utils/parseImagePrompts.d.ts +1 -3
- package/umd/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +14 -0
- package/umd/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +3 -0
- package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +0 -3
- package/umd/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +3 -3
- package/umd/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +3 -5
- package/umd/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -5
- package/umd/src/book-components/Qr/BrandedQrCode.d.ts +5 -0
- package/umd/src/book-components/Qr/GenericQrCode.d.ts +5 -0
- package/umd/src/book-components/Qr/PromptbookQrCode.d.ts +5 -0
- package/umd/src/book-components/Qr/useQrCode.d.ts +4 -1
- package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +4 -0
- package/umd/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +4 -0
- package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +3 -3
- package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -3
- package/umd/src/book-components/_common/Tooltip/Tooltip.d.ts +3 -0
- package/umd/src/book-components/icons/AboutIcon.d.ts +1 -0
- package/umd/src/book-components/icons/AttachmentIcon.d.ts +4 -0
- package/umd/src/book-components/icons/CameraIcon.d.ts +4 -0
- package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -0
- package/umd/src/book-components/icons/EmailIcon.d.ts +1 -0
- package/umd/src/book-components/icons/MenuIcon.d.ts +1 -3
- package/umd/src/book-components/icons/SaveIcon.d.ts +1 -0
- package/umd/src/book-components/icons/SendIcon.d.ts +0 -3
- package/umd/src/book-components/icons/TeacherIcon.d.ts +1 -0
- package/umd/src/cli/$runPromptbookCli.d.ts +0 -1
- package/umd/src/cli/cli-commands/_boilerplate.d.ts +0 -2
- package/umd/src/cli/cli-commands/about.d.ts +0 -6
- package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +18 -0
- package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +127 -0
- package/umd/src/cli/cli-commands/coder/boilerplateTemplates.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +0 -2
- package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -2
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +10 -2
- package/umd/src/cli/cli-commands/coder/init.d.ts +38 -2
- package/umd/src/cli/cli-commands/coder/run.d.ts +1 -3
- package/umd/src/cli/cli-commands/coder/run.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/verify.d.ts +0 -2
- package/umd/src/cli/cli-commands/coder.d.ts +0 -2
- package/umd/src/cli/cli-commands/common/handleActionErrors.d.ts +4 -0
- package/umd/src/cli/cli-commands/hello.d.ts +0 -5
- package/umd/src/cli/cli-commands/list-models.d.ts +0 -2
- package/umd/src/cli/cli-commands/list-scrapers.d.ts +0 -2
- package/umd/src/cli/cli-commands/login.d.ts +0 -5
- package/umd/src/cli/cli-commands/prettify.d.ts +0 -6
- package/umd/src/cli/cli-commands/run.d.ts +0 -8
- package/umd/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -5
- package/umd/src/cli/cli-commands/start-agents-server.d.ts +0 -2
- package/umd/src/cli/cli-commands/start-pipelines-server.d.ts +0 -5
- package/umd/src/cli/cli-commands/test-command.d.ts +0 -7
- package/umd/src/cli/common/$provideLlmToolsForCli.d.ts +5 -0
- package/umd/src/cli/main.d.ts +0 -2
- package/umd/src/cli/promptbookCli.d.ts +0 -7
- package/umd/src/collection/agent-collection/AgentCollection.d.ts +0 -3
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -6
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +3 -0
- package/umd/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +2 -1
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -5
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +1 -0
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts +4 -3
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +2 -3
- package/umd/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -0
- package/umd/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +0 -3
- package/umd/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -0
- package/umd/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -0
- package/umd/src/commands/EXPECT/ExpectCommand.d.ts +0 -3
- package/umd/src/commands/EXPECT/expectCommandParser.d.ts +3 -2
- package/umd/src/commands/FOREACH/ForeachCommand.d.ts +1 -0
- package/umd/src/commands/FOREACH/foreachCommandParser.d.ts +1 -3
- package/umd/src/commands/FORMAT/formatCommandParser.d.ts +1 -0
- package/umd/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -0
- package/umd/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -0
- package/umd/src/commands/JOKER/JokerCommand.d.ts +1 -0
- package/umd/src/commands/JOKER/jokerCommandParser.d.ts +1 -0
- package/umd/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -0
- package/umd/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -3
- package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +0 -3
- package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.test.d.ts +0 -3
- package/umd/src/commands/MODEL/ModelCommand.d.ts +1 -0
- package/umd/src/commands/MODEL/modelCommandParser.d.ts +1 -0
- package/umd/src/commands/PARAMETER/ParameterCommand.d.ts +1 -0
- package/umd/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -0
- package/umd/src/commands/PERSONA/PersonaCommand.d.ts +1 -0
- package/umd/src/commands/PERSONA/personaCommandParser.d.ts +1 -0
- package/umd/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -0
- package/umd/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -0
- package/umd/src/commands/SECTION/SectionCommand.d.ts +1 -0
- package/umd/src/commands/SECTION/sectionCommandParser.d.ts +1 -0
- package/umd/src/commands/URL/UrlCommand.d.ts +1 -0
- package/umd/src/commands/URL/urlCommandParser.d.ts +1 -0
- package/umd/src/commands/X_ACTION/ActionCommand.d.ts +1 -0
- package/umd/src/commands/X_ACTION/actionCommandParser.d.ts +1 -3
- package/umd/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -0
- package/umd/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -3
- package/umd/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +1 -0
- package/umd/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
- package/umd/src/commands/_common/stringifyCommand.d.ts +1 -1
- package/umd/src/commands/_common/types/CommandParser.d.ts +0 -4
- package/umd/src/commands/index.d.ts +0 -3
- package/umd/src/commitments/ACTION/ACTION.d.ts +0 -3
- package/umd/src/commitments/CLOSED/CLOSED.d.ts +0 -3
- package/umd/src/commitments/CLOSED/CLOSED.test.d.ts +0 -3
- package/umd/src/commitments/COMPONENT/COMPONENT.d.ts +0 -3
- package/umd/src/commitments/DELETE/DELETE.d.ts +0 -3
- package/umd/src/commitments/DICTIONARY/DICTIONARY.d.ts +0 -3
- package/umd/src/commitments/FORMAT/FORMAT.d.ts +0 -3
- package/umd/src/commitments/FROM/FROM.d.ts +0 -3
- package/umd/src/commitments/GOAL/GOAL.d.ts +0 -3
- package/umd/src/commitments/IMPORT/IMPORT.d.ts +0 -3
- package/umd/src/commitments/LANGUAGE/LANGUAGE.d.ts +0 -3
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -3
- package/umd/src/commitments/MESSAGE/MESSAGE.d.ts +0 -3
- package/umd/src/commitments/MESSAGE_SUFFIX/MESSAGE_SUFFIX.d.ts +0 -3
- package/umd/src/commitments/META/META.d.ts +0 -3
- package/umd/src/commitments/META/META_DESCRIPTION.d.ts +0 -3
- package/umd/src/commitments/META_COLOR/META_COLOR.d.ts +0 -3
- package/umd/src/commitments/META_DISCLAIMER/META_DISCLAIMER.d.ts +0 -3
- package/umd/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +0 -3
- package/umd/src/commitments/META_FONT/META_FONT.d.ts +0 -3
- package/umd/src/commitments/META_IMAGE/META_IMAGE.d.ts +0 -3
- package/umd/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +0 -3
- package/umd/src/commitments/META_LINK/META_LINK.d.ts +0 -3
- package/umd/src/commitments/META_VOICE/META_VOICE.d.ts +0 -3
- package/umd/src/commitments/MODEL/MODEL.d.ts +0 -3
- package/umd/src/commitments/OPEN/OPEN.d.ts +0 -3
- package/umd/src/commitments/PERSONA/PERSONA.d.ts +0 -3
- package/umd/src/commitments/RULE/RULE.d.ts +0 -3
- package/umd/src/commitments/SAMPLE/SAMPLE.d.ts +0 -3
- package/umd/src/commitments/SCENARIO/SCENARIO.d.ts +0 -3
- package/umd/src/commitments/TEAM/TEAM.d.ts +0 -3
- package/umd/src/commitments/TEMPLATE/TEMPLATE.d.ts +0 -3
- package/umd/src/commitments/USE/USE.d.ts +0 -3
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +2 -0
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -3
- package/umd/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +4 -5
- package/umd/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +0 -3
- package/umd/src/commitments/USE_CALENDAR/calendarReference.d.ts +0 -3
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -3
- package/umd/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +0 -3
- package/umd/src/commitments/USE_MCP/USE_MCP.d.ts +0 -3
- package/umd/src/commitments/USE_POPUP/USE_POPUP.d.ts +0 -3
- package/umd/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +0 -3
- package/umd/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +0 -3
- package/umd/src/commitments/USE_PROJECT/projectReference.d.ts +0 -3
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -3
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -3
- package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -3
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -3
- package/umd/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +0 -3
- package/umd/src/commitments/WALLET/WALLET.d.ts +0 -3
- package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +0 -3
- package/umd/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +0 -3
- package/umd/src/commitments/_base/createEmptyAgentModelRequirements.d.ts +0 -3
- package/umd/src/commitments/_common/commitmentToolFunctions.d.ts +2 -3
- package/umd/src/commitments/_common/createWritingCommitmentSections.d.ts +2 -3
- package/umd/src/commitments/_common/getAllCommitmentDefinitions.d.ts +1 -0
- package/umd/src/commitments/_common/getAllCommitmentTypes.d.ts +1 -0
- package/umd/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +0 -4
- package/umd/src/commitments/_common/getCommitmentDefinition.d.ts +1 -0
- package/umd/src/commitments/_common/isCommitmentSupported.d.ts +1 -0
- package/umd/src/commitments/_common/toolExecutionEnvelope.d.ts +0 -3
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +3 -3
- package/umd/src/commitments/index.d.ts +0 -4
- package/umd/src/config.test.d.ts +0 -3
- package/umd/src/constants/streaming.d.ts +0 -3
- package/umd/src/constants.d.ts +0 -3
- package/umd/src/conversion/archive/loadArchive.d.ts +0 -1
- package/umd/src/conversion/archive/saveArchive.d.ts +0 -5
- package/umd/src/conversion/compilePipeline.d.ts +2 -7
- package/umd/src/conversion/compilePipelineOnRemoteServer.d.ts +2 -5
- package/umd/src/conversion/parsePipeline.d.ts +1 -11
- package/umd/src/conversion/pipelineJsonToString.d.ts +1 -7
- package/umd/src/conversion/prettify/prettifyPipelineString.d.ts +0 -4
- package/umd/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -7
- package/umd/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -3
- package/umd/src/conversion/validation/_importPipeline.d.ts +6 -2
- package/umd/src/conversion/validation/pipelineStringToJson-parseErrors.test.d.ts +0 -3
- package/umd/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -3
- package/umd/src/conversion/validation/validatePipeline.d.ts +3 -9
- package/umd/src/conversion/validation/validatePipeline.test.d.ts +0 -3
- package/umd/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -2
- package/umd/src/errors/0-BoilerplateError.d.ts +0 -3
- package/umd/src/errors/0-index.d.ts +0 -3
- package/umd/src/errors/DatabaseError.d.ts +0 -3
- package/umd/src/errors/ExpectError.d.ts +2 -1
- package/umd/src/errors/ParseError.d.ts +0 -3
- package/umd/src/errors/PipelineExecutionError.d.ts +0 -3
- package/umd/src/executables/$provideExecutablesForNode.d.ts +0 -5
- package/umd/src/executables/apps/locateLibreoffice.d.ts +0 -2
- package/umd/src/executables/apps/locatePandoc.d.ts +0 -2
- package/umd/src/executables/browsers/locateBrowser.d.ts +0 -1
- package/umd/src/executables/browsers/locateDefaultSystemBrowser.d.ts +0 -1
- package/umd/src/executables/locateApp.d.ts +0 -2
- package/umd/src/executables/platforms/locateAppOnLinux.d.ts +0 -2
- package/umd/src/executables/platforms/locateAppOnMacOs.d.ts +0 -2
- package/umd/src/executables/platforms/locateAppOnWindows.d.ts +0 -2
- package/umd/src/execution/AbstractTaskResult.d.ts +0 -4
- package/umd/src/execution/AvailableModel.d.ts +0 -4
- package/umd/src/execution/CommonToolsOptions.d.ts +0 -5
- package/umd/src/execution/ExecutionTask.d.ts +4 -4
- package/umd/src/execution/FilesystemTools.d.ts +0 -3
- package/umd/src/execution/LlmExecutionTools.d.ts +3 -9
- package/umd/src/execution/LlmExecutionToolsConstructor.d.ts +0 -3
- package/umd/src/execution/PipelineExecutor.d.ts +0 -3
- package/umd/src/execution/PipelineExecutorResult.d.ts +0 -3
- package/umd/src/execution/PromptResult.d.ts +1 -9
- package/umd/src/execution/PromptbookFetch.test-type.d.ts +0 -4
- package/umd/src/execution/ScriptExecutionTools.d.ts +0 -4
- package/umd/src/execution/Usage.d.ts +0 -3
- package/umd/src/execution/UserInterfaceTools.d.ts +3 -0
- package/umd/src/execution/assertsTaskSuccessful.d.ts +1 -3
- package/umd/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +1 -0
- package/umd/src/execution/createPipelineExecutor/20-executeTask.d.ts +0 -3
- package/umd/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -3
- package/umd/src/execution/createPipelineExecutor/getContextForTask.d.ts +1 -0
- package/umd/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +0 -4
- package/umd/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +0 -1
- package/umd/src/execution/execution-report/ExecutionReportJson.d.ts +1 -0
- package/umd/src/execution/execution-report/ExecutionReportString.d.ts +0 -3
- package/umd/src/execution/execution-report/executionReportJsonToString.d.ts +0 -5
- package/umd/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -1
- package/umd/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -1
- package/umd/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -1
- package/umd/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +2 -0
- package/umd/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -3
- package/umd/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
- package/umd/src/execution/utils/checkExpectations.d.ts +2 -5
- package/umd/src/execution/utils/forEachAsync.d.ts +5 -1
- package/umd/src/execution/utils/usage-constants.d.ts +0 -3
- package/umd/src/execution/utils/usageToHuman.d.ts +0 -8
- package/umd/src/execution/utils/validatePromptResult.d.ts +1 -0
- package/umd/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -0
- package/umd/src/formats/_common/FormatParser.d.ts +2 -9
- package/umd/src/formats/_common/FormatSubvalueParser.d.ts +0 -3
- package/umd/src/formats/csv/CsvFormatParser.d.ts +2 -8
- package/umd/src/formats/index.d.ts +0 -3
- package/umd/src/formats/json/JsonFormatParser.d.ts +0 -11
- package/umd/src/formats/text/TextFormatParser.d.ts +0 -9
- package/umd/src/formats/xml/XmlFormatParser.d.ts +0 -11
- package/umd/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +1 -3
- package/umd/src/formfactors/_common/FormfactorDefinition.d.ts +1 -0
- package/umd/src/formfactors/index.d.ts +0 -3
- package/umd/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +0 -5
- package/umd/src/high-level-abstractions/index.d.ts +0 -4
- package/umd/src/high-level-abstractions/quick-chatbot/QuickChatbotHla.d.ts +0 -3
- package/umd/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +2 -3
- package/umd/src/llm-providers/_common/register/$llmToolsRegister.d.ts +2 -3
- package/umd/src/llm-providers/_common/register/$provideEnvFilename.d.ts +0 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +3 -6
- package/umd/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -7
- package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -16
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +0 -4
- package/umd/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +0 -5
- package/umd/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +0 -6
- package/umd/src/llm-providers/_common/register/LlmToolsOptions.d.ts +0 -4
- package/umd/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -0
- package/umd/src/llm-providers/_common/utils/assertUniqueModels.d.ts +0 -3
- package/umd/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -3
- package/umd/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -0
- package/umd/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -4
- package/umd/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -0
- package/umd/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -7
- package/umd/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +4 -0
- package/umd/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +1 -0
- package/umd/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +3 -7
- package/umd/src/llm-providers/_multiple/playground/playground.d.ts +0 -1
- package/umd/src/llm-providers/agent/Agent.d.ts +0 -3
- package/umd/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/agent/RemoteAgent.d.ts +0 -4
- package/umd/src/llm-providers/agent/playground/playground.d.ts +0 -6
- package/umd/src/llm-providers/agent/register-configuration.d.ts +0 -5
- package/umd/src/llm-providers/agent/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -10
- package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +3 -3
- package/umd/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -8
- package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +1 -3
- package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +0 -3
- package/umd/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +0 -7
- package/umd/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -5
- package/umd/src/llm-providers/anthropic-claude/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/anthropic-claude/register-constructor.d.ts +0 -5
- package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -6
- package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
- package/umd/src/llm-providers/azure-openai/createAzureOpenAiExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/azure-openai/playground/playground.d.ts +0 -2
- package/umd/src/llm-providers/azure-openai/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/azure-openai/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +1 -0
- package/umd/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -3
- package/umd/src/llm-providers/deepseek/deepseek-models.d.ts +1 -6
- package/umd/src/llm-providers/deepseek/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/deepseek/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +1 -0
- package/umd/src/llm-providers/google/createGoogleExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/google/google-models.d.ts +1 -6
- package/umd/src/llm-providers/google/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/google/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -5
- package/umd/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -3
- package/umd/src/llm-providers/mocked/test/joker.test.d.ts +0 -3
- package/umd/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -4
- package/umd/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -3
- package/umd/src/llm-providers/ollama/OllamaExecutionTools.d.ts +0 -3
- package/umd/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +1 -0
- package/umd/src/llm-providers/ollama/ollama-models.d.ts +1 -4
- package/umd/src/llm-providers/ollama/playground/playground.d.ts +0 -2
- package/umd/src/llm-providers/ollama/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/ollama/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +10 -0
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -8
- package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -7
- package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +2 -0
- package/umd/src/llm-providers/openai/computeOpenAiUsage.d.ts +1 -3
- package/umd/src/llm-providers/openai/computeOpenAiUsage.test.d.ts +0 -3
- package/umd/src/llm-providers/openai/createOpenAiAssistantExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/openai/createOpenAiExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/umd/src/llm-providers/openai/openai-models.test.d.ts +0 -3
- package/umd/src/llm-providers/openai/playground/playground.d.ts +0 -2
- package/umd/src/llm-providers/openai/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/openai/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -9
- package/umd/src/llm-providers/remote/playground/playground.d.ts +0 -1
- package/umd/src/llm-providers/vercel/playground/playground.d.ts +0 -2
- package/umd/src/other/templates/getBookTemplates.d.ts +2 -5
- package/umd/src/personas/preparePersona.d.ts +1 -7
- package/umd/src/pipeline/PipelineInterface/PipelineInterface.d.ts +1 -0
- package/umd/src/pipeline/PipelineInterface/constants.d.ts +0 -3
- package/umd/src/pipeline/PipelineJson/CommonTaskJson.d.ts +0 -4
- package/umd/src/pipeline/PipelineJson/DialogTaskJson.d.ts +1 -3
- package/umd/src/pipeline/PipelineJson/Expectations.d.ts +4 -3
- package/umd/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +0 -4
- package/umd/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +0 -3
- package/umd/src/pipeline/PipelineJson/PersonaJson.d.ts +0 -3
- package/umd/src/pipeline/PipelineJson/PreparationJson.d.ts +3 -5
- package/umd/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +1 -4
- package/umd/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +1 -3
- package/umd/src/pipeline/book-notation.d.ts +1 -4
- package/umd/src/pipeline/isValidPipelineString.d.ts +1 -3
- package/umd/src/pipeline/isValidPipelineString.test.d.ts +0 -3
- package/umd/src/pipeline/prompt-notation/helpers/ParameterEscaping.d.ts +5 -0
- package/umd/src/pipeline/prompt-notation/helpers/ParameterNaming.d.ts +1 -0
- package/umd/src/pipeline/prompt-notation/helpers/ParameterSection.d.ts +2 -0
- package/umd/src/pipeline/prompt-notation.d.ts +2 -5
- package/umd/src/pipeline/prompt-notation.test.d.ts +0 -3
- package/umd/src/pipeline/validatePipelineString.d.ts +1 -3
- package/umd/src/playground/permanent/_boilerplate.d.ts +0 -1
- package/umd/src/playground/permanent/agent-with-browser-playground.d.ts +0 -1
- package/umd/src/playground/permanent/error-handling-playground.d.ts +0 -1
- package/umd/src/playground/playground.d.ts +0 -2
- package/umd/src/postprocessing/utils/extractBlock.d.ts +2 -1
- package/umd/src/postprocessing/utils/extractJsonBlock.d.ts +2 -5
- package/umd/src/prepare/PrepareAndScrapeOptions.d.ts +0 -4
- package/umd/src/prepare/preparePipeline.d.ts +3 -2
- package/umd/src/prepare/preparePipelineOnRemoteServer.d.ts +2 -5
- package/umd/src/prepare/prepareTasks.d.ts +6 -10
- package/umd/src/prepare/unpreparePipeline.d.ts +1 -5
- package/umd/src/remote-server/RemoteServer.d.ts +3 -0
- package/umd/src/remote-server/openapi.d.ts +3 -4
- package/umd/src/remote-server/socket-types/_subtypes/Identification.d.ts +1 -5
- package/umd/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +0 -3
- package/umd/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +0 -3
- package/umd/src/remote-server/startAgentServer.d.ts +6 -2
- package/umd/src/remote-server/startRemoteServer.d.ts +1 -15
- package/umd/src/remote-server/types/RemoteClientOptions.d.ts +0 -5
- package/umd/src/remote-server/types/RemoteServerOptions.d.ts +10 -4
- package/umd/src/remote-server/ui/ServerApp.d.ts +1 -0
- package/umd/src/remote-server/ui/types.d.ts +3 -0
- package/umd/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +1 -4
- package/umd/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
- package/umd/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/_boilerplate/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/_boilerplate/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/_common/Scraper.d.ts +0 -5
- package/umd/src/scrapers/_common/ScraperIntermediateSource.d.ts +0 -3
- package/umd/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -0
- package/umd/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +0 -2
- package/umd/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -2
- package/umd/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -2
- package/umd/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +0 -3
- package/umd/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +2 -3
- package/umd/src/scrapers/_common/register/$scrapersRegister.d.ts +2 -3
- package/umd/src/scrapers/_common/register/ScraperConstructor.d.ts +0 -3
- package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +0 -7
- package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +0 -3
- package/umd/src/scrapers/_common/utils/promptbookFetch.d.ts +0 -3
- package/umd/src/scrapers/document/DocumentScraper.d.ts +1 -6
- package/umd/src/scrapers/document/DocumentScraper.test.d.ts +0 -3
- package/umd/src/scrapers/document/createDocumentScraper.d.ts +0 -3
- package/umd/src/scrapers/document/playground/document-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/document/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/document/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -6
- package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +0 -3
- package/umd/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +0 -3
- package/umd/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/document-legacy/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/document-legacy/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/markdown/MarkdownScraper.d.ts +1 -4
- package/umd/src/scrapers/markdown/MarkdownScraper.test.d.ts +0 -3
- package/umd/src/scrapers/markdown/createMarkdownScraper.d.ts +0 -3
- package/umd/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/markdown/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/markdown/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -7
- package/umd/src/scrapers/markitdown/createMarkitdownScraper.d.ts +0 -4
- package/umd/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/markitdown/register-constructor.d.ts +0 -5
- package/umd/src/scrapers/markitdown/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/pdf/PdfScraper.d.ts +1 -6
- package/umd/src/scrapers/pdf/createPdfScraper.d.ts +0 -3
- package/umd/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/pdf/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/pdf/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/website/WebsiteScraper.d.ts +1 -6
- package/umd/src/scrapers/website/createWebsiteScraper.d.ts +0 -3
- package/umd/src/scrapers/website/playground/website-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/website/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/website/register-metadata.d.ts +0 -3
- package/umd/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -5
- package/umd/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -3
- package/umd/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
- package/umd/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -3
- package/umd/src/scripting/javascript/postprocessing-functions.d.ts +0 -4
- package/umd/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -3
- package/umd/src/search-engines/SearchEngine.d.ts +3 -0
- package/umd/src/speech-recognition/BrowserSpeechRecognition.d.ts +0 -2
- package/umd/src/speech-recognition/OpenAiSpeechRecognition.d.ts +2 -2
- package/umd/src/storage/_common/PromptbookStorage.d.ts +0 -4
- package/umd/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -4
- package/umd/src/storage/env-storage/$EnvStorage.d.ts +0 -3
- package/umd/src/storage/file-cache-storage/FileCacheStorage.d.ts +0 -2
- package/umd/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -1
- package/umd/src/storage/local-storage/getLocalStorage.d.ts +0 -1
- package/umd/src/storage/local-storage/getSessionStorage.d.ts +0 -1
- package/umd/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +1 -0
- package/umd/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -4
- package/umd/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -3
- package/umd/src/transpilers/formatted-book-in-markdown/register.d.ts +2 -5
- package/umd/src/transpilers/openai-sdk/playground/playground.d.ts +0 -1
- package/umd/src/transpilers/openai-sdk/register.d.ts +2 -5
- package/umd/src/types/Arrayable.d.ts +1 -0
- package/umd/src/types/InputParameters_private.d.ts +4 -2
- package/umd/src/types/IntermediateFilesStrategy.d.ts +0 -3
- package/umd/src/types/LlmCall.d.ts +0 -3
- package/umd/src/types/ModelRequirements.d.ts +1 -0
- package/umd/src/types/ModelVariant.d.ts +3 -0
- package/umd/src/types/Parameters.d.ts +31 -0
- package/umd/src/types/Parameters_private.d.ts +4 -2
- package/umd/src/types/Prompt.d.ts +1 -6
- package/umd/src/types/ReservedParameters_private.d.ts +2 -1
- package/umd/src/types/ToolCall.d.ts +0 -2
- package/umd/src/types/Updatable.d.ts +1 -3
- package/umd/src/types/string_agent_hash_private.d.ts +1 -1
- package/umd/src/types/string_agent_name.d.ts +32 -0
- package/umd/src/types/string_agent_name_in_book_private.d.ts +1 -1
- package/umd/src/types/string_agent_name_private.d.ts +2 -1
- package/umd/src/types/string_agent_permanent_id_private.d.ts +2 -1
- package/umd/src/types/string_business_category_name.d.ts +5 -0
- package/umd/src/types/string_business_category_name_private.d.ts +1 -1
- package/umd/src/types/string_char_private.d.ts +1 -1
- package/umd/src/types/string_chat_prompt_private.d.ts +1 -1
- package/umd/src/types/string_completion_prompt_private.d.ts +1 -1
- package/umd/src/types/string_markdown.d.ts +0 -1
- package/umd/src/types/string_mime_type_private.d.ts +1 -0
- package/umd/src/types/string_model_description_private.d.ts +1 -1
- package/umd/src/types/string_model_name.d.ts +7 -0
- package/umd/src/types/string_model_name_private.d.ts +1 -1
- package/umd/src/types/string_name.d.ts +31 -0
- package/umd/src/types/string_name_private.d.ts +1 -1
- package/umd/src/types/string_page.d.ts +15 -0
- package/umd/src/types/string_page_private.d.ts +1 -1
- package/umd/src/types/string_parameter_name.d.ts +11 -210
- package/umd/src/types/string_parameter_value_private.d.ts +1 -1
- package/umd/src/types/string_persona_description.d.ts +14 -0
- package/umd/src/types/string_persona_description_private.d.ts +1 -1
- package/umd/src/types/string_prompt.d.ts +49 -0
- package/umd/src/types/string_prompt_image_private.d.ts +1 -1
- package/umd/src/types/string_prompt_private.d.ts +1 -1
- package/umd/src/types/string_reserved_parameter_name_private.d.ts +1 -1
- package/umd/src/types/string_sha256.d.ts +2 -2
- package/umd/src/types/string_system_message_private.d.ts +1 -1
- package/umd/src/types/string_template_private.d.ts +1 -1
- package/umd/src/types/string_text_prompt_private.d.ts +1 -1
- package/umd/src/types/string_title.d.ts +8 -0
- package/umd/src/types/string_title_private.d.ts +1 -1
- package/umd/src/types/typeAliasEmoji.d.ts +0 -3
- package/umd/src/types/typeAliases.d.ts +0 -6
- package/umd/src/utils/DEFAULT_THINKING_MESSAGES.d.ts +5 -1
- package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments.d.ts +0 -3
- package/umd/src/utils/chat/constants.d.ts +0 -3
- package/umd/src/utils/clientVersion.d.ts +0 -3
- package/umd/src/utils/color/$randomColor.d.ts +0 -5
- package/umd/src/utils/color/css-colors.d.ts +0 -3
- package/umd/src/utils/color/internal-utils/hslToRgb.d.ts +0 -3
- package/umd/src/utils/color/internal-utils/rgbToHsl.d.ts +0 -3
- package/umd/src/utils/color/operators/ColorTransformer.d.ts +2 -0
- package/umd/src/utils/color/operators/lighten.d.ts +0 -3
- package/umd/src/utils/color/operators/saturate.d.ts +0 -3
- package/umd/src/utils/color/utils/areColorsEqual.d.ts +0 -3
- package/umd/src/utils/color/utils/colorDistance.d.ts +2 -2
- package/umd/src/utils/color/utils/colorHue.d.ts +0 -1
- package/umd/src/utils/color/utils/colorHueDistance.d.ts +0 -1
- package/umd/src/utils/color/utils/colorToDataUrl.d.ts +0 -3
- package/umd/src/utils/database/uniqueConstraint.d.ts +1 -3
- package/umd/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +3 -4
- package/umd/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +0 -3
- package/umd/src/utils/editable/types/PipelineEditableSerialized.d.ts +2 -2
- package/umd/src/utils/editable/utils/renamePipelineParameter.d.ts +4 -3
- package/umd/src/utils/editable/utils/stringifyPipelineJson.d.ts +0 -6
- package/umd/src/utils/environment/$detectRuntimeEnvironment.d.ts +0 -3
- package/umd/src/utils/environment/$getGlobalScope.d.ts +1 -1
- package/umd/src/utils/environment/$isRunningInBrowser.d.ts +0 -3
- package/umd/src/utils/environment/$isRunningInJest.d.ts +0 -3
- package/umd/src/utils/environment/$isRunningInNode.d.ts +0 -3
- package/umd/src/utils/environment/$isRunningInWebWorker.d.ts +0 -3
- package/umd/src/utils/execCommand/$execCommand.d.ts +0 -2
- package/umd/src/utils/execCommand/$execCommands.d.ts +0 -1
- package/umd/src/utils/execCommand/ExecCommandOptions.d.ts +3 -4
- package/umd/src/utils/expectation-counters/constants.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countCharacters.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countLines.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countPages.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countParagraphs.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countSentences.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countWords.d.ts +0 -5
- package/umd/src/utils/expectation-counters/index.d.ts +0 -4
- package/umd/src/utils/files/$induceBookDownload.d.ts +0 -1
- package/umd/src/utils/files/$induceFileDownload.d.ts +0 -1
- package/umd/src/utils/files/ObjectUrl.d.ts +0 -1
- package/umd/src/utils/files/isDirectoryExisting.d.ts +0 -6
- package/umd/src/utils/files/isExecutable.d.ts +0 -4
- package/umd/src/utils/files/isFileExisting.d.ts +0 -5
- package/umd/src/utils/files/listAllFiles.d.ts +1 -5
- package/umd/src/utils/files/readResponseBytes.d.ts +1 -0
- package/umd/src/utils/knowledge/inlineKnowledgeSource.d.ts +11 -6
- package/umd/src/utils/knowledge/simplifyKnowledgeLabel.d.ts +2 -0
- package/umd/src/utils/linguistic-hash/linguisticHash.d.ts +2 -1
- package/umd/src/utils/linguistic-hash/linguisticHashTypes.d.ts +0 -3
- package/umd/src/utils/linguistic-hash/linguisticHashWords.cs.d.ts +0 -3
- package/umd/src/utils/linguistic-hash/linguisticHashWords.en.d.ts +0 -3
- package/umd/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -3
- package/umd/src/utils/markdown/createMarkdownTable.d.ts +0 -3
- package/umd/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -3
- package/umd/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -3
- package/umd/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -0
- package/umd/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -4
- package/umd/src/utils/markdown/humanizeAiText.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextEllipsis.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextEmdashed.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextQuotes.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextSources.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextWhitespace.d.ts +0 -3
- package/umd/src/utils/markdown/prettifyMarkdown.d.ts +4 -2
- package/umd/src/utils/markdown/promptbookifyAiText.d.ts +0 -3
- package/umd/src/utils/markdown/removeMarkdownComments.d.ts +1 -0
- package/umd/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
- package/umd/src/utils/markdown/removeMarkdownLinks.d.ts +1 -0
- package/umd/src/utils/markdown/trimCodeBlock.d.ts +1 -1
- package/umd/src/utils/markdown/trimEndOfCodeBlock.d.ts +1 -1
- package/umd/src/utils/misc/$getCurrentDate.d.ts +1 -0
- package/umd/src/utils/misc/aboutPromptbookInformation.d.ts +3 -3
- package/umd/src/utils/misc/computeHash.d.ts +0 -3
- package/umd/src/utils/misc/debounce.d.ts +2 -0
- package/umd/src/utils/misc/emojis.d.ts +3 -8
- package/umd/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +7 -2
- package/umd/src/utils/misc/parseNumber.d.ts +0 -4
- package/umd/src/utils/misc/xAboutPromptbookInformation.d.ts +3 -4
- package/umd/src/utils/normalization/IKeywords.d.ts +0 -3
- package/umd/src/utils/normalization/nameToUriPart.d.ts +1 -0
- package/umd/src/utils/normalization/nameToUriParts.d.ts +1 -0
- package/umd/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -3
- package/umd/src/utils/normalization/normalizeTo_PascalCase.d.ts +2 -0
- package/umd/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
- package/umd/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -3
- package/umd/src/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
- package/umd/src/utils/normalization/orderJson.d.ts +1 -0
- package/umd/src/utils/normalization/orderJson.test.d.ts +0 -3
- package/umd/src/utils/normalization/parseKeywords.d.ts +1 -4
- package/umd/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
- package/umd/src/utils/normalization/removeDiacritics.d.ts +1 -3
- package/umd/src/utils/normalization/removeEmojis.d.ts +1 -0
- package/umd/src/utils/normalization/removeQuotes.d.ts +1 -0
- package/umd/src/utils/normalization/searchKeywords.d.ts +1 -3
- package/umd/src/utils/normalization/titleToName.d.ts +1 -0
- package/umd/src/utils/normalization/unwrapResult.d.ts +1 -3
- package/umd/src/utils/organization/$sideEffect.d.ts +1 -0
- package/umd/src/utils/organization/TODO_USE.d.ts +1 -0
- package/umd/src/utils/organization/just.d.ts +1 -0
- package/umd/src/utils/organization/keepImported.d.ts +1 -0
- package/umd/src/utils/organization/keepTypeImported.d.ts +1 -0
- package/umd/src/utils/organization/keepUnused.d.ts +1 -0
- package/umd/src/utils/organization/preserve.d.ts +1 -3
- package/umd/src/utils/organization/really_any.d.ts +1 -0
- package/umd/src/utils/organization/spaceTrim.d.ts +3 -2
- package/umd/src/utils/parameters/extractParameterNames.d.ts +1 -0
- package/umd/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -0
- package/umd/src/utils/parameters/templateParameters.d.ts +2 -1
- package/umd/src/utils/parameters/valueToString.d.ts +2 -2
- package/umd/src/utils/random/$generateBookBoilerplate.d.ts +3 -3
- package/umd/src/utils/random/$randomAgentPersona.d.ts +1 -3
- package/umd/src/utils/random/$randomAgentRule.d.ts +1 -3
- package/umd/src/utils/random/$randomFullnameWithColor.d.ts +4 -3
- package/umd/src/utils/random/$randomItem.d.ts +0 -3
- package/umd/src/utils/random/$randomSeed.d.ts +0 -3
- package/umd/src/utils/random/$randomToken.d.ts +2 -5
- package/umd/src/utils/random/EnglishNamePool.d.ts +1 -0
- package/umd/src/utils/serialization/$deepFreeze.d.ts +1 -3
- package/umd/src/utils/serialization/checkSerializableAsJson.d.ts +1 -5
- package/umd/src/utils/serialization/clonePipeline.d.ts +1 -3
- package/umd/src/utils/serialization/deepClone.d.ts +1 -3
- package/umd/src/utils/serialization/exportJson.d.ts +1 -3
- package/umd/src/utils/serialization/isSerializableAsJson.d.ts +0 -5
- package/umd/src/utils/serialization/jsonStringsToJsons.d.ts +1 -4
- package/umd/src/utils/serialization/serializeToPromptbookJavascript.d.ts +3 -3
- package/umd/src/utils/sets/difference.d.ts +1 -3
- package/umd/src/utils/sets/intersection.d.ts +1 -0
- package/umd/src/utils/sets/union.d.ts +1 -0
- package/umd/src/utils/take/classes/TakeChain.d.ts +4 -1
- package/umd/src/utils/take/interfaces/ITakeChain.d.ts +5 -1
- package/umd/src/utils/take/interfaces/Takeable.d.ts +2 -1
- package/umd/src/utils/take/take.d.ts +1 -1
- package/umd/src/utils/validators/filePath/isRootPath.d.ts +1 -3
- package/umd/src/utils/validators/filePath/isRootPath.test.d.ts +0 -3
- package/umd/src/utils/validators/filePath/isValidFilePath.d.ts +1 -3
- package/umd/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -0
- package/umd/src/utils/validators/parameterName/validateParameterName.d.ts +1 -0
- package/umd/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
- package/umd/src/utils/validators/url/extractUrlsFromText.d.ts +1 -0
- package/umd/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
- package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +0 -3
- package/umd/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -3
- package/umd/src/utils/validators/url/normalizeDomainForMatching.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
- package/umd/src/wizard/$getCompiledBook.d.ts +0 -2
- package/umd/src/wizard/wizard.d.ts +1 -2
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-36';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -41,9 +41,7 @@
|
|
|
41
41
|
Object.setPrototypeOf(this, ParseError.prototype);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
* TODO: Maybe split `ParseError` and `ApplyError`
|
|
46
|
-
*/
|
|
44
|
+
// TODO: Maybe split `ParseError` and `ApplyError`
|
|
47
45
|
|
|
48
46
|
/**
|
|
49
47
|
* Makes first letter of a string uppercase
|
|
@@ -68,6 +66,7 @@
|
|
|
68
66
|
* @param markdown any valid markdown
|
|
69
67
|
* @returns code blocks with language and content
|
|
70
68
|
* @throws {ParseError} if block is not closed properly
|
|
69
|
+
*
|
|
71
70
|
* @public exported from `@promptbook/markdown-utils`
|
|
72
71
|
*/
|
|
73
72
|
function extractAllBlocksFromMarkdown(markdown) {
|
|
@@ -118,9 +117,7 @@
|
|
|
118
117
|
}
|
|
119
118
|
return codeBlocks;
|
|
120
119
|
}
|
|
121
|
-
|
|
122
|
-
* TODO: Maybe name for `blockNotation` instead of '```' and '>'
|
|
123
|
-
*/
|
|
120
|
+
// TODO: Maybe name for `blockNotation` instead of '```' and '>'
|
|
124
121
|
|
|
125
122
|
/**
|
|
126
123
|
* Extracts exactly ONE code block from markdown.
|
|
@@ -135,8 +132,9 @@
|
|
|
135
132
|
*
|
|
136
133
|
* @param markdown any valid markdown
|
|
137
134
|
* @returns code block with language and content
|
|
138
|
-
* @public exported from `@promptbook/markdown-utils`
|
|
139
135
|
* @throws {ParseError} if there is not exactly one code block in the markdown
|
|
136
|
+
*
|
|
137
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
140
138
|
*/
|
|
141
139
|
function extractOneBlockFromMarkdown(markdown) {
|
|
142
140
|
const codeBlocks = extractAllBlocksFromMarkdown(markdown);
|
|
@@ -149,9 +147,7 @@
|
|
|
149
147
|
}
|
|
150
148
|
return codeBlocks[0];
|
|
151
149
|
}
|
|
152
|
-
|
|
153
|
-
* TODO: [🍓][🌻] Decide of this is internal utility, external util OR validator/postprocessor
|
|
154
|
-
*/
|
|
150
|
+
// TODO: [🍓][🌻] Decide of this is internal utility, external util OR validator/postprocessor
|
|
155
151
|
|
|
156
152
|
/**
|
|
157
153
|
* Extracts code block from markdown.
|
|
@@ -164,8 +160,9 @@
|
|
|
164
160
|
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
165
161
|
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
|
|
166
162
|
*
|
|
167
|
-
* @public exported from `@promptbook/markdown-utils`
|
|
168
163
|
* @throws {ParseError} if there is not exactly one code block in the markdown
|
|
164
|
+
*
|
|
165
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
169
166
|
*/
|
|
170
167
|
function extractBlock(markdown) {
|
|
171
168
|
const { content } = extractOneBlockFromMarkdown(markdown);
|
|
@@ -176,16 +173,20 @@
|
|
|
176
173
|
* Trims string from all 4 sides
|
|
177
174
|
*
|
|
178
175
|
* Note: This is a re-exported function from the `spacetrim` package which is
|
|
179
|
-
*
|
|
176
|
+
* Developed by same author @hejny as this package
|
|
180
177
|
*
|
|
181
|
-
* @public exported from `@promptbook/utils`
|
|
182
178
|
* @see https://github.com/hejny/spacetrim#usage
|
|
179
|
+
*
|
|
180
|
+
* @public exported from `@promptbook/utils`
|
|
183
181
|
*/
|
|
184
182
|
const spaceTrim = spacetrim.spaceTrim;
|
|
185
183
|
|
|
186
184
|
/**
|
|
187
|
-
*
|
|
185
|
+
* Class implementing take chain.
|
|
186
|
+
*
|
|
188
187
|
* @de
|
|
188
|
+
*
|
|
189
|
+
* @private util of `@promptbook/color`
|
|
189
190
|
*/
|
|
190
191
|
class TakeChain {
|
|
191
192
|
constructor(value) {
|
|
@@ -202,9 +203,9 @@
|
|
|
202
203
|
*
|
|
203
204
|
* @param {*} initialValue - The initial value.
|
|
204
205
|
* @returns {Proxy<WithTake<TValue>>} - A proxy object with a `take` method.
|
|
206
|
+
* @deprecated [🤡] Use some better functional library instead of `TakeChain`
|
|
205
207
|
*
|
|
206
208
|
* @private util of `@promptbook/color`
|
|
207
|
-
* @deprecated [🤡] Use some better functional library instead of `TakeChain`
|
|
208
209
|
*/
|
|
209
210
|
function take(initialValue) {
|
|
210
211
|
if (initialValue instanceof TakeChain) {
|
|
@@ -382,9 +383,7 @@
|
|
|
382
383
|
yellow: '#ffff00',
|
|
383
384
|
yellowgreen: '#9acd32',
|
|
384
385
|
};
|
|
385
|
-
|
|
386
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
387
|
-
*/
|
|
386
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
388
387
|
|
|
389
388
|
/**
|
|
390
389
|
* Validates that a channel value is a valid number within the range of 0 to 255.
|
|
@@ -414,7 +413,13 @@
|
|
|
414
413
|
}
|
|
415
414
|
}
|
|
416
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Constant for short hex lengths.
|
|
418
|
+
*/
|
|
417
419
|
const SHORT_HEX_LENGTHS = new Set([3, 4]);
|
|
420
|
+
/**
|
|
421
|
+
* Constant for long hex lengths.
|
|
422
|
+
*/
|
|
418
423
|
const LONG_HEX_LENGTHS = new Set([6, 8]);
|
|
419
424
|
/**
|
|
420
425
|
* Parses a hex string into RGBA channel values.
|
|
@@ -447,6 +452,9 @@
|
|
|
447
452
|
}
|
|
448
453
|
return throwInvalidHex();
|
|
449
454
|
}
|
|
455
|
+
/**
|
|
456
|
+
* Parses short hex channel.
|
|
457
|
+
*/
|
|
450
458
|
function parseShortHexChannel(char, onError) {
|
|
451
459
|
if (!char) {
|
|
452
460
|
return onError();
|
|
@@ -457,6 +465,9 @@
|
|
|
457
465
|
}
|
|
458
466
|
return parsed * 16;
|
|
459
467
|
}
|
|
468
|
+
/**
|
|
469
|
+
* Parses long hex channel.
|
|
470
|
+
*/
|
|
460
471
|
function parseLongHexChannel(hex, start, onError) {
|
|
461
472
|
const segment = hex.substr(start, 2);
|
|
462
473
|
if (segment.length < 2) {
|
|
@@ -469,6 +480,9 @@
|
|
|
469
480
|
return parsed;
|
|
470
481
|
}
|
|
471
482
|
|
|
483
|
+
/**
|
|
484
|
+
* Pattern matching hsl.
|
|
485
|
+
*/
|
|
472
486
|
const HSL_REGEX = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
|
|
473
487
|
/**
|
|
474
488
|
* Parses an HSL string into RGBA channel values.
|
|
@@ -494,6 +508,9 @@
|
|
|
494
508
|
alpha: 255,
|
|
495
509
|
};
|
|
496
510
|
}
|
|
511
|
+
/**
|
|
512
|
+
* Handles convert hsl to Rgb.
|
|
513
|
+
*/
|
|
497
514
|
function convertHslToRgb(h, s, l) {
|
|
498
515
|
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
499
516
|
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
|
|
@@ -532,7 +549,13 @@
|
|
|
532
549
|
};
|
|
533
550
|
}
|
|
534
551
|
|
|
552
|
+
/**
|
|
553
|
+
* Pattern matching RGB.
|
|
554
|
+
*/
|
|
535
555
|
const RGB_REGEX = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
556
|
+
/**
|
|
557
|
+
* Pattern matching rgba.
|
|
558
|
+
*/
|
|
536
559
|
const RGBA_REGEX = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
537
560
|
/**
|
|
538
561
|
* Parses an RGB string into RGBA channel values.
|
|
@@ -574,6 +597,9 @@
|
|
|
574
597
|
alpha: parseAlphaValue(match[4]),
|
|
575
598
|
};
|
|
576
599
|
}
|
|
600
|
+
/**
|
|
601
|
+
* Parses channel value.
|
|
602
|
+
*/
|
|
577
603
|
function parseChannelValue(value) {
|
|
578
604
|
if (value.endsWith('%')) {
|
|
579
605
|
const percent = parseFloat(value);
|
|
@@ -581,6 +607,9 @@
|
|
|
581
607
|
}
|
|
582
608
|
return Math.round(parseFloat(value));
|
|
583
609
|
}
|
|
610
|
+
/**
|
|
611
|
+
* Parses alpha value.
|
|
612
|
+
*/
|
|
584
613
|
function parseAlphaValue(value) {
|
|
585
614
|
if (value.endsWith('%')) {
|
|
586
615
|
const percent = parseFloat(value);
|
|
@@ -593,8 +622,17 @@
|
|
|
593
622
|
return Math.round(parsed);
|
|
594
623
|
}
|
|
595
624
|
|
|
625
|
+
/**
|
|
626
|
+
* Pattern matching hsl regex.
|
|
627
|
+
*/
|
|
596
628
|
const HSL_REGEX_PATTERN = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
|
|
629
|
+
/**
|
|
630
|
+
* Pattern matching RGB regex.
|
|
631
|
+
*/
|
|
597
632
|
const RGB_REGEX_PATTERN = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
633
|
+
/**
|
|
634
|
+
* Pattern matching rgba regex.
|
|
635
|
+
*/
|
|
598
636
|
const RGBA_REGEX_PATTERN = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
599
637
|
/**
|
|
600
638
|
* Color object represents an RGB color with alpha channel
|
|
@@ -960,9 +998,7 @@
|
|
|
960
998
|
}
|
|
961
999
|
return [Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255)];
|
|
962
1000
|
}
|
|
963
|
-
|
|
964
|
-
* TODO: Properly name all used internal variables
|
|
965
|
-
*/
|
|
1001
|
+
// TODO: Properly name all used internal variables
|
|
966
1002
|
|
|
967
1003
|
/**
|
|
968
1004
|
* Converts RGB values to HSL values
|
|
@@ -1008,9 +1044,7 @@
|
|
|
1008
1044
|
}
|
|
1009
1045
|
return [hue, saturation, lightness];
|
|
1010
1046
|
}
|
|
1011
|
-
|
|
1012
|
-
* TODO: Properly name all used internal variables
|
|
1013
|
-
*/
|
|
1047
|
+
// TODO: Properly name all used internal variables
|
|
1014
1048
|
|
|
1015
1049
|
/**
|
|
1016
1050
|
* Makes color transformer which lighten the given color
|
|
@@ -1028,9 +1062,7 @@
|
|
|
1028
1062
|
return Color.fromValues(r, g, b, alpha);
|
|
1029
1063
|
};
|
|
1030
1064
|
}
|
|
1031
|
-
|
|
1032
|
-
* TODO: Maybe implement by mix+hsl
|
|
1033
|
-
*/
|
|
1065
|
+
// TODO: Maybe implement by mix+hsl
|
|
1034
1066
|
|
|
1035
1067
|
/**
|
|
1036
1068
|
* Makes color transformer which saturate the given color
|
|
@@ -1048,9 +1080,7 @@
|
|
|
1048
1080
|
return Color.fromValues(r, g, b, alpha);
|
|
1049
1081
|
};
|
|
1050
1082
|
}
|
|
1051
|
-
|
|
1052
|
-
* TODO: Maybe implement by mix+hsl
|
|
1053
|
-
*/
|
|
1083
|
+
// TODO: Maybe implement by mix+hsl
|
|
1054
1084
|
|
|
1055
1085
|
/**
|
|
1056
1086
|
* Returns the same value that is passed as argument.
|
|
@@ -1063,6 +1093,7 @@
|
|
|
1063
1093
|
*
|
|
1064
1094
|
* @param value any values
|
|
1065
1095
|
* @returns the same values
|
|
1096
|
+
*
|
|
1066
1097
|
* @private within the repository
|
|
1067
1098
|
*/
|
|
1068
1099
|
function just(value) {
|
|
@@ -1452,8 +1483,9 @@
|
|
|
1452
1483
|
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
1453
1484
|
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
|
|
1454
1485
|
*
|
|
1455
|
-
* @public exported from `@promptbook/markdown-utils`
|
|
1456
1486
|
* @throws {ParseError} if there is no valid JSON block in the markdown
|
|
1487
|
+
*
|
|
1488
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
1457
1489
|
*/
|
|
1458
1490
|
function extractJsonBlock(markdown) {
|
|
1459
1491
|
if (isValidJsonString(markdown)) {
|
|
@@ -1469,10 +1501,8 @@
|
|
|
1469
1501
|
}
|
|
1470
1502
|
return jsonBlocks[0].content;
|
|
1471
1503
|
}
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
* TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
|
|
1475
|
-
*/
|
|
1504
|
+
// TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
|
|
1505
|
+
// TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
|
|
1476
1506
|
|
|
1477
1507
|
/**
|
|
1478
1508
|
* Just says that the variable is not used but should be kept
|
|
@@ -1486,6 +1516,7 @@
|
|
|
1486
1516
|
*
|
|
1487
1517
|
* @param value any values
|
|
1488
1518
|
* @returns void
|
|
1519
|
+
*
|
|
1489
1520
|
* @private within the repository
|
|
1490
1521
|
*/
|
|
1491
1522
|
function keepUnused(...valuesToKeep) {
|
|
@@ -1512,6 +1543,7 @@
|
|
|
1512
1543
|
* Tests if given string is valid file path.
|
|
1513
1544
|
*
|
|
1514
1545
|
* Note: This does not check if the file exists only if the path is valid
|
|
1546
|
+
*
|
|
1515
1547
|
* @public exported from `@promptbook/utils`
|
|
1516
1548
|
*/
|
|
1517
1549
|
function isValidFilePath(filename) {
|
|
@@ -1560,9 +1592,7 @@
|
|
|
1560
1592
|
}
|
|
1561
1593
|
return false;
|
|
1562
1594
|
}
|
|
1563
|
-
|
|
1564
|
-
* TODO: [🍏] Implement for MacOs
|
|
1565
|
-
*/
|
|
1595
|
+
// TODO: [🍏] Implement for MacOs
|
|
1566
1596
|
|
|
1567
1597
|
/**
|
|
1568
1598
|
* Tests if given string is valid URL.
|
|
@@ -1604,6 +1634,7 @@
|
|
|
1604
1634
|
* @param {string} pipelineString the candidate for a pipeline string
|
|
1605
1635
|
* @returns {PipelineString} the same string as input, but validated as valid
|
|
1606
1636
|
* @throws {ParseError} if the string is not a valid pipeline string
|
|
1637
|
+
*
|
|
1607
1638
|
* @public exported from `@promptbook/core`
|
|
1608
1639
|
*/
|
|
1609
1640
|
function validatePipelineString(pipelineString) {
|
|
@@ -1622,17 +1653,16 @@
|
|
|
1622
1653
|
// <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
|
|
1623
1654
|
return pipelineString;
|
|
1624
1655
|
}
|
|
1625
|
-
|
|
1626
|
-
* TODO: [🧠][🈴] Where is the best location for this file
|
|
1627
|
-
*/
|
|
1656
|
+
// TODO: [🧠][🈴] Where is the best location for this file
|
|
1628
1657
|
|
|
1629
1658
|
/**
|
|
1630
1659
|
* Prettify the html code
|
|
1631
1660
|
*
|
|
1632
1661
|
* @param content raw html code
|
|
1633
1662
|
* @returns formatted html code
|
|
1634
|
-
* @private withing the package because of HUGE size of prettier dependency
|
|
1635
1663
|
* @deprecated Prettier removed from Promptbook due to package size
|
|
1664
|
+
*
|
|
1665
|
+
* @private withing the package because of HUGE size of prettier dependency
|
|
1636
1666
|
*/
|
|
1637
1667
|
function prettifyMarkdown(content) {
|
|
1638
1668
|
return (content + `\n\n<!-- Note: Prettier removed from Promptbook -->`);
|
|
@@ -1644,6 +1674,7 @@
|
|
|
1644
1674
|
* @deprecated TODO: [🥍][🧠] Backup original files in `PipelineJson` same as in Promptbook.studio
|
|
1645
1675
|
* @param pipelineJson Promptbook in JSON format (.bookc)
|
|
1646
1676
|
* @returns Promptbook in string format (.book.md)
|
|
1677
|
+
*
|
|
1647
1678
|
* @public exported from `@promptbook/core`
|
|
1648
1679
|
*/
|
|
1649
1680
|
function pipelineJsonToString(pipelineJson) {
|
|
@@ -1760,6 +1791,8 @@
|
|
|
1760
1791
|
return validatePipelineString(pipelineString);
|
|
1761
1792
|
}
|
|
1762
1793
|
/**
|
|
1794
|
+
* Handles task parameter Json to string.
|
|
1795
|
+
*
|
|
1763
1796
|
* @private internal utility of `pipelineJsonToString`
|
|
1764
1797
|
*/
|
|
1765
1798
|
function taskParameterJsonToString(taskParameterJson) {
|
|
@@ -1770,18 +1803,17 @@
|
|
|
1770
1803
|
}
|
|
1771
1804
|
return parameterString;
|
|
1772
1805
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
* TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
|
|
1779
|
-
*/
|
|
1806
|
+
// TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
|
|
1807
|
+
// TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
|
|
1808
|
+
// TODO: [🏛] Maybe make some markdown builder
|
|
1809
|
+
// TODO: [🏛] Escape all
|
|
1810
|
+
// TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
|
|
1780
1811
|
|
|
1781
1812
|
/**
|
|
1782
1813
|
* Orders JSON object by keys
|
|
1783
1814
|
*
|
|
1784
1815
|
* @returns The same type of object as the input re-ordered
|
|
1816
|
+
*
|
|
1785
1817
|
* @public exported from `@promptbook/utils`
|
|
1786
1818
|
*/
|
|
1787
1819
|
function orderJson(options) {
|
|
@@ -1800,6 +1832,7 @@
|
|
|
1800
1832
|
* Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
|
|
1801
1833
|
*
|
|
1802
1834
|
* @returns The same object as the input, but deeply frozen
|
|
1835
|
+
*
|
|
1803
1836
|
* @public exported from `@promptbook/utils`
|
|
1804
1837
|
*/
|
|
1805
1838
|
function $deepFreeze(objectValue) {
|
|
@@ -1816,9 +1849,7 @@
|
|
|
1816
1849
|
Object.freeze(objectValue);
|
|
1817
1850
|
return objectValue;
|
|
1818
1851
|
}
|
|
1819
|
-
|
|
1820
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
1821
|
-
*/
|
|
1852
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
1822
1853
|
|
|
1823
1854
|
/**
|
|
1824
1855
|
* Checks if the value is [🚉] serializable as JSON
|
|
@@ -1838,6 +1869,7 @@
|
|
|
1838
1869
|
* - And much more...
|
|
1839
1870
|
*
|
|
1840
1871
|
* @throws UnexpectedError if the value is not serializable as JSON
|
|
1872
|
+
*
|
|
1841
1873
|
* @public exported from `@promptbook/utils`
|
|
1842
1874
|
*/
|
|
1843
1875
|
function checkSerializableAsJson(options) {
|
|
@@ -1952,11 +1984,9 @@
|
|
|
1952
1984
|
`));
|
|
1953
1985
|
}
|
|
1954
1986
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
* Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
|
|
1959
|
-
*/
|
|
1987
|
+
// TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
|
|
1988
|
+
// TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
|
|
1989
|
+
// Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
|
|
1960
1990
|
|
|
1961
1991
|
/**
|
|
1962
1992
|
* Creates a deep clone of the given object
|
|
@@ -1966,6 +1996,7 @@
|
|
|
1966
1996
|
*
|
|
1967
1997
|
* @param objectValue The object to clone.
|
|
1968
1998
|
* @returns A deep, writable clone of the input object.
|
|
1999
|
+
*
|
|
1969
2000
|
* @public exported from `@promptbook/utils`
|
|
1970
2001
|
*/
|
|
1971
2002
|
function deepClone(objectValue) {
|
|
@@ -1982,9 +2013,7 @@
|
|
|
1982
2013
|
> return Object.assign({}, objectValue);
|
|
1983
2014
|
*/
|
|
1984
2015
|
}
|
|
1985
|
-
|
|
1986
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
1987
|
-
*/
|
|
2016
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
1988
2017
|
|
|
1989
2018
|
/**
|
|
1990
2019
|
* Utility to export a JSON object from a function
|
|
@@ -1997,6 +2026,7 @@
|
|
|
1997
2026
|
* Note: This function does not mutates the given object
|
|
1998
2027
|
*
|
|
1999
2028
|
* @returns The same type of object as the input but read-only and re-ordered
|
|
2029
|
+
*
|
|
2000
2030
|
* @public exported from `@promptbook/utils`
|
|
2001
2031
|
*/
|
|
2002
2032
|
function exportJson(options) {
|
|
@@ -2016,9 +2046,7 @@
|
|
|
2016
2046
|
$deepFreeze(orderedValue);
|
|
2017
2047
|
return orderedValue;
|
|
2018
2048
|
}
|
|
2019
|
-
|
|
2020
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2021
|
-
*/
|
|
2049
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2022
2050
|
|
|
2023
2051
|
/**
|
|
2024
2052
|
* Order of keys in the pipeline JSON
|
|
@@ -2078,9 +2106,7 @@
|
|
|
2078
2106
|
// <- TODO: Add [emoji] + instructions ACRY when adding new reserved parameter
|
|
2079
2107
|
],
|
|
2080
2108
|
});
|
|
2081
|
-
|
|
2082
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2083
|
-
*/
|
|
2109
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2084
2110
|
|
|
2085
2111
|
/**
|
|
2086
2112
|
* This error indicates that the promptbook object has valid syntax (=can be parsed) but contains logical errors (like circular dependencies)
|
|
@@ -2118,12 +2144,13 @@
|
|
|
2118
2144
|
* Tests if given string is valid promptbook version
|
|
2119
2145
|
* It looks into list of known promptbook versions.
|
|
2120
2146
|
*
|
|
2121
|
-
* @see https://www.npmjs.com/package/promptbook?activeTab=versions
|
|
2122
2147
|
* Note: When you are using for example promptbook 2.0.0 and there already is promptbook 3.0.0 it don`t know about it.
|
|
2123
2148
|
* Note: There are two similar functions:
|
|
2124
2149
|
* - `isValidSemanticVersion` which tests any semantic version
|
|
2125
2150
|
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
|
|
2126
2151
|
*
|
|
2152
|
+
* @see https://www.npmjs.com/package/promptbook?activeTab=versions
|
|
2153
|
+
*
|
|
2127
2154
|
* @public exported from `@promptbook/utils`
|
|
2128
2155
|
*/
|
|
2129
2156
|
function isValidPromptbookVersion(version) {
|
|
@@ -2166,9 +2193,7 @@
|
|
|
2166
2193
|
*/
|
|
2167
2194
|
return true;
|
|
2168
2195
|
}
|
|
2169
|
-
|
|
2170
|
-
* TODO: [🐠] Maybe more info why the URL is invalid
|
|
2171
|
-
*/
|
|
2196
|
+
// TODO: [🐠] Maybe more info why the URL is invalid
|
|
2172
2197
|
|
|
2173
2198
|
/**
|
|
2174
2199
|
* Validates PipelineJson if it is logically valid
|
|
@@ -2185,6 +2210,7 @@
|
|
|
2185
2210
|
* @param pipeline valid or invalid PipelineJson
|
|
2186
2211
|
* @returns the same pipeline if it is logically valid
|
|
2187
2212
|
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
2213
|
+
*
|
|
2188
2214
|
* @public exported from `@promptbook/core`
|
|
2189
2215
|
*/
|
|
2190
2216
|
function validatePipeline(pipeline) {
|
|
@@ -2209,6 +2235,8 @@
|
|
|
2209
2235
|
return pipeline;
|
|
2210
2236
|
}
|
|
2211
2237
|
/**
|
|
2238
|
+
* Validates pipeline inner function.
|
|
2239
|
+
*
|
|
2212
2240
|
* @private internal function for `validatePipeline`
|
|
2213
2241
|
*/
|
|
2214
2242
|
function validatePipeline_InnerFunction(pipeline) {
|
|
@@ -2453,15 +2481,13 @@
|
|
|
2453
2481
|
* > * - ...
|
|
2454
2482
|
* > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
|
|
2455
2483
|
*/
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
2464
|
-
*/
|
|
2484
|
+
// TODO: [🧳][main] !!4 Validate that all examples match expectations
|
|
2485
|
+
// TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
|
|
2486
|
+
// TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
|
|
2487
|
+
// TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
|
|
2488
|
+
// TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
|
|
2489
|
+
// TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
|
|
2490
|
+
// TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
2465
2491
|
|
|
2466
2492
|
/**
|
|
2467
2493
|
* This error indicates that promptbook not found in the collection
|
|
@@ -2494,6 +2520,7 @@
|
|
|
2494
2520
|
*
|
|
2495
2521
|
* @param template the string template with parameters in {curly} braces
|
|
2496
2522
|
* @returns the list of parameter names
|
|
2523
|
+
*
|
|
2497
2524
|
* @public exported from `@promptbook/utils`
|
|
2498
2525
|
*/
|
|
2499
2526
|
function extractParameterNames(template) {
|
|
@@ -2510,6 +2537,7 @@
|
|
|
2510
2537
|
* Unprepare just strips the preparation data of the pipeline
|
|
2511
2538
|
*
|
|
2512
2539
|
* @deprecated In future version this function will be removed or deprecated
|
|
2540
|
+
*
|
|
2513
2541
|
* @public exported from `@promptbook/core`
|
|
2514
2542
|
*/
|
|
2515
2543
|
function unpreparePipeline(pipeline) {
|
|
@@ -2538,18 +2566,17 @@
|
|
|
2538
2566
|
},
|
|
2539
2567
|
});
|
|
2540
2568
|
}
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
* TODO: [🍙] Make some standard order of json properties
|
|
2545
|
-
*/
|
|
2569
|
+
// TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
|
|
2570
|
+
// TODO: Write tests for `preparePipeline`
|
|
2571
|
+
// TODO: [🍙] Make some standard order of json properties
|
|
2546
2572
|
|
|
2547
2573
|
/**
|
|
2548
2574
|
* Library of pipelines that groups together pipelines for an application.
|
|
2549
2575
|
* This implementation is a very thin wrapper around the Array / Map of pipelines.
|
|
2550
2576
|
*
|
|
2551
|
-
* @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
|
|
2552
2577
|
* @see https://github.com/webgptorg/pipeline#pipeline-collection
|
|
2578
|
+
*
|
|
2579
|
+
* @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
|
|
2553
2580
|
*/
|
|
2554
2581
|
class SimplePipelineCollection {
|
|
2555
2582
|
/**
|
|
@@ -2653,6 +2680,7 @@
|
|
|
2653
2680
|
*
|
|
2654
2681
|
* @param promptbookSources
|
|
2655
2682
|
* @returns PipelineCollection
|
|
2683
|
+
*
|
|
2656
2684
|
* @public exported from `@promptbook/core`
|
|
2657
2685
|
*/
|
|
2658
2686
|
function createPipelineCollectionFromJson(...promptbooks) {
|
|
@@ -2683,16 +2711,15 @@
|
|
|
2683
2711
|
* Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
|
|
2684
2712
|
* Note: This function is cryptographically secure (it uses crypto.randomBytes internally)
|
|
2685
2713
|
*
|
|
2686
|
-
* @private internal helper function
|
|
2687
2714
|
* @returns secure random token
|
|
2715
|
+
*
|
|
2716
|
+
* @private internal helper function
|
|
2688
2717
|
*/
|
|
2689
2718
|
function $randomToken(randomness) {
|
|
2690
2719
|
return crypto.randomBytes(randomness).toString('hex');
|
|
2691
2720
|
}
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
* TODO: Maybe use nanoid instead https://github.com/ai/nanoid
|
|
2695
|
-
*/
|
|
2721
|
+
// TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
|
2722
|
+
// TODO: Maybe use nanoid instead https://github.com/ai/nanoid
|
|
2696
2723
|
|
|
2697
2724
|
/**
|
|
2698
2725
|
* This error indicates errors during the execution of the pipeline
|
|
@@ -2709,9 +2736,7 @@
|
|
|
2709
2736
|
Object.setPrototypeOf(this, PipelineExecutionError.prototype);
|
|
2710
2737
|
}
|
|
2711
2738
|
}
|
|
2712
|
-
|
|
2713
|
-
* TODO: [🧠][🌂] Add id to all errors
|
|
2714
|
-
*/
|
|
2739
|
+
// TODO: [🧠][🌂] Add id to all errors
|
|
2715
2740
|
|
|
2716
2741
|
/**
|
|
2717
2742
|
* Determine if the pipeline is fully prepared
|
|
@@ -2834,9 +2859,7 @@
|
|
|
2834
2859
|
Object.setPrototypeOf(this, DatabaseError.prototype);
|
|
2835
2860
|
}
|
|
2836
2861
|
}
|
|
2837
|
-
|
|
2838
|
-
* TODO: [🐱🚀] Explain that NotFoundError ([🐱🚀] and other specific errors) has priority over DatabaseError in some contexts
|
|
2839
|
-
*/
|
|
2862
|
+
// TODO: [🐱🚀] Explain that NotFoundError ([🐱🚀] and other specific errors) has priority over DatabaseError in some contexts
|
|
2840
2863
|
|
|
2841
2864
|
/**
|
|
2842
2865
|
* This error type indicates that you try to use a feature that is not available in the current environment
|
|
@@ -2854,10 +2877,11 @@
|
|
|
2854
2877
|
/**
|
|
2855
2878
|
* This error occurs when some expectation is not met in the execution of the pipeline
|
|
2856
2879
|
*
|
|
2857
|
-
* @public exported from `@promptbook/core`
|
|
2858
2880
|
* Note: Do not throw this error, its reserved for `checkExpectations` and `createPipelineExecutor` and public ONLY to be serializable through remote server
|
|
2859
2881
|
* Note: Always thrown in `checkExpectations` and catched in `createPipelineExecutor` and rethrown as `PipelineExecutionError`
|
|
2860
2882
|
* Note: This is a kindof subtype of PipelineExecutionError
|
|
2883
|
+
*
|
|
2884
|
+
* @public exported from `@promptbook/core`
|
|
2861
2885
|
*/
|
|
2862
2886
|
class ExpectError extends Error {
|
|
2863
2887
|
constructor(message) {
|
|
@@ -3003,9 +3027,7 @@
|
|
|
3003
3027
|
...PROMPTBOOK_ERRORS,
|
|
3004
3028
|
...COMMON_JAVASCRIPT_ERRORS,
|
|
3005
3029
|
};
|
|
3006
|
-
|
|
3007
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3008
|
-
*/
|
|
3030
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3009
3031
|
|
|
3010
3032
|
/**
|
|
3011
3033
|
* Serializes an error into a [🚉] JSON-serializable object
|
|
@@ -3074,7 +3096,7 @@
|
|
|
3074
3096
|
|
|
3075
3097
|
/**
|
|
3076
3098
|
* Recursively converts JSON strings to JSON objects
|
|
3077
|
-
|
|
3099
|
+
*
|
|
3078
3100
|
* @public exported from `@promptbook/utils`
|
|
3079
3101
|
*/
|
|
3080
3102
|
function jsonStringsToJsons(object) {
|
|
@@ -3098,9 +3120,7 @@
|
|
|
3098
3120
|
}
|
|
3099
3121
|
return newObject;
|
|
3100
3122
|
}
|
|
3101
|
-
|
|
3102
|
-
* TODO: Type the return type correctly
|
|
3103
|
-
*/
|
|
3123
|
+
// TODO: Type the return type correctly
|
|
3104
3124
|
|
|
3105
3125
|
/**
|
|
3106
3126
|
* Deserializes the error object
|
|
@@ -3135,6 +3155,7 @@
|
|
|
3135
3155
|
*
|
|
3136
3156
|
* @param executionResult - The partial result of the Promptbook execution
|
|
3137
3157
|
* @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred
|
|
3158
|
+
*
|
|
3138
3159
|
* @private internal helper function of `asPromise` method of `ExecutionTask`
|
|
3139
3160
|
*/
|
|
3140
3161
|
function assertsTaskSuccessful(executionResult) {
|
|
@@ -3165,9 +3186,7 @@
|
|
|
3165
3186
|
`));
|
|
3166
3187
|
}
|
|
3167
3188
|
}
|
|
3168
|
-
|
|
3169
|
-
* TODO: [🧠] Can this return type be better typed than void
|
|
3170
|
-
*/
|
|
3189
|
+
// TODO: [🧠] Can this return type be better typed than void
|
|
3171
3190
|
|
|
3172
3191
|
/**
|
|
3173
3192
|
* Helper to create a new task
|
|
@@ -3358,10 +3377,8 @@
|
|
|
3358
3377
|
},
|
|
3359
3378
|
};
|
|
3360
3379
|
}
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
* TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
|
|
3364
|
-
*/
|
|
3380
|
+
// TODO: Maybe allow to terminate the task and add getter `isFinished` or `status`
|
|
3381
|
+
// TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
|
|
3365
3382
|
|
|
3366
3383
|
/**
|
|
3367
3384
|
* Represents the uncertain value
|
|
@@ -3429,9 +3446,7 @@
|
|
|
3429
3446
|
pagesCount: UNCERTAIN_ZERO_VALUE,
|
|
3430
3447
|
},
|
|
3431
3448
|
});
|
|
3432
|
-
|
|
3433
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3434
|
-
*/
|
|
3449
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3435
3450
|
|
|
3436
3451
|
/**
|
|
3437
3452
|
* Async version of Array.forEach
|
|
@@ -3439,8 +3454,9 @@
|
|
|
3439
3454
|
* @param array - Array to iterate over
|
|
3440
3455
|
* @param options - Options for the function
|
|
3441
3456
|
* @param callbackfunction - Function to call for each item
|
|
3442
|
-
* @public exported from `@promptbook/utils`
|
|
3443
3457
|
* @deprecated [🪂] Use queues instead
|
|
3458
|
+
*
|
|
3459
|
+
* @public exported from `@promptbook/utils`
|
|
3444
3460
|
*/
|
|
3445
3461
|
async function forEachAsync(array, options, callbackfunction) {
|
|
3446
3462
|
const { maxParallelCount = Infinity } = options;
|
|
@@ -3525,6 +3541,7 @@
|
|
|
3525
3541
|
*
|
|
3526
3542
|
* @param llmTools - The LLM tools to be intercepted and tracked
|
|
3527
3543
|
* @returns Full proxy of the tools with added usage tracking capabilities
|
|
3544
|
+
*
|
|
3528
3545
|
* @public exported from `@promptbook/core`
|
|
3529
3546
|
*/
|
|
3530
3547
|
function countUsage(llmTools) {
|
|
@@ -3649,6 +3666,7 @@
|
|
|
3649
3666
|
* Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
|
|
3650
3667
|
*
|
|
3651
3668
|
* Note: Internal utility of `joinLlmExecutionTools` but exposed type
|
|
3669
|
+
*
|
|
3652
3670
|
* @public exported from `@promptbook/core`
|
|
3653
3671
|
*/
|
|
3654
3672
|
class MultipleLlmExecutionTools {
|
|
@@ -3811,16 +3829,16 @@
|
|
|
3811
3829
|
* `MultipleLlmExecutionTools` object. It provides failover and aggregation logic:
|
|
3812
3830
|
*
|
|
3813
3831
|
* 1. **Failover**: When a model call is made, it tries providers in the order they were provided.
|
|
3814
|
-
*
|
|
3832
|
+
* If the first provider doesn't support the requested model or fails, it tries the next one.
|
|
3815
3833
|
* 2. **Aggregation**: `listModels` returns a combined list of all models available from all providers.
|
|
3816
3834
|
* 3. **Empty case**: If no tools are provided, it logs a warning (as Promptbook requires LLMs to function).
|
|
3817
3835
|
*
|
|
3836
|
+
* Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
|
|
3837
|
+
*
|
|
3818
3838
|
* @param title - A descriptive title for this collection of joined tools
|
|
3819
3839
|
* @param llmExecutionTools - An array of execution tools to be joined
|
|
3820
3840
|
* @returns A single unified execution tool wrapper
|
|
3821
3841
|
*
|
|
3822
|
-
* Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
|
|
3823
|
-
*
|
|
3824
3842
|
* @public exported from `@promptbook/core`
|
|
3825
3843
|
*/
|
|
3826
3844
|
function joinLlmExecutionTools(title, ...llmExecutionTools) {
|
|
@@ -3857,10 +3875,8 @@
|
|
|
3857
3875
|
}
|
|
3858
3876
|
return new MultipleLlmExecutionTools(title || 'Multiple LLM Providers joined by `joinLlmExecutionTools`', ...llmExecutionTools);
|
|
3859
3877
|
}
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
* TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
3863
|
-
*/
|
|
3878
|
+
// TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
|
|
3879
|
+
// TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
3864
3880
|
|
|
3865
3881
|
/**
|
|
3866
3882
|
* Just returns the given `LlmExecutionTools` or joins multiple into one
|
|
@@ -3874,15 +3890,14 @@
|
|
|
3874
3890
|
: joinLlmExecutionTools('Multiple LLM Providers joined by `getSingleLlmExecutionTools`', ..._llms);
|
|
3875
3891
|
return llmTools;
|
|
3876
3892
|
}
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
* TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
3880
|
-
*/
|
|
3893
|
+
// TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
|
|
3894
|
+
// TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
3881
3895
|
|
|
3882
3896
|
/**
|
|
3883
3897
|
* Prepares the persona for the pipeline
|
|
3884
3898
|
*
|
|
3885
3899
|
* @see https://github.com/webgptorg/promptbook/discussions/22
|
|
3900
|
+
*
|
|
3886
3901
|
* @public exported from `@promptbook/core`
|
|
3887
3902
|
*/
|
|
3888
3903
|
async function preparePersona(personaDescription, tools, options) {
|
|
@@ -3939,13 +3954,11 @@
|
|
|
3939
3954
|
modelsRequirements,
|
|
3940
3955
|
};
|
|
3941
3956
|
}
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
* TODO: [🏢] Check validity of `temperature` in pipeline
|
|
3948
|
-
*/
|
|
3957
|
+
// TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
|
|
3958
|
+
// TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
|
|
3959
|
+
// TODO: [🏢] Check validity of `modelName` in pipeline
|
|
3960
|
+
// TODO: [🏢] Check validity of `systemMessage` in pipeline
|
|
3961
|
+
// TODO: [🏢] Check validity of `temperature` in pipeline
|
|
3949
3962
|
|
|
3950
3963
|
/**
|
|
3951
3964
|
* Safely retrieves the global scope object (window in browser, global in Node.js)
|
|
@@ -3953,7 +3966,7 @@
|
|
|
3953
3966
|
*
|
|
3954
3967
|
* Note: `$` is used to indicate that this function is not a pure function - it access global scope
|
|
3955
3968
|
*
|
|
3956
|
-
*
|
|
3969
|
+
* @private internal function of `$Register`
|
|
3957
3970
|
*/
|
|
3958
3971
|
function $getGlobalScope() {
|
|
3959
3972
|
return Function('return this')();
|
|
@@ -3968,6 +3981,7 @@
|
|
|
3968
3981
|
* @returns The normalized text in SCREAMING_CASE format.
|
|
3969
3982
|
* @example 'HELLO_WORLD'
|
|
3970
3983
|
* @example 'I_LOVE_PROMPTBOOK'
|
|
3984
|
+
*
|
|
3971
3985
|
* @public exported from `@promptbook/utils`
|
|
3972
3986
|
*/
|
|
3973
3987
|
function normalizeTo_SCREAMING_CASE(text) {
|
|
@@ -4025,6 +4039,7 @@
|
|
|
4025
4039
|
* @returns The normalized text in snake_case format.
|
|
4026
4040
|
* @example 'hello_world'
|
|
4027
4041
|
* @example 'i_love_promptbook'
|
|
4042
|
+
*
|
|
4028
4043
|
* @public exported from `@promptbook/utils`
|
|
4029
4044
|
*/
|
|
4030
4045
|
function normalizeTo_snake_case(text) {
|
|
@@ -4083,26 +4098,26 @@
|
|
|
4083
4098
|
* Global registry for storing metadata about all available scrapers and converters.
|
|
4084
4099
|
*
|
|
4085
4100
|
* Note: `$` is used to indicate that this interacts with the global scope.
|
|
4101
|
+
*
|
|
4086
4102
|
* @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
|
|
4103
|
+
*
|
|
4087
4104
|
* @public exported from `@promptbook/core`
|
|
4088
4105
|
*/
|
|
4089
4106
|
const $scrapersMetadataRegister = new $Register('scrapers_metadata');
|
|
4090
|
-
|
|
4091
|
-
* TODO: [®] DRY Register logic
|
|
4092
|
-
*/
|
|
4107
|
+
// TODO: [®] DRY Register logic
|
|
4093
4108
|
|
|
4094
4109
|
/**
|
|
4095
4110
|
* Registry for all available scrapers in the system.
|
|
4096
4111
|
* Central point for registering and accessing different types of content scrapers.
|
|
4097
4112
|
*
|
|
4098
4113
|
* Note: `$` is used to indicate that this interacts with the global scope
|
|
4114
|
+
*
|
|
4099
4115
|
* @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
|
|
4116
|
+
*
|
|
4100
4117
|
* @public exported from `@promptbook/core`
|
|
4101
4118
|
*/
|
|
4102
4119
|
const $scrapersRegister = new $Register('scraper_constructors');
|
|
4103
|
-
|
|
4104
|
-
* TODO: [®] DRY Register logic
|
|
4105
|
-
*/
|
|
4120
|
+
// TODO: [®] DRY Register logic
|
|
4106
4121
|
|
|
4107
4122
|
/**
|
|
4108
4123
|
* Creates a message with all registered scrapers
|
|
@@ -4187,10 +4202,11 @@
|
|
|
4187
4202
|
|
|
4188
4203
|
`);
|
|
4189
4204
|
}
|
|
4205
|
+
// TODO: [®] DRY Register logic
|
|
4206
|
+
|
|
4190
4207
|
/**
|
|
4191
|
-
*
|
|
4208
|
+
* Collection of default diacritics removal map.
|
|
4192
4209
|
*/
|
|
4193
|
-
|
|
4194
4210
|
const defaultDiacriticsRemovalMap = [
|
|
4195
4211
|
{
|
|
4196
4212
|
base: 'A',
|
|
@@ -4442,6 +4458,7 @@
|
|
|
4442
4458
|
*
|
|
4443
4459
|
* @param input The string containing diacritics to be normalized.
|
|
4444
4460
|
* @returns The string with diacritics removed or normalized.
|
|
4461
|
+
*
|
|
4445
4462
|
* @public exported from `@promptbook/utils`
|
|
4446
4463
|
*/
|
|
4447
4464
|
function removeDiacritics(input) {
|
|
@@ -4450,9 +4467,7 @@
|
|
|
4450
4467
|
return DIACRITIC_VARIANTS_LETTERS[character] || character;
|
|
4451
4468
|
});
|
|
4452
4469
|
}
|
|
4453
|
-
|
|
4454
|
-
* TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
|
|
4455
|
-
*/
|
|
4470
|
+
// TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
|
|
4456
4471
|
|
|
4457
4472
|
/**
|
|
4458
4473
|
* Converts a given text to kebab-case format.
|
|
@@ -4463,6 +4478,7 @@
|
|
|
4463
4478
|
* @returns The kebab-case formatted string.
|
|
4464
4479
|
* @example 'hello-world'
|
|
4465
4480
|
* @example 'i-love-promptbook'
|
|
4481
|
+
*
|
|
4466
4482
|
* @public exported from `@promptbook/utils`
|
|
4467
4483
|
*/
|
|
4468
4484
|
function normalizeToKebabCase(text) {
|
|
@@ -4503,9 +4519,7 @@
|
|
|
4503
4519
|
normalizedName = normalizedName.replace(/-$/, '');
|
|
4504
4520
|
return normalizedName;
|
|
4505
4521
|
}
|
|
4506
|
-
|
|
4507
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
4508
|
-
*/
|
|
4522
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
4509
4523
|
|
|
4510
4524
|
/**
|
|
4511
4525
|
* Creates unique name for the source
|
|
@@ -4524,9 +4538,7 @@
|
|
|
4524
4538
|
// <- TODO: Use MAX_FILENAME_LENGTH
|
|
4525
4539
|
return name;
|
|
4526
4540
|
}
|
|
4527
|
-
|
|
4528
|
-
* TODO: [🐱🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
|
|
4529
|
-
*/
|
|
4541
|
+
// TODO: [🐱🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
|
|
4530
4542
|
|
|
4531
4543
|
/**
|
|
4532
4544
|
* Converts a name to a properly formatted subfolder path for cache storage.
|
|
@@ -4576,11 +4588,9 @@
|
|
|
4576
4588
|
.catch(() => false);
|
|
4577
4589
|
return isFile;
|
|
4578
4590
|
}
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
* TODO: [🖇] What about symlinks?
|
|
4583
|
-
*/
|
|
4591
|
+
// Note: Not [~🟢~] because it is not directly dependent on `fs
|
|
4592
|
+
// TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
|
|
4593
|
+
// TODO: [🖇] What about symlinks?
|
|
4584
4594
|
|
|
4585
4595
|
/**
|
|
4586
4596
|
* Convert mime type to file extension
|
|
@@ -4600,6 +4610,7 @@
|
|
|
4600
4610
|
*
|
|
4601
4611
|
* @param text with emojis
|
|
4602
4612
|
* @returns text without emojis
|
|
4613
|
+
*
|
|
4603
4614
|
* @public exported from `@promptbook/utils`
|
|
4604
4615
|
*/
|
|
4605
4616
|
function removeEmojis(text) {
|
|
@@ -4619,6 +4630,7 @@
|
|
|
4619
4630
|
* @param value The title string to be converted to a name.
|
|
4620
4631
|
* @returns A normalized name derived from the input title.
|
|
4621
4632
|
* @example 'Hello World!' -> 'hello-world'
|
|
4633
|
+
*
|
|
4622
4634
|
* @public exported from `@promptbook/utils`
|
|
4623
4635
|
*/
|
|
4624
4636
|
function titleToName(value) {
|
|
@@ -4664,9 +4676,7 @@
|
|
|
4664
4676
|
`));
|
|
4665
4677
|
}
|
|
4666
4678
|
};
|
|
4667
|
-
|
|
4668
|
-
* TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
|
|
4669
|
-
*/
|
|
4679
|
+
// TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
|
|
4670
4680
|
|
|
4671
4681
|
/**
|
|
4672
4682
|
* Factory function that creates a handler for processing knowledge sources.
|
|
@@ -4886,6 +4896,7 @@
|
|
|
4886
4896
|
* Prepares the knowledge pieces
|
|
4887
4897
|
*
|
|
4888
4898
|
* @see https://github.com/webgptorg/promptbook/discussions/41
|
|
4899
|
+
*
|
|
4889
4900
|
* @public exported from `@promptbook/core`
|
|
4890
4901
|
*/
|
|
4891
4902
|
async function prepareKnowledgePieces(knowledgeSources, tools, options) {
|
|
@@ -5027,25 +5038,24 @@
|
|
|
5027
5038
|
});
|
|
5028
5039
|
return { tasksPrepared };
|
|
5029
5040
|
}
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
5039
|
-
*/
|
|
5041
|
+
// TODO: [😂] Adding knowledge should be convert to async high-level abstractions, similar thing with expectations to sync high-level abstractions
|
|
5042
|
+
// TODO: [🧠] Add context to each task (if missing)
|
|
5043
|
+
// TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
|
|
5044
|
+
// TODO: [♨][main] !!3 Prepare index the examples and maybe tasks
|
|
5045
|
+
// TODO: Write tests for `preparePipeline`
|
|
5046
|
+
// TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
5047
|
+
// TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
|
|
5048
|
+
// TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
5040
5049
|
|
|
5041
5050
|
/**
|
|
5042
5051
|
* Prepare pipeline locally
|
|
5043
5052
|
*
|
|
5044
|
-
* @see https://github.com/webgptorg/promptbook/discussions/196
|
|
5045
|
-
*
|
|
5046
5053
|
* Note: This function does not validate logic of the pipeline
|
|
5047
5054
|
* Note: This function acts as part of compilation process
|
|
5048
5055
|
* Note: When the pipeline is already prepared, it returns the same pipeline
|
|
5056
|
+
*
|
|
5057
|
+
* @see https://github.com/webgptorg/promptbook/discussions/196
|
|
5058
|
+
*
|
|
5049
5059
|
* @public exported from `@promptbook/core`
|
|
5050
5060
|
*/
|
|
5051
5061
|
async function preparePipeline(pipeline, tools, options) {
|
|
@@ -5216,8 +5226,8 @@
|
|
|
5216
5226
|
* This is useful and used in the `templateParameters` function
|
|
5217
5227
|
*
|
|
5218
5228
|
* Note: This function is not just calling `toString` method
|
|
5219
|
-
*
|
|
5220
|
-
*
|
|
5229
|
+
* It's more complex and can handle this conversion specifically for LLM models
|
|
5230
|
+
* See `VALUE_STRINGS`
|
|
5221
5231
|
*
|
|
5222
5232
|
* Note: There are 2 similar functions
|
|
5223
5233
|
* - `valueToString` converts value to string for LLM models as human-readable string
|
|
@@ -5270,6 +5280,7 @@
|
|
|
5270
5280
|
* @param script from which to extract the variables
|
|
5271
5281
|
* @returns the list of variable names
|
|
5272
5282
|
* @throws {ParseError} if the script is invalid
|
|
5283
|
+
*
|
|
5273
5284
|
* @public exported from `@promptbook/javascript`
|
|
5274
5285
|
*/
|
|
5275
5286
|
function extractVariablesFromJavascript(script) {
|
|
@@ -5335,9 +5346,7 @@
|
|
|
5335
5346
|
}
|
|
5336
5347
|
return variables;
|
|
5337
5348
|
}
|
|
5338
|
-
|
|
5339
|
-
* TODO: [🔣] Support for multiple languages - python, java,...
|
|
5340
|
-
*/
|
|
5349
|
+
// TODO: [🔣] Support for multiple languages - python, java,...
|
|
5341
5350
|
|
|
5342
5351
|
/**
|
|
5343
5352
|
* Parses the task and returns the set of all used parameters
|
|
@@ -5345,6 +5354,7 @@
|
|
|
5345
5354
|
* @param task the task with used parameters
|
|
5346
5355
|
* @returns the set of parameter names
|
|
5347
5356
|
* @throws {ParseError} if the script is invalid
|
|
5357
|
+
*
|
|
5348
5358
|
* @public exported from `@promptbook/core` <- Note: [👖] This utility is so tightly interconnected with the Promptbook that it is not exported as util but in core
|
|
5349
5359
|
*/
|
|
5350
5360
|
function extractParameterNamesFromTask(task) {
|
|
@@ -5385,14 +5395,13 @@
|
|
|
5385
5395
|
}
|
|
5386
5396
|
return parameterNames;
|
|
5387
5397
|
}
|
|
5388
|
-
|
|
5389
|
-
* TODO: [🔣] If script require contentLanguage
|
|
5390
|
-
*/
|
|
5398
|
+
// TODO: [🔣] If script require contentLanguage
|
|
5391
5399
|
|
|
5392
5400
|
/**
|
|
5393
5401
|
* Create difference set of two sets.
|
|
5394
5402
|
*
|
|
5395
5403
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5404
|
+
*
|
|
5396
5405
|
* @public exported from `@promptbook/utils`
|
|
5397
5406
|
*/
|
|
5398
5407
|
function difference(a, b, isEqual = (a, b) => a === b) {
|
|
@@ -5404,14 +5413,13 @@
|
|
|
5404
5413
|
}
|
|
5405
5414
|
return diff;
|
|
5406
5415
|
}
|
|
5407
|
-
|
|
5408
|
-
* TODO: [🧠][💯] Maybe also implement symmetricDifference
|
|
5409
|
-
*/
|
|
5416
|
+
// TODO: [🧠][💯] Maybe also implement symmetricDifference
|
|
5410
5417
|
|
|
5411
5418
|
/**
|
|
5412
5419
|
* Creates a new set with all elements that are present in either set
|
|
5413
5420
|
*
|
|
5414
5421
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5422
|
+
*
|
|
5415
5423
|
* @public exported from `@promptbook/utils`
|
|
5416
5424
|
*/
|
|
5417
5425
|
function union(...sets) {
|
|
@@ -5477,8 +5485,9 @@
|
|
|
5477
5485
|
/**
|
|
5478
5486
|
* Definition for CSV spreadsheet
|
|
5479
5487
|
*
|
|
5488
|
+
* TODO: [🏢] Export from package `@promptbook/csv`
|
|
5489
|
+
*
|
|
5480
5490
|
* @public exported from `@promptbook/core`
|
|
5481
|
-
* <- TODO: [🏢] Export from package `@promptbook/csv`
|
|
5482
5491
|
*/
|
|
5483
5492
|
const CsvFormatParser = {
|
|
5484
5493
|
formatName: 'CSV',
|
|
@@ -5568,13 +5577,11 @@
|
|
|
5568
5577
|
},
|
|
5569
5578
|
],
|
|
5570
5579
|
};
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
* TODO: [🏢] Allow to expect something inside CSV objects and other formats
|
|
5577
|
-
*/
|
|
5580
|
+
// TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
|
|
5581
|
+
// TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
|
|
5582
|
+
// TODO: [🍓] In `CsvFormatParser` implement `heal
|
|
5583
|
+
// TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
|
|
5584
|
+
// TODO: [🏢] Allow to expect something inside CSV objects and other formats
|
|
5578
5585
|
|
|
5579
5586
|
/**
|
|
5580
5587
|
* Definition for JSON format
|
|
@@ -5595,17 +5602,15 @@
|
|
|
5595
5602
|
},
|
|
5596
5603
|
subvalueParsers: [],
|
|
5597
5604
|
};
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
* TODO: [🏢] Allow to expect something inside JSON objects and other formats
|
|
5608
|
-
*/
|
|
5605
|
+
// TODO: [🧠] Maybe proper instance of object
|
|
5606
|
+
// TODO: [0] Make string_serialized_json
|
|
5607
|
+
// TODO: [1] Make type for JSON Settings and Schema
|
|
5608
|
+
// TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
|
|
5609
|
+
// TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
|
|
5610
|
+
// TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
|
|
5611
|
+
// TODO: [🍓] In `JsonFormatParser` implement `heal
|
|
5612
|
+
// TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
|
|
5613
|
+
// TODO: [🏢] Allow to expect something inside JSON objects and other formats
|
|
5609
5614
|
|
|
5610
5615
|
/**
|
|
5611
5616
|
* Definition for any text - this will be always valid
|
|
@@ -5643,15 +5648,13 @@
|
|
|
5643
5648
|
// <- TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
|
|
5644
5649
|
],
|
|
5645
5650
|
};
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
* TODO: [🏢] Allow to expect something inside each item of list and other formats
|
|
5654
|
-
*/
|
|
5651
|
+
// TODO: [1] Make type for XML Text and Schema
|
|
5652
|
+
// TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
|
|
5653
|
+
// TODO: [🍓] In `TextFormatParser` implement simple `isValid`
|
|
5654
|
+
// TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
|
|
5655
|
+
// TODO: [🍓] In `TextFormatParser` implement `heal
|
|
5656
|
+
// TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
|
|
5657
|
+
// TODO: [🏢] Allow to expect something inside each item of list and other formats
|
|
5655
5658
|
|
|
5656
5659
|
/**
|
|
5657
5660
|
* Function to check if a string is valid XML
|
|
@@ -5696,17 +5699,15 @@
|
|
|
5696
5699
|
},
|
|
5697
5700
|
subvalueParsers: [],
|
|
5698
5701
|
};
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
* TODO: [🏢] Allow to expect something inside XML and other formats
|
|
5709
|
-
*/
|
|
5702
|
+
// TODO: [🧠] Maybe proper instance of object
|
|
5703
|
+
// TODO: [0] Make string_serialized_xml
|
|
5704
|
+
// TODO: [1] Make type for XML Settings and Schema
|
|
5705
|
+
// TODO: [🧠] What to use for validating XMLs - XSD,...
|
|
5706
|
+
// TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
|
|
5707
|
+
// TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
|
|
5708
|
+
// TODO: [🍓] In `XmlFormatParser` implement `heal
|
|
5709
|
+
// TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
|
|
5710
|
+
// TODO: [🏢] Allow to expect something inside XML and other formats
|
|
5710
5711
|
|
|
5711
5712
|
/**
|
|
5712
5713
|
* Definitions for all formats supported by Promptbook
|
|
@@ -5714,9 +5715,7 @@
|
|
|
5714
5715
|
* @private internal index of `...` <- TODO [🏢]
|
|
5715
5716
|
*/
|
|
5716
5717
|
const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser, CsvFormatParser];
|
|
5717
|
-
|
|
5718
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5719
|
-
*/
|
|
5718
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5720
5719
|
|
|
5721
5720
|
/**
|
|
5722
5721
|
* Maps available parameters to expected parameters for a pipeline task.
|
|
@@ -5726,6 +5725,7 @@
|
|
|
5726
5725
|
* 2) Then, if there are unmatched expected and available parameters, map them by order.
|
|
5727
5726
|
*
|
|
5728
5727
|
* @throws {PipelineExecutionError} If the number of unmatched expected and available parameters does not match, or mapping is ambiguous.
|
|
5728
|
+
*
|
|
5729
5729
|
* @private within the repository used in `createPipelineExecutor`
|
|
5730
5730
|
*/
|
|
5731
5731
|
function mapAvailableToExpectedParameters(options) {
|
|
@@ -5788,12 +5788,13 @@
|
|
|
5788
5788
|
* Replaces parameters in template with values from parameters object
|
|
5789
5789
|
*
|
|
5790
5790
|
* Note: This function is not places strings into string,
|
|
5791
|
-
*
|
|
5791
|
+
* It's more complex and can handle this operation specifically for LLM models
|
|
5792
5792
|
*
|
|
5793
5793
|
* @param template the template with parameters in {curly} braces
|
|
5794
5794
|
* @param parameters the object with parameters
|
|
5795
5795
|
* @returns the template with replaced parameters
|
|
5796
5796
|
* @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened
|
|
5797
|
+
*
|
|
5797
5798
|
* @public exported from `@promptbook/utils`
|
|
5798
5799
|
*/
|
|
5799
5800
|
function templateParameters(template, parameters) {
|
|
@@ -5869,10 +5870,8 @@
|
|
|
5869
5870
|
text = text.replace(/\p{Extended_Pictographic}(\u{200D}\p{Extended_Pictographic})*/gu, '-');
|
|
5870
5871
|
return text.length;
|
|
5871
5872
|
}
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5875
|
-
*/
|
|
5873
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
5874
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5876
5875
|
|
|
5877
5876
|
/**
|
|
5878
5877
|
* Number of characters per standard line with 11pt Arial font size.
|
|
@@ -5886,10 +5885,8 @@
|
|
|
5886
5885
|
* @public exported from `@promptbook/utils`
|
|
5887
5886
|
*/
|
|
5888
5887
|
const LINES_PER_STANDARD_PAGE = 44;
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5892
|
-
*/
|
|
5888
|
+
// TODO: [🧠] Should be this `constants.ts` or `config.ts`?
|
|
5889
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5893
5890
|
|
|
5894
5891
|
/**
|
|
5895
5892
|
* Counts number of lines in the text
|
|
@@ -5907,10 +5904,8 @@
|
|
|
5907
5904
|
const lines = text.split(/\r?\n/);
|
|
5908
5905
|
return lines.reduce((count, line) => count + Math.max(Math.ceil(line.length / CHARACTERS_PER_STANDARD_LINE), 1), 0);
|
|
5909
5906
|
}
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5913
|
-
*/
|
|
5907
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
5908
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5914
5909
|
|
|
5915
5910
|
/**
|
|
5916
5911
|
* Counts number of pages in the text
|
|
@@ -5922,10 +5917,8 @@
|
|
|
5922
5917
|
function countPages(text) {
|
|
5923
5918
|
return Math.ceil(countLines(text) / LINES_PER_STANDARD_PAGE);
|
|
5924
5919
|
}
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5928
|
-
*/
|
|
5920
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
5921
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5929
5922
|
|
|
5930
5923
|
/**
|
|
5931
5924
|
* Counts number of paragraphs in the text
|
|
@@ -5935,10 +5928,8 @@
|
|
|
5935
5928
|
function countParagraphs(text) {
|
|
5936
5929
|
return text.split(/\n\s*\n/).filter((paragraph) => paragraph.trim() !== '').length;
|
|
5937
5930
|
}
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5941
|
-
*/
|
|
5931
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
5932
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5942
5933
|
|
|
5943
5934
|
/**
|
|
5944
5935
|
* Split text into sentences
|
|
@@ -5956,10 +5947,8 @@
|
|
|
5956
5947
|
function countSentences(text) {
|
|
5957
5948
|
return splitIntoSentences(text).length;
|
|
5958
5949
|
}
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5962
|
-
*/
|
|
5950
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
5951
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5963
5952
|
|
|
5964
5953
|
/**
|
|
5965
5954
|
* Counts number of words in the text
|
|
@@ -5973,11 +5962,9 @@
|
|
|
5973
5962
|
text = text.replace(/([a-z])([A-Z])/g, '$1 $2');
|
|
5974
5963
|
return text.split(/[^a-zа-я0-9]+/i).filter((word) => word.length > 0).length;
|
|
5975
5964
|
}
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
* TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
|
|
5980
|
-
*/
|
|
5965
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
5966
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
5967
|
+
// TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
|
|
5981
5968
|
|
|
5982
5969
|
/**
|
|
5983
5970
|
* Index of all counter functions
|
|
@@ -5992,10 +5979,8 @@
|
|
|
5992
5979
|
LINES: countLines,
|
|
5993
5980
|
PAGES: countPages,
|
|
5994
5981
|
};
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5998
|
-
*/
|
|
5982
|
+
// TODO: [🧠][🤠] This should be probably as part of `TextFormatParser`
|
|
5983
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5999
5984
|
|
|
6000
5985
|
/**
|
|
6001
5986
|
* Function checkExpectations will check if the expectations on given value are met
|
|
@@ -6006,6 +5991,7 @@
|
|
|
6006
5991
|
*
|
|
6007
5992
|
* @throws {ExpectError} if the expectations are not met
|
|
6008
5993
|
* @returns {void} Nothing
|
|
5994
|
+
*
|
|
6009
5995
|
* @private internal function of `createPipelineExecutor`
|
|
6010
5996
|
*/
|
|
6011
5997
|
function checkExpectations(expectations, value) {
|
|
@@ -6019,11 +6005,9 @@
|
|
|
6019
6005
|
}
|
|
6020
6006
|
}
|
|
6021
6007
|
}
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
* Note: [💝] and [🤠] are interconnected together
|
|
6026
|
-
*/
|
|
6008
|
+
// TODO: [💝] Unite object for expecting amount and format
|
|
6009
|
+
// TODO: [🧠][🤠] This should be part of `TextFormatParser`
|
|
6010
|
+
// Note: [💝] and [🤠] are interconnected together
|
|
6027
6011
|
|
|
6028
6012
|
/**
|
|
6029
6013
|
* Validates a prompt result against expectations and format requirements.
|
|
@@ -6034,6 +6018,7 @@
|
|
|
6034
6018
|
*
|
|
6035
6019
|
* @param options - The validation options including result string, expectations, and format
|
|
6036
6020
|
* @returns Validation result with processed string and validity status
|
|
6021
|
+
*
|
|
6037
6022
|
* @private internal function of `createPipelineExecutor` and `cacheLlmTools`
|
|
6038
6023
|
*/
|
|
6039
6024
|
function validatePromptResult(options) {
|
|
@@ -6096,6 +6081,7 @@
|
|
|
6096
6081
|
*
|
|
6097
6082
|
* @param options - The options for execution, including task, parameters, pipeline, and configuration.
|
|
6098
6083
|
* @returns The result string of the executed task.
|
|
6084
|
+
*
|
|
6099
6085
|
* @private internal utility of `createPipelineExecutor`
|
|
6100
6086
|
*/
|
|
6101
6087
|
async function executeAttempts(options) {
|
|
@@ -6419,9 +6405,7 @@
|
|
|
6419
6405
|
}
|
|
6420
6406
|
return $ongoingTaskResult.$resultString;
|
|
6421
6407
|
}
|
|
6422
|
-
|
|
6423
|
-
* TODO: Break into smaller functions
|
|
6424
|
-
*/
|
|
6408
|
+
// TODO: Break into smaller functions
|
|
6425
6409
|
|
|
6426
6410
|
/**
|
|
6427
6411
|
* Executes a pipeline task that requires mapping or iterating over subvalues of a parameter (such as rows in a CSV).
|
|
@@ -6564,6 +6548,7 @@
|
|
|
6564
6548
|
*
|
|
6565
6549
|
* @param task - The task for which the context is being generated. This should be a deeply immutable TaskJson object.
|
|
6566
6550
|
* @returns The context as a string, formatted as markdown and parameter value.
|
|
6551
|
+
*
|
|
6567
6552
|
* @private internal utility of `createPipelineExecutor`
|
|
6568
6553
|
*/
|
|
6569
6554
|
async function getContextForTask(task) {
|
|
@@ -6601,7 +6586,6 @@
|
|
|
6601
6586
|
}
|
|
6602
6587
|
|
|
6603
6588
|
/**
|
|
6604
|
-
*
|
|
6605
6589
|
* @param knowledgePieces
|
|
6606
6590
|
* @returns
|
|
6607
6591
|
*
|
|
@@ -6682,10 +6666,8 @@
|
|
|
6682
6666
|
return knowledgePiecesToString(preparedPipeline.knowledgePieces);
|
|
6683
6667
|
}
|
|
6684
6668
|
}
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
* TODO: [♨] Examples of values
|
|
6688
|
-
*/
|
|
6669
|
+
// TODO: [♨] Implement Better - use keyword search
|
|
6670
|
+
// TODO: [♨] Examples of values
|
|
6689
6671
|
|
|
6690
6672
|
/**
|
|
6691
6673
|
* Retrieves all reserved parameters for a given pipeline task, including context, knowledge, examples, and metadata.
|
|
@@ -6838,9 +6820,7 @@
|
|
|
6838
6820
|
resultString,
|
|
6839
6821
|
});
|
|
6840
6822
|
}
|
|
6841
|
-
|
|
6842
|
-
* TODO: [🤹♂️]
|
|
6843
|
-
*/
|
|
6823
|
+
// TODO: [🤹♂️]
|
|
6844
6824
|
|
|
6845
6825
|
/**
|
|
6846
6826
|
* Filters and returns only the output parameters from the provided pipeline execution options.
|
|
@@ -7170,6 +7150,7 @@
|
|
|
7170
7150
|
*
|
|
7171
7151
|
* @returns The executor function
|
|
7172
7152
|
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
7153
|
+
*
|
|
7173
7154
|
* @public exported from `@promptbook/core`
|
|
7174
7155
|
*/
|
|
7175
7156
|
function createPipelineExecutor(options) {
|
|
@@ -7344,14 +7325,13 @@
|
|
|
7344
7325
|
* @public exported from `@promptbook/cli`
|
|
7345
7326
|
*/
|
|
7346
7327
|
$scrapersMetadataRegister.register(markdownScraperMetadata);
|
|
7347
|
-
|
|
7348
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7349
|
-
*/
|
|
7328
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7350
7329
|
|
|
7351
7330
|
/**
|
|
7352
7331
|
* Scraper for markdown files
|
|
7353
7332
|
*
|
|
7354
7333
|
* @see `documentationUrl` for more details
|
|
7334
|
+
*
|
|
7355
7335
|
* @public exported from `@promptbook/markdown-utils`
|
|
7356
7336
|
*/
|
|
7357
7337
|
class MarkdownScraper {
|
|
@@ -7484,10 +7464,8 @@
|
|
|
7484
7464
|
return knowledge;
|
|
7485
7465
|
}
|
|
7486
7466
|
}
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
* Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7490
|
-
*/
|
|
7467
|
+
// TODO: [🪂] Do it in parallel 11:11
|
|
7468
|
+
// Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7491
7469
|
|
|
7492
7470
|
/**
|
|
7493
7471
|
* Creates a scraper for markdown content.
|
|
@@ -7497,9 +7475,7 @@
|
|
|
7497
7475
|
const createMarkdownScraper = Object.assign((tools, options) => {
|
|
7498
7476
|
return new MarkdownScraper(tools, options);
|
|
7499
7477
|
}, markdownScraperMetadata); /* <- Note: [🤛] */
|
|
7500
|
-
|
|
7501
|
-
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7502
|
-
*/
|
|
7478
|
+
// TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7503
7479
|
|
|
7504
7480
|
/**
|
|
7505
7481
|
* Registration of known scraper
|
|
@@ -7511,16 +7487,15 @@
|
|
|
7511
7487
|
* @public exported from `@promptbook/cli`
|
|
7512
7488
|
*/
|
|
7513
7489
|
const _MarkdownScraperRegistration = $scrapersRegister.register(createMarkdownScraper);
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7517
|
-
*/
|
|
7490
|
+
// TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7491
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7518
7492
|
|
|
7519
7493
|
/**
|
|
7520
7494
|
* Removes Markdown (or HTML) comments
|
|
7521
7495
|
*
|
|
7522
7496
|
* @param {string} content - The string to remove comments from.
|
|
7523
7497
|
* @returns {string} The input string with all comments removed.
|
|
7498
|
+
*
|
|
7524
7499
|
* @public exported from `@promptbook/markdown-utils`
|
|
7525
7500
|
*/
|
|
7526
7501
|
function removeMarkdownComments(content) {
|
|
@@ -7565,9 +7540,7 @@
|
|
|
7565
7540
|
${block(contentToInsert)}
|
|
7566
7541
|
`);
|
|
7567
7542
|
}
|
|
7568
|
-
|
|
7569
|
-
* TODO: [🏛] This can be part of markdown builder
|
|
7570
|
-
*/
|
|
7543
|
+
// TODO: [🏛] This can be part of markdown builder
|
|
7571
7544
|
|
|
7572
7545
|
/**
|
|
7573
7546
|
* Create a markdown table from a 2D array of strings
|
|
@@ -7594,9 +7567,7 @@
|
|
|
7594
7567
|
});
|
|
7595
7568
|
return [header, separator, ...rows].join('\n');
|
|
7596
7569
|
}
|
|
7597
|
-
|
|
7598
|
-
* TODO: [🏛] This can be part of markdown builder
|
|
7599
|
-
*/
|
|
7570
|
+
// TODO: [🏛] This can be part of markdown builder
|
|
7600
7571
|
|
|
7601
7572
|
/**
|
|
7602
7573
|
* Function createMarkdownChart will draw a chart in markdown from ⬛+🟦 tiles
|
|
@@ -7634,9 +7605,7 @@
|
|
|
7634
7605
|
function escapeMarkdownBlock(value) {
|
|
7635
7606
|
return value.replace(/```/g, '\\`\\`\\`');
|
|
7636
7607
|
}
|
|
7637
|
-
|
|
7638
|
-
* TODO: [🏛] This can be part of markdown builder
|
|
7639
|
-
*/
|
|
7608
|
+
// TODO: [🏛] This can be part of markdown builder
|
|
7640
7609
|
|
|
7641
7610
|
/**
|
|
7642
7611
|
* Utility function to extract all list items from markdown
|
|
@@ -7648,6 +7617,7 @@
|
|
|
7648
7617
|
*
|
|
7649
7618
|
* @param markdown any valid markdown
|
|
7650
7619
|
* @returns An array of strings, each representing an individual list item found in the markdown
|
|
7620
|
+
*
|
|
7651
7621
|
* @public exported from `@promptbook/markdown-utils`
|
|
7652
7622
|
*/
|
|
7653
7623
|
function extractAllListItemsFromMarkdown(markdown) {
|
|
@@ -7804,9 +7774,7 @@
|
|
|
7804
7774
|
function humanizeAiTextEllipsis(aiText) {
|
|
7805
7775
|
return aiText.replace(/[…⋯]/g, '...').replace(/\.\s+\.\s+\./g, '...');
|
|
7806
7776
|
}
|
|
7807
|
-
|
|
7808
|
-
* Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7809
|
-
*/
|
|
7777
|
+
// Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7810
7778
|
|
|
7811
7779
|
/**
|
|
7812
7780
|
* Change dash-like characters to regular dashes `—` -> `-` and remove soft hyphens
|
|
@@ -7819,9 +7787,7 @@
|
|
|
7819
7787
|
function humanizeAiTextEmdashed(aiText) {
|
|
7820
7788
|
return aiText.replace(/\u00AD/g, '').replace(/[‐‑‒–—―−⁃﹣-]/g, '-');
|
|
7821
7789
|
}
|
|
7822
|
-
|
|
7823
|
-
* Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7824
|
-
*/
|
|
7790
|
+
// Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7825
7791
|
|
|
7826
7792
|
/**
|
|
7827
7793
|
* Change smart quotes to regular quotes
|
|
@@ -7834,9 +7800,7 @@
|
|
|
7834
7800
|
function humanizeAiTextQuotes(aiText) {
|
|
7835
7801
|
return aiText.replace(/[“”„‟«»❝❞〝〞〟"]/g, '"').replace(/[‚‘’‛‹›❛❜'ʼ]/g, "'");
|
|
7836
7802
|
}
|
|
7837
|
-
|
|
7838
|
-
* Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7839
|
-
*/
|
|
7803
|
+
// Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7840
7804
|
|
|
7841
7805
|
/**
|
|
7842
7806
|
* Remove bracketed source citation artifacts like `\u30105:1\u2020source\u3011`.
|
|
@@ -7849,9 +7813,7 @@
|
|
|
7849
7813
|
function humanizeAiTextSources(aiText) {
|
|
7850
7814
|
return aiText.replace(/[ \t]*\u3010\s*\d+(?:\s*:\s*\d+)?\s*\u2020source\s*\u3011/g, '');
|
|
7851
7815
|
}
|
|
7852
|
-
|
|
7853
|
-
* Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7854
|
-
*/
|
|
7816
|
+
// Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7855
7817
|
|
|
7856
7818
|
/**
|
|
7857
7819
|
* Change unprintable hard spaces to regular spaces and drop zero-width spaces
|
|
@@ -7864,9 +7826,7 @@
|
|
|
7864
7826
|
function humanizeAiTextWhitespace(aiText) {
|
|
7865
7827
|
return aiText.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g, ' ').replace(/[\u200B\uFEFF\u2060]/g, '');
|
|
7866
7828
|
}
|
|
7867
|
-
|
|
7868
|
-
* Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7869
|
-
*/
|
|
7829
|
+
// Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7870
7830
|
|
|
7871
7831
|
/**
|
|
7872
7832
|
* Function `humanizeAiText` will remove traces of AI text generation artifacts
|
|
@@ -7885,11 +7845,11 @@
|
|
|
7885
7845
|
cleanedText = humanizeAiTextWhitespace(cleanedText);
|
|
7886
7846
|
return cleanedText;
|
|
7887
7847
|
}
|
|
7888
|
-
|
|
7889
|
-
* TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
|
|
7890
|
-
*/
|
|
7848
|
+
// TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
|
|
7891
7849
|
|
|
7892
7850
|
/**
|
|
7851
|
+
* Map of promptbook pseudotoken substitution.
|
|
7852
|
+
*
|
|
7893
7853
|
* @private
|
|
7894
7854
|
*/
|
|
7895
7855
|
const PROMPTBOOK_PSEUDOTOKEN_SUBSTITUTION = {
|
|
@@ -7937,15 +7897,14 @@
|
|
|
7937
7897
|
}
|
|
7938
7898
|
return promptbookifiedTextTokens.join('');
|
|
7939
7899
|
}
|
|
7940
|
-
|
|
7941
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
7942
|
-
*/
|
|
7900
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
7943
7901
|
|
|
7944
7902
|
/**
|
|
7945
7903
|
* Removes Markdown formatting tags from a string.
|
|
7946
7904
|
*
|
|
7947
7905
|
* @param {string} str - The string to remove Markdown tags from.
|
|
7948
7906
|
* @returns {string} The input string with all Markdown tags removed.
|
|
7907
|
+
*
|
|
7949
7908
|
* @public exported from `@promptbook/markdown-utils`
|
|
7950
7909
|
*/
|
|
7951
7910
|
function removeMarkdownFormatting(str) {
|
|
@@ -7963,6 +7922,7 @@
|
|
|
7963
7922
|
*
|
|
7964
7923
|
* @param {string} str - The string to remove Markdown tags from.
|
|
7965
7924
|
* @returns {string} The input string with all Markdown tags removed.
|
|
7925
|
+
*
|
|
7966
7926
|
* @public exported from `@promptbook/markdown-utils`
|
|
7967
7927
|
*/
|
|
7968
7928
|
function removeMarkdownLinks(str) {
|
|
@@ -7978,7 +7938,7 @@
|
|
|
7978
7938
|
*
|
|
7979
7939
|
* Note: [🔂] This function is idempotent.
|
|
7980
7940
|
* Note: This is useful for post-processing of the result of the chat LLM model
|
|
7981
|
-
*
|
|
7941
|
+
* when the model wraps the result in the (markdown) code block.
|
|
7982
7942
|
*
|
|
7983
7943
|
* @public exported from `@promptbook/markdown-utils`
|
|
7984
7944
|
*/
|
|
@@ -7997,7 +7957,7 @@
|
|
|
7997
7957
|
* Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
|
|
7998
7958
|
*
|
|
7999
7959
|
* Note: This is useful for post-processing of the result of the completion LLM model
|
|
8000
|
-
*
|
|
7960
|
+
* if you want to start code block in the prompt but you don't want to end it in the result.
|
|
8001
7961
|
*
|
|
8002
7962
|
* @public exported from `@promptbook/markdown-utils`
|
|
8003
7963
|
*/
|