@promptbook/documents 0.112.0-34 → 0.112.0-36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -0
- package/esm/index.es.js +272 -306
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/types.index.d.ts +45 -45
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -4
- package/esm/src/book-2.0/agent-source/AgentModelRequirements.d.ts +0 -4
- package/esm/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/createTeamToolName.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/padBook.d.ts +1 -4
- package/esm/src/book-2.0/agent-source/parseAgentSource.d.ts +0 -3
- package/esm/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/parseParameters.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/parseTeamCommitment.d.ts +0 -3
- package/esm/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +8 -3
- package/esm/src/book-2.0/agent-source/string_book.d.ts +1 -0
- package/esm/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +0 -3
- package/esm/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +0 -3
- package/esm/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +0 -3
- package/esm/src/book-components/AvatarProfile/AvatarProfile/AvatarProfileTooltip.d.ts +4 -0
- package/esm/src/book-components/BookEditor/BookEditor.d.ts +0 -3
- package/esm/src/book-components/BookEditor/BookEditorActionbar.d.ts +4 -0
- package/esm/src/book-components/BookEditor/BookEditorMonaco.d.ts +2 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +3 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +1 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoDecorations.d.ts +6 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoDiagnostics.d.ts +9 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +7 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +3 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +24 -0
- package/esm/src/book-components/Chat/AgentChat/AgentChat.d.ts +0 -3
- package/esm/src/book-components/Chat/AgentChip/AgentChip.d.ts +6 -5
- package/esm/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +4 -8
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +2 -3
- package/esm/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +0 -3
- package/esm/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +0 -3
- package/esm/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/chatCssClassNames.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/constants.d.ts +4 -3
- package/esm/src/book-components/Chat/Chat/insertDictationChunk.d.ts +16 -0
- package/esm/src/book-components/Chat/Chat/learnDictationDictionary.d.ts +7 -0
- package/esm/src/book-components/Chat/Chat/refineFinalDictationChunk.d.ts +36 -0
- package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +3 -0
- package/esm/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
- package/esm/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +7 -30
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +20 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +29 -0
- package/esm/src/book-components/Chat/LlmChat/defaults.d.ts +0 -3
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +3 -3
- package/esm/src/book-components/Chat/MockedChat/constants.d.ts +0 -3
- package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +4 -3
- package/esm/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +3 -0
- package/esm/src/book-components/Chat/effects/components/HeartsEffect.d.ts +3 -0
- package/esm/src/book-components/Chat/effects/index.d.ts +0 -4
- package/esm/src/book-components/Chat/effects/utils/detectEffects.d.ts +1 -0
- package/esm/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +4 -4
- package/esm/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -0
- package/esm/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +0 -3
- package/esm/src/book-components/Chat/save/index.d.ts +0 -3
- package/esm/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +1 -0
- package/esm/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +0 -4
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +3 -5
- package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +0 -3
- package/esm/src/book-components/Chat/utils/ExportFormat.d.ts +2 -0
- package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +4 -3
- package/esm/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/exportChatHistory.d.ts +0 -3
- package/esm/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +2 -1
- package/esm/src/book-components/Chat/utils/loadAgentProfile.d.ts +12 -0
- package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +0 -3
- package/esm/src/book-components/Chat/utils/parseImagePrompts.d.ts +1 -3
- package/esm/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +14 -0
- package/esm/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +3 -0
- package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +0 -3
- package/esm/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +3 -3
- package/esm/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +3 -5
- package/esm/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -5
- package/esm/src/book-components/Qr/BrandedQrCode.d.ts +5 -0
- package/esm/src/book-components/Qr/GenericQrCode.d.ts +5 -0
- package/esm/src/book-components/Qr/PromptbookQrCode.d.ts +5 -0
- package/esm/src/book-components/Qr/useQrCode.d.ts +4 -1
- package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +4 -0
- package/esm/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +4 -0
- package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +3 -3
- package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -3
- package/esm/src/book-components/_common/Tooltip/Tooltip.d.ts +3 -0
- package/esm/src/book-components/icons/AboutIcon.d.ts +1 -0
- package/esm/src/book-components/icons/AttachmentIcon.d.ts +4 -0
- package/esm/src/book-components/icons/CameraIcon.d.ts +4 -0
- package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -0
- package/esm/src/book-components/icons/EmailIcon.d.ts +1 -0
- package/esm/src/book-components/icons/MenuIcon.d.ts +1 -3
- package/esm/src/book-components/icons/SaveIcon.d.ts +1 -0
- package/esm/src/book-components/icons/SendIcon.d.ts +0 -3
- package/esm/src/book-components/icons/TeacherIcon.d.ts +1 -0
- package/esm/src/cli/$runPromptbookCli.d.ts +0 -1
- package/esm/src/cli/cli-commands/_boilerplate.d.ts +0 -2
- package/esm/src/cli/cli-commands/about.d.ts +0 -6
- package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +18 -0
- package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +127 -0
- package/esm/src/cli/cli-commands/coder/boilerplateTemplates.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +0 -2
- package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -2
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +10 -2
- package/esm/src/cli/cli-commands/coder/init.d.ts +38 -2
- package/esm/src/cli/cli-commands/coder/run.d.ts +1 -3
- package/esm/src/cli/cli-commands/coder/run.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/verify.d.ts +0 -2
- package/esm/src/cli/cli-commands/coder.d.ts +0 -2
- package/esm/src/cli/cli-commands/common/handleActionErrors.d.ts +4 -0
- package/esm/src/cli/cli-commands/hello.d.ts +0 -5
- package/esm/src/cli/cli-commands/list-models.d.ts +0 -2
- package/esm/src/cli/cli-commands/list-scrapers.d.ts +0 -2
- package/esm/src/cli/cli-commands/login.d.ts +0 -5
- package/esm/src/cli/cli-commands/prettify.d.ts +0 -6
- package/esm/src/cli/cli-commands/run.d.ts +0 -8
- package/esm/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -5
- package/esm/src/cli/cli-commands/start-agents-server.d.ts +0 -2
- package/esm/src/cli/cli-commands/start-pipelines-server.d.ts +0 -5
- package/esm/src/cli/cli-commands/test-command.d.ts +0 -7
- package/esm/src/cli/common/$provideLlmToolsForCli.d.ts +5 -0
- package/esm/src/cli/main.d.ts +0 -2
- package/esm/src/cli/promptbookCli.d.ts +0 -7
- package/esm/src/collection/agent-collection/AgentCollection.d.ts +0 -3
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -6
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +3 -0
- package/esm/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +2 -1
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -5
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +1 -0
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts +4 -3
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +2 -3
- package/esm/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -0
- package/esm/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +0 -3
- package/esm/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -0
- package/esm/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -0
- package/esm/src/commands/EXPECT/ExpectCommand.d.ts +0 -3
- package/esm/src/commands/EXPECT/expectCommandParser.d.ts +3 -2
- package/esm/src/commands/FOREACH/ForeachCommand.d.ts +1 -0
- package/esm/src/commands/FOREACH/foreachCommandParser.d.ts +1 -3
- package/esm/src/commands/FORMAT/formatCommandParser.d.ts +1 -0
- package/esm/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -0
- package/esm/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -0
- package/esm/src/commands/JOKER/JokerCommand.d.ts +1 -0
- package/esm/src/commands/JOKER/jokerCommandParser.d.ts +1 -0
- package/esm/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -0
- package/esm/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -3
- package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +0 -3
- package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.test.d.ts +0 -3
- package/esm/src/commands/MODEL/ModelCommand.d.ts +1 -0
- package/esm/src/commands/MODEL/modelCommandParser.d.ts +1 -0
- package/esm/src/commands/PARAMETER/ParameterCommand.d.ts +1 -0
- package/esm/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -0
- package/esm/src/commands/PERSONA/PersonaCommand.d.ts +1 -0
- package/esm/src/commands/PERSONA/personaCommandParser.d.ts +1 -0
- package/esm/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -0
- package/esm/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -0
- package/esm/src/commands/SECTION/SectionCommand.d.ts +1 -0
- package/esm/src/commands/SECTION/sectionCommandParser.d.ts +1 -0
- package/esm/src/commands/URL/UrlCommand.d.ts +1 -0
- package/esm/src/commands/URL/urlCommandParser.d.ts +1 -0
- package/esm/src/commands/X_ACTION/ActionCommand.d.ts +1 -0
- package/esm/src/commands/X_ACTION/actionCommandParser.d.ts +1 -3
- package/esm/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -0
- package/esm/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -3
- package/esm/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +1 -0
- package/esm/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
- package/esm/src/commands/_common/stringifyCommand.d.ts +1 -1
- package/esm/src/commands/_common/types/CommandParser.d.ts +0 -4
- package/esm/src/commands/index.d.ts +0 -3
- package/esm/src/commitments/ACTION/ACTION.d.ts +0 -3
- package/esm/src/commitments/CLOSED/CLOSED.d.ts +0 -3
- package/esm/src/commitments/CLOSED/CLOSED.test.d.ts +0 -3
- package/esm/src/commitments/COMPONENT/COMPONENT.d.ts +0 -3
- package/esm/src/commitments/DELETE/DELETE.d.ts +0 -3
- package/esm/src/commitments/DICTIONARY/DICTIONARY.d.ts +0 -3
- package/esm/src/commitments/FORMAT/FORMAT.d.ts +0 -3
- package/esm/src/commitments/FROM/FROM.d.ts +0 -3
- package/esm/src/commitments/GOAL/GOAL.d.ts +0 -3
- package/esm/src/commitments/IMPORT/IMPORT.d.ts +0 -3
- package/esm/src/commitments/LANGUAGE/LANGUAGE.d.ts +0 -3
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -3
- package/esm/src/commitments/MESSAGE/MESSAGE.d.ts +0 -3
- package/esm/src/commitments/MESSAGE_SUFFIX/MESSAGE_SUFFIX.d.ts +0 -3
- package/esm/src/commitments/META/META.d.ts +0 -3
- package/esm/src/commitments/META/META_DESCRIPTION.d.ts +0 -3
- package/esm/src/commitments/META_COLOR/META_COLOR.d.ts +0 -3
- package/esm/src/commitments/META_DISCLAIMER/META_DISCLAIMER.d.ts +0 -3
- package/esm/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +0 -3
- package/esm/src/commitments/META_FONT/META_FONT.d.ts +0 -3
- package/esm/src/commitments/META_IMAGE/META_IMAGE.d.ts +0 -3
- package/esm/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +0 -3
- package/esm/src/commitments/META_LINK/META_LINK.d.ts +0 -3
- package/esm/src/commitments/META_VOICE/META_VOICE.d.ts +0 -3
- package/esm/src/commitments/MODEL/MODEL.d.ts +0 -3
- package/esm/src/commitments/OPEN/OPEN.d.ts +0 -3
- package/esm/src/commitments/PERSONA/PERSONA.d.ts +0 -3
- package/esm/src/commitments/RULE/RULE.d.ts +0 -3
- package/esm/src/commitments/SAMPLE/SAMPLE.d.ts +0 -3
- package/esm/src/commitments/SCENARIO/SCENARIO.d.ts +0 -3
- package/esm/src/commitments/TEAM/TEAM.d.ts +0 -3
- package/esm/src/commitments/TEMPLATE/TEMPLATE.d.ts +0 -3
- package/esm/src/commitments/USE/USE.d.ts +0 -3
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +2 -0
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -3
- package/esm/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +4 -5
- package/esm/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +0 -3
- package/esm/src/commitments/USE_CALENDAR/calendarReference.d.ts +0 -3
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -3
- package/esm/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +0 -3
- package/esm/src/commitments/USE_MCP/USE_MCP.d.ts +0 -3
- package/esm/src/commitments/USE_POPUP/USE_POPUP.d.ts +0 -3
- package/esm/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +0 -3
- package/esm/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +0 -3
- package/esm/src/commitments/USE_PROJECT/projectReference.d.ts +0 -3
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -3
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -3
- package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -3
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -3
- package/esm/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +0 -3
- package/esm/src/commitments/WALLET/WALLET.d.ts +0 -3
- package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +0 -3
- package/esm/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +0 -3
- package/esm/src/commitments/_base/createEmptyAgentModelRequirements.d.ts +0 -3
- package/esm/src/commitments/_common/commitmentToolFunctions.d.ts +2 -3
- package/esm/src/commitments/_common/createWritingCommitmentSections.d.ts +2 -3
- package/esm/src/commitments/_common/getAllCommitmentDefinitions.d.ts +1 -0
- package/esm/src/commitments/_common/getAllCommitmentTypes.d.ts +1 -0
- package/esm/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +0 -4
- package/esm/src/commitments/_common/getCommitmentDefinition.d.ts +1 -0
- package/esm/src/commitments/_common/isCommitmentSupported.d.ts +1 -0
- package/esm/src/commitments/_common/toolExecutionEnvelope.d.ts +0 -3
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +3 -3
- package/esm/src/commitments/index.d.ts +0 -4
- package/esm/src/config.test.d.ts +0 -3
- package/esm/src/constants/streaming.d.ts +0 -3
- package/esm/src/constants.d.ts +0 -3
- package/esm/src/conversion/archive/loadArchive.d.ts +0 -1
- package/esm/src/conversion/archive/saveArchive.d.ts +0 -5
- package/esm/src/conversion/compilePipeline.d.ts +2 -7
- package/esm/src/conversion/compilePipelineOnRemoteServer.d.ts +2 -5
- package/esm/src/conversion/parsePipeline.d.ts +1 -11
- package/esm/src/conversion/pipelineJsonToString.d.ts +1 -7
- package/esm/src/conversion/prettify/prettifyPipelineString.d.ts +0 -4
- package/esm/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -7
- package/esm/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -3
- package/esm/src/conversion/validation/_importPipeline.d.ts +6 -2
- package/esm/src/conversion/validation/pipelineStringToJson-parseErrors.test.d.ts +0 -3
- package/esm/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -3
- package/esm/src/conversion/validation/validatePipeline.d.ts +3 -9
- package/esm/src/conversion/validation/validatePipeline.test.d.ts +0 -3
- package/esm/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -2
- package/esm/src/errors/0-BoilerplateError.d.ts +0 -3
- package/esm/src/errors/0-index.d.ts +0 -3
- package/esm/src/errors/DatabaseError.d.ts +0 -3
- package/esm/src/errors/ExpectError.d.ts +2 -1
- package/esm/src/errors/ParseError.d.ts +0 -3
- package/esm/src/errors/PipelineExecutionError.d.ts +0 -3
- package/esm/src/executables/$provideExecutablesForNode.d.ts +0 -5
- package/esm/src/executables/apps/locateLibreoffice.d.ts +0 -2
- package/esm/src/executables/apps/locatePandoc.d.ts +0 -2
- package/esm/src/executables/browsers/locateBrowser.d.ts +0 -1
- package/esm/src/executables/browsers/locateDefaultSystemBrowser.d.ts +0 -1
- package/esm/src/executables/locateApp.d.ts +0 -2
- package/esm/src/executables/platforms/locateAppOnLinux.d.ts +0 -2
- package/esm/src/executables/platforms/locateAppOnMacOs.d.ts +0 -2
- package/esm/src/executables/platforms/locateAppOnWindows.d.ts +0 -2
- package/esm/src/execution/AbstractTaskResult.d.ts +0 -4
- package/esm/src/execution/AvailableModel.d.ts +0 -4
- package/esm/src/execution/CommonToolsOptions.d.ts +0 -5
- package/esm/src/execution/ExecutionTask.d.ts +4 -4
- package/esm/src/execution/FilesystemTools.d.ts +0 -3
- package/esm/src/execution/LlmExecutionTools.d.ts +3 -9
- package/esm/src/execution/LlmExecutionToolsConstructor.d.ts +0 -3
- package/esm/src/execution/PipelineExecutor.d.ts +0 -3
- package/esm/src/execution/PipelineExecutorResult.d.ts +0 -3
- package/esm/src/execution/PromptResult.d.ts +1 -9
- package/esm/src/execution/PromptbookFetch.test-type.d.ts +0 -4
- package/esm/src/execution/ScriptExecutionTools.d.ts +0 -4
- package/esm/src/execution/Usage.d.ts +0 -3
- package/esm/src/execution/UserInterfaceTools.d.ts +3 -0
- package/esm/src/execution/assertsTaskSuccessful.d.ts +1 -3
- package/esm/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +1 -0
- package/esm/src/execution/createPipelineExecutor/20-executeTask.d.ts +0 -3
- package/esm/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -3
- package/esm/src/execution/createPipelineExecutor/getContextForTask.d.ts +1 -0
- package/esm/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +0 -4
- package/esm/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +0 -1
- package/esm/src/execution/execution-report/ExecutionReportJson.d.ts +1 -0
- package/esm/src/execution/execution-report/ExecutionReportString.d.ts +0 -3
- package/esm/src/execution/execution-report/executionReportJsonToString.d.ts +0 -5
- package/esm/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -1
- package/esm/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -1
- package/esm/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -1
- package/esm/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +2 -0
- package/esm/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -3
- package/esm/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
- package/esm/src/execution/utils/checkExpectations.d.ts +2 -5
- package/esm/src/execution/utils/forEachAsync.d.ts +5 -1
- package/esm/src/execution/utils/usage-constants.d.ts +0 -3
- package/esm/src/execution/utils/usageToHuman.d.ts +0 -8
- package/esm/src/execution/utils/validatePromptResult.d.ts +1 -0
- package/esm/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -0
- package/esm/src/formats/_common/FormatParser.d.ts +2 -9
- package/esm/src/formats/_common/FormatSubvalueParser.d.ts +0 -3
- package/esm/src/formats/csv/CsvFormatParser.d.ts +2 -8
- package/esm/src/formats/index.d.ts +0 -3
- package/esm/src/formats/json/JsonFormatParser.d.ts +0 -11
- package/esm/src/formats/text/TextFormatParser.d.ts +0 -9
- package/esm/src/formats/xml/XmlFormatParser.d.ts +0 -11
- package/esm/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +1 -3
- package/esm/src/formfactors/_common/FormfactorDefinition.d.ts +1 -0
- package/esm/src/formfactors/index.d.ts +0 -3
- package/esm/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +0 -5
- package/esm/src/high-level-abstractions/index.d.ts +0 -4
- package/esm/src/high-level-abstractions/quick-chatbot/QuickChatbotHla.d.ts +0 -3
- package/esm/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +2 -3
- package/esm/src/llm-providers/_common/register/$llmToolsRegister.d.ts +2 -3
- package/esm/src/llm-providers/_common/register/$provideEnvFilename.d.ts +0 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +3 -6
- package/esm/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -7
- package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -16
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +0 -4
- package/esm/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +0 -5
- package/esm/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +0 -6
- package/esm/src/llm-providers/_common/register/LlmToolsOptions.d.ts +0 -4
- package/esm/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -0
- package/esm/src/llm-providers/_common/utils/assertUniqueModels.d.ts +0 -3
- package/esm/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -3
- package/esm/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -0
- package/esm/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -4
- package/esm/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -0
- package/esm/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -7
- package/esm/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +4 -0
- package/esm/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +1 -0
- package/esm/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +3 -7
- package/esm/src/llm-providers/_multiple/playground/playground.d.ts +0 -1
- package/esm/src/llm-providers/agent/Agent.d.ts +0 -3
- package/esm/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/agent/RemoteAgent.d.ts +0 -4
- package/esm/src/llm-providers/agent/playground/playground.d.ts +0 -6
- package/esm/src/llm-providers/agent/register-configuration.d.ts +0 -5
- package/esm/src/llm-providers/agent/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -10
- package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +3 -3
- package/esm/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -8
- package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +1 -3
- package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +0 -3
- package/esm/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +0 -7
- package/esm/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -5
- package/esm/src/llm-providers/anthropic-claude/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/anthropic-claude/register-constructor.d.ts +0 -5
- package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -6
- package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
- package/esm/src/llm-providers/azure-openai/createAzureOpenAiExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/azure-openai/playground/playground.d.ts +0 -2
- package/esm/src/llm-providers/azure-openai/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/azure-openai/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +1 -0
- package/esm/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -3
- package/esm/src/llm-providers/deepseek/deepseek-models.d.ts +1 -6
- package/esm/src/llm-providers/deepseek/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/deepseek/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +1 -0
- package/esm/src/llm-providers/google/createGoogleExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/google/google-models.d.ts +1 -6
- package/esm/src/llm-providers/google/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/google/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -5
- package/esm/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -3
- package/esm/src/llm-providers/mocked/test/joker.test.d.ts +0 -3
- package/esm/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -4
- package/esm/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -3
- package/esm/src/llm-providers/ollama/OllamaExecutionTools.d.ts +0 -3
- package/esm/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +1 -0
- package/esm/src/llm-providers/ollama/ollama-models.d.ts +1 -4
- package/esm/src/llm-providers/ollama/playground/playground.d.ts +0 -2
- package/esm/src/llm-providers/ollama/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/ollama/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +10 -0
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -8
- package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -7
- package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +2 -0
- package/esm/src/llm-providers/openai/computeOpenAiUsage.d.ts +1 -3
- package/esm/src/llm-providers/openai/computeOpenAiUsage.test.d.ts +0 -3
- package/esm/src/llm-providers/openai/createOpenAiAssistantExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/openai/createOpenAiExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/esm/src/llm-providers/openai/openai-models.test.d.ts +0 -3
- package/esm/src/llm-providers/openai/playground/playground.d.ts +0 -2
- package/esm/src/llm-providers/openai/register-configuration.d.ts +0 -3
- package/esm/src/llm-providers/openai/register-constructor.d.ts +0 -4
- package/esm/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -9
- package/esm/src/llm-providers/remote/playground/playground.d.ts +0 -1
- package/esm/src/llm-providers/vercel/playground/playground.d.ts +0 -2
- package/esm/src/other/templates/getBookTemplates.d.ts +2 -5
- package/esm/src/personas/preparePersona.d.ts +1 -7
- package/esm/src/pipeline/PipelineInterface/PipelineInterface.d.ts +1 -0
- package/esm/src/pipeline/PipelineInterface/constants.d.ts +0 -3
- package/esm/src/pipeline/PipelineJson/CommonTaskJson.d.ts +0 -4
- package/esm/src/pipeline/PipelineJson/DialogTaskJson.d.ts +1 -3
- package/esm/src/pipeline/PipelineJson/Expectations.d.ts +4 -3
- package/esm/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +0 -4
- package/esm/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +0 -3
- package/esm/src/pipeline/PipelineJson/PersonaJson.d.ts +0 -3
- package/esm/src/pipeline/PipelineJson/PreparationJson.d.ts +3 -5
- package/esm/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +1 -4
- package/esm/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +1 -3
- package/esm/src/pipeline/book-notation.d.ts +1 -4
- package/esm/src/pipeline/isValidPipelineString.d.ts +1 -3
- package/esm/src/pipeline/isValidPipelineString.test.d.ts +0 -3
- package/esm/src/pipeline/prompt-notation/helpers/ParameterEscaping.d.ts +5 -0
- package/esm/src/pipeline/prompt-notation/helpers/ParameterNaming.d.ts +1 -0
- package/esm/src/pipeline/prompt-notation/helpers/ParameterSection.d.ts +2 -0
- package/esm/src/pipeline/prompt-notation.d.ts +2 -5
- package/esm/src/pipeline/prompt-notation.test.d.ts +0 -3
- package/esm/src/pipeline/validatePipelineString.d.ts +1 -3
- package/esm/src/playground/permanent/_boilerplate.d.ts +0 -1
- package/esm/src/playground/permanent/agent-with-browser-playground.d.ts +0 -1
- package/esm/src/playground/permanent/error-handling-playground.d.ts +0 -1
- package/esm/src/playground/playground.d.ts +0 -2
- package/esm/src/postprocessing/utils/extractBlock.d.ts +2 -1
- package/esm/src/postprocessing/utils/extractJsonBlock.d.ts +2 -5
- package/esm/src/prepare/PrepareAndScrapeOptions.d.ts +0 -4
- package/esm/src/prepare/preparePipeline.d.ts +3 -2
- package/esm/src/prepare/preparePipelineOnRemoteServer.d.ts +2 -5
- package/esm/src/prepare/prepareTasks.d.ts +6 -10
- package/esm/src/prepare/unpreparePipeline.d.ts +1 -5
- package/esm/src/remote-server/RemoteServer.d.ts +3 -0
- package/esm/src/remote-server/openapi.d.ts +3 -4
- package/esm/src/remote-server/socket-types/_subtypes/Identification.d.ts +1 -5
- package/esm/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +0 -3
- package/esm/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +0 -3
- package/esm/src/remote-server/startAgentServer.d.ts +6 -2
- package/esm/src/remote-server/startRemoteServer.d.ts +1 -15
- package/esm/src/remote-server/types/RemoteClientOptions.d.ts +0 -5
- package/esm/src/remote-server/types/RemoteServerOptions.d.ts +10 -4
- package/esm/src/remote-server/ui/ServerApp.d.ts +1 -0
- package/esm/src/remote-server/ui/types.d.ts +3 -0
- package/esm/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +1 -4
- package/esm/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
- package/esm/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/_boilerplate/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/_boilerplate/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/_common/Scraper.d.ts +0 -5
- package/esm/src/scrapers/_common/ScraperIntermediateSource.d.ts +0 -3
- package/esm/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -0
- package/esm/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +0 -2
- package/esm/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -2
- package/esm/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -2
- package/esm/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +0 -3
- package/esm/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +2 -3
- package/esm/src/scrapers/_common/register/$scrapersRegister.d.ts +2 -3
- package/esm/src/scrapers/_common/register/ScraperConstructor.d.ts +0 -3
- package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +0 -7
- package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +0 -3
- package/esm/src/scrapers/_common/utils/promptbookFetch.d.ts +0 -3
- package/esm/src/scrapers/document/DocumentScraper.d.ts +1 -6
- package/esm/src/scrapers/document/DocumentScraper.test.d.ts +0 -3
- package/esm/src/scrapers/document/createDocumentScraper.d.ts +0 -3
- package/esm/src/scrapers/document/playground/document-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/document/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/document/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -6
- package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +0 -3
- package/esm/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +0 -3
- package/esm/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/document-legacy/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/document-legacy/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/markdown/MarkdownScraper.d.ts +1 -4
- package/esm/src/scrapers/markdown/MarkdownScraper.test.d.ts +0 -3
- package/esm/src/scrapers/markdown/createMarkdownScraper.d.ts +0 -3
- package/esm/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/markdown/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/markdown/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -7
- package/esm/src/scrapers/markitdown/createMarkitdownScraper.d.ts +0 -4
- package/esm/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/markitdown/register-constructor.d.ts +0 -5
- package/esm/src/scrapers/markitdown/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/pdf/PdfScraper.d.ts +1 -6
- package/esm/src/scrapers/pdf/createPdfScraper.d.ts +0 -3
- package/esm/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/pdf/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/pdf/register-metadata.d.ts +0 -3
- package/esm/src/scrapers/website/WebsiteScraper.d.ts +1 -6
- package/esm/src/scrapers/website/createWebsiteScraper.d.ts +0 -3
- package/esm/src/scrapers/website/playground/website-scraper-playground.d.ts +0 -1
- package/esm/src/scrapers/website/register-constructor.d.ts +0 -4
- package/esm/src/scrapers/website/register-metadata.d.ts +0 -3
- package/esm/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -5
- package/esm/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -3
- package/esm/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
- package/esm/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -3
- package/esm/src/scripting/javascript/postprocessing-functions.d.ts +0 -4
- package/esm/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -3
- package/esm/src/search-engines/SearchEngine.d.ts +3 -0
- package/esm/src/speech-recognition/BrowserSpeechRecognition.d.ts +0 -2
- package/esm/src/speech-recognition/OpenAiSpeechRecognition.d.ts +2 -2
- package/esm/src/storage/_common/PromptbookStorage.d.ts +0 -4
- package/esm/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -4
- package/esm/src/storage/env-storage/$EnvStorage.d.ts +0 -3
- package/esm/src/storage/file-cache-storage/FileCacheStorage.d.ts +0 -2
- package/esm/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -1
- package/esm/src/storage/local-storage/getLocalStorage.d.ts +0 -1
- package/esm/src/storage/local-storage/getSessionStorage.d.ts +0 -1
- package/esm/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +1 -0
- package/esm/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -4
- package/esm/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -3
- package/esm/src/transpilers/formatted-book-in-markdown/register.d.ts +2 -5
- package/esm/src/transpilers/openai-sdk/playground/playground.d.ts +0 -1
- package/esm/src/transpilers/openai-sdk/register.d.ts +2 -5
- package/esm/src/types/Arrayable.d.ts +1 -0
- package/esm/src/types/InputParameters_private.d.ts +4 -2
- package/esm/src/types/IntermediateFilesStrategy.d.ts +0 -3
- package/esm/src/types/LlmCall.d.ts +0 -3
- package/esm/src/types/ModelRequirements.d.ts +1 -0
- package/esm/src/types/ModelVariant.d.ts +3 -0
- package/esm/src/types/Parameters.d.ts +31 -0
- package/esm/src/types/Parameters_private.d.ts +4 -2
- package/esm/src/types/Prompt.d.ts +1 -6
- package/esm/src/types/ReservedParameters_private.d.ts +2 -1
- package/esm/src/types/ToolCall.d.ts +0 -2
- package/esm/src/types/Updatable.d.ts +1 -3
- package/esm/src/types/string_agent_hash_private.d.ts +1 -1
- package/esm/src/types/string_agent_name.d.ts +32 -0
- package/esm/src/types/string_agent_name_in_book_private.d.ts +1 -1
- package/esm/src/types/string_agent_name_private.d.ts +2 -1
- package/esm/src/types/string_agent_permanent_id_private.d.ts +2 -1
- package/esm/src/types/string_business_category_name.d.ts +5 -0
- package/esm/src/types/string_business_category_name_private.d.ts +1 -1
- package/esm/src/types/string_char_private.d.ts +1 -1
- package/esm/src/types/string_chat_prompt_private.d.ts +1 -1
- package/esm/src/types/string_completion_prompt_private.d.ts +1 -1
- package/esm/src/types/string_markdown.d.ts +0 -1
- package/esm/src/types/string_mime_type_private.d.ts +1 -0
- package/esm/src/types/string_model_description_private.d.ts +1 -1
- package/esm/src/types/string_model_name.d.ts +7 -0
- package/esm/src/types/string_model_name_private.d.ts +1 -1
- package/esm/src/types/string_name.d.ts +31 -0
- package/esm/src/types/string_name_private.d.ts +1 -1
- package/esm/src/types/string_page.d.ts +15 -0
- package/esm/src/types/string_page_private.d.ts +1 -1
- package/esm/src/types/string_parameter_name.d.ts +11 -210
- package/esm/src/types/string_parameter_value_private.d.ts +1 -1
- package/esm/src/types/string_persona_description.d.ts +14 -0
- package/esm/src/types/string_persona_description_private.d.ts +1 -1
- package/esm/src/types/string_prompt.d.ts +49 -0
- package/esm/src/types/string_prompt_image_private.d.ts +1 -1
- package/esm/src/types/string_prompt_private.d.ts +1 -1
- package/esm/src/types/string_reserved_parameter_name_private.d.ts +1 -1
- package/esm/src/types/string_sha256.d.ts +2 -2
- package/esm/src/types/string_system_message_private.d.ts +1 -1
- package/esm/src/types/string_template_private.d.ts +1 -1
- package/esm/src/types/string_text_prompt_private.d.ts +1 -1
- package/esm/src/types/string_title.d.ts +8 -0
- package/esm/src/types/string_title_private.d.ts +1 -1
- package/esm/src/types/typeAliasEmoji.d.ts +0 -3
- package/esm/src/types/typeAliases.d.ts +0 -6
- package/esm/src/utils/DEFAULT_THINKING_MESSAGES.d.ts +5 -1
- package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +1 -0
- package/esm/src/utils/chat/chatAttachments.d.ts +0 -3
- package/esm/src/utils/chat/constants.d.ts +0 -3
- package/esm/src/utils/clientVersion.d.ts +0 -3
- package/esm/src/utils/color/$randomColor.d.ts +0 -5
- package/esm/src/utils/color/css-colors.d.ts +0 -3
- package/esm/src/utils/color/internal-utils/hslToRgb.d.ts +0 -3
- package/esm/src/utils/color/internal-utils/rgbToHsl.d.ts +0 -3
- package/esm/src/utils/color/operators/ColorTransformer.d.ts +2 -0
- package/esm/src/utils/color/operators/lighten.d.ts +0 -3
- package/esm/src/utils/color/operators/saturate.d.ts +0 -3
- package/esm/src/utils/color/utils/areColorsEqual.d.ts +0 -3
- package/esm/src/utils/color/utils/colorDistance.d.ts +2 -2
- package/esm/src/utils/color/utils/colorHue.d.ts +0 -1
- package/esm/src/utils/color/utils/colorHueDistance.d.ts +0 -1
- package/esm/src/utils/color/utils/colorToDataUrl.d.ts +0 -3
- package/esm/src/utils/database/uniqueConstraint.d.ts +1 -3
- package/esm/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +3 -4
- package/esm/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +0 -3
- package/esm/src/utils/editable/types/PipelineEditableSerialized.d.ts +2 -2
- package/esm/src/utils/editable/utils/renamePipelineParameter.d.ts +4 -3
- package/esm/src/utils/editable/utils/stringifyPipelineJson.d.ts +0 -6
- package/esm/src/utils/environment/$detectRuntimeEnvironment.d.ts +0 -3
- package/esm/src/utils/environment/$getGlobalScope.d.ts +1 -1
- package/esm/src/utils/environment/$isRunningInBrowser.d.ts +0 -3
- package/esm/src/utils/environment/$isRunningInJest.d.ts +0 -3
- package/esm/src/utils/environment/$isRunningInNode.d.ts +0 -3
- package/esm/src/utils/environment/$isRunningInWebWorker.d.ts +0 -3
- package/esm/src/utils/execCommand/$execCommand.d.ts +0 -2
- package/esm/src/utils/execCommand/$execCommands.d.ts +0 -1
- package/esm/src/utils/execCommand/ExecCommandOptions.d.ts +3 -4
- package/esm/src/utils/expectation-counters/constants.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countCharacters.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countLines.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countPages.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countParagraphs.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countSentences.d.ts +0 -4
- package/esm/src/utils/expectation-counters/countWords.d.ts +0 -5
- package/esm/src/utils/expectation-counters/index.d.ts +0 -4
- package/esm/src/utils/files/$induceBookDownload.d.ts +0 -1
- package/esm/src/utils/files/$induceFileDownload.d.ts +0 -1
- package/esm/src/utils/files/ObjectUrl.d.ts +0 -1
- package/esm/src/utils/files/isDirectoryExisting.d.ts +0 -6
- package/esm/src/utils/files/isExecutable.d.ts +0 -4
- package/esm/src/utils/files/isFileExisting.d.ts +0 -5
- package/esm/src/utils/files/listAllFiles.d.ts +1 -5
- package/esm/src/utils/files/readResponseBytes.d.ts +1 -0
- package/esm/src/utils/knowledge/inlineKnowledgeSource.d.ts +11 -6
- package/esm/src/utils/knowledge/simplifyKnowledgeLabel.d.ts +2 -0
- package/esm/src/utils/linguistic-hash/linguisticHash.d.ts +2 -1
- package/esm/src/utils/linguistic-hash/linguisticHashTypes.d.ts +0 -3
- package/esm/src/utils/linguistic-hash/linguisticHashWords.cs.d.ts +0 -3
- package/esm/src/utils/linguistic-hash/linguisticHashWords.en.d.ts +0 -3
- package/esm/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -3
- package/esm/src/utils/markdown/createMarkdownTable.d.ts +0 -3
- package/esm/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -3
- package/esm/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -3
- package/esm/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -0
- package/esm/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -4
- package/esm/src/utils/markdown/humanizeAiText.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextEllipsis.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextEmdashed.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextQuotes.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextSources.d.ts +0 -3
- package/esm/src/utils/markdown/humanizeAiTextWhitespace.d.ts +0 -3
- package/esm/src/utils/markdown/prettifyMarkdown.d.ts +4 -2
- package/esm/src/utils/markdown/promptbookifyAiText.d.ts +0 -3
- package/esm/src/utils/markdown/removeMarkdownComments.d.ts +1 -0
- package/esm/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
- package/esm/src/utils/markdown/removeMarkdownLinks.d.ts +1 -0
- package/esm/src/utils/markdown/trimCodeBlock.d.ts +1 -1
- package/esm/src/utils/markdown/trimEndOfCodeBlock.d.ts +1 -1
- package/esm/src/utils/misc/$getCurrentDate.d.ts +1 -0
- package/esm/src/utils/misc/aboutPromptbookInformation.d.ts +3 -3
- package/esm/src/utils/misc/computeHash.d.ts +0 -3
- package/esm/src/utils/misc/debounce.d.ts +2 -0
- package/esm/src/utils/misc/emojis.d.ts +3 -8
- package/esm/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +7 -2
- package/esm/src/utils/misc/parseNumber.d.ts +0 -4
- package/esm/src/utils/misc/xAboutPromptbookInformation.d.ts +3 -4
- package/esm/src/utils/normalization/IKeywords.d.ts +0 -3
- package/esm/src/utils/normalization/nameToUriPart.d.ts +1 -0
- package/esm/src/utils/normalization/nameToUriParts.d.ts +1 -0
- package/esm/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -3
- package/esm/src/utils/normalization/normalizeTo_PascalCase.d.ts +2 -0
- package/esm/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
- package/esm/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -3
- package/esm/src/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
- package/esm/src/utils/normalization/orderJson.d.ts +1 -0
- package/esm/src/utils/normalization/orderJson.test.d.ts +0 -3
- package/esm/src/utils/normalization/parseKeywords.d.ts +1 -4
- package/esm/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
- package/esm/src/utils/normalization/removeDiacritics.d.ts +1 -3
- package/esm/src/utils/normalization/removeEmojis.d.ts +1 -0
- package/esm/src/utils/normalization/removeQuotes.d.ts +1 -0
- package/esm/src/utils/normalization/searchKeywords.d.ts +1 -3
- package/esm/src/utils/normalization/titleToName.d.ts +1 -0
- package/esm/src/utils/normalization/unwrapResult.d.ts +1 -3
- package/esm/src/utils/organization/$sideEffect.d.ts +1 -0
- package/esm/src/utils/organization/TODO_USE.d.ts +1 -0
- package/esm/src/utils/organization/just.d.ts +1 -0
- package/esm/src/utils/organization/keepImported.d.ts +1 -0
- package/esm/src/utils/organization/keepTypeImported.d.ts +1 -0
- package/esm/src/utils/organization/keepUnused.d.ts +1 -0
- package/esm/src/utils/organization/preserve.d.ts +1 -3
- package/esm/src/utils/organization/really_any.d.ts +1 -0
- package/esm/src/utils/organization/spaceTrim.d.ts +3 -2
- package/esm/src/utils/parameters/extractParameterNames.d.ts +1 -0
- package/esm/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -0
- package/esm/src/utils/parameters/templateParameters.d.ts +2 -1
- package/esm/src/utils/parameters/valueToString.d.ts +2 -2
- package/esm/src/utils/random/$generateBookBoilerplate.d.ts +3 -3
- package/esm/src/utils/random/$randomAgentPersona.d.ts +1 -3
- package/esm/src/utils/random/$randomAgentRule.d.ts +1 -3
- package/esm/src/utils/random/$randomFullnameWithColor.d.ts +4 -3
- package/esm/src/utils/random/$randomItem.d.ts +0 -3
- package/esm/src/utils/random/$randomSeed.d.ts +0 -3
- package/esm/src/utils/random/$randomToken.d.ts +2 -5
- package/esm/src/utils/random/EnglishNamePool.d.ts +1 -0
- package/esm/src/utils/serialization/$deepFreeze.d.ts +1 -3
- package/esm/src/utils/serialization/checkSerializableAsJson.d.ts +1 -5
- package/esm/src/utils/serialization/clonePipeline.d.ts +1 -3
- package/esm/src/utils/serialization/deepClone.d.ts +1 -3
- package/esm/src/utils/serialization/exportJson.d.ts +1 -3
- package/esm/src/utils/serialization/isSerializableAsJson.d.ts +0 -5
- package/esm/src/utils/serialization/jsonStringsToJsons.d.ts +1 -4
- package/esm/src/utils/serialization/serializeToPromptbookJavascript.d.ts +3 -3
- package/esm/src/utils/sets/difference.d.ts +1 -3
- package/esm/src/utils/sets/intersection.d.ts +1 -0
- package/esm/src/utils/sets/union.d.ts +1 -0
- package/esm/src/utils/take/classes/TakeChain.d.ts +4 -1
- package/esm/src/utils/take/interfaces/ITakeChain.d.ts +5 -1
- package/esm/src/utils/take/interfaces/Takeable.d.ts +2 -1
- package/esm/src/utils/take/take.d.ts +1 -1
- package/esm/src/utils/validators/filePath/isRootPath.d.ts +1 -3
- package/esm/src/utils/validators/filePath/isRootPath.test.d.ts +0 -3
- package/esm/src/utils/validators/filePath/isValidFilePath.d.ts +1 -3
- package/esm/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -0
- package/esm/src/utils/validators/parameterName/validateParameterName.d.ts +1 -0
- package/esm/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
- package/esm/src/utils/validators/url/extractUrlsFromText.d.ts +1 -0
- package/esm/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
- package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +0 -3
- package/esm/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -3
- package/esm/src/utils/validators/url/normalizeDomainForMatching.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/esm/src/wizard/$getCompiledBook.d.ts +0 -2
- package/esm/src/wizard/wizard.d.ts +1 -2
- package/package.json +2 -2
- package/umd/index.umd.js +272 -306
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/types.index.d.ts +45 -45
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -4
- package/umd/src/book-2.0/agent-source/AgentModelRequirements.d.ts +0 -4
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/createTeamToolName.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/padBook.d.ts +1 -4
- package/umd/src/book-2.0/agent-source/parseAgentSource.d.ts +0 -3
- package/umd/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/parseParameters.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/parseTeamCommitment.d.ts +0 -3
- package/umd/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +8 -3
- package/umd/src/book-2.0/agent-source/string_book.d.ts +1 -0
- package/umd/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +0 -3
- package/umd/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +0 -3
- package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +0 -3
- package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfileTooltip.d.ts +4 -0
- package/umd/src/book-components/BookEditor/BookEditor.d.ts +0 -3
- package/umd/src/book-components/BookEditor/BookEditorActionbar.d.ts +4 -0
- package/umd/src/book-components/BookEditor/BookEditorMonaco.d.ts +2 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +3 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +1 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoDecorations.d.ts +6 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoDiagnostics.d.ts +9 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +7 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +3 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +24 -0
- package/umd/src/book-components/Chat/AgentChat/AgentChat.d.ts +0 -3
- package/umd/src/book-components/Chat/AgentChip/AgentChip.d.ts +6 -5
- package/umd/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +4 -8
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +2 -3
- package/umd/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +0 -3
- package/umd/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +0 -3
- package/umd/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/chatCssClassNames.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/constants.d.ts +4 -3
- package/umd/src/book-components/Chat/Chat/insertDictationChunk.d.ts +16 -0
- package/umd/src/book-components/Chat/Chat/learnDictationDictionary.d.ts +7 -0
- package/umd/src/book-components/Chat/Chat/refineFinalDictationChunk.d.ts +36 -0
- package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +3 -0
- package/umd/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
- package/umd/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +7 -30
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +20 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +29 -0
- package/umd/src/book-components/Chat/LlmChat/defaults.d.ts +0 -3
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +3 -3
- package/umd/src/book-components/Chat/MockedChat/constants.d.ts +0 -3
- package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +4 -3
- package/umd/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +3 -0
- package/umd/src/book-components/Chat/effects/components/HeartsEffect.d.ts +3 -0
- package/umd/src/book-components/Chat/effects/index.d.ts +0 -4
- package/umd/src/book-components/Chat/effects/utils/detectEffects.d.ts +1 -0
- package/umd/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +4 -4
- package/umd/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -0
- package/umd/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +0 -3
- package/umd/src/book-components/Chat/save/index.d.ts +0 -3
- package/umd/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +1 -0
- package/umd/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +0 -4
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +3 -5
- package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +0 -3
- package/umd/src/book-components/Chat/utils/ExportFormat.d.ts +2 -0
- package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +4 -3
- package/umd/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/exportChatHistory.d.ts +0 -3
- package/umd/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +2 -1
- package/umd/src/book-components/Chat/utils/loadAgentProfile.d.ts +12 -0
- package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +0 -3
- package/umd/src/book-components/Chat/utils/parseImagePrompts.d.ts +1 -3
- package/umd/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +14 -0
- package/umd/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +3 -0
- package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +0 -3
- package/umd/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +3 -3
- package/umd/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +3 -5
- package/umd/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -5
- package/umd/src/book-components/Qr/BrandedQrCode.d.ts +5 -0
- package/umd/src/book-components/Qr/GenericQrCode.d.ts +5 -0
- package/umd/src/book-components/Qr/PromptbookQrCode.d.ts +5 -0
- package/umd/src/book-components/Qr/useQrCode.d.ts +4 -1
- package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +4 -0
- package/umd/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +4 -0
- package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +3 -3
- package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -3
- package/umd/src/book-components/_common/Tooltip/Tooltip.d.ts +3 -0
- package/umd/src/book-components/icons/AboutIcon.d.ts +1 -0
- package/umd/src/book-components/icons/AttachmentIcon.d.ts +4 -0
- package/umd/src/book-components/icons/CameraIcon.d.ts +4 -0
- package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -0
- package/umd/src/book-components/icons/EmailIcon.d.ts +1 -0
- package/umd/src/book-components/icons/MenuIcon.d.ts +1 -3
- package/umd/src/book-components/icons/SaveIcon.d.ts +1 -0
- package/umd/src/book-components/icons/SendIcon.d.ts +0 -3
- package/umd/src/book-components/icons/TeacherIcon.d.ts +1 -0
- package/umd/src/cli/$runPromptbookCli.d.ts +0 -1
- package/umd/src/cli/cli-commands/_boilerplate.d.ts +0 -2
- package/umd/src/cli/cli-commands/about.d.ts +0 -6
- package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +18 -0
- package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +127 -0
- package/umd/src/cli/cli-commands/coder/boilerplateTemplates.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +0 -2
- package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -2
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +10 -2
- package/umd/src/cli/cli-commands/coder/init.d.ts +38 -2
- package/umd/src/cli/cli-commands/coder/run.d.ts +1 -3
- package/umd/src/cli/cli-commands/coder/run.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/verify.d.ts +0 -2
- package/umd/src/cli/cli-commands/coder.d.ts +0 -2
- package/umd/src/cli/cli-commands/common/handleActionErrors.d.ts +4 -0
- package/umd/src/cli/cli-commands/hello.d.ts +0 -5
- package/umd/src/cli/cli-commands/list-models.d.ts +0 -2
- package/umd/src/cli/cli-commands/list-scrapers.d.ts +0 -2
- package/umd/src/cli/cli-commands/login.d.ts +0 -5
- package/umd/src/cli/cli-commands/prettify.d.ts +0 -6
- package/umd/src/cli/cli-commands/run.d.ts +0 -8
- package/umd/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -5
- package/umd/src/cli/cli-commands/start-agents-server.d.ts +0 -2
- package/umd/src/cli/cli-commands/start-pipelines-server.d.ts +0 -5
- package/umd/src/cli/cli-commands/test-command.d.ts +0 -7
- package/umd/src/cli/common/$provideLlmToolsForCli.d.ts +5 -0
- package/umd/src/cli/main.d.ts +0 -2
- package/umd/src/cli/promptbookCli.d.ts +0 -7
- package/umd/src/collection/agent-collection/AgentCollection.d.ts +0 -3
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -6
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +3 -0
- package/umd/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +2 -1
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -5
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +1 -0
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts +4 -3
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +2 -3
- package/umd/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -0
- package/umd/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +0 -3
- package/umd/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -0
- package/umd/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -0
- package/umd/src/commands/EXPECT/ExpectCommand.d.ts +0 -3
- package/umd/src/commands/EXPECT/expectCommandParser.d.ts +3 -2
- package/umd/src/commands/FOREACH/ForeachCommand.d.ts +1 -0
- package/umd/src/commands/FOREACH/foreachCommandParser.d.ts +1 -3
- package/umd/src/commands/FORMAT/formatCommandParser.d.ts +1 -0
- package/umd/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -0
- package/umd/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -0
- package/umd/src/commands/JOKER/JokerCommand.d.ts +1 -0
- package/umd/src/commands/JOKER/jokerCommandParser.d.ts +1 -0
- package/umd/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -0
- package/umd/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -3
- package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +0 -3
- package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.test.d.ts +0 -3
- package/umd/src/commands/MODEL/ModelCommand.d.ts +1 -0
- package/umd/src/commands/MODEL/modelCommandParser.d.ts +1 -0
- package/umd/src/commands/PARAMETER/ParameterCommand.d.ts +1 -0
- package/umd/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -0
- package/umd/src/commands/PERSONA/PersonaCommand.d.ts +1 -0
- package/umd/src/commands/PERSONA/personaCommandParser.d.ts +1 -0
- package/umd/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -0
- package/umd/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -0
- package/umd/src/commands/SECTION/SectionCommand.d.ts +1 -0
- package/umd/src/commands/SECTION/sectionCommandParser.d.ts +1 -0
- package/umd/src/commands/URL/UrlCommand.d.ts +1 -0
- package/umd/src/commands/URL/urlCommandParser.d.ts +1 -0
- package/umd/src/commands/X_ACTION/ActionCommand.d.ts +1 -0
- package/umd/src/commands/X_ACTION/actionCommandParser.d.ts +1 -3
- package/umd/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -0
- package/umd/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -3
- package/umd/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +1 -0
- package/umd/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
- package/umd/src/commands/_common/stringifyCommand.d.ts +1 -1
- package/umd/src/commands/_common/types/CommandParser.d.ts +0 -4
- package/umd/src/commands/index.d.ts +0 -3
- package/umd/src/commitments/ACTION/ACTION.d.ts +0 -3
- package/umd/src/commitments/CLOSED/CLOSED.d.ts +0 -3
- package/umd/src/commitments/CLOSED/CLOSED.test.d.ts +0 -3
- package/umd/src/commitments/COMPONENT/COMPONENT.d.ts +0 -3
- package/umd/src/commitments/DELETE/DELETE.d.ts +0 -3
- package/umd/src/commitments/DICTIONARY/DICTIONARY.d.ts +0 -3
- package/umd/src/commitments/FORMAT/FORMAT.d.ts +0 -3
- package/umd/src/commitments/FROM/FROM.d.ts +0 -3
- package/umd/src/commitments/GOAL/GOAL.d.ts +0 -3
- package/umd/src/commitments/IMPORT/IMPORT.d.ts +0 -3
- package/umd/src/commitments/LANGUAGE/LANGUAGE.d.ts +0 -3
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -3
- package/umd/src/commitments/MESSAGE/MESSAGE.d.ts +0 -3
- package/umd/src/commitments/MESSAGE_SUFFIX/MESSAGE_SUFFIX.d.ts +0 -3
- package/umd/src/commitments/META/META.d.ts +0 -3
- package/umd/src/commitments/META/META_DESCRIPTION.d.ts +0 -3
- package/umd/src/commitments/META_COLOR/META_COLOR.d.ts +0 -3
- package/umd/src/commitments/META_DISCLAIMER/META_DISCLAIMER.d.ts +0 -3
- package/umd/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +0 -3
- package/umd/src/commitments/META_FONT/META_FONT.d.ts +0 -3
- package/umd/src/commitments/META_IMAGE/META_IMAGE.d.ts +0 -3
- package/umd/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +0 -3
- package/umd/src/commitments/META_LINK/META_LINK.d.ts +0 -3
- package/umd/src/commitments/META_VOICE/META_VOICE.d.ts +0 -3
- package/umd/src/commitments/MODEL/MODEL.d.ts +0 -3
- package/umd/src/commitments/OPEN/OPEN.d.ts +0 -3
- package/umd/src/commitments/PERSONA/PERSONA.d.ts +0 -3
- package/umd/src/commitments/RULE/RULE.d.ts +0 -3
- package/umd/src/commitments/SAMPLE/SAMPLE.d.ts +0 -3
- package/umd/src/commitments/SCENARIO/SCENARIO.d.ts +0 -3
- package/umd/src/commitments/TEAM/TEAM.d.ts +0 -3
- package/umd/src/commitments/TEMPLATE/TEMPLATE.d.ts +0 -3
- package/umd/src/commitments/USE/USE.d.ts +0 -3
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +2 -0
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -3
- package/umd/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +4 -5
- package/umd/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +0 -3
- package/umd/src/commitments/USE_CALENDAR/calendarReference.d.ts +0 -3
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -3
- package/umd/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +0 -3
- package/umd/src/commitments/USE_MCP/USE_MCP.d.ts +0 -3
- package/umd/src/commitments/USE_POPUP/USE_POPUP.d.ts +0 -3
- package/umd/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +0 -3
- package/umd/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +0 -3
- package/umd/src/commitments/USE_PROJECT/projectReference.d.ts +0 -3
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -3
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -3
- package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -3
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -3
- package/umd/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +0 -3
- package/umd/src/commitments/WALLET/WALLET.d.ts +0 -3
- package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +0 -3
- package/umd/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +0 -3
- package/umd/src/commitments/_base/createEmptyAgentModelRequirements.d.ts +0 -3
- package/umd/src/commitments/_common/commitmentToolFunctions.d.ts +2 -3
- package/umd/src/commitments/_common/createWritingCommitmentSections.d.ts +2 -3
- package/umd/src/commitments/_common/getAllCommitmentDefinitions.d.ts +1 -0
- package/umd/src/commitments/_common/getAllCommitmentTypes.d.ts +1 -0
- package/umd/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +0 -4
- package/umd/src/commitments/_common/getCommitmentDefinition.d.ts +1 -0
- package/umd/src/commitments/_common/isCommitmentSupported.d.ts +1 -0
- package/umd/src/commitments/_common/toolExecutionEnvelope.d.ts +0 -3
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +3 -3
- package/umd/src/commitments/index.d.ts +0 -4
- package/umd/src/config.test.d.ts +0 -3
- package/umd/src/constants/streaming.d.ts +0 -3
- package/umd/src/constants.d.ts +0 -3
- package/umd/src/conversion/archive/loadArchive.d.ts +0 -1
- package/umd/src/conversion/archive/saveArchive.d.ts +0 -5
- package/umd/src/conversion/compilePipeline.d.ts +2 -7
- package/umd/src/conversion/compilePipelineOnRemoteServer.d.ts +2 -5
- package/umd/src/conversion/parsePipeline.d.ts +1 -11
- package/umd/src/conversion/pipelineJsonToString.d.ts +1 -7
- package/umd/src/conversion/prettify/prettifyPipelineString.d.ts +0 -4
- package/umd/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -7
- package/umd/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -3
- package/umd/src/conversion/validation/_importPipeline.d.ts +6 -2
- package/umd/src/conversion/validation/pipelineStringToJson-parseErrors.test.d.ts +0 -3
- package/umd/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -3
- package/umd/src/conversion/validation/validatePipeline.d.ts +3 -9
- package/umd/src/conversion/validation/validatePipeline.test.d.ts +0 -3
- package/umd/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -2
- package/umd/src/errors/0-BoilerplateError.d.ts +0 -3
- package/umd/src/errors/0-index.d.ts +0 -3
- package/umd/src/errors/DatabaseError.d.ts +0 -3
- package/umd/src/errors/ExpectError.d.ts +2 -1
- package/umd/src/errors/ParseError.d.ts +0 -3
- package/umd/src/errors/PipelineExecutionError.d.ts +0 -3
- package/umd/src/executables/$provideExecutablesForNode.d.ts +0 -5
- package/umd/src/executables/apps/locateLibreoffice.d.ts +0 -2
- package/umd/src/executables/apps/locatePandoc.d.ts +0 -2
- package/umd/src/executables/browsers/locateBrowser.d.ts +0 -1
- package/umd/src/executables/browsers/locateDefaultSystemBrowser.d.ts +0 -1
- package/umd/src/executables/locateApp.d.ts +0 -2
- package/umd/src/executables/platforms/locateAppOnLinux.d.ts +0 -2
- package/umd/src/executables/platforms/locateAppOnMacOs.d.ts +0 -2
- package/umd/src/executables/platforms/locateAppOnWindows.d.ts +0 -2
- package/umd/src/execution/AbstractTaskResult.d.ts +0 -4
- package/umd/src/execution/AvailableModel.d.ts +0 -4
- package/umd/src/execution/CommonToolsOptions.d.ts +0 -5
- package/umd/src/execution/ExecutionTask.d.ts +4 -4
- package/umd/src/execution/FilesystemTools.d.ts +0 -3
- package/umd/src/execution/LlmExecutionTools.d.ts +3 -9
- package/umd/src/execution/LlmExecutionToolsConstructor.d.ts +0 -3
- package/umd/src/execution/PipelineExecutor.d.ts +0 -3
- package/umd/src/execution/PipelineExecutorResult.d.ts +0 -3
- package/umd/src/execution/PromptResult.d.ts +1 -9
- package/umd/src/execution/PromptbookFetch.test-type.d.ts +0 -4
- package/umd/src/execution/ScriptExecutionTools.d.ts +0 -4
- package/umd/src/execution/Usage.d.ts +0 -3
- package/umd/src/execution/UserInterfaceTools.d.ts +3 -0
- package/umd/src/execution/assertsTaskSuccessful.d.ts +1 -3
- package/umd/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +1 -0
- package/umd/src/execution/createPipelineExecutor/20-executeTask.d.ts +0 -3
- package/umd/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -3
- package/umd/src/execution/createPipelineExecutor/getContextForTask.d.ts +1 -0
- package/umd/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +0 -4
- package/umd/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +0 -1
- package/umd/src/execution/execution-report/ExecutionReportJson.d.ts +1 -0
- package/umd/src/execution/execution-report/ExecutionReportString.d.ts +0 -3
- package/umd/src/execution/execution-report/executionReportJsonToString.d.ts +0 -5
- package/umd/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -1
- package/umd/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -1
- package/umd/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -1
- package/umd/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +2 -0
- package/umd/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -3
- package/umd/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
- package/umd/src/execution/utils/checkExpectations.d.ts +2 -5
- package/umd/src/execution/utils/forEachAsync.d.ts +5 -1
- package/umd/src/execution/utils/usage-constants.d.ts +0 -3
- package/umd/src/execution/utils/usageToHuman.d.ts +0 -8
- package/umd/src/execution/utils/validatePromptResult.d.ts +1 -0
- package/umd/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -0
- package/umd/src/formats/_common/FormatParser.d.ts +2 -9
- package/umd/src/formats/_common/FormatSubvalueParser.d.ts +0 -3
- package/umd/src/formats/csv/CsvFormatParser.d.ts +2 -8
- package/umd/src/formats/index.d.ts +0 -3
- package/umd/src/formats/json/JsonFormatParser.d.ts +0 -11
- package/umd/src/formats/text/TextFormatParser.d.ts +0 -9
- package/umd/src/formats/xml/XmlFormatParser.d.ts +0 -11
- package/umd/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +1 -3
- package/umd/src/formfactors/_common/FormfactorDefinition.d.ts +1 -0
- package/umd/src/formfactors/index.d.ts +0 -3
- package/umd/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +0 -5
- package/umd/src/high-level-abstractions/index.d.ts +0 -4
- package/umd/src/high-level-abstractions/quick-chatbot/QuickChatbotHla.d.ts +0 -3
- package/umd/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +2 -3
- package/umd/src/llm-providers/_common/register/$llmToolsRegister.d.ts +2 -3
- package/umd/src/llm-providers/_common/register/$provideEnvFilename.d.ts +0 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +3 -6
- package/umd/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -7
- package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -16
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +0 -4
- package/umd/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +0 -5
- package/umd/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +0 -6
- package/umd/src/llm-providers/_common/register/LlmToolsOptions.d.ts +0 -4
- package/umd/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -0
- package/umd/src/llm-providers/_common/utils/assertUniqueModels.d.ts +0 -3
- package/umd/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -3
- package/umd/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -0
- package/umd/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -4
- package/umd/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -0
- package/umd/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -7
- package/umd/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +4 -0
- package/umd/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +1 -0
- package/umd/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +3 -7
- package/umd/src/llm-providers/_multiple/playground/playground.d.ts +0 -1
- package/umd/src/llm-providers/agent/Agent.d.ts +0 -3
- package/umd/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/agent/RemoteAgent.d.ts +0 -4
- package/umd/src/llm-providers/agent/playground/playground.d.ts +0 -6
- package/umd/src/llm-providers/agent/register-configuration.d.ts +0 -5
- package/umd/src/llm-providers/agent/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -10
- package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +3 -3
- package/umd/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -8
- package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +1 -3
- package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +0 -3
- package/umd/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +0 -7
- package/umd/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -5
- package/umd/src/llm-providers/anthropic-claude/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/anthropic-claude/register-constructor.d.ts +0 -5
- package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -6
- package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
- package/umd/src/llm-providers/azure-openai/createAzureOpenAiExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/azure-openai/playground/playground.d.ts +0 -2
- package/umd/src/llm-providers/azure-openai/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/azure-openai/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +1 -0
- package/umd/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -3
- package/umd/src/llm-providers/deepseek/deepseek-models.d.ts +1 -6
- package/umd/src/llm-providers/deepseek/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/deepseek/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +1 -0
- package/umd/src/llm-providers/google/createGoogleExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/google/google-models.d.ts +1 -6
- package/umd/src/llm-providers/google/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/google/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -5
- package/umd/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -3
- package/umd/src/llm-providers/mocked/test/joker.test.d.ts +0 -3
- package/umd/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -4
- package/umd/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -3
- package/umd/src/llm-providers/ollama/OllamaExecutionTools.d.ts +0 -3
- package/umd/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +1 -0
- package/umd/src/llm-providers/ollama/ollama-models.d.ts +1 -4
- package/umd/src/llm-providers/ollama/playground/playground.d.ts +0 -2
- package/umd/src/llm-providers/ollama/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/ollama/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +10 -0
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -8
- package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -7
- package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +2 -0
- package/umd/src/llm-providers/openai/computeOpenAiUsage.d.ts +1 -3
- package/umd/src/llm-providers/openai/computeOpenAiUsage.test.d.ts +0 -3
- package/umd/src/llm-providers/openai/createOpenAiAssistantExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/openai/createOpenAiExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/openai/openai-models.d.ts +1 -0
- package/umd/src/llm-providers/openai/openai-models.test.d.ts +0 -3
- package/umd/src/llm-providers/openai/playground/playground.d.ts +0 -2
- package/umd/src/llm-providers/openai/register-configuration.d.ts +0 -3
- package/umd/src/llm-providers/openai/register-constructor.d.ts +0 -4
- package/umd/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -9
- package/umd/src/llm-providers/remote/playground/playground.d.ts +0 -1
- package/umd/src/llm-providers/vercel/playground/playground.d.ts +0 -2
- package/umd/src/other/templates/getBookTemplates.d.ts +2 -5
- package/umd/src/personas/preparePersona.d.ts +1 -7
- package/umd/src/pipeline/PipelineInterface/PipelineInterface.d.ts +1 -0
- package/umd/src/pipeline/PipelineInterface/constants.d.ts +0 -3
- package/umd/src/pipeline/PipelineJson/CommonTaskJson.d.ts +0 -4
- package/umd/src/pipeline/PipelineJson/DialogTaskJson.d.ts +1 -3
- package/umd/src/pipeline/PipelineJson/Expectations.d.ts +4 -3
- package/umd/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +0 -4
- package/umd/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +0 -3
- package/umd/src/pipeline/PipelineJson/PersonaJson.d.ts +0 -3
- package/umd/src/pipeline/PipelineJson/PreparationJson.d.ts +3 -5
- package/umd/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +1 -4
- package/umd/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +1 -3
- package/umd/src/pipeline/book-notation.d.ts +1 -4
- package/umd/src/pipeline/isValidPipelineString.d.ts +1 -3
- package/umd/src/pipeline/isValidPipelineString.test.d.ts +0 -3
- package/umd/src/pipeline/prompt-notation/helpers/ParameterEscaping.d.ts +5 -0
- package/umd/src/pipeline/prompt-notation/helpers/ParameterNaming.d.ts +1 -0
- package/umd/src/pipeline/prompt-notation/helpers/ParameterSection.d.ts +2 -0
- package/umd/src/pipeline/prompt-notation.d.ts +2 -5
- package/umd/src/pipeline/prompt-notation.test.d.ts +0 -3
- package/umd/src/pipeline/validatePipelineString.d.ts +1 -3
- package/umd/src/playground/permanent/_boilerplate.d.ts +0 -1
- package/umd/src/playground/permanent/agent-with-browser-playground.d.ts +0 -1
- package/umd/src/playground/permanent/error-handling-playground.d.ts +0 -1
- package/umd/src/playground/playground.d.ts +0 -2
- package/umd/src/postprocessing/utils/extractBlock.d.ts +2 -1
- package/umd/src/postprocessing/utils/extractJsonBlock.d.ts +2 -5
- package/umd/src/prepare/PrepareAndScrapeOptions.d.ts +0 -4
- package/umd/src/prepare/preparePipeline.d.ts +3 -2
- package/umd/src/prepare/preparePipelineOnRemoteServer.d.ts +2 -5
- package/umd/src/prepare/prepareTasks.d.ts +6 -10
- package/umd/src/prepare/unpreparePipeline.d.ts +1 -5
- package/umd/src/remote-server/RemoteServer.d.ts +3 -0
- package/umd/src/remote-server/openapi.d.ts +3 -4
- package/umd/src/remote-server/socket-types/_subtypes/Identification.d.ts +1 -5
- package/umd/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +0 -3
- package/umd/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +0 -3
- package/umd/src/remote-server/startAgentServer.d.ts +6 -2
- package/umd/src/remote-server/startRemoteServer.d.ts +1 -15
- package/umd/src/remote-server/types/RemoteClientOptions.d.ts +0 -5
- package/umd/src/remote-server/types/RemoteServerOptions.d.ts +10 -4
- package/umd/src/remote-server/ui/ServerApp.d.ts +1 -0
- package/umd/src/remote-server/ui/types.d.ts +3 -0
- package/umd/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +1 -4
- package/umd/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
- package/umd/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/_boilerplate/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/_boilerplate/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/_common/Scraper.d.ts +0 -5
- package/umd/src/scrapers/_common/ScraperIntermediateSource.d.ts +0 -3
- package/umd/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -0
- package/umd/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +0 -2
- package/umd/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -2
- package/umd/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -2
- package/umd/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +0 -3
- package/umd/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +2 -3
- package/umd/src/scrapers/_common/register/$scrapersRegister.d.ts +2 -3
- package/umd/src/scrapers/_common/register/ScraperConstructor.d.ts +0 -3
- package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +0 -7
- package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +0 -3
- package/umd/src/scrapers/_common/utils/promptbookFetch.d.ts +0 -3
- package/umd/src/scrapers/document/DocumentScraper.d.ts +1 -6
- package/umd/src/scrapers/document/DocumentScraper.test.d.ts +0 -3
- package/umd/src/scrapers/document/createDocumentScraper.d.ts +0 -3
- package/umd/src/scrapers/document/playground/document-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/document/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/document/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -6
- package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +0 -3
- package/umd/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +0 -3
- package/umd/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/document-legacy/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/document-legacy/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/markdown/MarkdownScraper.d.ts +1 -4
- package/umd/src/scrapers/markdown/MarkdownScraper.test.d.ts +0 -3
- package/umd/src/scrapers/markdown/createMarkdownScraper.d.ts +0 -3
- package/umd/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/markdown/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/markdown/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -7
- package/umd/src/scrapers/markitdown/createMarkitdownScraper.d.ts +0 -4
- package/umd/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/markitdown/register-constructor.d.ts +0 -5
- package/umd/src/scrapers/markitdown/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/pdf/PdfScraper.d.ts +1 -6
- package/umd/src/scrapers/pdf/createPdfScraper.d.ts +0 -3
- package/umd/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/pdf/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/pdf/register-metadata.d.ts +0 -3
- package/umd/src/scrapers/website/WebsiteScraper.d.ts +1 -6
- package/umd/src/scrapers/website/createWebsiteScraper.d.ts +0 -3
- package/umd/src/scrapers/website/playground/website-scraper-playground.d.ts +0 -1
- package/umd/src/scrapers/website/register-constructor.d.ts +0 -4
- package/umd/src/scrapers/website/register-metadata.d.ts +0 -3
- package/umd/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -5
- package/umd/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -3
- package/umd/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
- package/umd/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -3
- package/umd/src/scripting/javascript/postprocessing-functions.d.ts +0 -4
- package/umd/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -3
- package/umd/src/search-engines/SearchEngine.d.ts +3 -0
- package/umd/src/speech-recognition/BrowserSpeechRecognition.d.ts +0 -2
- package/umd/src/speech-recognition/OpenAiSpeechRecognition.d.ts +2 -2
- package/umd/src/storage/_common/PromptbookStorage.d.ts +0 -4
- package/umd/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -4
- package/umd/src/storage/env-storage/$EnvStorage.d.ts +0 -3
- package/umd/src/storage/file-cache-storage/FileCacheStorage.d.ts +0 -2
- package/umd/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -1
- package/umd/src/storage/local-storage/getLocalStorage.d.ts +0 -1
- package/umd/src/storage/local-storage/getSessionStorage.d.ts +0 -1
- package/umd/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +1 -0
- package/umd/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -4
- package/umd/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -3
- package/umd/src/transpilers/formatted-book-in-markdown/register.d.ts +2 -5
- package/umd/src/transpilers/openai-sdk/playground/playground.d.ts +0 -1
- package/umd/src/transpilers/openai-sdk/register.d.ts +2 -5
- package/umd/src/types/Arrayable.d.ts +1 -0
- package/umd/src/types/InputParameters_private.d.ts +4 -2
- package/umd/src/types/IntermediateFilesStrategy.d.ts +0 -3
- package/umd/src/types/LlmCall.d.ts +0 -3
- package/umd/src/types/ModelRequirements.d.ts +1 -0
- package/umd/src/types/ModelVariant.d.ts +3 -0
- package/umd/src/types/Parameters.d.ts +31 -0
- package/umd/src/types/Parameters_private.d.ts +4 -2
- package/umd/src/types/Prompt.d.ts +1 -6
- package/umd/src/types/ReservedParameters_private.d.ts +2 -1
- package/umd/src/types/ToolCall.d.ts +0 -2
- package/umd/src/types/Updatable.d.ts +1 -3
- package/umd/src/types/string_agent_hash_private.d.ts +1 -1
- package/umd/src/types/string_agent_name.d.ts +32 -0
- package/umd/src/types/string_agent_name_in_book_private.d.ts +1 -1
- package/umd/src/types/string_agent_name_private.d.ts +2 -1
- package/umd/src/types/string_agent_permanent_id_private.d.ts +2 -1
- package/umd/src/types/string_business_category_name.d.ts +5 -0
- package/umd/src/types/string_business_category_name_private.d.ts +1 -1
- package/umd/src/types/string_char_private.d.ts +1 -1
- package/umd/src/types/string_chat_prompt_private.d.ts +1 -1
- package/umd/src/types/string_completion_prompt_private.d.ts +1 -1
- package/umd/src/types/string_markdown.d.ts +0 -1
- package/umd/src/types/string_mime_type_private.d.ts +1 -0
- package/umd/src/types/string_model_description_private.d.ts +1 -1
- package/umd/src/types/string_model_name.d.ts +7 -0
- package/umd/src/types/string_model_name_private.d.ts +1 -1
- package/umd/src/types/string_name.d.ts +31 -0
- package/umd/src/types/string_name_private.d.ts +1 -1
- package/umd/src/types/string_page.d.ts +15 -0
- package/umd/src/types/string_page_private.d.ts +1 -1
- package/umd/src/types/string_parameter_name.d.ts +11 -210
- package/umd/src/types/string_parameter_value_private.d.ts +1 -1
- package/umd/src/types/string_persona_description.d.ts +14 -0
- package/umd/src/types/string_persona_description_private.d.ts +1 -1
- package/umd/src/types/string_prompt.d.ts +49 -0
- package/umd/src/types/string_prompt_image_private.d.ts +1 -1
- package/umd/src/types/string_prompt_private.d.ts +1 -1
- package/umd/src/types/string_reserved_parameter_name_private.d.ts +1 -1
- package/umd/src/types/string_sha256.d.ts +2 -2
- package/umd/src/types/string_system_message_private.d.ts +1 -1
- package/umd/src/types/string_template_private.d.ts +1 -1
- package/umd/src/types/string_text_prompt_private.d.ts +1 -1
- package/umd/src/types/string_title.d.ts +8 -0
- package/umd/src/types/string_title_private.d.ts +1 -1
- package/umd/src/types/typeAliasEmoji.d.ts +0 -3
- package/umd/src/types/typeAliases.d.ts +0 -6
- package/umd/src/utils/DEFAULT_THINKING_MESSAGES.d.ts +5 -1
- package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +1 -0
- package/umd/src/utils/chat/chatAttachments.d.ts +0 -3
- package/umd/src/utils/chat/constants.d.ts +0 -3
- package/umd/src/utils/clientVersion.d.ts +0 -3
- package/umd/src/utils/color/$randomColor.d.ts +0 -5
- package/umd/src/utils/color/css-colors.d.ts +0 -3
- package/umd/src/utils/color/internal-utils/hslToRgb.d.ts +0 -3
- package/umd/src/utils/color/internal-utils/rgbToHsl.d.ts +0 -3
- package/umd/src/utils/color/operators/ColorTransformer.d.ts +2 -0
- package/umd/src/utils/color/operators/lighten.d.ts +0 -3
- package/umd/src/utils/color/operators/saturate.d.ts +0 -3
- package/umd/src/utils/color/utils/areColorsEqual.d.ts +0 -3
- package/umd/src/utils/color/utils/colorDistance.d.ts +2 -2
- package/umd/src/utils/color/utils/colorHue.d.ts +0 -1
- package/umd/src/utils/color/utils/colorHueDistance.d.ts +0 -1
- package/umd/src/utils/color/utils/colorToDataUrl.d.ts +0 -3
- package/umd/src/utils/database/uniqueConstraint.d.ts +1 -3
- package/umd/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +3 -4
- package/umd/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +0 -3
- package/umd/src/utils/editable/types/PipelineEditableSerialized.d.ts +2 -2
- package/umd/src/utils/editable/utils/renamePipelineParameter.d.ts +4 -3
- package/umd/src/utils/editable/utils/stringifyPipelineJson.d.ts +0 -6
- package/umd/src/utils/environment/$detectRuntimeEnvironment.d.ts +0 -3
- package/umd/src/utils/environment/$getGlobalScope.d.ts +1 -1
- package/umd/src/utils/environment/$isRunningInBrowser.d.ts +0 -3
- package/umd/src/utils/environment/$isRunningInJest.d.ts +0 -3
- package/umd/src/utils/environment/$isRunningInNode.d.ts +0 -3
- package/umd/src/utils/environment/$isRunningInWebWorker.d.ts +0 -3
- package/umd/src/utils/execCommand/$execCommand.d.ts +0 -2
- package/umd/src/utils/execCommand/$execCommands.d.ts +0 -1
- package/umd/src/utils/execCommand/ExecCommandOptions.d.ts +3 -4
- package/umd/src/utils/expectation-counters/constants.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countCharacters.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countLines.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countPages.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countParagraphs.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countSentences.d.ts +0 -4
- package/umd/src/utils/expectation-counters/countWords.d.ts +0 -5
- package/umd/src/utils/expectation-counters/index.d.ts +0 -4
- package/umd/src/utils/files/$induceBookDownload.d.ts +0 -1
- package/umd/src/utils/files/$induceFileDownload.d.ts +0 -1
- package/umd/src/utils/files/ObjectUrl.d.ts +0 -1
- package/umd/src/utils/files/isDirectoryExisting.d.ts +0 -6
- package/umd/src/utils/files/isExecutable.d.ts +0 -4
- package/umd/src/utils/files/isFileExisting.d.ts +0 -5
- package/umd/src/utils/files/listAllFiles.d.ts +1 -5
- package/umd/src/utils/files/readResponseBytes.d.ts +1 -0
- package/umd/src/utils/knowledge/inlineKnowledgeSource.d.ts +11 -6
- package/umd/src/utils/knowledge/simplifyKnowledgeLabel.d.ts +2 -0
- package/umd/src/utils/linguistic-hash/linguisticHash.d.ts +2 -1
- package/umd/src/utils/linguistic-hash/linguisticHashTypes.d.ts +0 -3
- package/umd/src/utils/linguistic-hash/linguisticHashWords.cs.d.ts +0 -3
- package/umd/src/utils/linguistic-hash/linguisticHashWords.en.d.ts +0 -3
- package/umd/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -3
- package/umd/src/utils/markdown/createMarkdownTable.d.ts +0 -3
- package/umd/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -3
- package/umd/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -3
- package/umd/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -0
- package/umd/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -4
- package/umd/src/utils/markdown/humanizeAiText.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextEllipsis.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextEmdashed.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextQuotes.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextSources.d.ts +0 -3
- package/umd/src/utils/markdown/humanizeAiTextWhitespace.d.ts +0 -3
- package/umd/src/utils/markdown/prettifyMarkdown.d.ts +4 -2
- package/umd/src/utils/markdown/promptbookifyAiText.d.ts +0 -3
- package/umd/src/utils/markdown/removeMarkdownComments.d.ts +1 -0
- package/umd/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
- package/umd/src/utils/markdown/removeMarkdownLinks.d.ts +1 -0
- package/umd/src/utils/markdown/trimCodeBlock.d.ts +1 -1
- package/umd/src/utils/markdown/trimEndOfCodeBlock.d.ts +1 -1
- package/umd/src/utils/misc/$getCurrentDate.d.ts +1 -0
- package/umd/src/utils/misc/aboutPromptbookInformation.d.ts +3 -3
- package/umd/src/utils/misc/computeHash.d.ts +0 -3
- package/umd/src/utils/misc/debounce.d.ts +2 -0
- package/umd/src/utils/misc/emojis.d.ts +3 -8
- package/umd/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +7 -2
- package/umd/src/utils/misc/parseNumber.d.ts +0 -4
- package/umd/src/utils/misc/xAboutPromptbookInformation.d.ts +3 -4
- package/umd/src/utils/normalization/IKeywords.d.ts +0 -3
- package/umd/src/utils/normalization/nameToUriPart.d.ts +1 -0
- package/umd/src/utils/normalization/nameToUriParts.d.ts +1 -0
- package/umd/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -3
- package/umd/src/utils/normalization/normalizeTo_PascalCase.d.ts +2 -0
- package/umd/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
- package/umd/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -3
- package/umd/src/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
- package/umd/src/utils/normalization/orderJson.d.ts +1 -0
- package/umd/src/utils/normalization/orderJson.test.d.ts +0 -3
- package/umd/src/utils/normalization/parseKeywords.d.ts +1 -4
- package/umd/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
- package/umd/src/utils/normalization/removeDiacritics.d.ts +1 -3
- package/umd/src/utils/normalization/removeEmojis.d.ts +1 -0
- package/umd/src/utils/normalization/removeQuotes.d.ts +1 -0
- package/umd/src/utils/normalization/searchKeywords.d.ts +1 -3
- package/umd/src/utils/normalization/titleToName.d.ts +1 -0
- package/umd/src/utils/normalization/unwrapResult.d.ts +1 -3
- package/umd/src/utils/organization/$sideEffect.d.ts +1 -0
- package/umd/src/utils/organization/TODO_USE.d.ts +1 -0
- package/umd/src/utils/organization/just.d.ts +1 -0
- package/umd/src/utils/organization/keepImported.d.ts +1 -0
- package/umd/src/utils/organization/keepTypeImported.d.ts +1 -0
- package/umd/src/utils/organization/keepUnused.d.ts +1 -0
- package/umd/src/utils/organization/preserve.d.ts +1 -3
- package/umd/src/utils/organization/really_any.d.ts +1 -0
- package/umd/src/utils/organization/spaceTrim.d.ts +3 -2
- package/umd/src/utils/parameters/extractParameterNames.d.ts +1 -0
- package/umd/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -0
- package/umd/src/utils/parameters/templateParameters.d.ts +2 -1
- package/umd/src/utils/parameters/valueToString.d.ts +2 -2
- package/umd/src/utils/random/$generateBookBoilerplate.d.ts +3 -3
- package/umd/src/utils/random/$randomAgentPersona.d.ts +1 -3
- package/umd/src/utils/random/$randomAgentRule.d.ts +1 -3
- package/umd/src/utils/random/$randomFullnameWithColor.d.ts +4 -3
- package/umd/src/utils/random/$randomItem.d.ts +0 -3
- package/umd/src/utils/random/$randomSeed.d.ts +0 -3
- package/umd/src/utils/random/$randomToken.d.ts +2 -5
- package/umd/src/utils/random/EnglishNamePool.d.ts +1 -0
- package/umd/src/utils/serialization/$deepFreeze.d.ts +1 -3
- package/umd/src/utils/serialization/checkSerializableAsJson.d.ts +1 -5
- package/umd/src/utils/serialization/clonePipeline.d.ts +1 -3
- package/umd/src/utils/serialization/deepClone.d.ts +1 -3
- package/umd/src/utils/serialization/exportJson.d.ts +1 -3
- package/umd/src/utils/serialization/isSerializableAsJson.d.ts +0 -5
- package/umd/src/utils/serialization/jsonStringsToJsons.d.ts +1 -4
- package/umd/src/utils/serialization/serializeToPromptbookJavascript.d.ts +3 -3
- package/umd/src/utils/sets/difference.d.ts +1 -3
- package/umd/src/utils/sets/intersection.d.ts +1 -0
- package/umd/src/utils/sets/union.d.ts +1 -0
- package/umd/src/utils/take/classes/TakeChain.d.ts +4 -1
- package/umd/src/utils/take/interfaces/ITakeChain.d.ts +5 -1
- package/umd/src/utils/take/interfaces/Takeable.d.ts +2 -1
- package/umd/src/utils/take/take.d.ts +1 -1
- package/umd/src/utils/validators/filePath/isRootPath.d.ts +1 -3
- package/umd/src/utils/validators/filePath/isRootPath.test.d.ts +0 -3
- package/umd/src/utils/validators/filePath/isValidFilePath.d.ts +1 -3
- package/umd/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -0
- package/umd/src/utils/validators/parameterName/validateParameterName.d.ts +1 -0
- package/umd/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
- package/umd/src/utils/validators/url/extractUrlsFromText.d.ts +1 -0
- package/umd/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
- package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +0 -3
- package/umd/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -3
- package/umd/src/utils/validators/url/normalizeDomainForMatching.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
- package/umd/src/wizard/$getCompiledBook.d.ts +0 -2
- package/umd/src/wizard/wizard.d.ts +1 -2
package/umd/index.umd.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @generated
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
27
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-36';
|
|
28
28
|
/**
|
|
29
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
30
30
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
*
|
|
43
43
|
* @param value any values
|
|
44
44
|
* @returns void
|
|
45
|
+
*
|
|
45
46
|
* @private within the repository
|
|
46
47
|
*/
|
|
47
48
|
function keepUnused(...valuesToKeep) {
|
|
@@ -51,16 +52,20 @@
|
|
|
51
52
|
* Trims string from all 4 sides
|
|
52
53
|
*
|
|
53
54
|
* Note: This is a re-exported function from the `spacetrim` package which is
|
|
54
|
-
*
|
|
55
|
+
* Developed by same author @hejny as this package
|
|
55
56
|
*
|
|
56
|
-
* @public exported from `@promptbook/utils`
|
|
57
57
|
* @see https://github.com/hejny/spacetrim#usage
|
|
58
|
+
*
|
|
59
|
+
* @public exported from `@promptbook/utils`
|
|
58
60
|
*/
|
|
59
61
|
const spaceTrim = spacetrim.spaceTrim;
|
|
60
62
|
|
|
61
63
|
/**
|
|
62
|
-
*
|
|
64
|
+
* Class implementing take chain.
|
|
65
|
+
*
|
|
63
66
|
* @de
|
|
67
|
+
*
|
|
68
|
+
* @private util of `@promptbook/color`
|
|
64
69
|
*/
|
|
65
70
|
class TakeChain {
|
|
66
71
|
constructor(value) {
|
|
@@ -77,9 +82,9 @@
|
|
|
77
82
|
*
|
|
78
83
|
* @param {*} initialValue - The initial value.
|
|
79
84
|
* @returns {Proxy<WithTake<TValue>>} - A proxy object with a `take` method.
|
|
85
|
+
* @deprecated [🤡] Use some better functional library instead of `TakeChain`
|
|
80
86
|
*
|
|
81
87
|
* @private util of `@promptbook/color`
|
|
82
|
-
* @deprecated [🤡] Use some better functional library instead of `TakeChain`
|
|
83
88
|
*/
|
|
84
89
|
function take(initialValue) {
|
|
85
90
|
if (initialValue instanceof TakeChain) {
|
|
@@ -257,9 +262,7 @@
|
|
|
257
262
|
yellow: '#ffff00',
|
|
258
263
|
yellowgreen: '#9acd32',
|
|
259
264
|
};
|
|
260
|
-
|
|
261
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
262
|
-
*/
|
|
265
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
263
266
|
|
|
264
267
|
/**
|
|
265
268
|
* Validates that a channel value is a valid number within the range of 0 to 255.
|
|
@@ -289,7 +292,13 @@
|
|
|
289
292
|
}
|
|
290
293
|
}
|
|
291
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Constant for short hex lengths.
|
|
297
|
+
*/
|
|
292
298
|
const SHORT_HEX_LENGTHS = new Set([3, 4]);
|
|
299
|
+
/**
|
|
300
|
+
* Constant for long hex lengths.
|
|
301
|
+
*/
|
|
293
302
|
const LONG_HEX_LENGTHS = new Set([6, 8]);
|
|
294
303
|
/**
|
|
295
304
|
* Parses a hex string into RGBA channel values.
|
|
@@ -322,6 +331,9 @@
|
|
|
322
331
|
}
|
|
323
332
|
return throwInvalidHex();
|
|
324
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Parses short hex channel.
|
|
336
|
+
*/
|
|
325
337
|
function parseShortHexChannel(char, onError) {
|
|
326
338
|
if (!char) {
|
|
327
339
|
return onError();
|
|
@@ -332,6 +344,9 @@
|
|
|
332
344
|
}
|
|
333
345
|
return parsed * 16;
|
|
334
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* Parses long hex channel.
|
|
349
|
+
*/
|
|
335
350
|
function parseLongHexChannel(hex, start, onError) {
|
|
336
351
|
const segment = hex.substr(start, 2);
|
|
337
352
|
if (segment.length < 2) {
|
|
@@ -344,6 +359,9 @@
|
|
|
344
359
|
return parsed;
|
|
345
360
|
}
|
|
346
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Pattern matching hsl.
|
|
364
|
+
*/
|
|
347
365
|
const HSL_REGEX = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
|
|
348
366
|
/**
|
|
349
367
|
* Parses an HSL string into RGBA channel values.
|
|
@@ -369,6 +387,9 @@
|
|
|
369
387
|
alpha: 255,
|
|
370
388
|
};
|
|
371
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* Handles convert hsl to Rgb.
|
|
392
|
+
*/
|
|
372
393
|
function convertHslToRgb(h, s, l) {
|
|
373
394
|
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
374
395
|
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
|
|
@@ -407,7 +428,13 @@
|
|
|
407
428
|
};
|
|
408
429
|
}
|
|
409
430
|
|
|
431
|
+
/**
|
|
432
|
+
* Pattern matching RGB.
|
|
433
|
+
*/
|
|
410
434
|
const RGB_REGEX = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
435
|
+
/**
|
|
436
|
+
* Pattern matching rgba.
|
|
437
|
+
*/
|
|
411
438
|
const RGBA_REGEX = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
412
439
|
/**
|
|
413
440
|
* Parses an RGB string into RGBA channel values.
|
|
@@ -449,6 +476,9 @@
|
|
|
449
476
|
alpha: parseAlphaValue(match[4]),
|
|
450
477
|
};
|
|
451
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
* Parses channel value.
|
|
481
|
+
*/
|
|
452
482
|
function parseChannelValue(value) {
|
|
453
483
|
if (value.endsWith('%')) {
|
|
454
484
|
const percent = parseFloat(value);
|
|
@@ -456,6 +486,9 @@
|
|
|
456
486
|
}
|
|
457
487
|
return Math.round(parseFloat(value));
|
|
458
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* Parses alpha value.
|
|
491
|
+
*/
|
|
459
492
|
function parseAlphaValue(value) {
|
|
460
493
|
if (value.endsWith('%')) {
|
|
461
494
|
const percent = parseFloat(value);
|
|
@@ -468,8 +501,17 @@
|
|
|
468
501
|
return Math.round(parsed);
|
|
469
502
|
}
|
|
470
503
|
|
|
504
|
+
/**
|
|
505
|
+
* Pattern matching hsl regex.
|
|
506
|
+
*/
|
|
471
507
|
const HSL_REGEX_PATTERN = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
|
|
508
|
+
/**
|
|
509
|
+
* Pattern matching RGB regex.
|
|
510
|
+
*/
|
|
472
511
|
const RGB_REGEX_PATTERN = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
512
|
+
/**
|
|
513
|
+
* Pattern matching rgba regex.
|
|
514
|
+
*/
|
|
473
515
|
const RGBA_REGEX_PATTERN = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
|
|
474
516
|
/**
|
|
475
517
|
* Color object represents an RGB color with alpha channel
|
|
@@ -835,9 +877,7 @@
|
|
|
835
877
|
}
|
|
836
878
|
return [Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255)];
|
|
837
879
|
}
|
|
838
|
-
|
|
839
|
-
* TODO: Properly name all used internal variables
|
|
840
|
-
*/
|
|
880
|
+
// TODO: Properly name all used internal variables
|
|
841
881
|
|
|
842
882
|
/**
|
|
843
883
|
* Converts RGB values to HSL values
|
|
@@ -883,9 +923,7 @@
|
|
|
883
923
|
}
|
|
884
924
|
return [hue, saturation, lightness];
|
|
885
925
|
}
|
|
886
|
-
|
|
887
|
-
* TODO: Properly name all used internal variables
|
|
888
|
-
*/
|
|
926
|
+
// TODO: Properly name all used internal variables
|
|
889
927
|
|
|
890
928
|
/**
|
|
891
929
|
* Makes color transformer which lighten the given color
|
|
@@ -903,9 +941,7 @@
|
|
|
903
941
|
return Color.fromValues(r, g, b, alpha);
|
|
904
942
|
};
|
|
905
943
|
}
|
|
906
|
-
|
|
907
|
-
* TODO: Maybe implement by mix+hsl
|
|
908
|
-
*/
|
|
944
|
+
// TODO: Maybe implement by mix+hsl
|
|
909
945
|
|
|
910
946
|
/**
|
|
911
947
|
* Makes color transformer which saturate the given color
|
|
@@ -923,9 +959,7 @@
|
|
|
923
959
|
return Color.fromValues(r, g, b, alpha);
|
|
924
960
|
};
|
|
925
961
|
}
|
|
926
|
-
|
|
927
|
-
* TODO: Maybe implement by mix+hsl
|
|
928
|
-
*/
|
|
962
|
+
// TODO: Maybe implement by mix+hsl
|
|
929
963
|
|
|
930
964
|
/**
|
|
931
965
|
* Returns the same value that is passed as argument.
|
|
@@ -938,6 +972,7 @@
|
|
|
938
972
|
*
|
|
939
973
|
* @param value any values
|
|
940
974
|
* @returns the same values
|
|
975
|
+
*
|
|
941
976
|
* @private within the repository
|
|
942
977
|
*/
|
|
943
978
|
function just(value) {
|
|
@@ -1296,9 +1331,7 @@
|
|
|
1296
1331
|
return false;
|
|
1297
1332
|
}
|
|
1298
1333
|
}
|
|
1299
|
-
|
|
1300
|
-
* TODO: [🎺]
|
|
1301
|
-
*/
|
|
1334
|
+
// TODO: [🎺]
|
|
1302
1335
|
|
|
1303
1336
|
/**
|
|
1304
1337
|
* Normalize options for `execCommand` and `execCommands`
|
|
@@ -1366,7 +1399,6 @@
|
|
|
1366
1399
|
/**
|
|
1367
1400
|
* Run one command in a shell
|
|
1368
1401
|
*
|
|
1369
|
-
*
|
|
1370
1402
|
* Note: There are 2 similar functions in the codebase:
|
|
1371
1403
|
* - `$execCommand` which runs a single command
|
|
1372
1404
|
* - `$execCommands` which runs multiple commands
|
|
@@ -1465,7 +1497,7 @@
|
|
|
1465
1497
|
}
|
|
1466
1498
|
});
|
|
1467
1499
|
}
|
|
1468
|
-
|
|
1500
|
+
// 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
|
|
1469
1501
|
|
|
1470
1502
|
/**
|
|
1471
1503
|
* Get the file extension from a file name
|
|
@@ -1496,11 +1528,9 @@
|
|
|
1496
1528
|
.catch(() => false);
|
|
1497
1529
|
return isFile;
|
|
1498
1530
|
}
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
* TODO: [🖇] What about symlinks?
|
|
1503
|
-
*/
|
|
1531
|
+
// Note: Not [~🟢~] because it is not directly dependent on `fs
|
|
1532
|
+
// TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
|
|
1533
|
+
// TODO: [🖇] What about symlinks?
|
|
1504
1534
|
|
|
1505
1535
|
/**
|
|
1506
1536
|
* Converts a name to a properly formatted subfolder path for cache storage.
|
|
@@ -1512,6 +1542,9 @@
|
|
|
1512
1542
|
return [name.substr(0, 1).toLowerCase(), name.substr(1, 1).toLowerCase()];
|
|
1513
1543
|
}
|
|
1514
1544
|
|
|
1545
|
+
/**
|
|
1546
|
+
* Collection of default diacritics removal map.
|
|
1547
|
+
*/
|
|
1515
1548
|
const defaultDiacriticsRemovalMap = [
|
|
1516
1549
|
{
|
|
1517
1550
|
base: 'A',
|
|
@@ -1763,6 +1796,7 @@
|
|
|
1763
1796
|
*
|
|
1764
1797
|
* @param input The string containing diacritics to be normalized.
|
|
1765
1798
|
* @returns The string with diacritics removed or normalized.
|
|
1799
|
+
*
|
|
1766
1800
|
* @public exported from `@promptbook/utils`
|
|
1767
1801
|
*/
|
|
1768
1802
|
function removeDiacritics(input) {
|
|
@@ -1771,9 +1805,7 @@
|
|
|
1771
1805
|
return DIACRITIC_VARIANTS_LETTERS[character] || character;
|
|
1772
1806
|
});
|
|
1773
1807
|
}
|
|
1774
|
-
|
|
1775
|
-
* TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
|
|
1776
|
-
*/
|
|
1808
|
+
// TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
|
|
1777
1809
|
|
|
1778
1810
|
/**
|
|
1779
1811
|
* Converts a given text to kebab-case format.
|
|
@@ -1784,6 +1816,7 @@
|
|
|
1784
1816
|
* @returns The kebab-case formatted string.
|
|
1785
1817
|
* @example 'hello-world'
|
|
1786
1818
|
* @example 'i-love-promptbook'
|
|
1819
|
+
*
|
|
1787
1820
|
* @public exported from `@promptbook/utils`
|
|
1788
1821
|
*/
|
|
1789
1822
|
function normalizeToKebabCase(text) {
|
|
@@ -1824,14 +1857,13 @@
|
|
|
1824
1857
|
normalizedName = normalizedName.replace(/-$/, '');
|
|
1825
1858
|
return normalizedName;
|
|
1826
1859
|
}
|
|
1827
|
-
|
|
1828
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
1829
|
-
*/
|
|
1860
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
1830
1861
|
|
|
1831
1862
|
/**
|
|
1832
1863
|
* Tests if given string is valid file path.
|
|
1833
1864
|
*
|
|
1834
1865
|
* Note: This does not check if the file exists only if the path is valid
|
|
1866
|
+
*
|
|
1835
1867
|
* @public exported from `@promptbook/utils`
|
|
1836
1868
|
*/
|
|
1837
1869
|
function isValidFilePath(filename) {
|
|
@@ -1880,9 +1912,7 @@
|
|
|
1880
1912
|
}
|
|
1881
1913
|
return false;
|
|
1882
1914
|
}
|
|
1883
|
-
|
|
1884
|
-
* TODO: [🍏] Implement for MacOs
|
|
1885
|
-
*/
|
|
1915
|
+
// TODO: [🍏] Implement for MacOs
|
|
1886
1916
|
|
|
1887
1917
|
/**
|
|
1888
1918
|
* Tests if given string is valid URL.
|
|
@@ -1922,6 +1952,7 @@
|
|
|
1922
1952
|
*
|
|
1923
1953
|
* @param text with emojis
|
|
1924
1954
|
* @returns text without emojis
|
|
1955
|
+
*
|
|
1925
1956
|
* @public exported from `@promptbook/utils`
|
|
1926
1957
|
*/
|
|
1927
1958
|
function removeEmojis(text) {
|
|
@@ -1941,6 +1972,7 @@
|
|
|
1941
1972
|
* @param value The title string to be converted to a name.
|
|
1942
1973
|
* @returns A normalized name derived from the input title.
|
|
1943
1974
|
* @example 'Hello World!' -> 'hello-world'
|
|
1975
|
+
*
|
|
1944
1976
|
* @public exported from `@promptbook/utils`
|
|
1945
1977
|
*/
|
|
1946
1978
|
function titleToName(value) {
|
|
@@ -2021,13 +2053,11 @@
|
|
|
2021
2053
|
};
|
|
2022
2054
|
return fileHandler;
|
|
2023
2055
|
}
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
* TODO: [🐱🐉][🧠] Make some smart crop
|
|
2030
|
-
*/
|
|
2056
|
+
// 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
|
|
2057
|
+
// Note: Not using `FileCacheStorage` for two reasons:
|
|
2058
|
+
// 1. Need to store more than serialized JSONs.
|
|
2059
|
+
// 2. Need to switch between a `rootDirname` and `cacheDirname` <- TODO: [😡]
|
|
2060
|
+
// TODO: [🐱🐉][🧠] Make some smart crop
|
|
2031
2061
|
|
|
2032
2062
|
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"}];
|
|
2033
2063
|
|
|
@@ -2058,9 +2088,7 @@
|
|
|
2058
2088
|
Object.setPrototypeOf(this, ParseError.prototype);
|
|
2059
2089
|
}
|
|
2060
2090
|
}
|
|
2061
|
-
|
|
2062
|
-
* TODO: Maybe split `ParseError` and `ApplyError`
|
|
2063
|
-
*/
|
|
2091
|
+
// TODO: Maybe split `ParseError` and `ApplyError`
|
|
2064
2092
|
|
|
2065
2093
|
/**
|
|
2066
2094
|
* This error type indicates that somewhere in the code non-Error object was thrown and it was wrapped into the `WrappedError`
|
|
@@ -2141,6 +2169,7 @@
|
|
|
2141
2169
|
* @param {string} pipelineString the candidate for a pipeline string
|
|
2142
2170
|
* @returns {PipelineString} the same string as input, but validated as valid
|
|
2143
2171
|
* @throws {ParseError} if the string is not a valid pipeline string
|
|
2172
|
+
*
|
|
2144
2173
|
* @public exported from `@promptbook/core`
|
|
2145
2174
|
*/
|
|
2146
2175
|
function validatePipelineString(pipelineString) {
|
|
@@ -2159,17 +2188,16 @@
|
|
|
2159
2188
|
// <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
|
|
2160
2189
|
return pipelineString;
|
|
2161
2190
|
}
|
|
2162
|
-
|
|
2163
|
-
* TODO: [🧠][🈴] Where is the best location for this file
|
|
2164
|
-
*/
|
|
2191
|
+
// TODO: [🧠][🈴] Where is the best location for this file
|
|
2165
2192
|
|
|
2166
2193
|
/**
|
|
2167
2194
|
* Prettify the html code
|
|
2168
2195
|
*
|
|
2169
2196
|
* @param content raw html code
|
|
2170
2197
|
* @returns formatted html code
|
|
2171
|
-
* @private withing the package because of HUGE size of prettier dependency
|
|
2172
2198
|
* @deprecated Prettier removed from Promptbook due to package size
|
|
2199
|
+
*
|
|
2200
|
+
* @private withing the package because of HUGE size of prettier dependency
|
|
2173
2201
|
*/
|
|
2174
2202
|
function prettifyMarkdown(content) {
|
|
2175
2203
|
return (content + `\n\n<!-- Note: Prettier removed from Promptbook -->`);
|
|
@@ -2192,6 +2220,7 @@
|
|
|
2192
2220
|
* @deprecated TODO: [🥍][🧠] Backup original files in `PipelineJson` same as in Promptbook.studio
|
|
2193
2221
|
* @param pipelineJson Promptbook in JSON format (.bookc)
|
|
2194
2222
|
* @returns Promptbook in string format (.book.md)
|
|
2223
|
+
*
|
|
2195
2224
|
* @public exported from `@promptbook/core`
|
|
2196
2225
|
*/
|
|
2197
2226
|
function pipelineJsonToString(pipelineJson) {
|
|
@@ -2308,6 +2337,8 @@
|
|
|
2308
2337
|
return validatePipelineString(pipelineString);
|
|
2309
2338
|
}
|
|
2310
2339
|
/**
|
|
2340
|
+
* Handles task parameter Json to string.
|
|
2341
|
+
*
|
|
2311
2342
|
* @private internal utility of `pipelineJsonToString`
|
|
2312
2343
|
*/
|
|
2313
2344
|
function taskParameterJsonToString(taskParameterJson) {
|
|
@@ -2318,18 +2349,17 @@
|
|
|
2318
2349
|
}
|
|
2319
2350
|
return parameterString;
|
|
2320
2351
|
}
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
* TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
|
|
2327
|
-
*/
|
|
2352
|
+
// TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
|
|
2353
|
+
// TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
|
|
2354
|
+
// TODO: [🏛] Maybe make some markdown builder
|
|
2355
|
+
// TODO: [🏛] Escape all
|
|
2356
|
+
// TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
|
|
2328
2357
|
|
|
2329
2358
|
/**
|
|
2330
2359
|
* Orders JSON object by keys
|
|
2331
2360
|
*
|
|
2332
2361
|
* @returns The same type of object as the input re-ordered
|
|
2362
|
+
*
|
|
2333
2363
|
* @public exported from `@promptbook/utils`
|
|
2334
2364
|
*/
|
|
2335
2365
|
function orderJson(options) {
|
|
@@ -2348,6 +2378,7 @@
|
|
|
2348
2378
|
* Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
|
|
2349
2379
|
*
|
|
2350
2380
|
* @returns The same object as the input, but deeply frozen
|
|
2381
|
+
*
|
|
2351
2382
|
* @public exported from `@promptbook/utils`
|
|
2352
2383
|
*/
|
|
2353
2384
|
function $deepFreeze(objectValue) {
|
|
@@ -2364,9 +2395,7 @@
|
|
|
2364
2395
|
Object.freeze(objectValue);
|
|
2365
2396
|
return objectValue;
|
|
2366
2397
|
}
|
|
2367
|
-
|
|
2368
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2369
|
-
*/
|
|
2398
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2370
2399
|
|
|
2371
2400
|
/**
|
|
2372
2401
|
* Checks if the value is [🚉] serializable as JSON
|
|
@@ -2386,6 +2415,7 @@
|
|
|
2386
2415
|
* - And much more...
|
|
2387
2416
|
*
|
|
2388
2417
|
* @throws UnexpectedError if the value is not serializable as JSON
|
|
2418
|
+
*
|
|
2389
2419
|
* @public exported from `@promptbook/utils`
|
|
2390
2420
|
*/
|
|
2391
2421
|
function checkSerializableAsJson(options) {
|
|
@@ -2500,11 +2530,9 @@
|
|
|
2500
2530
|
`));
|
|
2501
2531
|
}
|
|
2502
2532
|
}
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
* Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
|
|
2507
|
-
*/
|
|
2533
|
+
// TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
|
|
2534
|
+
// TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
|
|
2535
|
+
// Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
|
|
2508
2536
|
|
|
2509
2537
|
/**
|
|
2510
2538
|
* Creates a deep clone of the given object
|
|
@@ -2514,6 +2542,7 @@
|
|
|
2514
2542
|
*
|
|
2515
2543
|
* @param objectValue The object to clone.
|
|
2516
2544
|
* @returns A deep, writable clone of the input object.
|
|
2545
|
+
*
|
|
2517
2546
|
* @public exported from `@promptbook/utils`
|
|
2518
2547
|
*/
|
|
2519
2548
|
function deepClone(objectValue) {
|
|
@@ -2530,9 +2559,7 @@
|
|
|
2530
2559
|
> return Object.assign({}, objectValue);
|
|
2531
2560
|
*/
|
|
2532
2561
|
}
|
|
2533
|
-
|
|
2534
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2535
|
-
*/
|
|
2562
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2536
2563
|
|
|
2537
2564
|
/**
|
|
2538
2565
|
* Utility to export a JSON object from a function
|
|
@@ -2545,6 +2572,7 @@
|
|
|
2545
2572
|
* Note: This function does not mutates the given object
|
|
2546
2573
|
*
|
|
2547
2574
|
* @returns The same type of object as the input but read-only and re-ordered
|
|
2575
|
+
*
|
|
2548
2576
|
* @public exported from `@promptbook/utils`
|
|
2549
2577
|
*/
|
|
2550
2578
|
function exportJson(options) {
|
|
@@ -2564,9 +2592,7 @@
|
|
|
2564
2592
|
$deepFreeze(orderedValue);
|
|
2565
2593
|
return orderedValue;
|
|
2566
2594
|
}
|
|
2567
|
-
|
|
2568
|
-
* TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2569
|
-
*/
|
|
2595
|
+
// TODO: [🧠] Is there a way how to meaningfully test this utility
|
|
2570
2596
|
|
|
2571
2597
|
/**
|
|
2572
2598
|
* Order of keys in the pipeline JSON
|
|
@@ -2626,9 +2652,7 @@
|
|
|
2626
2652
|
// <- TODO: Add [emoji] + instructions ACRY when adding new reserved parameter
|
|
2627
2653
|
],
|
|
2628
2654
|
});
|
|
2629
|
-
|
|
2630
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2631
|
-
*/
|
|
2655
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
2632
2656
|
|
|
2633
2657
|
/**
|
|
2634
2658
|
* This error indicates that the promptbook object has valid syntax (=can be parsed) but contains logical errors (like circular dependencies)
|
|
@@ -2666,12 +2690,13 @@
|
|
|
2666
2690
|
* Tests if given string is valid promptbook version
|
|
2667
2691
|
* It looks into list of known promptbook versions.
|
|
2668
2692
|
*
|
|
2669
|
-
* @see https://www.npmjs.com/package/promptbook?activeTab=versions
|
|
2670
2693
|
* 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.
|
|
2671
2694
|
* Note: There are two similar functions:
|
|
2672
2695
|
* - `isValidSemanticVersion` which tests any semantic version
|
|
2673
2696
|
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
|
|
2674
2697
|
*
|
|
2698
|
+
* @see https://www.npmjs.com/package/promptbook?activeTab=versions
|
|
2699
|
+
*
|
|
2675
2700
|
* @public exported from `@promptbook/utils`
|
|
2676
2701
|
*/
|
|
2677
2702
|
function isValidPromptbookVersion(version) {
|
|
@@ -2714,9 +2739,7 @@
|
|
|
2714
2739
|
*/
|
|
2715
2740
|
return true;
|
|
2716
2741
|
}
|
|
2717
|
-
|
|
2718
|
-
* TODO: [🐠] Maybe more info why the URL is invalid
|
|
2719
|
-
*/
|
|
2742
|
+
// TODO: [🐠] Maybe more info why the URL is invalid
|
|
2720
2743
|
|
|
2721
2744
|
/**
|
|
2722
2745
|
* Validates PipelineJson if it is logically valid
|
|
@@ -2733,6 +2756,7 @@
|
|
|
2733
2756
|
* @param pipeline valid or invalid PipelineJson
|
|
2734
2757
|
* @returns the same pipeline if it is logically valid
|
|
2735
2758
|
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
2759
|
+
*
|
|
2736
2760
|
* @public exported from `@promptbook/core`
|
|
2737
2761
|
*/
|
|
2738
2762
|
function validatePipeline(pipeline) {
|
|
@@ -2757,6 +2781,8 @@
|
|
|
2757
2781
|
return pipeline;
|
|
2758
2782
|
}
|
|
2759
2783
|
/**
|
|
2784
|
+
* Validates pipeline inner function.
|
|
2785
|
+
*
|
|
2760
2786
|
* @private internal function for `validatePipeline`
|
|
2761
2787
|
*/
|
|
2762
2788
|
function validatePipeline_InnerFunction(pipeline) {
|
|
@@ -3001,15 +3027,13 @@
|
|
|
3001
3027
|
* > * - ...
|
|
3002
3028
|
* > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
|
|
3003
3029
|
*/
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
3012
|
-
*/
|
|
3030
|
+
// TODO: [🧳][main] !!4 Validate that all examples match expectations
|
|
3031
|
+
// TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
|
|
3032
|
+
// TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
|
|
3033
|
+
// TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
|
|
3034
|
+
// TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
|
|
3035
|
+
// TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
|
|
3036
|
+
// TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
3013
3037
|
|
|
3014
3038
|
/**
|
|
3015
3039
|
* This error indicates that promptbook not found in the collection
|
|
@@ -3042,6 +3066,7 @@
|
|
|
3042
3066
|
*
|
|
3043
3067
|
* @param template the string template with parameters in {curly} braces
|
|
3044
3068
|
* @returns the list of parameter names
|
|
3069
|
+
*
|
|
3045
3070
|
* @public exported from `@promptbook/utils`
|
|
3046
3071
|
*/
|
|
3047
3072
|
function extractParameterNames(template) {
|
|
@@ -3058,6 +3083,7 @@
|
|
|
3058
3083
|
* Unprepare just strips the preparation data of the pipeline
|
|
3059
3084
|
*
|
|
3060
3085
|
* @deprecated In future version this function will be removed or deprecated
|
|
3086
|
+
*
|
|
3061
3087
|
* @public exported from `@promptbook/core`
|
|
3062
3088
|
*/
|
|
3063
3089
|
function unpreparePipeline(pipeline) {
|
|
@@ -3086,18 +3112,17 @@
|
|
|
3086
3112
|
},
|
|
3087
3113
|
});
|
|
3088
3114
|
}
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
* TODO: [🍙] Make some standard order of json properties
|
|
3093
|
-
*/
|
|
3115
|
+
// TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
|
|
3116
|
+
// TODO: Write tests for `preparePipeline`
|
|
3117
|
+
// TODO: [🍙] Make some standard order of json properties
|
|
3094
3118
|
|
|
3095
3119
|
/**
|
|
3096
3120
|
* Library of pipelines that groups together pipelines for an application.
|
|
3097
3121
|
* This implementation is a very thin wrapper around the Array / Map of pipelines.
|
|
3098
3122
|
*
|
|
3099
|
-
* @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
|
|
3100
3123
|
* @see https://github.com/webgptorg/pipeline#pipeline-collection
|
|
3124
|
+
*
|
|
3125
|
+
* @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
|
|
3101
3126
|
*/
|
|
3102
3127
|
class SimplePipelineCollection {
|
|
3103
3128
|
/**
|
|
@@ -3201,6 +3226,7 @@
|
|
|
3201
3226
|
*
|
|
3202
3227
|
* @param promptbookSources
|
|
3203
3228
|
* @returns PipelineCollection
|
|
3229
|
+
*
|
|
3204
3230
|
* @public exported from `@promptbook/core`
|
|
3205
3231
|
*/
|
|
3206
3232
|
function createPipelineCollectionFromJson(...promptbooks) {
|
|
@@ -3213,16 +3239,15 @@
|
|
|
3213
3239
|
* Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
|
|
3214
3240
|
* Note: This function is cryptographically secure (it uses crypto.randomBytes internally)
|
|
3215
3241
|
*
|
|
3216
|
-
* @private internal helper function
|
|
3217
3242
|
* @returns secure random token
|
|
3243
|
+
*
|
|
3244
|
+
* @private internal helper function
|
|
3218
3245
|
*/
|
|
3219
3246
|
function $randomToken(randomness) {
|
|
3220
3247
|
return crypto.randomBytes(randomness).toString('hex');
|
|
3221
3248
|
}
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
* TODO: Maybe use nanoid instead https://github.com/ai/nanoid
|
|
3225
|
-
*/
|
|
3249
|
+
// TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
|
3250
|
+
// TODO: Maybe use nanoid instead https://github.com/ai/nanoid
|
|
3226
3251
|
|
|
3227
3252
|
/**
|
|
3228
3253
|
* This error indicates errors during the execution of the pipeline
|
|
@@ -3239,9 +3264,7 @@
|
|
|
3239
3264
|
Object.setPrototypeOf(this, PipelineExecutionError.prototype);
|
|
3240
3265
|
}
|
|
3241
3266
|
}
|
|
3242
|
-
|
|
3243
|
-
* TODO: [🧠][🌂] Add id to all errors
|
|
3244
|
-
*/
|
|
3267
|
+
// TODO: [🧠][🌂] Add id to all errors
|
|
3245
3268
|
|
|
3246
3269
|
/**
|
|
3247
3270
|
* Determine if the pipeline is fully prepared
|
|
@@ -3364,17 +3387,16 @@
|
|
|
3364
3387
|
Object.setPrototypeOf(this, DatabaseError.prototype);
|
|
3365
3388
|
}
|
|
3366
3389
|
}
|
|
3367
|
-
|
|
3368
|
-
* TODO: [🐱🚀] Explain that NotFoundError ([🐱🚀] and other specific errors) has priority over DatabaseError in some contexts
|
|
3369
|
-
*/
|
|
3390
|
+
// TODO: [🐱🚀] Explain that NotFoundError ([🐱🚀] and other specific errors) has priority over DatabaseError in some contexts
|
|
3370
3391
|
|
|
3371
3392
|
/**
|
|
3372
3393
|
* This error occurs when some expectation is not met in the execution of the pipeline
|
|
3373
3394
|
*
|
|
3374
|
-
* @public exported from `@promptbook/core`
|
|
3375
3395
|
* Note: Do not throw this error, its reserved for `checkExpectations` and `createPipelineExecutor` and public ONLY to be serializable through remote server
|
|
3376
3396
|
* Note: Always thrown in `checkExpectations` and catched in `createPipelineExecutor` and rethrown as `PipelineExecutionError`
|
|
3377
3397
|
* Note: This is a kindof subtype of PipelineExecutionError
|
|
3398
|
+
*
|
|
3399
|
+
* @public exported from `@promptbook/core`
|
|
3378
3400
|
*/
|
|
3379
3401
|
class ExpectError extends Error {
|
|
3380
3402
|
constructor(message) {
|
|
@@ -3507,9 +3529,7 @@
|
|
|
3507
3529
|
...PROMPTBOOK_ERRORS,
|
|
3508
3530
|
...COMMON_JAVASCRIPT_ERRORS,
|
|
3509
3531
|
};
|
|
3510
|
-
|
|
3511
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3512
|
-
*/
|
|
3532
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3513
3533
|
|
|
3514
3534
|
/**
|
|
3515
3535
|
* Serializes an error into a [🚉] JSON-serializable object
|
|
@@ -3578,7 +3598,7 @@
|
|
|
3578
3598
|
|
|
3579
3599
|
/**
|
|
3580
3600
|
* Recursively converts JSON strings to JSON objects
|
|
3581
|
-
|
|
3601
|
+
*
|
|
3582
3602
|
* @public exported from `@promptbook/utils`
|
|
3583
3603
|
*/
|
|
3584
3604
|
function jsonStringsToJsons(object) {
|
|
@@ -3602,9 +3622,7 @@
|
|
|
3602
3622
|
}
|
|
3603
3623
|
return newObject;
|
|
3604
3624
|
}
|
|
3605
|
-
|
|
3606
|
-
* TODO: Type the return type correctly
|
|
3607
|
-
*/
|
|
3625
|
+
// TODO: Type the return type correctly
|
|
3608
3626
|
|
|
3609
3627
|
/**
|
|
3610
3628
|
* Deserializes the error object
|
|
@@ -3639,6 +3657,7 @@
|
|
|
3639
3657
|
*
|
|
3640
3658
|
* @param executionResult - The partial result of the Promptbook execution
|
|
3641
3659
|
* @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred
|
|
3660
|
+
*
|
|
3642
3661
|
* @private internal helper function of `asPromise` method of `ExecutionTask`
|
|
3643
3662
|
*/
|
|
3644
3663
|
function assertsTaskSuccessful(executionResult) {
|
|
@@ -3669,9 +3688,7 @@
|
|
|
3669
3688
|
`));
|
|
3670
3689
|
}
|
|
3671
3690
|
}
|
|
3672
|
-
|
|
3673
|
-
* TODO: [🧠] Can this return type be better typed than void
|
|
3674
|
-
*/
|
|
3691
|
+
// TODO: [🧠] Can this return type be better typed than void
|
|
3675
3692
|
|
|
3676
3693
|
/**
|
|
3677
3694
|
* Helper to create a new task
|
|
@@ -3862,10 +3879,8 @@
|
|
|
3862
3879
|
},
|
|
3863
3880
|
};
|
|
3864
3881
|
}
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
* TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
|
|
3868
|
-
*/
|
|
3882
|
+
// TODO: Maybe allow to terminate the task and add getter `isFinished` or `status`
|
|
3883
|
+
// TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
|
|
3869
3884
|
|
|
3870
3885
|
/**
|
|
3871
3886
|
* Represents the uncertain value
|
|
@@ -3933,9 +3948,7 @@
|
|
|
3933
3948
|
pagesCount: UNCERTAIN_ZERO_VALUE,
|
|
3934
3949
|
},
|
|
3935
3950
|
});
|
|
3936
|
-
|
|
3937
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3938
|
-
*/
|
|
3951
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3939
3952
|
|
|
3940
3953
|
/**
|
|
3941
3954
|
* Async version of Array.forEach
|
|
@@ -3943,8 +3956,9 @@
|
|
|
3943
3956
|
* @param array - Array to iterate over
|
|
3944
3957
|
* @param options - Options for the function
|
|
3945
3958
|
* @param callbackfunction - Function to call for each item
|
|
3946
|
-
* @public exported from `@promptbook/utils`
|
|
3947
3959
|
* @deprecated [🪂] Use queues instead
|
|
3960
|
+
*
|
|
3961
|
+
* @public exported from `@promptbook/utils`
|
|
3948
3962
|
*/
|
|
3949
3963
|
async function forEachAsync(array, options, callbackfunction) {
|
|
3950
3964
|
const { maxParallelCount = Infinity } = options;
|
|
@@ -4029,6 +4043,7 @@
|
|
|
4029
4043
|
*
|
|
4030
4044
|
* @param llmTools - The LLM tools to be intercepted and tracked
|
|
4031
4045
|
* @returns Full proxy of the tools with added usage tracking capabilities
|
|
4046
|
+
*
|
|
4032
4047
|
* @public exported from `@promptbook/core`
|
|
4033
4048
|
*/
|
|
4034
4049
|
function countUsage(llmTools) {
|
|
@@ -4153,6 +4168,7 @@
|
|
|
4153
4168
|
* Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
|
|
4154
4169
|
*
|
|
4155
4170
|
* Note: Internal utility of `joinLlmExecutionTools` but exposed type
|
|
4171
|
+
*
|
|
4156
4172
|
* @public exported from `@promptbook/core`
|
|
4157
4173
|
*/
|
|
4158
4174
|
class MultipleLlmExecutionTools {
|
|
@@ -4315,16 +4331,16 @@
|
|
|
4315
4331
|
* `MultipleLlmExecutionTools` object. It provides failover and aggregation logic:
|
|
4316
4332
|
*
|
|
4317
4333
|
* 1. **Failover**: When a model call is made, it tries providers in the order they were provided.
|
|
4318
|
-
*
|
|
4334
|
+
* If the first provider doesn't support the requested model or fails, it tries the next one.
|
|
4319
4335
|
* 2. **Aggregation**: `listModels` returns a combined list of all models available from all providers.
|
|
4320
4336
|
* 3. **Empty case**: If no tools are provided, it logs a warning (as Promptbook requires LLMs to function).
|
|
4321
4337
|
*
|
|
4338
|
+
* Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
|
|
4339
|
+
*
|
|
4322
4340
|
* @param title - A descriptive title for this collection of joined tools
|
|
4323
4341
|
* @param llmExecutionTools - An array of execution tools to be joined
|
|
4324
4342
|
* @returns A single unified execution tool wrapper
|
|
4325
4343
|
*
|
|
4326
|
-
* Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
|
|
4327
|
-
*
|
|
4328
4344
|
* @public exported from `@promptbook/core`
|
|
4329
4345
|
*/
|
|
4330
4346
|
function joinLlmExecutionTools(title, ...llmExecutionTools) {
|
|
@@ -4361,10 +4377,8 @@
|
|
|
4361
4377
|
}
|
|
4362
4378
|
return new MultipleLlmExecutionTools(title || 'Multiple LLM Providers joined by `joinLlmExecutionTools`', ...llmExecutionTools);
|
|
4363
4379
|
}
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
* TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
4367
|
-
*/
|
|
4380
|
+
// TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
|
|
4381
|
+
// TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
4368
4382
|
|
|
4369
4383
|
/**
|
|
4370
4384
|
* Just returns the given `LlmExecutionTools` or joins multiple into one
|
|
@@ -4378,15 +4392,14 @@
|
|
|
4378
4392
|
: joinLlmExecutionTools('Multiple LLM Providers joined by `getSingleLlmExecutionTools`', ..._llms);
|
|
4379
4393
|
return llmTools;
|
|
4380
4394
|
}
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
* TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
4384
|
-
*/
|
|
4395
|
+
// TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
|
|
4396
|
+
// TODO: [👷♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
|
|
4385
4397
|
|
|
4386
4398
|
/**
|
|
4387
4399
|
* Prepares the persona for the pipeline
|
|
4388
4400
|
*
|
|
4389
4401
|
* @see https://github.com/webgptorg/promptbook/discussions/22
|
|
4402
|
+
*
|
|
4390
4403
|
* @public exported from `@promptbook/core`
|
|
4391
4404
|
*/
|
|
4392
4405
|
async function preparePersona(personaDescription, tools, options) {
|
|
@@ -4443,13 +4456,11 @@
|
|
|
4443
4456
|
modelsRequirements,
|
|
4444
4457
|
};
|
|
4445
4458
|
}
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
* TODO: [🏢] Check validity of `temperature` in pipeline
|
|
4452
|
-
*/
|
|
4459
|
+
// TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
|
|
4460
|
+
// TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
|
|
4461
|
+
// TODO: [🏢] Check validity of `modelName` in pipeline
|
|
4462
|
+
// TODO: [🏢] Check validity of `systemMessage` in pipeline
|
|
4463
|
+
// TODO: [🏢] Check validity of `temperature` in pipeline
|
|
4453
4464
|
|
|
4454
4465
|
/**
|
|
4455
4466
|
* Safely retrieves the global scope object (window in browser, global in Node.js)
|
|
@@ -4457,7 +4468,7 @@
|
|
|
4457
4468
|
*
|
|
4458
4469
|
* Note: `$` is used to indicate that this function is not a pure function - it access global scope
|
|
4459
4470
|
*
|
|
4460
|
-
*
|
|
4471
|
+
* @private internal function of `$Register`
|
|
4461
4472
|
*/
|
|
4462
4473
|
function $getGlobalScope() {
|
|
4463
4474
|
return Function('return this')();
|
|
@@ -4472,6 +4483,7 @@
|
|
|
4472
4483
|
* @returns The normalized text in SCREAMING_CASE format.
|
|
4473
4484
|
* @example 'HELLO_WORLD'
|
|
4474
4485
|
* @example 'I_LOVE_PROMPTBOOK'
|
|
4486
|
+
*
|
|
4475
4487
|
* @public exported from `@promptbook/utils`
|
|
4476
4488
|
*/
|
|
4477
4489
|
function normalizeTo_SCREAMING_CASE(text) {
|
|
@@ -4529,6 +4541,7 @@
|
|
|
4529
4541
|
* @returns The normalized text in snake_case format.
|
|
4530
4542
|
* @example 'hello_world'
|
|
4531
4543
|
* @example 'i_love_promptbook'
|
|
4544
|
+
*
|
|
4532
4545
|
* @public exported from `@promptbook/utils`
|
|
4533
4546
|
*/
|
|
4534
4547
|
function normalizeTo_snake_case(text) {
|
|
@@ -4587,26 +4600,26 @@
|
|
|
4587
4600
|
* Global registry for storing metadata about all available scrapers and converters.
|
|
4588
4601
|
*
|
|
4589
4602
|
* Note: `$` is used to indicate that this interacts with the global scope.
|
|
4603
|
+
*
|
|
4590
4604
|
* @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
|
|
4605
|
+
*
|
|
4591
4606
|
* @public exported from `@promptbook/core`
|
|
4592
4607
|
*/
|
|
4593
4608
|
const $scrapersMetadataRegister = new $Register('scrapers_metadata');
|
|
4594
|
-
|
|
4595
|
-
* TODO: [®] DRY Register logic
|
|
4596
|
-
*/
|
|
4609
|
+
// TODO: [®] DRY Register logic
|
|
4597
4610
|
|
|
4598
4611
|
/**
|
|
4599
4612
|
* Registry for all available scrapers in the system.
|
|
4600
4613
|
* Central point for registering and accessing different types of content scrapers.
|
|
4601
4614
|
*
|
|
4602
4615
|
* Note: `$` is used to indicate that this interacts with the global scope
|
|
4616
|
+
*
|
|
4603
4617
|
* @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
|
|
4618
|
+
*
|
|
4604
4619
|
* @public exported from `@promptbook/core`
|
|
4605
4620
|
*/
|
|
4606
4621
|
const $scrapersRegister = new $Register('scraper_constructors');
|
|
4607
|
-
|
|
4608
|
-
* TODO: [®] DRY Register logic
|
|
4609
|
-
*/
|
|
4622
|
+
// TODO: [®] DRY Register logic
|
|
4610
4623
|
|
|
4611
4624
|
/**
|
|
4612
4625
|
* Creates a message with all registered scrapers
|
|
@@ -4691,9 +4704,7 @@
|
|
|
4691
4704
|
|
|
4692
4705
|
`);
|
|
4693
4706
|
}
|
|
4694
|
-
|
|
4695
|
-
* TODO: [®] DRY Register logic
|
|
4696
|
-
*/
|
|
4707
|
+
// TODO: [®] DRY Register logic
|
|
4697
4708
|
|
|
4698
4709
|
/**
|
|
4699
4710
|
* Creates unique name for the source
|
|
@@ -4712,9 +4723,7 @@
|
|
|
4712
4723
|
// <- TODO: Use MAX_FILENAME_LENGTH
|
|
4713
4724
|
return name;
|
|
4714
4725
|
}
|
|
4715
|
-
|
|
4716
|
-
* TODO: [🐱🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
|
|
4717
|
-
*/
|
|
4726
|
+
// TODO: [🐱🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
|
|
4718
4727
|
|
|
4719
4728
|
/**
|
|
4720
4729
|
* Convert file extension to mime type
|
|
@@ -4763,9 +4772,7 @@
|
|
|
4763
4772
|
`));
|
|
4764
4773
|
}
|
|
4765
4774
|
};
|
|
4766
|
-
|
|
4767
|
-
* TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
|
|
4768
|
-
*/
|
|
4775
|
+
// TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
|
|
4769
4776
|
|
|
4770
4777
|
/**
|
|
4771
4778
|
* Factory function that creates a handler for processing knowledge sources.
|
|
@@ -4985,6 +4992,7 @@
|
|
|
4985
4992
|
* Prepares the knowledge pieces
|
|
4986
4993
|
*
|
|
4987
4994
|
* @see https://github.com/webgptorg/promptbook/discussions/41
|
|
4995
|
+
*
|
|
4988
4996
|
* @public exported from `@promptbook/core`
|
|
4989
4997
|
*/
|
|
4990
4998
|
async function prepareKnowledgePieces(knowledgeSources, tools, options) {
|
|
@@ -5126,25 +5134,24 @@
|
|
|
5126
5134
|
});
|
|
5127
5135
|
return { tasksPrepared };
|
|
5128
5136
|
}
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
5138
|
-
*/
|
|
5137
|
+
// TODO: [😂] Adding knowledge should be convert to async high-level abstractions, similar thing with expectations to sync high-level abstractions
|
|
5138
|
+
// TODO: [🧠] Add context to each task (if missing)
|
|
5139
|
+
// TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
|
|
5140
|
+
// TODO: [♨][main] !!3 Prepare index the examples and maybe tasks
|
|
5141
|
+
// TODO: Write tests for `preparePipeline`
|
|
5142
|
+
// TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
|
|
5143
|
+
// TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
|
|
5144
|
+
// TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
5139
5145
|
|
|
5140
5146
|
/**
|
|
5141
5147
|
* Prepare pipeline locally
|
|
5142
5148
|
*
|
|
5143
|
-
* @see https://github.com/webgptorg/promptbook/discussions/196
|
|
5144
|
-
*
|
|
5145
5149
|
* Note: This function does not validate logic of the pipeline
|
|
5146
5150
|
* Note: This function acts as part of compilation process
|
|
5147
5151
|
* Note: When the pipeline is already prepared, it returns the same pipeline
|
|
5152
|
+
*
|
|
5153
|
+
* @see https://github.com/webgptorg/promptbook/discussions/196
|
|
5154
|
+
*
|
|
5148
5155
|
* @public exported from `@promptbook/core`
|
|
5149
5156
|
*/
|
|
5150
5157
|
async function preparePipeline(pipeline, tools, options) {
|
|
@@ -5315,8 +5322,8 @@
|
|
|
5315
5322
|
* This is useful and used in the `templateParameters` function
|
|
5316
5323
|
*
|
|
5317
5324
|
* Note: This function is not just calling `toString` method
|
|
5318
|
-
*
|
|
5319
|
-
*
|
|
5325
|
+
* It's more complex and can handle this conversion specifically for LLM models
|
|
5326
|
+
* See `VALUE_STRINGS`
|
|
5320
5327
|
*
|
|
5321
5328
|
* Note: There are 2 similar functions
|
|
5322
5329
|
* - `valueToString` converts value to string for LLM models as human-readable string
|
|
@@ -5369,6 +5376,7 @@
|
|
|
5369
5376
|
* @param script from which to extract the variables
|
|
5370
5377
|
* @returns the list of variable names
|
|
5371
5378
|
* @throws {ParseError} if the script is invalid
|
|
5379
|
+
*
|
|
5372
5380
|
* @public exported from `@promptbook/javascript`
|
|
5373
5381
|
*/
|
|
5374
5382
|
function extractVariablesFromJavascript(script) {
|
|
@@ -5434,9 +5442,7 @@
|
|
|
5434
5442
|
}
|
|
5435
5443
|
return variables;
|
|
5436
5444
|
}
|
|
5437
|
-
|
|
5438
|
-
* TODO: [🔣] Support for multiple languages - python, java,...
|
|
5439
|
-
*/
|
|
5445
|
+
// TODO: [🔣] Support for multiple languages - python, java,...
|
|
5440
5446
|
|
|
5441
5447
|
/**
|
|
5442
5448
|
* Parses the task and returns the set of all used parameters
|
|
@@ -5444,6 +5450,7 @@
|
|
|
5444
5450
|
* @param task the task with used parameters
|
|
5445
5451
|
* @returns the set of parameter names
|
|
5446
5452
|
* @throws {ParseError} if the script is invalid
|
|
5453
|
+
*
|
|
5447
5454
|
* @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
|
|
5448
5455
|
*/
|
|
5449
5456
|
function extractParameterNamesFromTask(task) {
|
|
@@ -5484,14 +5491,13 @@
|
|
|
5484
5491
|
}
|
|
5485
5492
|
return parameterNames;
|
|
5486
5493
|
}
|
|
5487
|
-
|
|
5488
|
-
* TODO: [🔣] If script require contentLanguage
|
|
5489
|
-
*/
|
|
5494
|
+
// TODO: [🔣] If script require contentLanguage
|
|
5490
5495
|
|
|
5491
5496
|
/**
|
|
5492
5497
|
* Create difference set of two sets.
|
|
5493
5498
|
*
|
|
5494
5499
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5500
|
+
*
|
|
5495
5501
|
* @public exported from `@promptbook/utils`
|
|
5496
5502
|
*/
|
|
5497
5503
|
function difference(a, b, isEqual = (a, b) => a === b) {
|
|
@@ -5503,14 +5509,13 @@
|
|
|
5503
5509
|
}
|
|
5504
5510
|
return diff;
|
|
5505
5511
|
}
|
|
5506
|
-
|
|
5507
|
-
* TODO: [🧠][💯] Maybe also implement symmetricDifference
|
|
5508
|
-
*/
|
|
5512
|
+
// TODO: [🧠][💯] Maybe also implement symmetricDifference
|
|
5509
5513
|
|
|
5510
5514
|
/**
|
|
5511
5515
|
* Creates a new set with all elements that are present in either set
|
|
5512
5516
|
*
|
|
5513
5517
|
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
|
|
5518
|
+
*
|
|
5514
5519
|
* @public exported from `@promptbook/utils`
|
|
5515
5520
|
*/
|
|
5516
5521
|
function union(...sets) {
|
|
@@ -5576,8 +5581,9 @@
|
|
|
5576
5581
|
/**
|
|
5577
5582
|
* Definition for CSV spreadsheet
|
|
5578
5583
|
*
|
|
5584
|
+
* TODO: [🏢] Export from package `@promptbook/csv`
|
|
5585
|
+
*
|
|
5579
5586
|
* @public exported from `@promptbook/core`
|
|
5580
|
-
* <- TODO: [🏢] Export from package `@promptbook/csv`
|
|
5581
5587
|
*/
|
|
5582
5588
|
const CsvFormatParser = {
|
|
5583
5589
|
formatName: 'CSV',
|
|
@@ -5667,13 +5673,11 @@
|
|
|
5667
5673
|
},
|
|
5668
5674
|
],
|
|
5669
5675
|
};
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
* TODO: [🏢] Allow to expect something inside CSV objects and other formats
|
|
5676
|
-
*/
|
|
5676
|
+
// TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
|
|
5677
|
+
// TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
|
|
5678
|
+
// TODO: [🍓] In `CsvFormatParser` implement `heal
|
|
5679
|
+
// TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
|
|
5680
|
+
// TODO: [🏢] Allow to expect something inside CSV objects and other formats
|
|
5677
5681
|
|
|
5678
5682
|
/**
|
|
5679
5683
|
* Definition for JSON format
|
|
@@ -5694,17 +5698,15 @@
|
|
|
5694
5698
|
},
|
|
5695
5699
|
subvalueParsers: [],
|
|
5696
5700
|
};
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
* TODO: [🏢] Allow to expect something inside JSON objects and other formats
|
|
5707
|
-
*/
|
|
5701
|
+
// TODO: [🧠] Maybe proper instance of object
|
|
5702
|
+
// TODO: [0] Make string_serialized_json
|
|
5703
|
+
// TODO: [1] Make type for JSON Settings and Schema
|
|
5704
|
+
// TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
|
|
5705
|
+
// TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
|
|
5706
|
+
// TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
|
|
5707
|
+
// TODO: [🍓] In `JsonFormatParser` implement `heal
|
|
5708
|
+
// TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
|
|
5709
|
+
// TODO: [🏢] Allow to expect something inside JSON objects and other formats
|
|
5708
5710
|
|
|
5709
5711
|
/**
|
|
5710
5712
|
* Definition for any text - this will be always valid
|
|
@@ -5742,15 +5744,13 @@
|
|
|
5742
5744
|
// <- TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
|
|
5743
5745
|
],
|
|
5744
5746
|
};
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
* TODO: [🏢] Allow to expect something inside each item of list and other formats
|
|
5753
|
-
*/
|
|
5747
|
+
// TODO: [1] Make type for XML Text and Schema
|
|
5748
|
+
// TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
|
|
5749
|
+
// TODO: [🍓] In `TextFormatParser` implement simple `isValid`
|
|
5750
|
+
// TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
|
|
5751
|
+
// TODO: [🍓] In `TextFormatParser` implement `heal
|
|
5752
|
+
// TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
|
|
5753
|
+
// TODO: [🏢] Allow to expect something inside each item of list and other formats
|
|
5754
5754
|
|
|
5755
5755
|
/**
|
|
5756
5756
|
* Function to check if a string is valid XML
|
|
@@ -5795,17 +5795,15 @@
|
|
|
5795
5795
|
},
|
|
5796
5796
|
subvalueParsers: [],
|
|
5797
5797
|
};
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
* TODO: [🏢] Allow to expect something inside XML and other formats
|
|
5808
|
-
*/
|
|
5798
|
+
// TODO: [🧠] Maybe proper instance of object
|
|
5799
|
+
// TODO: [0] Make string_serialized_xml
|
|
5800
|
+
// TODO: [1] Make type for XML Settings and Schema
|
|
5801
|
+
// TODO: [🧠] What to use for validating XMLs - XSD,...
|
|
5802
|
+
// TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
|
|
5803
|
+
// TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
|
|
5804
|
+
// TODO: [🍓] In `XmlFormatParser` implement `heal
|
|
5805
|
+
// TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
|
|
5806
|
+
// TODO: [🏢] Allow to expect something inside XML and other formats
|
|
5809
5807
|
|
|
5810
5808
|
/**
|
|
5811
5809
|
* Definitions for all formats supported by Promptbook
|
|
@@ -5813,9 +5811,7 @@
|
|
|
5813
5811
|
* @private internal index of `...` <- TODO [🏢]
|
|
5814
5812
|
*/
|
|
5815
5813
|
const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser, CsvFormatParser];
|
|
5816
|
-
|
|
5817
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5818
|
-
*/
|
|
5814
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5819
5815
|
|
|
5820
5816
|
/**
|
|
5821
5817
|
* Maps available parameters to expected parameters for a pipeline task.
|
|
@@ -5825,6 +5821,7 @@
|
|
|
5825
5821
|
* 2) Then, if there are unmatched expected and available parameters, map them by order.
|
|
5826
5822
|
*
|
|
5827
5823
|
* @throws {PipelineExecutionError} If the number of unmatched expected and available parameters does not match, or mapping is ambiguous.
|
|
5824
|
+
*
|
|
5828
5825
|
* @private within the repository used in `createPipelineExecutor`
|
|
5829
5826
|
*/
|
|
5830
5827
|
function mapAvailableToExpectedParameters(options) {
|
|
@@ -5887,12 +5884,13 @@
|
|
|
5887
5884
|
* Replaces parameters in template with values from parameters object
|
|
5888
5885
|
*
|
|
5889
5886
|
* Note: This function is not places strings into string,
|
|
5890
|
-
*
|
|
5887
|
+
* It's more complex and can handle this operation specifically for LLM models
|
|
5891
5888
|
*
|
|
5892
5889
|
* @param template the template with parameters in {curly} braces
|
|
5893
5890
|
* @param parameters the object with parameters
|
|
5894
5891
|
* @returns the template with replaced parameters
|
|
5895
5892
|
* @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened
|
|
5893
|
+
*
|
|
5896
5894
|
* @public exported from `@promptbook/utils`
|
|
5897
5895
|
*/
|
|
5898
5896
|
function templateParameters(template, parameters) {
|
|
@@ -5966,6 +5964,7 @@
|
|
|
5966
5964
|
* @param markdown any valid markdown
|
|
5967
5965
|
* @returns code blocks with language and content
|
|
5968
5966
|
* @throws {ParseError} if block is not closed properly
|
|
5967
|
+
*
|
|
5969
5968
|
* @public exported from `@promptbook/markdown-utils`
|
|
5970
5969
|
*/
|
|
5971
5970
|
function extractAllBlocksFromMarkdown(markdown) {
|
|
@@ -6016,9 +6015,7 @@
|
|
|
6016
6015
|
}
|
|
6017
6016
|
return codeBlocks;
|
|
6018
6017
|
}
|
|
6019
|
-
|
|
6020
|
-
* TODO: Maybe name for `blockNotation` instead of '```' and '>'
|
|
6021
|
-
*/
|
|
6018
|
+
// TODO: Maybe name for `blockNotation` instead of '```' and '>'
|
|
6022
6019
|
|
|
6023
6020
|
/**
|
|
6024
6021
|
* Extracts extracts exactly one valid JSON code block
|
|
@@ -6034,8 +6031,9 @@
|
|
|
6034
6031
|
* - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
|
|
6035
6032
|
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
|
|
6036
6033
|
*
|
|
6037
|
-
* @public exported from `@promptbook/markdown-utils`
|
|
6038
6034
|
* @throws {ParseError} if there is no valid JSON block in the markdown
|
|
6035
|
+
*
|
|
6036
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
6039
6037
|
*/
|
|
6040
6038
|
function extractJsonBlock(markdown) {
|
|
6041
6039
|
if (isValidJsonString(markdown)) {
|
|
@@ -6051,10 +6049,8 @@
|
|
|
6051
6049
|
}
|
|
6052
6050
|
return jsonBlocks[0].content;
|
|
6053
6051
|
}
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
* TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
|
|
6057
|
-
*/
|
|
6052
|
+
// TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
|
|
6053
|
+
// TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
|
|
6058
6054
|
|
|
6059
6055
|
/**
|
|
6060
6056
|
* Counts number of characters in the text
|
|
@@ -6070,10 +6066,8 @@
|
|
|
6070
6066
|
text = text.replace(/\p{Extended_Pictographic}(\u{200D}\p{Extended_Pictographic})*/gu, '-');
|
|
6071
6067
|
return text.length;
|
|
6072
6068
|
}
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6076
|
-
*/
|
|
6069
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6070
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6077
6071
|
|
|
6078
6072
|
/**
|
|
6079
6073
|
* Number of characters per standard line with 11pt Arial font size.
|
|
@@ -6087,10 +6081,8 @@
|
|
|
6087
6081
|
* @public exported from `@promptbook/utils`
|
|
6088
6082
|
*/
|
|
6089
6083
|
const LINES_PER_STANDARD_PAGE = 44;
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
6093
|
-
*/
|
|
6084
|
+
// TODO: [🧠] Should be this `constants.ts` or `config.ts`?
|
|
6085
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
6094
6086
|
|
|
6095
6087
|
/**
|
|
6096
6088
|
* Counts number of lines in the text
|
|
@@ -6108,10 +6100,8 @@
|
|
|
6108
6100
|
const lines = text.split(/\r?\n/);
|
|
6109
6101
|
return lines.reduce((count, line) => count + Math.max(Math.ceil(line.length / CHARACTERS_PER_STANDARD_LINE), 1), 0);
|
|
6110
6102
|
}
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6114
|
-
*/
|
|
6103
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6104
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6115
6105
|
|
|
6116
6106
|
/**
|
|
6117
6107
|
* Counts number of pages in the text
|
|
@@ -6123,10 +6113,8 @@
|
|
|
6123
6113
|
function countPages(text) {
|
|
6124
6114
|
return Math.ceil(countLines(text) / LINES_PER_STANDARD_PAGE);
|
|
6125
6115
|
}
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6129
|
-
*/
|
|
6116
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6117
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6130
6118
|
|
|
6131
6119
|
/**
|
|
6132
6120
|
* Counts number of paragraphs in the text
|
|
@@ -6136,10 +6124,8 @@
|
|
|
6136
6124
|
function countParagraphs(text) {
|
|
6137
6125
|
return text.split(/\n\s*\n/).filter((paragraph) => paragraph.trim() !== '').length;
|
|
6138
6126
|
}
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6142
|
-
*/
|
|
6127
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6128
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6143
6129
|
|
|
6144
6130
|
/**
|
|
6145
6131
|
* Split text into sentences
|
|
@@ -6157,10 +6143,8 @@
|
|
|
6157
6143
|
function countSentences(text) {
|
|
6158
6144
|
return splitIntoSentences(text).length;
|
|
6159
6145
|
}
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
* TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6163
|
-
*/
|
|
6146
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6147
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6164
6148
|
|
|
6165
6149
|
/**
|
|
6166
6150
|
* Counts number of words in the text
|
|
@@ -6174,11 +6158,9 @@
|
|
|
6174
6158
|
text = text.replace(/([a-z])([A-Z])/g, '$1 $2');
|
|
6175
6159
|
return text.split(/[^a-zа-я0-9]+/i).filter((word) => word.length > 0).length;
|
|
6176
6160
|
}
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
* TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
|
|
6181
|
-
*/
|
|
6161
|
+
// TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
|
|
6162
|
+
// TODO: [🧠][✌️] Make some Promptbook-native token system
|
|
6163
|
+
// TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
|
|
6182
6164
|
|
|
6183
6165
|
/**
|
|
6184
6166
|
* Index of all counter functions
|
|
@@ -6193,10 +6175,8 @@
|
|
|
6193
6175
|
LINES: countLines,
|
|
6194
6176
|
PAGES: countPages,
|
|
6195
6177
|
};
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
6199
|
-
*/
|
|
6178
|
+
// TODO: [🧠][🤠] This should be probably as part of `TextFormatParser`
|
|
6179
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
6200
6180
|
|
|
6201
6181
|
/**
|
|
6202
6182
|
* Function checkExpectations will check if the expectations on given value are met
|
|
@@ -6207,6 +6187,7 @@
|
|
|
6207
6187
|
*
|
|
6208
6188
|
* @throws {ExpectError} if the expectations are not met
|
|
6209
6189
|
* @returns {void} Nothing
|
|
6190
|
+
*
|
|
6210
6191
|
* @private internal function of `createPipelineExecutor`
|
|
6211
6192
|
*/
|
|
6212
6193
|
function checkExpectations(expectations, value) {
|
|
@@ -6220,11 +6201,9 @@
|
|
|
6220
6201
|
}
|
|
6221
6202
|
}
|
|
6222
6203
|
}
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
* Note: [💝] and [🤠] are interconnected together
|
|
6227
|
-
*/
|
|
6204
|
+
// TODO: [💝] Unite object for expecting amount and format
|
|
6205
|
+
// TODO: [🧠][🤠] This should be part of `TextFormatParser`
|
|
6206
|
+
// Note: [💝] and [🤠] are interconnected together
|
|
6228
6207
|
|
|
6229
6208
|
/**
|
|
6230
6209
|
* Validates a prompt result against expectations and format requirements.
|
|
@@ -6235,6 +6214,7 @@
|
|
|
6235
6214
|
*
|
|
6236
6215
|
* @param options - The validation options including result string, expectations, and format
|
|
6237
6216
|
* @returns Validation result with processed string and validity status
|
|
6217
|
+
*
|
|
6238
6218
|
* @private internal function of `createPipelineExecutor` and `cacheLlmTools`
|
|
6239
6219
|
*/
|
|
6240
6220
|
function validatePromptResult(options) {
|
|
@@ -6297,6 +6277,7 @@
|
|
|
6297
6277
|
*
|
|
6298
6278
|
* @param options - The options for execution, including task, parameters, pipeline, and configuration.
|
|
6299
6279
|
* @returns The result string of the executed task.
|
|
6280
|
+
*
|
|
6300
6281
|
* @private internal utility of `createPipelineExecutor`
|
|
6301
6282
|
*/
|
|
6302
6283
|
async function executeAttempts(options) {
|
|
@@ -6620,9 +6601,7 @@
|
|
|
6620
6601
|
}
|
|
6621
6602
|
return $ongoingTaskResult.$resultString;
|
|
6622
6603
|
}
|
|
6623
|
-
|
|
6624
|
-
* TODO: Break into smaller functions
|
|
6625
|
-
*/
|
|
6604
|
+
// TODO: Break into smaller functions
|
|
6626
6605
|
|
|
6627
6606
|
/**
|
|
6628
6607
|
* Executes a pipeline task that requires mapping or iterating over subvalues of a parameter (such as rows in a CSV).
|
|
@@ -6765,6 +6744,7 @@
|
|
|
6765
6744
|
*
|
|
6766
6745
|
* @param task - The task for which the context is being generated. This should be a deeply immutable TaskJson object.
|
|
6767
6746
|
* @returns The context as a string, formatted as markdown and parameter value.
|
|
6747
|
+
*
|
|
6768
6748
|
* @private internal utility of `createPipelineExecutor`
|
|
6769
6749
|
*/
|
|
6770
6750
|
async function getContextForTask(task) {
|
|
@@ -6802,7 +6782,6 @@
|
|
|
6802
6782
|
}
|
|
6803
6783
|
|
|
6804
6784
|
/**
|
|
6805
|
-
*
|
|
6806
6785
|
* @param knowledgePieces
|
|
6807
6786
|
* @returns
|
|
6808
6787
|
*
|
|
@@ -6883,10 +6862,8 @@
|
|
|
6883
6862
|
return knowledgePiecesToString(preparedPipeline.knowledgePieces);
|
|
6884
6863
|
}
|
|
6885
6864
|
}
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
* TODO: [♨] Examples of values
|
|
6889
|
-
*/
|
|
6865
|
+
// TODO: [♨] Implement Better - use keyword search
|
|
6866
|
+
// TODO: [♨] Examples of values
|
|
6890
6867
|
|
|
6891
6868
|
/**
|
|
6892
6869
|
* Retrieves all reserved parameters for a given pipeline task, including context, knowledge, examples, and metadata.
|
|
@@ -7039,9 +7016,7 @@
|
|
|
7039
7016
|
resultString,
|
|
7040
7017
|
});
|
|
7041
7018
|
}
|
|
7042
|
-
|
|
7043
|
-
* TODO: [🤹♂️]
|
|
7044
|
-
*/
|
|
7019
|
+
// TODO: [🤹♂️]
|
|
7045
7020
|
|
|
7046
7021
|
/**
|
|
7047
7022
|
* Filters and returns only the output parameters from the provided pipeline execution options.
|
|
@@ -7371,6 +7346,7 @@
|
|
|
7371
7346
|
*
|
|
7372
7347
|
* @returns The executor function
|
|
7373
7348
|
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
7349
|
+
*
|
|
7374
7350
|
* @public exported from `@promptbook/core`
|
|
7375
7351
|
*/
|
|
7376
7352
|
function createPipelineExecutor(options) {
|
|
@@ -7545,14 +7521,13 @@
|
|
|
7545
7521
|
* @public exported from `@promptbook/cli`
|
|
7546
7522
|
*/
|
|
7547
7523
|
$scrapersMetadataRegister.register(markdownScraperMetadata);
|
|
7548
|
-
|
|
7549
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7550
|
-
*/
|
|
7524
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7551
7525
|
|
|
7552
7526
|
/**
|
|
7553
7527
|
* Scraper for markdown files
|
|
7554
7528
|
*
|
|
7555
7529
|
* @see `documentationUrl` for more details
|
|
7530
|
+
*
|
|
7556
7531
|
* @public exported from `@promptbook/markdown-utils`
|
|
7557
7532
|
*/
|
|
7558
7533
|
class MarkdownScraper {
|
|
@@ -7685,10 +7660,8 @@
|
|
|
7685
7660
|
return knowledge;
|
|
7686
7661
|
}
|
|
7687
7662
|
}
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
* Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7691
|
-
*/
|
|
7663
|
+
// TODO: [🪂] Do it in parallel 11:11
|
|
7664
|
+
// Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7692
7665
|
|
|
7693
7666
|
/**
|
|
7694
7667
|
* Metadata of the scraper
|
|
@@ -7715,15 +7688,14 @@
|
|
|
7715
7688
|
* @public exported from `@promptbook/cli`
|
|
7716
7689
|
*/
|
|
7717
7690
|
$scrapersMetadataRegister.register(documentScraperMetadata);
|
|
7718
|
-
|
|
7719
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7720
|
-
*/
|
|
7691
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7721
7692
|
|
|
7722
7693
|
// TODO: [🏳🌈] Finally take pick of .json vs .ts
|
|
7723
7694
|
/**
|
|
7724
7695
|
* Scraper of .docx and .odt files
|
|
7725
7696
|
*
|
|
7726
7697
|
* @see `documentationUrl` for more details
|
|
7698
|
+
*
|
|
7727
7699
|
* @public exported from `@promptbook/documents`
|
|
7728
7700
|
*/
|
|
7729
7701
|
class DocumentScraper {
|
|
@@ -7819,12 +7791,10 @@
|
|
|
7819
7791
|
return knowledge;
|
|
7820
7792
|
}
|
|
7821
7793
|
}
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
* Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7827
|
-
*/
|
|
7794
|
+
// 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
|
|
7795
|
+
// TODO: [👣] Converted documents can act as cached items - there is no need to run conversion each time
|
|
7796
|
+
// TODO: [🪂] Do it in parallel 11:11
|
|
7797
|
+
// Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
7828
7798
|
|
|
7829
7799
|
/**
|
|
7830
7800
|
* Creates a scraper for document content.
|
|
@@ -7834,9 +7804,7 @@
|
|
|
7834
7804
|
const createDocumentScraper = Object.assign((tools, options) => {
|
|
7835
7805
|
return new DocumentScraper(tools, options);
|
|
7836
7806
|
}, documentScraperMetadata); /* <- Note: [🤛] */
|
|
7837
|
-
|
|
7838
|
-
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7839
|
-
*/
|
|
7807
|
+
// TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7840
7808
|
|
|
7841
7809
|
/**
|
|
7842
7810
|
* Registration of known scraper
|
|
@@ -7848,10 +7816,8 @@
|
|
|
7848
7816
|
* @public exported from `@promptbook/cli`
|
|
7849
7817
|
*/
|
|
7850
7818
|
const _DocumentScraperRegistration = $scrapersRegister.register(createDocumentScraper);
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7854
|
-
*/
|
|
7819
|
+
// TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
7820
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
7855
7821
|
|
|
7856
7822
|
exports.BOOK_LANGUAGE_VERSION = BOOK_LANGUAGE_VERSION;
|
|
7857
7823
|
exports.DocumentScraper = DocumentScraper;
|