@promptbook/documents 0.112.0-32 → 0.112.0-35
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 +18 -0
- package/esm/index.es.js +272 -308
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/types.index.d.ts +94 -94
- 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 +38 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -14
- package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageToolCallChips.d.ts +22 -0
- 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 +34 -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/createChatMessageToolCallRenderModel.d.ts +76 -0
- package/esm/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +16 -0
- 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 +27 -0
- package/esm/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +33 -0
- package/esm/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +39 -0
- package/esm/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +39 -0
- package/esm/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +47 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +34 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +3 -2
- package/esm/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +30 -0
- package/esm/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +27 -0
- package/esm/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
- package/esm/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +10 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaAttachments.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +53 -0
- 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/Chat/useChatMessageAvatarTooltip.d.ts +31 -0
- package/esm/src/book-components/Chat/Chat/useChatMessageSpeechPlayback.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 -3
- package/esm/src/cli/cli-commands/_boilerplate.d.ts +0 -4
- 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/find-fresh-emoji-tags.d.ts +0 -4
- package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -4
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +0 -4
- package/esm/src/cli/cli-commands/coder/init.d.ts +0 -4
- package/esm/src/cli/cli-commands/coder/run.d.ts +1 -5
- package/esm/src/cli/cli-commands/coder/run.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/verify.d.ts +0 -4
- package/esm/src/cli/cli-commands/coder.d.ts +0 -4
- 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 -4
- package/esm/src/cli/cli-commands/list-scrapers.d.ts +0 -4
- package/esm/src/cli/cli-commands/login.d.ts +0 -5
- package/esm/src/cli/cli-commands/make.d.ts +1 -1
- 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 -4
- 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 -4
- 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 -7
- 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 -3
- 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 -4
- 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 -4
- 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 -4
- package/esm/src/executables/apps/locatePandoc.d.ts +0 -4
- 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 -4
- package/esm/src/executables/platforms/locateAppOnLinux.d.ts +0 -4
- package/esm/src/executables/platforms/locateAppOnMacOs.d.ts +0 -4
- package/esm/src/executables/platforms/locateAppOnWindows.d.ts +0 -4
- 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 -5
- package/esm/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -6
- 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 -3
- package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -3
- 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 -18
- 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 -3
- 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 -4
- 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 -4
- 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 -4
- 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 -3
- package/esm/src/llm-providers/vercel/playground/playground.d.ts +0 -4
- 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 -3
- package/esm/src/playground/permanent/agent-with-browser-playground.d.ts +0 -3
- package/esm/src/playground/permanent/error-handling-playground.d.ts +0 -3
- package/esm/src/playground/playground.d.ts +0 -4
- 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 -4
- package/esm/src/remote-server/startRemoteServer.d.ts +1 -16
- 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 -6
- package/esm/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
- package/esm/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -3
- 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 -4
- package/esm/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -4
- package/esm/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -4
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -4
- 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 -4
- package/esm/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -3
- package/esm/src/storage/local-storage/getLocalStorage.d.ts +0 -3
- package/esm/src/storage/local-storage/getSessionStorage.d.ts +0 -3
- 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 -3
- 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 +13 -0
- 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 +18 -0
- package/esm/src/types/Prompt.d.ts +1 -6
- package/esm/src/types/ReservedParameters_private.d.ts +11 -0
- package/esm/src/types/ToolCall.d.ts +0 -2
- package/esm/src/types/Updatable.d.ts +1 -3
- package/esm/src/types/number_bytes.d.ts +21 -0
- package/esm/src/types/number_id.d.ts +13 -0
- package/esm/src/types/number_likeness.d.ts +8 -0
- package/esm/src/types/number_milliseconds.d.ts +33 -0
- package/esm/src/types/number_percent.d.ts +18 -0
- package/esm/src/types/number_positive.d.ts +16 -0
- package/esm/src/types/number_usd.d.ts +6 -106
- package/esm/src/types/string_agent_hash_private.d.ts +9 -0
- package/esm/src/types/string_agent_name.d.ts +32 -0
- package/esm/src/types/string_agent_name_in_book_private.d.ts +8 -0
- package/esm/src/types/string_agent_name_private.d.ts +10 -0
- package/esm/src/types/string_agent_permanent_id_private.d.ts +11 -0
- package/esm/src/types/string_base64_private.d.ts +17 -0
- package/esm/src/types/string_business_category_name.d.ts +5 -0
- package/esm/src/types/string_business_category_name_private.d.ts +6 -0
- package/esm/src/types/string_char_private.d.ts +8 -0
- package/esm/src/types/string_chat_prompt_private.d.ts +9 -0
- package/esm/src/types/string_completion_prompt_private.d.ts +9 -0
- package/esm/src/types/string_email_private.d.ts +16 -0
- package/esm/src/types/string_host_private.d.ts +55 -0
- package/esm/src/types/string_markdown.d.ts +0 -1
- package/esm/src/types/string_mime_type_private.d.ts +18 -0
- package/esm/src/types/string_model_description_private.d.ts +8 -0
- package/esm/src/types/string_model_name.d.ts +7 -0
- package/esm/src/types/string_model_name_private.d.ts +8 -0
- package/esm/src/types/string_name.d.ts +31 -0
- package/esm/src/types/string_name_private.d.ts +9 -0
- package/esm/src/types/string_page.d.ts +15 -0
- package/esm/src/types/string_page_private.d.ts +9 -0
- package/esm/src/types/string_parameter_name.d.ts +11 -167
- package/esm/src/types/string_parameter_value_private.d.ts +9 -0
- package/esm/src/types/string_persona_description.d.ts +14 -0
- package/esm/src/types/string_persona_description_private.d.ts +8 -0
- package/esm/src/types/string_prompt.d.ts +49 -0
- package/esm/src/types/string_prompt_image_private.d.ts +8 -0
- package/esm/src/types/string_prompt_private.d.ts +8 -0
- package/esm/src/types/string_reserved_parameter_name_private.d.ts +11 -0
- package/esm/src/types/string_sha256.d.ts +2 -2
- package/esm/src/types/string_system_message_private.d.ts +9 -0
- package/esm/src/types/string_template_private.d.ts +8 -0
- package/esm/src/types/string_text_prompt_private.d.ts +9 -0
- package/esm/src/types/string_title.d.ts +8 -0
- package/esm/src/types/string_title_private.d.ts +9 -0
- package/esm/src/types/string_url.d.ts +50 -46
- package/esm/src/types/string_url_private.d.ts +88 -0
- package/esm/src/types/typeAliasEmoji.d.ts +0 -3
- package/esm/src/types/typeAliases.d.ts +7 -7
- 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 -4
- package/esm/src/utils/execCommand/$execCommands.d.ts +0 -3
- 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 -3
- package/esm/src/utils/files/$induceFileDownload.d.ts +0 -3
- package/esm/src/utils/files/ObjectUrl.d.ts +0 -3
- 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 -4
- package/esm/src/wizard/wizard.d.ts +1 -4
- package/package.json +2 -2
- package/umd/index.umd.js +272 -308
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/types.index.d.ts +94 -94
- 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 +38 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -14
- package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageToolCallChips.d.ts +22 -0
- 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 +34 -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/createChatMessageToolCallRenderModel.d.ts +76 -0
- package/umd/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +16 -0
- 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 +27 -0
- package/umd/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +33 -0
- package/umd/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +39 -0
- package/umd/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +39 -0
- package/umd/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +47 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +34 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +3 -2
- package/umd/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +30 -0
- package/umd/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +27 -0
- package/umd/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
- package/umd/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +10 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaAttachments.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +53 -0
- 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/Chat/useChatMessageAvatarTooltip.d.ts +31 -0
- package/umd/src/book-components/Chat/Chat/useChatMessageSpeechPlayback.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 -3
- package/umd/src/cli/cli-commands/_boilerplate.d.ts +0 -4
- 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/find-fresh-emoji-tags.d.ts +0 -4
- package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -4
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +0 -4
- package/umd/src/cli/cli-commands/coder/init.d.ts +0 -4
- package/umd/src/cli/cli-commands/coder/run.d.ts +1 -5
- package/umd/src/cli/cli-commands/coder/run.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/verify.d.ts +0 -4
- package/umd/src/cli/cli-commands/coder.d.ts +0 -4
- 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 -4
- package/umd/src/cli/cli-commands/list-scrapers.d.ts +0 -4
- package/umd/src/cli/cli-commands/login.d.ts +0 -5
- package/umd/src/cli/cli-commands/make.d.ts +1 -1
- 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 -4
- 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 -4
- 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 -7
- 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 -3
- 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 -4
- 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 -4
- 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 -4
- package/umd/src/executables/apps/locatePandoc.d.ts +0 -4
- 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 -4
- package/umd/src/executables/platforms/locateAppOnLinux.d.ts +0 -4
- package/umd/src/executables/platforms/locateAppOnMacOs.d.ts +0 -4
- package/umd/src/executables/platforms/locateAppOnWindows.d.ts +0 -4
- 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 -5
- package/umd/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -6
- 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 -3
- package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -3
- 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 -18
- 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 -3
- 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 -4
- 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 -4
- 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 -4
- 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 -3
- package/umd/src/llm-providers/vercel/playground/playground.d.ts +0 -4
- 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 -3
- package/umd/src/playground/permanent/agent-with-browser-playground.d.ts +0 -3
- package/umd/src/playground/permanent/error-handling-playground.d.ts +0 -3
- package/umd/src/playground/playground.d.ts +0 -4
- 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 -4
- package/umd/src/remote-server/startRemoteServer.d.ts +1 -16
- 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 -6
- package/umd/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
- package/umd/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -3
- 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 -4
- package/umd/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -4
- package/umd/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -4
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -4
- 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 -4
- package/umd/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -3
- package/umd/src/storage/local-storage/getLocalStorage.d.ts +0 -3
- package/umd/src/storage/local-storage/getSessionStorage.d.ts +0 -3
- 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 -3
- 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 +13 -0
- 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 +18 -0
- package/umd/src/types/Prompt.d.ts +1 -6
- package/umd/src/types/ReservedParameters_private.d.ts +11 -0
- package/umd/src/types/ToolCall.d.ts +0 -2
- package/umd/src/types/Updatable.d.ts +1 -3
- package/umd/src/types/number_bytes.d.ts +21 -0
- package/umd/src/types/number_id.d.ts +13 -0
- package/umd/src/types/number_likeness.d.ts +8 -0
- package/umd/src/types/number_milliseconds.d.ts +33 -0
- package/umd/src/types/number_percent.d.ts +18 -0
- package/umd/src/types/number_positive.d.ts +16 -0
- package/umd/src/types/number_usd.d.ts +6 -106
- package/umd/src/types/string_agent_hash_private.d.ts +9 -0
- package/umd/src/types/string_agent_name.d.ts +32 -0
- package/umd/src/types/string_agent_name_in_book_private.d.ts +8 -0
- package/umd/src/types/string_agent_name_private.d.ts +10 -0
- package/umd/src/types/string_agent_permanent_id_private.d.ts +11 -0
- package/umd/src/types/string_base64_private.d.ts +17 -0
- package/umd/src/types/string_business_category_name.d.ts +5 -0
- package/umd/src/types/string_business_category_name_private.d.ts +6 -0
- package/umd/src/types/string_char_private.d.ts +8 -0
- package/umd/src/types/string_chat_prompt_private.d.ts +9 -0
- package/umd/src/types/string_completion_prompt_private.d.ts +9 -0
- package/umd/src/types/string_email_private.d.ts +16 -0
- package/umd/src/types/string_host_private.d.ts +55 -0
- package/umd/src/types/string_markdown.d.ts +0 -1
- package/umd/src/types/string_mime_type_private.d.ts +18 -0
- package/umd/src/types/string_model_description_private.d.ts +8 -0
- package/umd/src/types/string_model_name.d.ts +7 -0
- package/umd/src/types/string_model_name_private.d.ts +8 -0
- package/umd/src/types/string_name.d.ts +31 -0
- package/umd/src/types/string_name_private.d.ts +9 -0
- package/umd/src/types/string_page.d.ts +15 -0
- package/umd/src/types/string_page_private.d.ts +9 -0
- package/umd/src/types/string_parameter_name.d.ts +11 -167
- package/umd/src/types/string_parameter_value_private.d.ts +9 -0
- package/umd/src/types/string_persona_description.d.ts +14 -0
- package/umd/src/types/string_persona_description_private.d.ts +8 -0
- package/umd/src/types/string_prompt.d.ts +49 -0
- package/umd/src/types/string_prompt_image_private.d.ts +8 -0
- package/umd/src/types/string_prompt_private.d.ts +8 -0
- package/umd/src/types/string_reserved_parameter_name_private.d.ts +11 -0
- package/umd/src/types/string_sha256.d.ts +2 -2
- package/umd/src/types/string_system_message_private.d.ts +9 -0
- package/umd/src/types/string_template_private.d.ts +8 -0
- package/umd/src/types/string_text_prompt_private.d.ts +9 -0
- package/umd/src/types/string_title.d.ts +8 -0
- package/umd/src/types/string_title_private.d.ts +9 -0
- package/umd/src/types/string_url.d.ts +50 -46
- package/umd/src/types/string_url_private.d.ts +88 -0
- package/umd/src/types/typeAliasEmoji.d.ts +0 -3
- package/umd/src/types/typeAliases.d.ts +7 -7
- 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 -4
- package/umd/src/utils/execCommand/$execCommands.d.ts +0 -3
- 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 -3
- package/umd/src/utils/files/$induceFileDownload.d.ts +0 -3
- package/umd/src/utils/files/ObjectUrl.d.ts +0 -3
- 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 -4
- package/umd/src/wizard/wizard.d.ts +1 -4
package/esm/index.es.js
CHANGED
|
@@ -26,7 +26,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
26
26
|
* @generated
|
|
27
27
|
* @see https://github.com/webgptorg/promptbook
|
|
28
28
|
*/
|
|
29
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
29
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-35';
|
|
30
30
|
/**
|
|
31
31
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
32
32
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -44,6 +44,7 @@ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-32';
|
|
|
44
44
|
*
|
|
45
45
|
* @param value any values
|
|
46
46
|
* @returns void
|
|
47
|
+
*
|
|
47
48
|
* @private within the repository
|
|
48
49
|
*/
|
|
49
50
|
function keepUnused(...valuesToKeep) {
|
|
@@ -53,16 +54,20 @@ function keepUnused(...valuesToKeep) {
|
|
|
53
54
|
* Trims string from all 4 sides
|
|
54
55
|
*
|
|
55
56
|
* Note: This is a re-exported function from the `spacetrim` package which is
|
|
56
|
-
*
|
|
57
|
+
* Developed by same author @hejny as this package
|
|
57
58
|
*
|
|
58
|
-
* @public exported from `@promptbook/utils`
|
|
59
59
|
* @see https://github.com/hejny/spacetrim#usage
|
|
60
|
+
*
|
|
61
|
+
* @public exported from `@promptbook/utils`
|
|
60
62
|
*/
|
|
61
63
|
const spaceTrim = spaceTrim$1;
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
|
-
*
|
|
66
|
+
* Class implementing take chain.
|
|
67
|
+
*
|
|
65
68
|
* @de
|
|
69
|
+
*
|
|
70
|
+
* @private util of `@promptbook/color`
|
|
66
71
|
*/
|
|
67
72
|
class TakeChain {
|
|
68
73
|
constructor(value) {
|
|
@@ -79,9 +84,9 @@ class TakeChain {
|
|
|
79
84
|
*
|
|
80
85
|
* @param {*} initialValue - The initial value.
|
|
81
86
|
* @returns {Proxy<WithTake<TValue>>} - A proxy object with a `take` method.
|
|
87
|
+
* @deprecated [🤡] Use some better functional library instead of `TakeChain`
|
|
82
88
|
*
|
|
83
89
|
* @private util of `@promptbook/color`
|
|
84
|
-
* @deprecated [🤡] Use some better functional library instead of `TakeChain`
|
|
85
90
|
*/
|
|
86
91
|
function take(initialValue) {
|
|
87
92
|
if (initialValue instanceof TakeChain) {
|
|
@@ -259,9 +264,7 @@ const CSS_COLORS = {
|
|
|
259
264
|
yellow: '#ffff00',
|
|
260
265
|
yellowgreen: '#9acd32',
|
|
261
266
|
};
|
|
262
|
-
|
|
263
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
264
|
-
*/
|
|
267
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
265
268
|
|
|
266
269
|
/**
|
|
267
270
|
* Validates that a channel value is a valid number within the range of 0 to 255.
|
|
@@ -291,7 +294,13 @@ function checkChannelValue(channelName, value) {
|
|
|
291
294
|
}
|
|
292
295
|
}
|
|
293
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Constant for short hex lengths.
|
|
299
|
+
*/
|
|
294
300
|
const SHORT_HEX_LENGTHS = new Set([3, 4]);
|
|
301
|
+
/**
|
|
302
|
+
* Constant for long hex lengths.
|
|
303
|
+
*/
|
|
295
304
|
const LONG_HEX_LENGTHS = new Set([6, 8]);
|
|
296
305
|
/**
|
|
297
306
|
* Parses a hex string into RGBA channel values.
|
|
@@ -324,6 +333,9 @@ function parseHexColor(hex) {
|
|
|
324
333
|
}
|
|
325
334
|
return throwInvalidHex();
|
|
326
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Parses short hex channel.
|
|
338
|
+
*/
|
|
327
339
|
function parseShortHexChannel(char, onError) {
|
|
328
340
|
if (!char) {
|
|
329
341
|
return onError();
|
|
@@ -334,6 +346,9 @@ function parseShortHexChannel(char, onError) {
|
|
|
334
346
|
}
|
|
335
347
|
return parsed * 16;
|
|
336
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Parses long hex channel.
|
|
351
|
+
*/
|
|
337
352
|
function parseLongHexChannel(hex, start, onError) {
|
|
338
353
|
const segment = hex.substr(start, 2);
|
|
339
354
|
if (segment.length < 2) {
|
|
@@ -346,6 +361,9 @@ function parseLongHexChannel(hex, start, onError) {
|
|
|
346
361
|
return parsed;
|
|
347
362
|
}
|
|
348
363
|
|
|
364
|
+
/**
|
|
365
|
+
* Pattern matching hsl.
|
|
366
|
+
*/
|
|
349
367
|
const HSL_REGEX = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
|
|
350
368
|
/**
|
|
351
369
|
* Parses an HSL string into RGBA channel values.
|
|
@@ -371,6 +389,9 @@ function parseHslColor(hsl) {
|
|
|
371
389
|
alpha: 255,
|
|
372
390
|
};
|
|
373
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
* Handles convert hsl to Rgb.
|
|
394
|
+
*/
|
|
374
395
|
function convertHslToRgb(h, s, l) {
|
|
375
396
|
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
376
397
|
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
|
|
@@ -409,7 +430,13 @@ function convertHslToRgb(h, s, l) {
|
|
|
409
430
|
};
|
|
410
431
|
}
|
|
411
432
|
|
|
433
|
+
/**
|
|
434
|
+
* Pattern matching RGB.
|
|
435
|
+
*/
|
|
412
436
|
const RGB_REGEX = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
437
|
+
/**
|
|
438
|
+
* Pattern matching rgba.
|
|
439
|
+
*/
|
|
413
440
|
const RGBA_REGEX = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
414
441
|
/**
|
|
415
442
|
* Parses an RGB string into RGBA channel values.
|
|
@@ -451,6 +478,9 @@ function parseRgbaColor(rgba) {
|
|
|
451
478
|
alpha: parseAlphaValue(match[4]),
|
|
452
479
|
};
|
|
453
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* Parses channel value.
|
|
483
|
+
*/
|
|
454
484
|
function parseChannelValue(value) {
|
|
455
485
|
if (value.endsWith('%')) {
|
|
456
486
|
const percent = parseFloat(value);
|
|
@@ -458,6 +488,9 @@ function parseChannelValue(value) {
|
|
|
458
488
|
}
|
|
459
489
|
return Math.round(parseFloat(value));
|
|
460
490
|
}
|
|
491
|
+
/**
|
|
492
|
+
* Parses alpha value.
|
|
493
|
+
*/
|
|
461
494
|
function parseAlphaValue(value) {
|
|
462
495
|
if (value.endsWith('%')) {
|
|
463
496
|
const percent = parseFloat(value);
|
|
@@ -470,8 +503,17 @@ function parseAlphaValue(value) {
|
|
|
470
503
|
return Math.round(parsed);
|
|
471
504
|
}
|
|
472
505
|
|
|
506
|
+
/**
|
|
507
|
+
* Pattern matching hsl regex.
|
|
508
|
+
*/
|
|
473
509
|
const HSL_REGEX_PATTERN = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
|
|
510
|
+
/**
|
|
511
|
+
* Pattern matching RGB regex.
|
|
512
|
+
*/
|
|
474
513
|
const RGB_REGEX_PATTERN = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
514
|
+
/**
|
|
515
|
+
* Pattern matching rgba regex.
|
|
516
|
+
*/
|
|
475
517
|
const RGBA_REGEX_PATTERN = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
476
518
|
/**
|
|
477
519
|
* Color object represents an RGB color with alpha channel
|
|
@@ -837,9 +879,7 @@ function hslToRgb(hue, saturation, lightness) {
|
|
|
837
879
|
}
|
|
838
880
|
return [Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255)];
|
|
839
881
|
}
|
|
840
|
-
|
|
841
|
-
* TODO: Properly name all used internal variables
|
|
842
|
-
*/
|
|
882
|
+
// TODO: Properly name all used internal variables
|
|
843
883
|
|
|
844
884
|
/**
|
|
845
885
|
* Converts RGB values to HSL values
|
|
@@ -885,9 +925,7 @@ function rgbToHsl(red, green, blue) {
|
|
|
885
925
|
}
|
|
886
926
|
return [hue, saturation, lightness];
|
|
887
927
|
}
|
|
888
|
-
|
|
889
|
-
* TODO: Properly name all used internal variables
|
|
890
|
-
*/
|
|
928
|
+
// TODO: Properly name all used internal variables
|
|
891
929
|
|
|
892
930
|
/**
|
|
893
931
|
* Makes color transformer which lighten the given color
|
|
@@ -905,9 +943,7 @@ function lighten(amount) {
|
|
|
905
943
|
return Color.fromValues(r, g, b, alpha);
|
|
906
944
|
};
|
|
907
945
|
}
|
|
908
|
-
|
|
909
|
-
* TODO: Maybe implement by mix+hsl
|
|
910
|
-
*/
|
|
946
|
+
// TODO: Maybe implement by mix+hsl
|
|
911
947
|
|
|
912
948
|
/**
|
|
913
949
|
* Makes color transformer which saturate the given color
|
|
@@ -925,9 +961,7 @@ function saturate(amount) {
|
|
|
925
961
|
return Color.fromValues(r, g, b, alpha);
|
|
926
962
|
};
|
|
927
963
|
}
|
|
928
|
-
|
|
929
|
-
* TODO: Maybe implement by mix+hsl
|
|
930
|
-
*/
|
|
964
|
+
// TODO: Maybe implement by mix+hsl
|
|
931
965
|
|
|
932
966
|
/**
|
|
933
967
|
* Returns the same value that is passed as argument.
|
|
@@ -940,6 +974,7 @@ function saturate(amount) {
|
|
|
940
974
|
*
|
|
941
975
|
* @param value any values
|
|
942
976
|
* @returns the same values
|
|
977
|
+
*
|
|
943
978
|
* @private within the repository
|
|
944
979
|
*/
|
|
945
980
|
function just(value) {
|
|
@@ -1298,9 +1333,7 @@ function $isRunningInNode() {
|
|
|
1298
1333
|
return false;
|
|
1299
1334
|
}
|
|
1300
1335
|
}
|
|
1301
|
-
|
|
1302
|
-
* TODO: [🎺]
|
|
1303
|
-
*/
|
|
1336
|
+
// TODO: [🎺]
|
|
1304
1337
|
|
|
1305
1338
|
/**
|
|
1306
1339
|
* Normalize options for `execCommand` and `execCommands`
|
|
@@ -1368,7 +1401,6 @@ function $execCommandNormalizeOptions(options) {
|
|
|
1368
1401
|
/**
|
|
1369
1402
|
* Run one command in a shell
|
|
1370
1403
|
*
|
|
1371
|
-
*
|
|
1372
1404
|
* Note: There are 2 similar functions in the codebase:
|
|
1373
1405
|
* - `$execCommand` which runs a single command
|
|
1374
1406
|
* - `$execCommands` which runs multiple commands
|
|
@@ -1467,9 +1499,7 @@ function $execCommand(options) {
|
|
|
1467
1499
|
}
|
|
1468
1500
|
});
|
|
1469
1501
|
}
|
|
1470
|
-
|
|
1471
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
1472
|
-
*/
|
|
1502
|
+
// Note: [🟢] Code for Node command-execution helper [$execCommand](src/utils/execCommand/$execCommand.ts) should never be published into packages that could be imported into browser environment
|
|
1473
1503
|
|
|
1474
1504
|
/**
|
|
1475
1505
|
* Get the file extension from a file name
|
|
@@ -1500,11 +1530,9 @@ async function isFileExisting(filename, fs) {
|
|
|
1500
1530
|
.catch(() => false);
|
|
1501
1531
|
return isFile;
|
|
1502
1532
|
}
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
* TODO: [🖇] What about symlinks?
|
|
1507
|
-
*/
|
|
1533
|
+
// Note: Not [~🟢~] because it is not directly dependent on `fs
|
|
1534
|
+
// TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
|
|
1535
|
+
// TODO: [🖇] What about symlinks?
|
|
1508
1536
|
|
|
1509
1537
|
/**
|
|
1510
1538
|
* Converts a name to a properly formatted subfolder path for cache storage.
|
|
@@ -1516,6 +1544,9 @@ function nameToSubfolderPath(name) {
|
|
|
1516
1544
|
return [name.substr(0, 1).toLowerCase(), name.substr(1, 1).toLowerCase()];
|
|
1517
1545
|
}
|
|
1518
1546
|
|
|
1547
|
+
/**
|
|
1548
|
+
* Collection of default diacritics removal map.
|
|
1549
|
+
*/
|
|
1519
1550
|
const defaultDiacriticsRemovalMap = [
|
|
1520
1551
|
{
|
|
1521
1552
|
base: 'A',
|
|
@@ -1767,6 +1798,7 @@ for (let i = 0; i < defaultDiacriticsRemovalMap.length; i++) {
|
|
|
1767
1798
|
*
|
|
1768
1799
|
* @param input The string containing diacritics to be normalized.
|
|
1769
1800
|
* @returns The string with diacritics removed or normalized.
|
|
1801
|
+
*
|
|
1770
1802
|
* @public exported from `@promptbook/utils`
|
|
1771
1803
|
*/
|
|
1772
1804
|
function removeDiacritics(input) {
|
|
@@ -1775,9 +1807,7 @@ function removeDiacritics(input) {
|
|
|
1775
1807
|
return DIACRITIC_VARIANTS_LETTERS[character] || character;
|
|
1776
1808
|
});
|
|
1777
1809
|
}
|
|
1778
|
-
|
|
1779
|
-
* TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
|
|
1780
|
-
*/
|
|
1810
|
+
// TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
|
|
1781
1811
|
|
|
1782
1812
|
/**
|
|
1783
1813
|
* Converts a given text to kebab-case format.
|
|
@@ -1788,6 +1818,7 @@ function removeDiacritics(input) {
|
|
|
1788
1818
|
* @returns The kebab-case formatted string.
|
|
1789
1819
|
* @example 'hello-world'
|
|
1790
1820
|
* @example 'i-love-promptbook'
|
|
1821
|
+
*
|
|
1791
1822
|
* @public exported from `@promptbook/utils`
|
|
1792
1823
|
*/
|
|
1793
1824
|
function normalizeToKebabCase(text) {
|
|
@@ -1828,14 +1859,13 @@ function normalizeToKebabCase(text) {
|
|
|
1828
1859
|
normalizedName = normalizedName.replace(/-$/, '');
|
|
1829
1860
|
return normalizedName;
|
|
1830
1861
|
}
|
|
1831
|
-
|
|
1832
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
1833
|
-
*/
|
|
1862
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
1834
1863
|
|
|
1835
1864
|
/**
|
|
1836
1865
|
* Tests if given string is valid file path.
|
|
1837
1866
|
*
|
|
1838
1867
|
* Note: This does not check if the file exists only if the path is valid
|
|
1868
|
+
*
|
|
1839
1869
|
* @public exported from `@promptbook/utils`
|
|
1840
1870
|
*/
|
|
1841
1871
|
function isValidFilePath(filename) {
|
|
@@ -1884,9 +1914,7 @@ function isValidFilePath(filename) {
|
|
|
1884
1914
|
}
|
|
1885
1915
|
return false;
|
|
1886
1916
|
}
|
|
1887
|
-
|
|
1888
|
-
* TODO: [🍏] Implement for MacOs
|
|
1889
|
-
*/
|
|
1917
|
+
// TODO: [🍏] Implement for MacOs
|
|
1890
1918
|
|
|
1891
1919
|
/**
|
|
1892
1920
|
* Tests if given string is valid URL.
|
|
@@ -1926,6 +1954,7 @@ function isValidUrl(url) {
|
|
|
1926
1954
|
*
|
|
1927
1955
|
* @param text with emojis
|
|
1928
1956
|
* @returns text without emojis
|
|
1957
|
+
*
|
|
1929
1958
|
* @public exported from `@promptbook/utils`
|
|
1930
1959
|
*/
|
|
1931
1960
|
function removeEmojis(text) {
|
|
@@ -1945,6 +1974,7 @@ function removeEmojis(text) {
|
|
|
1945
1974
|
* @param value The title string to be converted to a name.
|
|
1946
1975
|
* @returns A normalized name derived from the input title.
|
|
1947
1976
|
* @example 'Hello World!' -> 'hello-world'
|
|
1977
|
+
*
|
|
1948
1978
|
* @public exported from `@promptbook/utils`
|
|
1949
1979
|
*/
|
|
1950
1980
|
function titleToName(value) {
|
|
@@ -2025,13 +2055,11 @@ async function getScraperIntermediateSource(source, options) {
|
|
|
2025
2055
|
};
|
|
2026
2056
|
return fileHandler;
|
|
2027
2057
|
}
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
2034
|
-
*/
|
|
2058
|
+
// Note: [🟢] Code for Node scraper helper [getScraperIntermediateSource](src/scrapers/_common/utils/getScraperIntermediateSource.ts) should never be published into packages that could be imported into browser environment
|
|
2059
|
+
// Note: Not using `FileCacheStorage` for two reasons:
|
|
2060
|
+
// 1. Need to store more than serialized JSONs.
|
|
2061
|
+
// 2. Need to switch between a `rootDirname` and `cacheDirname` <- TODO: [😡]
|
|
2062
|
+
// TODO: [🐱🐉][🧠] Make some smart crop
|
|
2035
2063
|
|
|
2036
2064
|
var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book",formfactorName:"GENERIC",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",resultingParameterName:"knowledgePieces",dependentParameterNames:["knowledgeContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Knowledge from Markdown\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book`\n- INPUT PARAMETER `{knowledgeContent}` Markdown document content\n- OUTPUT PARAMETER `{knowledgePieces}` The knowledge JSON object\n\n## Knowledge\n\n<!-- TODO: [🍆] -FORMAT JSON -->\n\n```markdown\nYou are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}\n```\n\n`-> {knowledgePieces}`\n"}],sourceFile:"./books/prepare-knowledge-from-markdown.book"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.book",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",resultingParameterName:"keywords",dependentParameterNames:["knowledgePieceContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Keywords\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-keywords.book`\n- INPUT PARAMETER `{knowledgePieceContent}` The content\n- OUTPUT PARAMETER `{keywords}` Keywords separated by comma\n\n## Knowledge\n\n<!-- TODO: [🍆] -FORMAT JSON -->\n\n```markdown\nYou are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}\n```\n\n`-> {keywords}`\n"}],sourceFile:"./books/prepare-knowledge-keywords.book"},{title:"Prepare Knowledge-piece Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.book",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",resultingParameterName:"title",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Knowledge-piece Title\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-title.book`\n- INPUT PARAMETER `{knowledgePieceContent}` The content\n- OUTPUT PARAMETER `{title}` The title of the document\n\n## Knowledge\n\n- EXPECT MIN 1 WORD\n- EXPECT MAX 8 WORDS\n\n```markdown\nYou are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}\n```\n\n`-> {title}`\n"}],sourceFile:"./books/prepare-knowledge-title.book"},{title:"Prepare Persona",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.book",formfactorName:"GENERIC",parameters:[{name:"availableModels",description:"List of available model names together with their descriptions as JSON",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelsRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"make-model-requirements",title:"Make modelRequirements",content:"You are an experienced AI engineer, you need to find the best models for virtual assistants:\n\n## Example\n\n```json\n[\n {\n \"modelName\": \"gpt-4o\",\n \"systemMessage\": \"You are experienced AI engineer and helpful assistant.\",\n \"temperature\": 0.7\n },\n {\n \"modelName\": \"claude-3-5-sonnet\",\n \"systemMessage\": \"You are a friendly and knowledgeable chatbot.\",\n \"temperature\": 0.5\n }\n]\n```\n\n## Instructions\n\n- Your output format is JSON array\n- Sort best-fitting models first\n- Omit any models that are not suitable\n- Write just the JSON, no other text should be present\n- Array contain items with following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nHere are the available models:\n\n```json\n{availableModels}\n```\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",resultingParameterName:"modelsRequirements",format:"JSON",dependentParameterNames:["availableModels","personaDescription"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Persona\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-persona.book`\n- INPUT PARAMETER `{availableModels}` List of available model names together with their descriptions as JSON\n- INPUT PARAMETER `{personaDescription}` Description of the persona\n- OUTPUT PARAMETER `{modelsRequirements}` Specific requirements for the model\n\n## Make modelRequirements\n\n- FORMAT JSON\n\n```markdown\nYou are an experienced AI engineer, you need to find the best models for virtual assistants:\n\n## Example\n\n\\`\\`\\`json\n[\n {\n \"modelName\": \"gpt-4o\",\n \"systemMessage\": \"You are experienced AI engineer and helpful assistant.\",\n \"temperature\": 0.7\n },\n {\n \"modelName\": \"claude-3-5-sonnet\",\n \"systemMessage\": \"You are a friendly and knowledgeable chatbot.\",\n \"temperature\": 0.5\n }\n]\n\\`\\`\\`\n\n## Instructions\n\n- Your output format is JSON array\n- Sort best-fitting models first\n- Omit any models that are not suitable\n- Write just the JSON, no other text should be present\n- Array contain items with following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nHere are the available models:\n\n\\`\\`\\`json\n{availableModels}\n\\`\\`\\`\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}\n```\n\n`-> {modelsRequirements}`\n"}],sourceFile:"./books/prepare-persona.book"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-title.book",formfactorName:"GENERIC",parameters:[{name:"book",description:"The book to prepare the title for",isInput:true,isOutput:false},{name:"title",description:"Best title for the book",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"make-title",title:"Make title",content:"Make best title for given text which describes the workflow:\n\n## Rules\n\n- Write just title, nothing else\n- Title should be concise and clear - Write maximum ideally 2 words, maximum 5 words\n- Title starts with emoticon\n- Title should not mention the input and output of the workflow but the main purpose of the workflow\n _For example, not \"✍ Convert Knowledge-piece to title\" but \"✍ Title\"_\n\n## The workflow\n\n> {book}",resultingParameterName:"title",expectations:{words:{min:1,max:8},lines:{min:1,max:1}},dependentParameterNames:["book"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Title\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-title.book`\n- INPUT PARAMETER `{book}` The book to prepare the title for\n- OUTPUT PARAMETER `{title}` Best title for the book\n\n## Make title\n\n- EXPECT MIN 1 Word\n- EXPECT MAX 8 Words\n- EXPECT EXACTLY 1 Line\n\n```markdown\nMake best title for given text which describes the workflow:\n\n## Rules\n\n- Write just title, nothing else\n- Title should be concise and clear - Write maximum ideally 2 words, maximum 5 words\n- Title starts with emoticon\n- Title should not mention the input and output of the workflow but the main purpose of the workflow\n _For example, not \"✍ Convert Knowledge-piece to title\" but \"✍ Title\"_\n\n## The workflow\n\n> {book}\n```\n\n`-> {title}`\n"}],sourceFile:"./books/prepare-title.book"}];
|
|
2037
2065
|
|
|
@@ -2062,9 +2090,7 @@ class ParseError extends Error {
|
|
|
2062
2090
|
Object.setPrototypeOf(this, ParseError.prototype);
|
|
2063
2091
|
}
|
|
2064
2092
|
}
|
|
2065
|
-
|
|
2066
|
-
* TODO: Maybe split `ParseError` and `ApplyError`
|
|
2067
|
-
*/
|
|
2093
|
+
// TODO: Maybe split `ParseError` and `ApplyError`
|
|
2068
2094
|
|
|
2069
2095
|
/**
|
|
2070
2096
|
* This error type indicates that somewhere in the code non-Error object was thrown and it was wrapped into the `WrappedError`
|
|
@@ -2145,6 +2171,7 @@ function isValidJsonString(value /* <- [👨⚖️] */) {
|
|
|
2145
2171
|
* @param {string} pipelineString the candidate for a pipeline string
|
|
2146
2172
|
* @returns {PipelineString} the same string as input, but validated as valid
|
|
2147
2173
|
* @throws {ParseError} if the string is not a valid pipeline string
|
|
2174
|
+
*
|
|
2148
2175
|
* @public exported from `@promptbook/core`
|
|
2149
2176
|
*/
|
|
2150
2177
|
function validatePipelineString(pipelineString) {
|
|
@@ -2163,17 +2190,16 @@ function validatePipelineString(pipelineString) {
|
|
|
2163
2190
|
// <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
|
|
2164
2191
|
return pipelineString;
|
|
2165
2192
|
}
|
|
2166
|
-
|
|
2167
|
-
* TODO: [🧠][🈴] Where is the best location for this file
|
|
2168
|
-
*/
|
|
2193
|
+
// TODO: [🧠][🈴] Where is the best location for this file
|
|
2169
2194
|
|
|
2170
2195
|
/**
|
|
2171
2196
|
* Prettify the html code
|
|
2172
2197
|
*
|
|
2173
2198
|
* @param content raw html code
|
|
2174
2199
|
* @returns formatted html code
|
|
2175
|
-
* @private withing the package because of HUGE size of prettier dependency
|
|
2176
2200
|
* @deprecated Prettier removed from Promptbook due to package size
|
|
2201
|
+
*
|
|
2202
|
+
* @private withing the package because of HUGE size of prettier dependency
|
|
2177
2203
|
*/
|
|
2178
2204
|
function prettifyMarkdown(content) {
|
|
2179
2205
|
return (content + `\n\n<!-- Note: Prettier removed from Promptbook -->`);
|
|
@@ -2196,6 +2222,7 @@ function capitalize(word) {
|
|
|
2196
2222
|
* @deprecated TODO: [🥍][🧠] Backup original files in `PipelineJson` same as in Promptbook.studio
|
|
2197
2223
|
* @param pipelineJson Promptbook in JSON format (.bookc)
|
|
2198
2224
|
* @returns Promptbook in string format (.book.md)
|
|
2225
|
+
*
|
|
2199
2226
|
* @public exported from `@promptbook/core`
|
|
2200
2227
|
*/
|
|
2201
2228
|
function pipelineJsonToString(pipelineJson) {
|
|
@@ -2312,6 +2339,8 @@ function pipelineJsonToString(pipelineJson) {
|
|
|
2312
2339
|
return validatePipelineString(pipelineString);
|
|
2313
2340
|
}
|
|
2314
2341
|
/**
|
|
2342
|
+
* Handles task parameter Json to string.
|
|
2343
|
+
*
|
|
2315
2344
|
* @private internal utility of `pipelineJsonToString`
|
|
2316
2345
|
*/
|
|
2317
2346
|
function taskParameterJsonToString(taskParameterJson) {
|
|
@@ -2322,18 +2351,17 @@ function taskParameterJsonToString(taskParameterJson) {
|
|
|
2322
2351
|
}
|
|
2323
2352
|
return parameterString;
|
|
2324
2353
|
}
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
* TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
|
|
2331
|
-
*/
|
|
2354
|
+
// TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
|
|
2355
|
+
// TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
|
|
2356
|
+
// TODO: [🏛] Maybe make some markdown builder
|
|
2357
|
+
// TODO: [🏛] Escape all
|
|
2358
|
+
// TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
|
|
2332
2359
|
|
|
2333
2360
|
/**
|
|
2334
2361
|
* Orders JSON object by keys
|
|
2335
2362
|
*
|
|
2336
2363
|
* @returns The same type of object as the input re-ordered
|
|
2364
|
+
*
|
|
2337
2365
|
* @public exported from `@promptbook/utils`
|
|
2338
2366
|
*/
|
|
2339
2367
|
function orderJson(options) {
|
|
@@ -2352,6 +2380,7 @@ function orderJson(options) {
|
|
|
2352
2380
|
* Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
|
|
2353
2381
|
*
|
|
2354
2382
|
* @returns The same object as the input, but deeply frozen
|
|
2383
|
+
*
|
|
2355
2384
|
* @public exported from `@promptbook/utils`
|
|
2356
2385
|
*/
|
|
2357
2386
|
function $deepFreeze(objectValue) {
|
|
@@ -2368,9 +2397,7 @@ function $deepFreeze(objectValue) {
|
|
|
2368
2397
|
Object.freeze(objectValue);
|
|
2369
2398
|
return objectValue;
|
|
2370
2399
|
}
|
|
2371
|
-
|
|
2372
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2373
|
-
*/
|
|
2400
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2374
2401
|
|
|
2375
2402
|
/**
|
|
2376
2403
|
* Checks if the value is [🚉] serializable as JSON
|
|
@@ -2390,6 +2417,7 @@ function $deepFreeze(objectValue) {
|
|
|
2390
2417
|
* - And much more...
|
|
2391
2418
|
*
|
|
2392
2419
|
* @throws UnexpectedError if the value is not serializable as JSON
|
|
2420
|
+
*
|
|
2393
2421
|
* @public exported from `@promptbook/utils`
|
|
2394
2422
|
*/
|
|
2395
2423
|
function checkSerializableAsJson(options) {
|
|
@@ -2504,11 +2532,9 @@ function checkSerializableAsJson(options) {
|
|
|
2504
2532
|
`));
|
|
2505
2533
|
}
|
|
2506
2534
|
}
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
* Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
|
|
2511
|
-
*/
|
|
2535
|
+
// TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
|
|
2536
|
+
// TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
|
|
2537
|
+
// Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
|
|
2512
2538
|
|
|
2513
2539
|
/**
|
|
2514
2540
|
* Creates a deep clone of the given object
|
|
@@ -2518,6 +2544,7 @@ function checkSerializableAsJson(options) {
|
|
|
2518
2544
|
*
|
|
2519
2545
|
* @param objectValue The object to clone.
|
|
2520
2546
|
* @returns A deep, writable clone of the input object.
|
|
2547
|
+
*
|
|
2521
2548
|
* @public exported from `@promptbook/utils`
|
|
2522
2549
|
*/
|
|
2523
2550
|
function deepClone(objectValue) {
|
|
@@ -2534,9 +2561,7 @@ function deepClone(objectValue) {
|
|
|
2534
2561
|
> return Object.assign({}, objectValue);
|
|
2535
2562
|
*/
|
|
2536
2563
|
}
|
|
2537
|
-
|
|
2538
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2539
|
-
*/
|
|
2564
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2540
2565
|
|
|
2541
2566
|
/**
|
|
2542
2567
|
* Utility to export a JSON object from a function
|
|
@@ -2549,6 +2574,7 @@ function deepClone(objectValue) {
|
|
|
2549
2574
|
* Note: This function does not mutates the given object
|
|
2550
2575
|
*
|
|
2551
2576
|
* @returns The same type of object as the input but read-only and re-ordered
|
|
2577
|
+
*
|
|
2552
2578
|
* @public exported from `@promptbook/utils`
|
|
2553
2579
|
*/
|
|
2554
2580
|
function exportJson(options) {
|
|
@@ -2568,9 +2594,7 @@ function exportJson(options) {
|
|
|
2568
2594
|
$deepFreeze(orderedValue);
|
|
2569
2595
|
return orderedValue;
|
|
2570
2596
|
}
|
|
2571
|
-
|
|
2572
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2573
|
-
*/
|
|
2597
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2574
2598
|
|
|
2575
2599
|
/**
|
|
2576
2600
|
* Order of keys in the pipeline JSON
|
|
@@ -2630,9 +2654,7 @@ const RESERVED_PARAMETER_NAMES = exportJson({
|
|
|
2630
2654
|
// <- TODO: Add [emoji] + instructions ACRY when adding new reserved parameter
|
|
2631
2655
|
],
|
|
2632
2656
|
});
|
|
2633
|
-
|
|
2634
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2635
|
-
*/
|
|
2657
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2636
2658
|
|
|
2637
2659
|
/**
|
|
2638
2660
|
* This error indicates that the promptbook object has valid syntax (=can be parsed) but contains logical errors (like circular dependencies)
|
|
@@ -2670,12 +2692,13 @@ function isValidSemanticVersion(version) {
|
|
|
2670
2692
|
* Tests if given string is valid promptbook version
|
|
2671
2693
|
* It looks into list of known promptbook versions.
|
|
2672
2694
|
*
|
|
2673
|
-
* @see https://www.npmjs.com/package/promptbook?activeTab=versions
|
|
2674
2695
|
* 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.
|
|
2675
2696
|
* Note: There are two similar functions:
|
|
2676
2697
|
* - `isValidSemanticVersion` which tests any semantic version
|
|
2677
2698
|
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
|
|
2678
2699
|
*
|
|
2700
|
+
* @see https://www.npmjs.com/package/promptbook?activeTab=versions
|
|
2701
|
+
*
|
|
2679
2702
|
* @public exported from `@promptbook/utils`
|
|
2680
2703
|
*/
|
|
2681
2704
|
function isValidPromptbookVersion(version) {
|
|
@@ -2718,9 +2741,7 @@ function isValidPipelineUrl(url) {
|
|
|
2718
2741
|
*/
|
|
2719
2742
|
return true;
|
|
2720
2743
|
}
|
|
2721
|
-
|
|
2722
|
-
* TODO: [🐠] Maybe more info why the URL is invalid
|
|
2723
|
-
*/
|
|
2744
|
+
// TODO: [🐠] Maybe more info why the URL is invalid
|
|
2724
2745
|
|
|
2725
2746
|
/**
|
|
2726
2747
|
* Validates PipelineJson if it is logically valid
|
|
@@ -2737,6 +2758,7 @@ function isValidPipelineUrl(url) {
|
|
|
2737
2758
|
* @param pipeline valid or invalid PipelineJson
|
|
2738
2759
|
* @returns the same pipeline if it is logically valid
|
|
2739
2760
|
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
2761
|
+
*
|
|
2740
2762
|
* @public exported from `@promptbook/core`
|
|
2741
2763
|
*/
|
|
2742
2764
|
function validatePipeline(pipeline) {
|
|
@@ -2761,6 +2783,8 @@ function validatePipeline(pipeline) {
|
|
|
2761
2783
|
return pipeline;
|
|
2762
2784
|
}
|
|
2763
2785
|
/**
|
|
2786
|
+
* Validates pipeline inner function.
|
|
2787
|
+
*
|
|
2764
2788
|
* @private internal function for `validatePipeline`
|
|
2765
2789
|
*/
|
|
2766
2790
|
function validatePipeline_InnerFunction(pipeline) {
|
|
@@ -3005,15 +3029,13 @@ function validatePipeline_InnerFunction(pipeline) {
|
|
|
3005
3029
|
* > * - ...
|
|
3006
3030
|
* > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
|
|
3007
3031
|
*/
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
3016
|
-
*/
|
|
3032
|
+
// TODO: [🧳][main] !!4 Validate that all examples match expectations
|
|
3033
|
+
// TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
|
|
3034
|
+
// TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
|
|
3035
|
+
// TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
|
|
3036
|
+
// TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
|
|
3037
|
+
// TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
|
|
3038
|
+
// TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
3017
3039
|
|
|
3018
3040
|
/**
|
|
3019
3041
|
* This error indicates that promptbook not found in the collection
|
|
@@ -3046,6 +3068,7 @@ class PipelineUrlError extends Error {
|
|
|
3046
3068
|
*
|
|
3047
3069
|
* @param template the string template with parameters in {curly} braces
|
|
3048
3070
|
* @returns the list of parameter names
|
|
3071
|
+
*
|
|
3049
3072
|
* @public exported from `@promptbook/utils`
|
|
3050
3073
|
*/
|
|
3051
3074
|
function extractParameterNames(template) {
|
|
@@ -3062,6 +3085,7 @@ function extractParameterNames(template) {
|
|
|
3062
3085
|
* Unprepare just strips the preparation data of the pipeline
|
|
3063
3086
|
*
|
|
3064
3087
|
* @deprecated In future version this function will be removed or deprecated
|
|
3088
|
+
*
|
|
3065
3089
|
* @public exported from `@promptbook/core`
|
|
3066
3090
|
*/
|
|
3067
3091
|
function unpreparePipeline(pipeline) {
|
|
@@ -3090,18 +3114,17 @@ function unpreparePipeline(pipeline) {
|
|
|
3090
3114
|
},
|
|
3091
3115
|
});
|
|
3092
3116
|
}
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
* TODO: [🍙] Make some standard order of json properties
|
|
3097
|
-
*/
|
|
3117
|
+
// TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
|
|
3118
|
+
// TODO: Write tests for `preparePipeline`
|
|
3119
|
+
// TODO: [🍙] Make some standard order of json properties
|
|
3098
3120
|
|
|
3099
3121
|
/**
|
|
3100
3122
|
* Library of pipelines that groups together pipelines for an application.
|
|
3101
3123
|
* This implementation is a very thin wrapper around the Array / Map of pipelines.
|
|
3102
3124
|
*
|
|
3103
|
-
* @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
|
|
3104
3125
|
* @see https://github.com/webgptorg/pipeline#pipeline-collection
|
|
3126
|
+
*
|
|
3127
|
+
* @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
|
|
3105
3128
|
*/
|
|
3106
3129
|
class SimplePipelineCollection {
|
|
3107
3130
|
/**
|
|
@@ -3205,6 +3228,7 @@ class SimplePipelineCollection {
|
|
|
3205
3228
|
*
|
|
3206
3229
|
* @param promptbookSources
|
|
3207
3230
|
* @returns PipelineCollection
|
|
3231
|
+
*
|
|
3208
3232
|
* @public exported from `@promptbook/core`
|
|
3209
3233
|
*/
|
|
3210
3234
|
function createPipelineCollectionFromJson(...promptbooks) {
|
|
@@ -3217,16 +3241,15 @@ function createPipelineCollectionFromJson(...promptbooks) {
|
|
|
3217
3241
|
* Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
|
|
3218
3242
|
* Note: This function is cryptographically secure (it uses crypto.randomBytes internally)
|
|
3219
3243
|
*
|
|
3220
|
-
* @private internal helper function
|
|
3221
3244
|
* @returns secure random token
|
|
3245
|
+
*
|
|
3246
|
+
* @private internal helper function
|
|
3222
3247
|
*/
|
|
3223
3248
|
function $randomToken(randomness) {
|
|
3224
3249
|
return randomBytes(randomness).toString('hex');
|
|
3225
3250
|
}
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
* TODO: Maybe use nanoid instead https://github.com/ai/nanoid
|
|
3229
|
-
*/
|
|
3251
|
+
// TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
|
3252
|
+
// TODO: Maybe use nanoid instead https://github.com/ai/nanoid
|
|
3230
3253
|
|
|
3231
3254
|
/**
|
|
3232
3255
|
* This error indicates errors during the execution of the pipeline
|
|
@@ -3243,9 +3266,7 @@ class PipelineExecutionError extends Error {
|
|
|
3243
3266
|
Object.setPrototypeOf(this, PipelineExecutionError.prototype);
|
|
3244
3267
|
}
|
|
3245
3268
|
}
|
|
3246
|
-
|
|
3247
|
-
* TODO: [🧠][🌂] Add id to all errors
|
|
3248
|
-
*/
|
|
3269
|
+
// TODO: [🧠][🌂] Add id to all errors
|
|
3249
3270
|
|
|
3250
3271
|
/**
|
|
3251
3272
|
* Determine if the pipeline is fully prepared
|
|
@@ -3368,17 +3389,16 @@ class DatabaseError extends Error {
|
|
|
3368
3389
|
Object.setPrototypeOf(this, DatabaseError.prototype);
|
|
3369
3390
|
}
|
|
3370
3391
|
}
|
|
3371
|
-
|
|
3372
|
-
* TODO: [🐱🚀] Explain that NotFoundError ([🐱🚀] and other specific errors) has priority over DatabaseError in some contexts
|
|
3373
|
-
*/
|
|
3392
|
+
// TODO: [🐱🚀] Explain that NotFoundError ([🐱🚀] and other specific errors) has priority over DatabaseError in some contexts
|
|
3374
3393
|
|
|
3375
3394
|
/**
|
|
3376
3395
|
* This error occurs when some expectation is not met in the execution of the pipeline
|
|
3377
3396
|
*
|
|
3378
|
-
* @public exported from `@promptbook/core`
|
|
3379
3397
|
* Note: Do not throw this error, its reserved for `checkExpectations` and `createPipelineExecutor` and public ONLY to be serializable through remote server
|
|
3380
3398
|
* Note: Always thrown in `checkExpectations` and catched in `createPipelineExecutor` and rethrown as `PipelineExecutionError`
|
|
3381
3399
|
* Note: This is a kindof subtype of PipelineExecutionError
|
|
3400
|
+
*
|
|
3401
|
+
* @public exported from `@promptbook/core`
|
|
3382
3402
|
*/
|
|
3383
3403
|
class ExpectError extends Error {
|
|
3384
3404
|
constructor(message) {
|
|
@@ -3511,9 +3531,7 @@ const ALL_ERRORS = {
|
|
|
3511
3531
|
...PROMPTBOOK_ERRORS,
|
|
3512
3532
|
...COMMON_JAVASCRIPT_ERRORS,
|
|
3513
3533
|
};
|
|
3514
|
-
|
|
3515
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3516
|
-
*/
|
|
3534
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3517
3535
|
|
|
3518
3536
|
/**
|
|
3519
3537
|
* Serializes an error into a [🚉] JSON-serializable object
|
|
@@ -3582,7 +3600,7 @@ function jsonParse(value) {
|
|
|
3582
3600
|
|
|
3583
3601
|
/**
|
|
3584
3602
|
* Recursively converts JSON strings to JSON objects
|
|
3585
|
-
|
|
3603
|
+
*
|
|
3586
3604
|
* @public exported from `@promptbook/utils`
|
|
3587
3605
|
*/
|
|
3588
3606
|
function jsonStringsToJsons(object) {
|
|
@@ -3606,9 +3624,7 @@ function jsonStringsToJsons(object) {
|
|
|
3606
3624
|
}
|
|
3607
3625
|
return newObject;
|
|
3608
3626
|
}
|
|
3609
|
-
|
|
3610
|
-
* TODO: Type the return type correctly
|
|
3611
|
-
*/
|
|
3627
|
+
// TODO: Type the return type correctly
|
|
3612
3628
|
|
|
3613
3629
|
/**
|
|
3614
3630
|
* Deserializes the error object
|
|
@@ -3643,6 +3659,7 @@ function deserializeError(error, isStackAddedToMessage = true) {
|
|
|
3643
3659
|
*
|
|
3644
3660
|
* @param executionResult - The partial result of the Promptbook execution
|
|
3645
3661
|
* @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred
|
|
3662
|
+
*
|
|
3646
3663
|
* @private internal helper function of `asPromise` method of `ExecutionTask`
|
|
3647
3664
|
*/
|
|
3648
3665
|
function assertsTaskSuccessful(executionResult) {
|
|
@@ -3673,9 +3690,7 @@ function assertsTaskSuccessful(executionResult) {
|
|
|
3673
3690
|
`));
|
|
3674
3691
|
}
|
|
3675
3692
|
}
|
|
3676
|
-
|
|
3677
|
-
* TODO: [🧠] Can this return type be better typed than void
|
|
3678
|
-
*/
|
|
3693
|
+
// TODO: [🧠] Can this return type be better typed than void
|
|
3679
3694
|
|
|
3680
3695
|
/**
|
|
3681
3696
|
* Helper to create a new task
|
|
@@ -3866,10 +3881,8 @@ function createTask(options) {
|
|
|
3866
3881
|
},
|
|
3867
3882
|
};
|
|
3868
3883
|
}
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
* TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
|
|
3872
|
-
*/
|
|
3884
|
+
// TODO: Maybe allow to terminate the task and add getter `isFinished` or `status`
|
|
3885
|
+
// TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
|
|
3873
3886
|
|
|
3874
3887
|
/**
|
|
3875
3888
|
* Represents the uncertain value
|
|
@@ -3937,9 +3950,7 @@ const UNCERTAIN_USAGE = $deepFreeze({
|
|
|
3937
3950
|
pagesCount: UNCERTAIN_ZERO_VALUE,
|
|
3938
3951
|
},
|
|
3939
3952
|
});
|
|
3940
|
-
|
|
3941
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3942
|
-
*/
|
|
3953
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3943
3954
|
|
|
3944
3955
|
/**
|
|
3945
3956
|
* Async version of Array.forEach
|
|
@@ -3947,8 +3958,9 @@ const UNCERTAIN_USAGE = $deepFreeze({
|
|
|
3947
3958
|
* @param array - Array to iterate over
|
|
3948
3959
|
* @param options - Options for the function
|
|
3949
3960
|
* @param callbackfunction - Function to call for each item
|
|
3950
|
-
* @public exported from `@promptbook/utils`
|
|
3951
3961
|
* @deprecated [🪂] Use queues instead
|
|
3962
|
+
*
|
|
3963
|
+
* @public exported from `@promptbook/utils`
|
|
3952
3964
|
*/
|
|
3953
3965
|
async function forEachAsync(array, options, callbackfunction) {
|
|
3954
3966
|
const { maxParallelCount = Infinity } = options;
|
|
@@ -4033,6 +4045,7 @@ function addUsage(...usageItems) {
|
|
|
4033
4045
|
*
|
|
4034
4046
|
* @param llmTools - The LLM tools to be intercepted and tracked
|
|
4035
4047
|
* @returns Full proxy of the tools with added usage tracking capabilities
|
|
4048
|
+
*
|
|
4036
4049
|
* @public exported from `@promptbook/core`
|
|
4037
4050
|
*/
|
|
4038
4051
|
function countUsage(llmTools) {
|
|
@@ -4157,6 +4170,7 @@ const MULTIPLE_PROVIDER_PROFILE = {
|
|
|
4157
4170
|
* Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
|
|
4158
4171
|
*
|
|
4159
4172
|
* Note: Internal utility of `joinLlmExecutionTools` but exposed type
|
|
4173
|
+
*
|
|
4160
4174
|
* @public exported from `@promptbook/core`
|
|
4161
4175
|
*/
|
|
4162
4176
|
class MultipleLlmExecutionTools {
|
|
@@ -4319,16 +4333,16 @@ class MultipleLlmExecutionTools {
|
|
|
4319
4333
|
* `MultipleLlmExecutionTools` object. It provides failover and aggregation logic:
|
|
4320
4334
|
*
|
|
4321
4335
|
* 1. **Failover**: When a model call is made, it tries providers in the order they were provided.
|
|
4322
|
-
*
|
|
4336
|
+
* If the first provider doesn't support the requested model or fails, it tries the next one.
|
|
4323
4337
|
* 2. **Aggregation**: `listModels` returns a combined list of all models available from all providers.
|
|
4324
4338
|
* 3. **Empty case**: If no tools are provided, it logs a warning (as Promptbook requires LLMs to function).
|
|
4325
4339
|
*
|
|
4340
|
+
* Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
|
|
4341
|
+
*
|
|
4326
4342
|
* @param title - A descriptive title for this collection of joined tools
|
|
4327
4343
|
* @param llmExecutionTools - An array of execution tools to be joined
|
|
4328
4344
|
* @returns A single unified execution tool wrapper
|
|
4329
4345
|
*
|
|
4330
|
-
* Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
|
|
4331
|
-
*
|
|
4332
4346
|
* @public exported from `@promptbook/core`
|
|
4333
4347
|
*/
|
|
4334
4348
|
function joinLlmExecutionTools(title, ...llmExecutionTools) {
|
|
@@ -4365,10 +4379,8 @@ function joinLlmExecutionTools(title, ...llmExecutionTools) {
|
|
|
4365
4379
|
}
|
|
4366
4380
|
return new MultipleLlmExecutionTools(title || 'Multiple LLM Providers joined by `joinLlmExecutionTools`', ...llmExecutionTools);
|
|
4367
4381
|
}
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
* TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
4371
|
-
*/
|
|
4382
|
+
// TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
|
|
4383
|
+
// TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
4372
4384
|
|
|
4373
4385
|
/**
|
|
4374
4386
|
* Just returns the given `LlmExecutionTools` or joins multiple into one
|
|
@@ -4382,15 +4394,14 @@ function getSingleLlmExecutionTools(oneOrMoreLlmExecutionTools) {
|
|
|
4382
4394
|
: joinLlmExecutionTools('Multiple LLM Providers joined by `getSingleLlmExecutionTools`', ..._llms);
|
|
4383
4395
|
return llmTools;
|
|
4384
4396
|
}
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
* TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
4388
|
-
*/
|
|
4397
|
+
// TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
|
|
4398
|
+
// TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
4389
4399
|
|
|
4390
4400
|
/**
|
|
4391
4401
|
* Prepares the persona for the pipeline
|
|
4392
4402
|
*
|
|
4393
4403
|
* @see https://github.com/webgptorg/promptbook/discussions/22
|
|
4404
|
+
*
|
|
4394
4405
|
* @public exported from `@promptbook/core`
|
|
4395
4406
|
*/
|
|
4396
4407
|
async function preparePersona(personaDescription, tools, options) {
|
|
@@ -4447,13 +4458,11 @@ async function preparePersona(personaDescription, tools, options) {
|
|
|
4447
4458
|
modelsRequirements,
|
|
4448
4459
|
};
|
|
4449
4460
|
}
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
* TODO: [🏢] Check validity of `temperature` in pipeline
|
|
4456
|
-
*/
|
|
4461
|
+
// TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
|
|
4462
|
+
// TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
|
|
4463
|
+
// TODO: [🏢] Check validity of `modelName` in pipeline
|
|
4464
|
+
// TODO: [🏢] Check validity of `systemMessage` in pipeline
|
|
4465
|
+
// TODO: [🏢] Check validity of `temperature` in pipeline
|
|
4457
4466
|
|
|
4458
4467
|
/**
|
|
4459
4468
|
* Safely retrieves the global scope object (window in browser, global in Node.js)
|
|
@@ -4461,7 +4470,7 @@ async function preparePersona(personaDescription, tools, options) {
|
|
|
4461
4470
|
*
|
|
4462
4471
|
* Note: `$` is used to indicate that this function is not a pure function - it access global scope
|
|
4463
4472
|
*
|
|
4464
|
-
*
|
|
4473
|
+
* @private internal function of `$Register`
|
|
4465
4474
|
*/
|
|
4466
4475
|
function $getGlobalScope() {
|
|
4467
4476
|
return Function('return this')();
|
|
@@ -4476,6 +4485,7 @@ function $getGlobalScope() {
|
|
|
4476
4485
|
* @returns The normalized text in SCREAMING_CASE format.
|
|
4477
4486
|
* @example 'HELLO_WORLD'
|
|
4478
4487
|
* @example 'I_LOVE_PROMPTBOOK'
|
|
4488
|
+
*
|
|
4479
4489
|
* @public exported from `@promptbook/utils`
|
|
4480
4490
|
*/
|
|
4481
4491
|
function normalizeTo_SCREAMING_CASE(text) {
|
|
@@ -4533,6 +4543,7 @@ function normalizeTo_SCREAMING_CASE(text) {
|
|
|
4533
4543
|
* @returns The normalized text in snake_case format.
|
|
4534
4544
|
* @example 'hello_world'
|
|
4535
4545
|
* @example 'i_love_promptbook'
|
|
4546
|
+
*
|
|
4536
4547
|
* @public exported from `@promptbook/utils`
|
|
4537
4548
|
*/
|
|
4538
4549
|
function normalizeTo_snake_case(text) {
|
|
@@ -4591,26 +4602,26 @@ class $Register {
|
|
|
4591
4602
|
* Global registry for storing metadata about all available scrapers and converters.
|
|
4592
4603
|
*
|
|
4593
4604
|
* Note: `$` is used to indicate that this interacts with the global scope.
|
|
4605
|
+
*
|
|
4594
4606
|
* @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
|
|
4607
|
+
*
|
|
4595
4608
|
* @public exported from `@promptbook/core`
|
|
4596
4609
|
*/
|
|
4597
4610
|
const $scrapersMetadataRegister = new $Register('scrapers_metadata');
|
|
4598
|
-
|
|
4599
|
-
* TODO: [®] DRY Register logic
|
|
4600
|
-
*/
|
|
4611
|
+
// TODO: [®] DRY Register logic
|
|
4601
4612
|
|
|
4602
4613
|
/**
|
|
4603
4614
|
* Registry for all available scrapers in the system.
|
|
4604
4615
|
* Central point for registering and accessing different types of content scrapers.
|
|
4605
4616
|
*
|
|
4606
4617
|
* Note: `$` is used to indicate that this interacts with the global scope
|
|
4618
|
+
*
|
|
4607
4619
|
* @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
|
|
4620
|
+
*
|
|
4608
4621
|
* @public exported from `@promptbook/core`
|
|
4609
4622
|
*/
|
|
4610
4623
|
const $scrapersRegister = new $Register('scraper_constructors');
|
|
4611
|
-
|
|
4612
|
-
* TODO: [®] DRY Register logic
|
|
4613
|
-
*/
|
|
4624
|
+
// TODO: [®] DRY Register logic
|
|
4614
4625
|
|
|
4615
4626
|
/**
|
|
4616
4627
|
* Creates a message with all registered scrapers
|
|
@@ -4695,9 +4706,7 @@ function $registeredScrapersMessage(availableScrapers) {
|
|
|
4695
4706
|
|
|
4696
4707
|
`);
|
|
4697
4708
|
}
|
|
4698
|
-
|
|
4699
|
-
* TODO: [®] DRY Register logic
|
|
4700
|
-
*/
|
|
4709
|
+
// TODO: [®] DRY Register logic
|
|
4701
4710
|
|
|
4702
4711
|
/**
|
|
4703
4712
|
* Creates unique name for the source
|
|
@@ -4716,9 +4725,7 @@ function knowledgeSourceContentToName(knowledgeSourceContent) {
|
|
|
4716
4725
|
// <- TODO: Use MAX_FILENAME_LENGTH
|
|
4717
4726
|
return name;
|
|
4718
4727
|
}
|
|
4719
|
-
|
|
4720
|
-
* TODO: [🐱🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
|
|
4721
|
-
*/
|
|
4728
|
+
// TODO: [🐱🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
|
|
4722
4729
|
|
|
4723
4730
|
/**
|
|
4724
4731
|
* Convert file extension to mime type
|
|
@@ -4767,9 +4774,7 @@ const promptbookFetch = async (urlOrRequest, init) => {
|
|
|
4767
4774
|
`));
|
|
4768
4775
|
}
|
|
4769
4776
|
};
|
|
4770
|
-
|
|
4771
|
-
* TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
|
|
4772
|
-
*/
|
|
4777
|
+
// TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
|
|
4773
4778
|
|
|
4774
4779
|
/**
|
|
4775
4780
|
* Factory function that creates a handler for processing knowledge sources.
|
|
@@ -4989,6 +4994,7 @@ async function makeKnowledgeSourceHandler(knowledgeSource, tools, options) {
|
|
|
4989
4994
|
* Prepares the knowledge pieces
|
|
4990
4995
|
*
|
|
4991
4996
|
* @see https://github.com/webgptorg/promptbook/discussions/41
|
|
4997
|
+
*
|
|
4992
4998
|
* @public exported from `@promptbook/core`
|
|
4993
4999
|
*/
|
|
4994
5000
|
async function prepareKnowledgePieces(knowledgeSources, tools, options) {
|
|
@@ -5130,25 +5136,24 @@ async function prepareTasks(pipeline, tools, options) {
|
|
|
5130
5136
|
});
|
|
5131
5137
|
return { tasksPrepared };
|
|
5132
5138
|
}
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
5142
|
-
*/
|
|
5139
|
+
// TODO: [😂] Adding knowledge should be convert to async high-level abstractions, similar thing with expectations to sync high-level abstractions
|
|
5140
|
+
// TODO: [🧠] Add context to each task (if missing)
|
|
5141
|
+
// TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
|
|
5142
|
+
// TODO: [♨][main] !!3 Prepare index the examples and maybe tasks
|
|
5143
|
+
// TODO: Write tests for `preparePipeline`
|
|
5144
|
+
// TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
5145
|
+
// TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
|
|
5146
|
+
// TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
5143
5147
|
|
|
5144
5148
|
/**
|
|
5145
5149
|
* Prepare pipeline locally
|
|
5146
5150
|
*
|
|
5147
|
-
* @see https://github.com/webgptorg/promptbook/discussions/196
|
|
5148
|
-
*
|
|
5149
5151
|
* Note: This function does not validate logic of the pipeline
|
|
5150
5152
|
* Note: This function acts as part of compilation process
|
|
5151
5153
|
* Note: When the pipeline is already prepared, it returns the same pipeline
|
|
5154
|
+
*
|
|
5155
|
+
* @see https://github.com/webgptorg/promptbook/discussions/196
|
|
5156
|
+
*
|
|
5152
5157
|
* @public exported from `@promptbook/core`
|
|
5153
5158
|
*/
|
|
5154
5159
|
async function preparePipeline(pipeline, tools, options) {
|
|
@@ -5319,8 +5324,8 @@ function numberToString(value) {
|
|
|
5319
5324
|
* This is useful and used in the `templateParameters` function
|
|
5320
5325
|
*
|
|
5321
5326
|
* Note: This function is not just calling `toString` method
|
|
5322
|
-
*
|
|
5323
|
-
*
|
|
5327
|
+
* It's more complex and can handle this conversion specifically for LLM models
|
|
5328
|
+
* See `VALUE_STRINGS`
|
|
5324
5329
|
*
|
|
5325
5330
|
* Note: There are 2 similar functions
|
|
5326
5331
|
* - `valueToString` converts value to string for LLM models as human-readable string
|
|
@@ -5373,6 +5378,7 @@ function valueToString(value) {
|
|
|
5373
5378
|
* @param script from which to extract the variables
|
|
5374
5379
|
* @returns the list of variable names
|
|
5375
5380
|
* @throws {ParseError} if the script is invalid
|
|
5381
|
+
*
|
|
5376
5382
|
* @public exported from `@promptbook/javascript`
|
|
5377
5383
|
*/
|
|
5378
5384
|
function extractVariablesFromJavascript(script) {
|
|
@@ -5438,9 +5444,7 @@ function extractVariablesFromJavascript(script) {
|
|
|
5438
5444
|
}
|
|
5439
5445
|
return variables;
|
|
5440
5446
|
}
|
|
5441
|
-
|
|
5442
|
-
* TODO: [🔣] Support for multiple languages - python, java,...
|
|
5443
|
-
*/
|
|
5447
|
+
// TODO: [🔣] Support for multiple languages - python, java,...
|
|
5444
5448
|
|
|
5445
5449
|
/**
|
|
5446
5450
|
* Parses the task and returns the set of all used parameters
|
|
@@ -5448,6 +5452,7 @@ function extractVariablesFromJavascript(script) {
|
|
|
5448
5452
|
* @param task the task with used parameters
|
|
5449
5453
|
* @returns the set of parameter names
|
|
5450
5454
|
* @throws {ParseError} if the script is invalid
|
|
5455
|
+
*
|
|
5451
5456
|
* @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
|
|
5452
5457
|
*/
|
|
5453
5458
|
function extractParameterNamesFromTask(task) {
|
|
@@ -5488,14 +5493,13 @@ function extractParameterNamesFromTask(task) {
|
|
|
5488
5493
|
}
|
|
5489
5494
|
return parameterNames;
|
|
5490
5495
|
}
|
|
5491
|
-
|
|
5492
|
-
* TODO: [🔣] If script require contentLanguage
|
|
5493
|
-
*/
|
|
5496
|
+
// TODO: [🔣] If script require contentLanguage
|
|
5494
5497
|
|
|
5495
5498
|
/**
|
|
5496
5499
|
* Create difference set of two sets.
|
|
5497
5500
|
*
|
|
5498
5501
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5502
|
+
*
|
|
5499
5503
|
* @public exported from `@promptbook/utils`
|
|
5500
5504
|
*/
|
|
5501
5505
|
function difference(a, b, isEqual = (a, b) => a === b) {
|
|
@@ -5507,14 +5511,13 @@ function difference(a, b, isEqual = (a, b) => a === b) {
|
|
|
5507
5511
|
}
|
|
5508
5512
|
return diff;
|
|
5509
5513
|
}
|
|
5510
|
-
|
|
5511
|
-
* TODO: [🧠][💯] Maybe also implement symmetricDifference
|
|
5512
|
-
*/
|
|
5514
|
+
// TODO: [🧠][💯] Maybe also implement symmetricDifference
|
|
5513
5515
|
|
|
5514
5516
|
/**
|
|
5515
5517
|
* Creates a new set with all elements that are present in either set
|
|
5516
5518
|
*
|
|
5517
5519
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5520
|
+
*
|
|
5518
5521
|
* @public exported from `@promptbook/utils`
|
|
5519
5522
|
*/
|
|
5520
5523
|
function union(...sets) {
|
|
@@ -5580,8 +5583,9 @@ function isValidCsvString(value) {
|
|
|
5580
5583
|
/**
|
|
5581
5584
|
* Definition for CSV spreadsheet
|
|
5582
5585
|
*
|
|
5586
|
+
* TODO: [🏢] Export from package `@promptbook/csv`
|
|
5587
|
+
*
|
|
5583
5588
|
* @public exported from `@promptbook/core`
|
|
5584
|
-
* <- TODO: [🏢] Export from package `@promptbook/csv`
|
|
5585
5589
|
*/
|
|
5586
5590
|
const CsvFormatParser = {
|
|
5587
5591
|
formatName: 'CSV',
|
|
@@ -5671,13 +5675,11 @@ const CsvFormatParser = {
|
|
|
5671
5675
|
},
|
|
5672
5676
|
],
|
|
5673
5677
|
};
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
* TODO: [🏢] Allow to expect something inside CSV objects and other formats
|
|
5680
|
-
*/
|
|
5678
|
+
// TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
|
|
5679
|
+
// TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
|
|
5680
|
+
// TODO: [🍓] In `CsvFormatParser` implement `heal
|
|
5681
|
+
// TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
|
|
5682
|
+
// TODO: [🏢] Allow to expect something inside CSV objects and other formats
|
|
5681
5683
|
|
|
5682
5684
|
/**
|
|
5683
5685
|
* Definition for JSON format
|
|
@@ -5698,17 +5700,15 @@ const JsonFormatParser = {
|
|
|
5698
5700
|
},
|
|
5699
5701
|
subvalueParsers: [],
|
|
5700
5702
|
};
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
* TODO: [🏢] Allow to expect something inside JSON objects and other formats
|
|
5711
|
-
*/
|
|
5703
|
+
// TODO: [🧠] Maybe proper instance of object
|
|
5704
|
+
// TODO: [0] Make string_serialized_json
|
|
5705
|
+
// TODO: [1] Make type for JSON Settings and Schema
|
|
5706
|
+
// TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
|
|
5707
|
+
// TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
|
|
5708
|
+
// TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
|
|
5709
|
+
// TODO: [🍓] In `JsonFormatParser` implement `heal
|
|
5710
|
+
// TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
|
|
5711
|
+
// TODO: [🏢] Allow to expect something inside JSON objects and other formats
|
|
5712
5712
|
|
|
5713
5713
|
/**
|
|
5714
5714
|
* Definition for any text - this will be always valid
|
|
@@ -5746,15 +5746,13 @@ const TextFormatParser = {
|
|
|
5746
5746
|
// <- TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
|
|
5747
5747
|
],
|
|
5748
5748
|
};
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
* TODO: [🏢] Allow to expect something inside each item of list and other formats
|
|
5757
|
-
*/
|
|
5749
|
+
// TODO: [1] Make type for XML Text and Schema
|
|
5750
|
+
// TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
|
|
5751
|
+
// TODO: [🍓] In `TextFormatParser` implement simple `isValid`
|
|
5752
|
+
// TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
|
|
5753
|
+
// TODO: [🍓] In `TextFormatParser` implement `heal
|
|
5754
|
+
// TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
|
|
5755
|
+
// TODO: [🏢] Allow to expect something inside each item of list and other formats
|
|
5758
5756
|
|
|
5759
5757
|
/**
|
|
5760
5758
|
* Function to check if a string is valid XML
|
|
@@ -5799,17 +5797,15 @@ const XmlFormatParser = {
|
|
|
5799
5797
|
},
|
|
5800
5798
|
subvalueParsers: [],
|
|
5801
5799
|
};
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
* TODO: [🏢] Allow to expect something inside XML and other formats
|
|
5812
|
-
*/
|
|
5800
|
+
// TODO: [🧠] Maybe proper instance of object
|
|
5801
|
+
// TODO: [0] Make string_serialized_xml
|
|
5802
|
+
// TODO: [1] Make type for XML Settings and Schema
|
|
5803
|
+
// TODO: [🧠] What to use for validating XMLs - XSD,...
|
|
5804
|
+
// TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
|
|
5805
|
+
// TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
|
|
5806
|
+
// TODO: [🍓] In `XmlFormatParser` implement `heal
|
|
5807
|
+
// TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
|
|
5808
|
+
// TODO: [🏢] Allow to expect something inside XML and other formats
|
|
5813
5809
|
|
|
5814
5810
|
/**
|
|
5815
5811
|
* Definitions for all formats supported by Promptbook
|
|
@@ -5817,9 +5813,7 @@ const XmlFormatParser = {
|
|
|
5817
5813
|
* @private internal index of `...` <- TODO [🏢]
|
|
5818
5814
|
*/
|
|
5819
5815
|
const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser, CsvFormatParser];
|
|
5820
|
-
|
|
5821
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5822
|
-
*/
|
|
5816
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5823
5817
|
|
|
5824
5818
|
/**
|
|
5825
5819
|
* Maps available parameters to expected parameters for a pipeline task.
|
|
@@ -5829,6 +5823,7 @@ const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser,
|
|
|
5829
5823
|
* 2) Then, if there are unmatched expected and available parameters, map them by order.
|
|
5830
5824
|
*
|
|
5831
5825
|
* @throws {PipelineExecutionError} If the number of unmatched expected and available parameters does not match, or mapping is ambiguous.
|
|
5826
|
+
*
|
|
5832
5827
|
* @private within the repository used in `createPipelineExecutor`
|
|
5833
5828
|
*/
|
|
5834
5829
|
function mapAvailableToExpectedParameters(options) {
|
|
@@ -5891,12 +5886,13 @@ function mapAvailableToExpectedParameters(options) {
|
|
|
5891
5886
|
* Replaces parameters in template with values from parameters object
|
|
5892
5887
|
*
|
|
5893
5888
|
* Note: This function is not places strings into string,
|
|
5894
|
-
*
|
|
5889
|
+
* It's more complex and can handle this operation specifically for LLM models
|
|
5895
5890
|
*
|
|
5896
5891
|
* @param template the template with parameters in {curly} braces
|
|
5897
5892
|
* @param parameters the object with parameters
|
|
5898
5893
|
* @returns the template with replaced parameters
|
|
5899
5894
|
* @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened
|
|
5895
|
+
*
|
|
5900
5896
|
* @public exported from `@promptbook/utils`
|
|
5901
5897
|
*/
|
|
5902
5898
|
function templateParameters(template, parameters) {
|
|
@@ -5970,6 +5966,7 @@ function templateParameters(template, parameters) {
|
|
|
5970
5966
|
* @param markdown any valid markdown
|
|
5971
5967
|
* @returns code blocks with language and content
|
|
5972
5968
|
* @throws {ParseError} if block is not closed properly
|
|
5969
|
+
*
|
|
5973
5970
|
* @public exported from `@promptbook/markdown-utils`
|
|
5974
5971
|
*/
|
|
5975
5972
|
function extractAllBlocksFromMarkdown(markdown) {
|
|
@@ -6020,9 +6017,7 @@ function extractAllBlocksFromMarkdown(markdown) {
|
|
|
6020
6017
|
}
|
|
6021
6018
|
return codeBlocks;
|
|
6022
6019
|
}
|
|
6023
|
-
|
|
6024
|
-
* TODO: Maybe name for `blockNotation` instead of '```' and '>'
|
|
6025
|
-
*/
|
|
6020
|
+
// TODO: Maybe name for `blockNotation` instead of '```' and '>'
|
|
6026
6021
|
|
|
6027
6022
|
/**
|
|
6028
6023
|
* Extracts extracts exactly one valid JSON code block
|
|
@@ -6038,8 +6033,9 @@ function extractAllBlocksFromMarkdown(markdown) {
|
|
|
6038
6033
|
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
6039
6034
|
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
|
|
6040
6035
|
*
|
|
6041
|
-
* @public exported from `@promptbook/markdown-utils`
|
|
6042
6036
|
* @throws {ParseError} if there is no valid JSON block in the markdown
|
|
6037
|
+
*
|
|
6038
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
6043
6039
|
*/
|
|
6044
6040
|
function extractJsonBlock(markdown) {
|
|
6045
6041
|
if (isValidJsonString(markdown)) {
|
|
@@ -6055,10 +6051,8 @@ function extractJsonBlock(markdown) {
|
|
|
6055
6051
|
}
|
|
6056
6052
|
return jsonBlocks[0].content;
|
|
6057
6053
|
}
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
* TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
|
|
6061
|
-
*/
|
|
6054
|
+
// TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
|
|
6055
|
+
// TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
|
|
6062
6056
|
|
|
6063
6057
|
/**
|
|
6064
6058
|
* Counts number of characters in the text
|
|
@@ -6074,10 +6068,8 @@ function countCharacters(text) {
|
|
|
6074
6068
|
text = text.replace(/\p{Extended_Pictographic}(\u{200D}\p{Extended_Pictographic})*/gu, '-');
|
|
6075
6069
|
return text.length;
|
|
6076
6070
|
}
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6080
|
-
*/
|
|
6071
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6072
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6081
6073
|
|
|
6082
6074
|
/**
|
|
6083
6075
|
* Number of characters per standard line with 11pt Arial font size.
|
|
@@ -6091,10 +6083,8 @@ const CHARACTERS_PER_STANDARD_LINE = 63;
|
|
|
6091
6083
|
* @public exported from `@promptbook/utils`
|
|
6092
6084
|
*/
|
|
6093
6085
|
const LINES_PER_STANDARD_PAGE = 44;
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
6097
|
-
*/
|
|
6086
|
+
// TODO: [🧠] Should be this `constants.ts` or `config.ts`?
|
|
6087
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
6098
6088
|
|
|
6099
6089
|
/**
|
|
6100
6090
|
* Counts number of lines in the text
|
|
@@ -6112,10 +6102,8 @@ function countLines(text) {
|
|
|
6112
6102
|
const lines = text.split(/\r?\n/);
|
|
6113
6103
|
return lines.reduce((count, line) => count + Math.max(Math.ceil(line.length / CHARACTERS_PER_STANDARD_LINE), 1), 0);
|
|
6114
6104
|
}
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6118
|
-
*/
|
|
6105
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6106
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6119
6107
|
|
|
6120
6108
|
/**
|
|
6121
6109
|
* Counts number of pages in the text
|
|
@@ -6127,10 +6115,8 @@ function countLines(text) {
|
|
|
6127
6115
|
function countPages(text) {
|
|
6128
6116
|
return Math.ceil(countLines(text) / LINES_PER_STANDARD_PAGE);
|
|
6129
6117
|
}
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6133
|
-
*/
|
|
6118
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6119
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6134
6120
|
|
|
6135
6121
|
/**
|
|
6136
6122
|
* Counts number of paragraphs in the text
|
|
@@ -6140,10 +6126,8 @@ function countPages(text) {
|
|
|
6140
6126
|
function countParagraphs(text) {
|
|
6141
6127
|
return text.split(/\n\s*\n/).filter((paragraph) => paragraph.trim() !== '').length;
|
|
6142
6128
|
}
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6146
|
-
*/
|
|
6129
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6130
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6147
6131
|
|
|
6148
6132
|
/**
|
|
6149
6133
|
* Split text into sentences
|
|
@@ -6161,10 +6145,8 @@ function splitIntoSentences(text) {
|
|
|
6161
6145
|
function countSentences(text) {
|
|
6162
6146
|
return splitIntoSentences(text).length;
|
|
6163
6147
|
}
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6167
|
-
*/
|
|
6148
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6149
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6168
6150
|
|
|
6169
6151
|
/**
|
|
6170
6152
|
* Counts number of words in the text
|
|
@@ -6178,11 +6160,9 @@ function countWords(text) {
|
|
|
6178
6160
|
text = text.replace(/([a-z])([A-Z])/g, '$1 $2');
|
|
6179
6161
|
return text.split(/[^a-zа-я0-9]+/i).filter((word) => word.length > 0).length;
|
|
6180
6162
|
}
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
* TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
|
|
6185
|
-
*/
|
|
6163
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6164
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6165
|
+
// TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
|
|
6186
6166
|
|
|
6187
6167
|
/**
|
|
6188
6168
|
* Index of all counter functions
|
|
@@ -6197,10 +6177,8 @@ const CountUtils = {
|
|
|
6197
6177
|
LINES: countLines,
|
|
6198
6178
|
PAGES: countPages,
|
|
6199
6179
|
};
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
6203
|
-
*/
|
|
6180
|
+
// TODO: [🧠][🤠] This should be probably as part of `TextFormatParser`
|
|
6181
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
6204
6182
|
|
|
6205
6183
|
/**
|
|
6206
6184
|
* Function checkExpectations will check if the expectations on given value are met
|
|
@@ -6211,6 +6189,7 @@ const CountUtils = {
|
|
|
6211
6189
|
*
|
|
6212
6190
|
* @throws {ExpectError} if the expectations are not met
|
|
6213
6191
|
* @returns {void} Nothing
|
|
6192
|
+
*
|
|
6214
6193
|
* @private internal function of `createPipelineExecutor`
|
|
6215
6194
|
*/
|
|
6216
6195
|
function checkExpectations(expectations, value) {
|
|
@@ -6224,11 +6203,9 @@ function checkExpectations(expectations, value) {
|
|
|
6224
6203
|
}
|
|
6225
6204
|
}
|
|
6226
6205
|
}
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
* Note: [💝] and [🤠] are interconnected together
|
|
6231
|
-
*/
|
|
6206
|
+
// TODO: [💝] Unite object for expecting amount and format
|
|
6207
|
+
// TODO: [🧠][🤠] This should be part of `TextFormatParser`
|
|
6208
|
+
// Note: [💝] and [🤠] are interconnected together
|
|
6232
6209
|
|
|
6233
6210
|
/**
|
|
6234
6211
|
* Validates a prompt result against expectations and format requirements.
|
|
@@ -6239,6 +6216,7 @@ function checkExpectations(expectations, value) {
|
|
|
6239
6216
|
*
|
|
6240
6217
|
* @param options - The validation options including result string, expectations, and format
|
|
6241
6218
|
* @returns Validation result with processed string and validity status
|
|
6219
|
+
*
|
|
6242
6220
|
* @private internal function of `createPipelineExecutor` and `cacheLlmTools`
|
|
6243
6221
|
*/
|
|
6244
6222
|
function validatePromptResult(options) {
|
|
@@ -6301,6 +6279,7 @@ function validatePromptResult(options) {
|
|
|
6301
6279
|
*
|
|
6302
6280
|
* @param options - The options for execution, including task, parameters, pipeline, and configuration.
|
|
6303
6281
|
* @returns The result string of the executed task.
|
|
6282
|
+
*
|
|
6304
6283
|
* @private internal utility of `createPipelineExecutor`
|
|
6305
6284
|
*/
|
|
6306
6285
|
async function executeAttempts(options) {
|
|
@@ -6624,9 +6603,7 @@ async function executeAttempts(options) {
|
|
|
6624
6603
|
}
|
|
6625
6604
|
return $ongoingTaskResult.$resultString;
|
|
6626
6605
|
}
|
|
6627
|
-
|
|
6628
|
-
* TODO: Break into smaller functions
|
|
6629
|
-
*/
|
|
6606
|
+
// TODO: Break into smaller functions
|
|
6630
6607
|
|
|
6631
6608
|
/**
|
|
6632
6609
|
* Executes a pipeline task that requires mapping or iterating over subvalues of a parameter (such as rows in a CSV).
|
|
@@ -6769,6 +6746,7 @@ async function executeFormatSubvalues(options) {
|
|
|
6769
6746
|
*
|
|
6770
6747
|
* @param task - The task for which the context is being generated. This should be a deeply immutable TaskJson object.
|
|
6771
6748
|
* @returns The context as a string, formatted as markdown and parameter value.
|
|
6749
|
+
*
|
|
6772
6750
|
* @private internal utility of `createPipelineExecutor`
|
|
6773
6751
|
*/
|
|
6774
6752
|
async function getContextForTask(task) {
|
|
@@ -6806,7 +6784,6 @@ function computeCosineSimilarity(embeddingVector1, embeddingVector2) {
|
|
|
6806
6784
|
}
|
|
6807
6785
|
|
|
6808
6786
|
/**
|
|
6809
|
-
*
|
|
6810
6787
|
* @param knowledgePieces
|
|
6811
6788
|
* @returns
|
|
6812
6789
|
*
|
|
@@ -6887,10 +6864,8 @@ async function getKnowledgeForTask(options) {
|
|
|
6887
6864
|
return knowledgePiecesToString(preparedPipeline.knowledgePieces);
|
|
6888
6865
|
}
|
|
6889
6866
|
}
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
* TODO: [♨] Examples of values
|
|
6893
|
-
*/
|
|
6867
|
+
// TODO: [♨] Implement Better - use keyword search
|
|
6868
|
+
// TODO: [♨] Examples of values
|
|
6894
6869
|
|
|
6895
6870
|
/**
|
|
6896
6871
|
* Retrieves all reserved parameters for a given pipeline task, including context, knowledge, examples, and metadata.
|
|
@@ -7043,9 +7018,7 @@ async function executeTask(options) {
|
|
|
7043
7018
|
resultString,
|
|
7044
7019
|
});
|
|
7045
7020
|
}
|
|
7046
|
-
|
|
7047
|
-
* TODO: [🤹♂️]
|
|
7048
|
-
*/
|
|
7021
|
+
// TODO: [🤹♂️]
|
|
7049
7022
|
|
|
7050
7023
|
/**
|
|
7051
7024
|
* Filters and returns only the output parameters from the provided pipeline execution options.
|
|
@@ -7375,6 +7348,7 @@ async function executePipeline(options) {
|
|
|
7375
7348
|
*
|
|
7376
7349
|
* @returns The executor function
|
|
7377
7350
|
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
7351
|
+
*
|
|
7378
7352
|
* @public exported from `@promptbook/core`
|
|
7379
7353
|
*/
|
|
7380
7354
|
function createPipelineExecutor(options) {
|
|
@@ -7549,14 +7523,13 @@ const markdownScraperMetadata = $deepFreeze({
|
|
|
7549
7523
|
* @public exported from `@promptbook/cli`
|
|
7550
7524
|
*/
|
|
7551
7525
|
$scrapersMetadataRegister.register(markdownScraperMetadata);
|
|
7552
|
-
|
|
7553
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7554
|
-
*/
|
|
7526
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7555
7527
|
|
|
7556
7528
|
/**
|
|
7557
7529
|
* Scraper for markdown files
|
|
7558
7530
|
*
|
|
7559
7531
|
* @see `documentationUrl` for more details
|
|
7532
|
+
*
|
|
7560
7533
|
* @public exported from `@promptbook/markdown-utils`
|
|
7561
7534
|
*/
|
|
7562
7535
|
class MarkdownScraper {
|
|
@@ -7689,10 +7662,8 @@ class MarkdownScraper {
|
|
|
7689
7662
|
return knowledge;
|
|
7690
7663
|
}
|
|
7691
7664
|
}
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
* Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7695
|
-
*/
|
|
7665
|
+
// TODO: [🪂] Do it in parallel 11:11
|
|
7666
|
+
// Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7696
7667
|
|
|
7697
7668
|
/**
|
|
7698
7669
|
* Metadata of the scraper
|
|
@@ -7719,15 +7690,14 @@ const documentScraperMetadata = $deepFreeze({
|
|
|
7719
7690
|
* @public exported from `@promptbook/cli`
|
|
7720
7691
|
*/
|
|
7721
7692
|
$scrapersMetadataRegister.register(documentScraperMetadata);
|
|
7722
|
-
|
|
7723
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7724
|
-
*/
|
|
7693
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7725
7694
|
|
|
7726
7695
|
// TODO: [🏳🌈] Finally take pick of .json vs .ts
|
|
7727
7696
|
/**
|
|
7728
7697
|
* Scraper of .docx and .odt files
|
|
7729
7698
|
*
|
|
7730
7699
|
* @see `documentationUrl` for more details
|
|
7700
|
+
*
|
|
7731
7701
|
* @public exported from `@promptbook/documents`
|
|
7732
7702
|
*/
|
|
7733
7703
|
class DocumentScraper {
|
|
@@ -7823,12 +7793,10 @@ class DocumentScraper {
|
|
|
7823
7793
|
return knowledge;
|
|
7824
7794
|
}
|
|
7825
7795
|
}
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
7831
|
-
*/
|
|
7796
|
+
// Note: [🟢] Code for Node scraper implementation [DocumentScraper](src/scrapers/document/DocumentScraper.ts) should never be published into packages that could be imported into browser environment
|
|
7797
|
+
// TODO: [👣] Converted documents can act as cached items - there is no need to run conversion each time
|
|
7798
|
+
// TODO: [🪂] Do it in parallel 11:11
|
|
7799
|
+
// Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7832
7800
|
|
|
7833
7801
|
/**
|
|
7834
7802
|
* Creates a scraper for document content.
|
|
@@ -7838,9 +7806,7 @@ class DocumentScraper {
|
|
|
7838
7806
|
const createDocumentScraper = Object.assign((tools, options) => {
|
|
7839
7807
|
return new DocumentScraper(tools, options);
|
|
7840
7808
|
}, documentScraperMetadata); /* <- Note: [🤛] */
|
|
7841
|
-
|
|
7842
|
-
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7843
|
-
*/
|
|
7809
|
+
// TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7844
7810
|
|
|
7845
7811
|
/**
|
|
7846
7812
|
* Registration of known scraper
|
|
@@ -7852,10 +7818,8 @@ const createDocumentScraper = Object.assign((tools, options) => {
|
|
|
7852
7818
|
* @public exported from `@promptbook/cli`
|
|
7853
7819
|
*/
|
|
7854
7820
|
const _DocumentScraperRegistration = $scrapersRegister.register(createDocumentScraper);
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7858
|
-
*/
|
|
7821
|
+
// TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7822
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7859
7823
|
|
|
7860
7824
|
export { BOOK_LANGUAGE_VERSION, DocumentScraper, PROMPTBOOK_ENGINE_VERSION, _DocumentScraperRegistration, createDocumentScraper };
|
|
7861
7825
|
//# sourceMappingURL=index.es.js.map
|