@promptbook/ollama 0.112.0-66 → 0.112.0-69
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 +3 -3
- package/esm/index.es.js +225 -222
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/core.index.d.ts +2 -0
- package/esm/src/avatars/AvatarOrImage.d.ts +2 -1
- package/esm/src/avatars/avatarRenderingUtils.d.ts +1 -1
- package/esm/src/avatars/renderAvatarVisual.d.ts +1 -2
- package/esm/src/avatars/types/AvatarDefinition.d.ts +2 -1
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +2 -1
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +5 -1
- package/esm/src/book-2.0/agent-source/AgentModelRequirements.d.ts +3 -2
- package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +1 -1
- package/esm/src/book-2.0/agent-source/computeAgentHash.d.ts +2 -2
- package/esm/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +4 -1
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.d.ts +1 -1
- package/esm/src/book-2.0/agent-source/createDefaultAgentName.d.ts +2 -2
- package/esm/src/book-2.0/agent-source/normalizeAgentName.d.ts +1 -1
- package/esm/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -1
- package/esm/src/book-2.0/agent-source/parseTeamCommitment.d.ts +1 -1
- package/esm/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +1 -1
- package/esm/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +3 -1
- package/esm/src/book-3.0/Book.d.ts +33 -0
- package/esm/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +1 -1
- package/esm/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +1 -1
- package/esm/src/book-components/BookEditor/BookEditor.d.ts +4 -1
- package/esm/src/book-components/BookEditor/BookEditorActionbar.d.ts +1 -1
- package/esm/src/book-components/Chat/AgentChip/AgentChip.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +2 -2
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +4 -4
- package/esm/src/book-components/Chat/Chat/ChatRatingModal.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +2 -2
- package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -2
- package/esm/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.d.ts +2 -2
- package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/resolveRunBrowserToolCallDetailsState.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/useChatToolCallModalState.d.ts +3 -3
- package/esm/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +2 -2
- package/esm/src/book-components/Chat/LlmChat/useLlmChatMessageHandler.d.ts +1 -1
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -1
- package/esm/src/book-components/Chat/hooks/useChatRatings.d.ts +2 -2
- package/esm/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +2 -1
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +6 -2
- package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +5 -3
- package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +1 -1
- package/esm/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -1
- package/esm/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -1
- package/esm/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +2 -2
- package/esm/src/book-components/Chat/utils/loadAgentProfile.d.ts +2 -1
- package/esm/src/book-components/Chat/utils/resolveCitationUrl.d.ts +1 -1
- package/esm/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +1 -1
- package/esm/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +1 -1
- package/esm/src/book-components/Qr/useQrCode.d.ts +1 -1
- package/esm/src/book-components/_common/react-utils/classNames.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
- package/esm/src/cli/common/$provideLlmToolsForCli.d.ts +1 -1
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +3 -3
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
- package/esm/src/collection/pipeline-collection/PipelineCollection.d.ts +1 -1
- package/esm/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +1 -1
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -1
- package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +1 -1
- package/esm/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -1
- package/esm/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -1
- package/esm/src/commands/FOREACH/ForeachJson.d.ts +1 -1
- package/esm/src/commands/JOKER/JokerCommand.d.ts +1 -1
- package/esm/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -1
- package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +2 -2
- package/esm/src/commands/PARAMETER/ParameterCommand.d.ts +2 -2
- package/esm/src/commands/PERSONA/PersonaCommand.d.ts +2 -2
- package/esm/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -1
- package/esm/src/commands/_common/parseCommand.d.ts +1 -1
- package/esm/src/commands/_common/stringifyCommand.d.ts +1 -1
- package/esm/src/commands/_common/types/CommandParser.d.ts +2 -1
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +2 -2
- package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +1 -1
- package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +1 -1
- package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +1 -1
- package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +1 -1
- package/esm/src/commitments/TEAM/TEAM.d.ts +2 -2
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +2 -2
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +1 -1
- package/esm/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +1 -1
- package/esm/src/commitments/USE_CALENDAR/createUseCalendarToolFunctions.d.ts +1 -1
- package/esm/src/commitments/USE_CALENDAR/getUseCalendarToolTitles.d.ts +1 -1
- package/esm/src/commitments/USE_CALENDAR/resolveUseCalendarToolRuntimeOrWalletCredentialResult.d.ts +1 -1
- package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +2 -2
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +2 -2
- package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +1 -1
- package/esm/src/commitments/USE_POPUP/USE_POPUP.d.ts +2 -2
- package/esm/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +2 -2
- package/esm/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +1 -1
- package/esm/src/commitments/USE_PROJECT/createUseProjectToolFunctions.d.ts +1 -1
- package/esm/src/commitments/USE_PROJECT/getUseProjectToolTitles.d.ts +1 -1
- package/esm/src/commitments/USE_PROJECT/resolveUseProjectToolRuntimeOrWalletCredentialResult.d.ts +1 -1
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +2 -2
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +2 -2
- package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +1 -1
- package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +2 -2
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +1 -1
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +2 -2
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +1 -1
- package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +1 -1
- package/esm/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +2 -2
- package/esm/src/commitments/WALLET/WALLET.d.ts +2 -2
- package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +1 -1
- package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +1 -1
- package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +1 -1
- package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +1 -1
- package/esm/src/commitments/_base/BaseCommitmentDefinition.d.ts +2 -2
- package/esm/src/commitments/_base/CommitmentDefinition.d.ts +2 -2
- package/esm/src/commitments/_common/commitmentToolFunctions.d.ts +2 -2
- package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +1 -1
- package/esm/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +1 -1
- package/esm/src/commitments/_common/getAllCommitmentsToolTitles.d.ts +1 -1
- package/esm/src/commitments/_common/getGroupedCommitmentDefinitions.d.ts +1 -1
- package/esm/src/commitments/_common/toolExecutionEnvelope.d.ts +1 -1
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +1 -1
- package/esm/src/config.d.ts +5 -1
- package/esm/src/conversion/archive/loadArchive.d.ts +1 -1
- package/esm/src/conversion/archive/saveArchive.d.ts +1 -1
- package/esm/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +1 -1
- package/esm/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -1
- package/esm/src/errors/PipelineExecutionError.d.ts +1 -1
- package/esm/src/errors/utils/ErrorJson.d.ts +1 -1
- package/esm/src/executables/apps/locateLibreoffice.d.ts +1 -1
- package/esm/src/executables/apps/locatePandoc.d.ts +1 -1
- package/esm/src/executables/apps/locateVscode.d.ts +1 -1
- package/esm/src/executables/browsers/locateBrowser.d.ts +1 -1
- package/esm/src/executables/browsers/locateChrome.d.ts +1 -1
- package/esm/src/executables/browsers/locateDefaultSystemBrowser.d.ts +1 -1
- package/esm/src/executables/browsers/locateEdge.d.ts +1 -1
- package/esm/src/executables/browsers/locateFirefox.d.ts +1 -1
- package/esm/src/executables/browsers/locateInternetExplorer.d.ts +1 -1
- package/esm/src/executables/browsers/locateSafari.d.ts +1 -1
- package/esm/src/executables/locateApp.d.ts +1 -1
- package/esm/src/executables/platforms/locateAppOnLinux.d.ts +1 -1
- package/esm/src/executables/platforms/locateAppOnMacOs.d.ts +1 -1
- package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
- package/esm/src/execution/AbstractTaskResult.d.ts +1 -1
- package/esm/src/execution/AvailableModel.d.ts +5 -1
- package/esm/src/execution/CommonToolsOptions.d.ts +1 -1
- package/esm/src/execution/Executables.d.ts +1 -1
- package/esm/src/execution/ExecutionTask.d.ts +3 -2
- package/esm/src/execution/LlmExecutionTools.d.ts +2 -1
- package/esm/src/execution/PipelineExecutor.d.ts +1 -1
- package/esm/src/execution/PipelineExecutorResult.d.ts +2 -2
- package/esm/src/execution/PromptResult.d.ts +3 -1
- package/esm/src/execution/PromptbookFetch.d.ts +1 -1
- package/esm/src/execution/ScriptExecutionTools.d.ts +2 -2
- package/esm/src/execution/UncertainNumber.d.ts +2 -2
- package/esm/src/execution/UserInterfaceTools.d.ts +1 -2
- package/esm/src/execution/createPipelineExecutor/10-executePipeline.d.ts +1 -1
- package/esm/src/execution/createPipelineExecutor/20-executeTask.d.ts +1 -1
- package/esm/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +2 -1
- package/esm/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +1 -1
- package/esm/src/execution/createPipelineExecutor/getContextForTask.d.ts +2 -2
- package/esm/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +2 -2
- package/esm/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +3 -1
- package/esm/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +1 -2
- package/esm/src/execution/execution-report/ExecutionReportJson.d.ts +3 -3
- package/esm/src/execution/execution-report/ExecutionReportStringOptions.d.ts +1 -1
- package/esm/src/execution/utils/usageToHuman.d.ts +1 -1
- package/esm/src/execution/utils/validatePromptResult.d.ts +1 -1
- package/esm/src/file-security-checkers/FileSecurityCheckResult.d.ts +2 -1
- package/esm/src/file-security-checkers/FileSecurityChecker.d.ts +3 -1
- package/esm/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -1
- package/esm/src/formats/_common/FormatParser.d.ts +2 -2
- package/esm/src/formats/_common/FormatSubvalueParser.d.ts +2 -3
- package/esm/src/formats/csv/utils/csvParse.d.ts +1 -1
- package/esm/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +2 -3
- package/esm/src/import-plugins/FileImportPlugin.d.ts +1 -1
- package/esm/src/llm-providers/_common/register/$provideEnvFilename.d.ts +1 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -2
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +2 -1
- package/esm/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +1 -1
- package/esm/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +2 -1
- package/esm/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +3 -1
- package/esm/src/llm-providers/_common/utils/assertUniqueModels.d.ts +1 -1
- package/esm/src/llm-providers/_common/utils/cache/CacheItem.d.ts +2 -2
- package/esm/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +2 -1
- package/esm/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +2 -1
- package/esm/src/llm-providers/agent/Agent.d.ts +6 -2
- package/esm/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +3 -1
- package/esm/src/llm-providers/agent/RemoteAgent.d.ts +2 -2
- package/esm/src/llm-providers/agent/RemoteAgentOptions.d.ts +1 -1
- package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -1
- package/esm/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -1
- package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +2 -3
- package/esm/src/llm-providers/deepseek/deepseek-models.d.ts +1 -1
- package/esm/src/llm-providers/google/google-models.d.ts +1 -1
- package/esm/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -1
- package/esm/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -1
- package/esm/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +2 -1
- package/esm/src/llm-providers/ollama/OllamaExecutionTools.d.ts +2 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +3 -2
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +3 -1
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsOptions.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +3 -1
- package/esm/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -1
- package/esm/src/llm-providers/openai/OpenAiVectorStoreHandler.d.ts +2 -2
- package/esm/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +3 -1
- package/esm/src/llm-providers/openai/utils/OpenAiCompatibleUnsupportedParameterRetrier.d.ts +1 -1
- package/esm/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +2 -1
- package/esm/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +2 -1
- package/esm/src/other/templates/getBookTemplates.d.ts +1 -1
- package/esm/src/personas/preparePersona.d.ts +1 -1
- package/esm/src/pipeline/PipelineJson/CommonTaskJson.d.ts +4 -8
- package/esm/src/pipeline/PipelineJson/Expectations.d.ts +1 -2
- package/esm/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +4 -6
- package/esm/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +3 -3
- package/esm/src/pipeline/PipelineJson/ParameterJson.d.ts +2 -3
- package/esm/src/pipeline/PipelineJson/PersonaJson.d.ts +3 -3
- package/esm/src/pipeline/PipelineJson/PipelineJson.d.ts +6 -9
- package/esm/src/pipeline/PipelineJson/PreparationJson.d.ts +1 -1
- package/esm/src/pipeline/PipelineJson/PromptTaskJson.d.ts +1 -1
- package/esm/src/pipeline/prompt-notation.d.ts +1 -1
- package/esm/src/postprocessing/utils/extractBlock.d.ts +1 -1
- package/esm/src/postprocessing/utils/extractJsonBlock.d.ts +1 -2
- package/esm/src/prepare/PrepareAndScrapeOptions.d.ts +1 -1
- package/esm/src/remote-server/socket-types/_subtypes/Identification.d.ts +2 -2
- package/esm/src/remote-server/socket-types/_subtypes/identificationToPromptbookToken.d.ts +1 -1
- package/esm/src/remote-server/socket-types/_subtypes/promptbookTokenToIdentification.d.ts +1 -1
- package/esm/src/remote-server/startAgentServer.d.ts +1 -1
- package/esm/src/remote-server/types/RemoteClientOptions.d.ts +1 -1
- package/esm/src/remote-server/types/RemoteServerOptions.d.ts +2 -1
- package/esm/src/scrapers/_common/Scraper.d.ts +4 -4
- package/esm/src/scrapers/_common/ScraperIntermediateSource.d.ts +1 -1
- package/esm/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +1 -1
- package/esm/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +3 -1
- package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +1 -1
- package/esm/src/scrapers/website/WebsiteScraper.d.ts +2 -3
- package/esm/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +2 -2
- package/esm/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +2 -2
- package/esm/src/search-engines/SearchEngine.d.ts +2 -1
- package/esm/src/search-engines/SearchResult.d.ts +1 -1
- package/esm/src/search-engines/bing/BingSearchEngine.d.ts +2 -1
- package/esm/src/search-engines/dummy/DummySearchEngine.d.ts +2 -1
- package/esm/src/search-engines/google/GoogleSearchEngine.d.ts +2 -1
- package/esm/src/search-engines/serp/SerpSearchEngine.d.ts +2 -1
- package/esm/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +1 -1
- package/esm/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +1 -1
- package/esm/src/storage/local-storage/utils/IndexedDbStorageOptions.d.ts +1 -1
- package/esm/src/transpilers/_common/BookTranspiler.d.ts +4 -2
- package/esm/src/transpilers/_common/createTranspiledTeamRuntimeSection.d.ts +1 -1
- package/esm/src/transpilers/_common/formatUsedToolFunctions.d.ts +1 -1
- package/esm/src/transpilers/agent-os/AgentOsTranspiler.d.ts +1 -1
- package/esm/src/transpilers/anthropic-claude-managed/AnthropicClaudeManagedTranspiler.d.ts +1 -1
- package/esm/src/transpilers/anthropic-claude-sdk/AnthropicClaudeSdkTranspiler.d.ts +1 -1
- package/esm/src/transpilers/e2b/E2BTranspiler.d.ts +1 -1
- package/esm/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.d.ts +1 -1
- package/esm/src/transpilers/openai-agents/OpenAiAgentsTranspiler.d.ts +1 -1
- package/esm/src/transpilers/openai-sdk/OpenAiSdkTranspiler.d.ts +1 -1
- package/esm/src/types/LlmCall.d.ts +1 -1
- package/esm/src/types/LlmToolDefinition.d.ts +2 -1
- package/esm/src/types/Message.d.ts +4 -3
- package/esm/src/types/ModelRequirements.d.ts +4 -2
- package/esm/src/types/Prompt.d.ts +7 -12
- package/esm/src/types/SpeechRecognition.d.ts +1 -1
- package/esm/src/types/ToolCall.d.ts +1 -1
- package/esm/src/types/string_email.d.ts +1 -1
- package/esm/src/types/string_host.d.ts +1 -1
- package/esm/src/types/string_person_fullname.d.ts +1 -1
- package/esm/src/types/string_token.d.ts +1 -1
- package/esm/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -1
- package/esm/src/utils/color/Color.d.ts +2 -1
- package/esm/src/utils/color/internal-utils/hslToRgb.d.ts +2 -3
- package/esm/src/utils/color/internal-utils/rgbToHsl.d.ts +2 -3
- package/esm/src/utils/color/operators/darken.d.ts +1 -1
- package/esm/src/utils/color/operators/grayscale.d.ts +1 -1
- package/esm/src/utils/color/operators/lighten.d.ts +1 -1
- package/esm/src/utils/color/operators/mixWithColor.d.ts +1 -1
- package/esm/src/utils/color/operators/saturate.d.ts +1 -1
- package/esm/src/utils/color/parsers/parseHexColor.d.ts +1 -1
- package/esm/src/utils/color/parsers/parseHslColor.d.ts +1 -1
- package/esm/src/utils/color/parsers/parseRgbColor.d.ts +1 -1
- package/esm/src/utils/color/utils/colorToDataUrl.d.ts +3 -1
- package/esm/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +1 -1
- package/esm/src/utils/editable/types/PipelineEditableSerialized.d.ts +1 -1
- package/esm/src/utils/editable/utils/renamePipelineParameter.d.ts +1 -1
- package/esm/src/utils/editable/utils/stringifyPipelineJson.d.ts +1 -1
- package/esm/src/utils/files/$induceFileDownload.d.ts +1 -1
- package/esm/src/utils/files/ObjectUrl.d.ts +2 -1
- package/esm/src/utils/files/extensionToMimeType.d.ts +2 -2
- package/esm/src/utils/files/getFileExtension.d.ts +2 -2
- package/esm/src/utils/files/isDirectoryExisting.d.ts +1 -1
- package/esm/src/utils/files/isFileExisting.d.ts +1 -1
- package/esm/src/utils/files/listAllFiles.d.ts +1 -1
- package/esm/src/utils/files/mimeTypeToExtension.d.ts +2 -2
- package/esm/src/utils/filesystem/promptbookTemporaryPath.d.ts +27 -0
- package/esm/src/utils/knowledge/inlineKnowledgeSource.d.ts +3 -1
- package/esm/src/utils/markdown/addAutoGeneratedSection.d.ts +2 -2
- package/esm/src/utils/markdown/createMarkdownChart.d.ts +1 -1
- package/esm/src/utils/markdown/createMarkdownTable.d.ts +1 -2
- package/esm/src/utils/markdown/escapeMarkdownBlock.d.ts +1 -1
- package/esm/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
- package/esm/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
- package/esm/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -1
- package/esm/src/utils/markdown/flattenMarkdown.d.ts +1 -1
- package/esm/src/utils/markdown/humanizeAiText.d.ts +1 -1
- package/esm/src/utils/markdown/humanizeAiTextEllipsis.d.ts +1 -1
- package/esm/src/utils/markdown/humanizeAiTextEmdashed.d.ts +1 -1
- package/esm/src/utils/markdown/humanizeAiTextQuotes.d.ts +1 -1
- package/esm/src/utils/markdown/humanizeAiTextSources.d.ts +1 -1
- package/esm/src/utils/markdown/humanizeAiTextWhitespace.d.ts +1 -1
- package/esm/src/utils/markdown/parseMarkdownSection.d.ts +1 -1
- package/esm/src/utils/markdown/prettifyMarkdown.d.ts +1 -1
- package/esm/src/utils/markdown/promptbookifyAiText.d.ts +1 -1
- package/esm/src/utils/markdown/removeMarkdownComments.d.ts +1 -2
- package/esm/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -1
- package/esm/src/utils/markdown/splitMarkdownIntoSections.d.ts +1 -1
- package/esm/src/utils/misc/$Register.d.ts +1 -1
- package/esm/src/utils/misc/$getCurrentDate.d.ts +1 -1
- package/esm/src/utils/misc/aboutPromptbookInformation.d.ts +1 -1
- package/esm/src/utils/misc/computeHash.d.ts +2 -2
- package/esm/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +1 -1
- package/esm/src/utils/normalization/suffixUrl.d.ts +1 -1
- package/esm/src/utils/organization/keepImported.d.ts +1 -1
- package/esm/src/utils/parameters/extractParameterNames.d.ts +2 -2
- package/esm/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -1
- package/esm/src/utils/parameters/numberToString.d.ts +1 -1
- package/esm/src/utils/parameters/templateParameters.d.ts +2 -1
- package/esm/src/utils/parameters/valueToString.d.ts +1 -1
- package/esm/src/utils/random/$generateBookBoilerplate.d.ts +1 -1
- package/esm/src/utils/random/$randomAgentPersona.d.ts +1 -1
- package/esm/src/utils/random/$randomAgentRule.d.ts +1 -1
- package/esm/src/utils/random/$randomFullnameWithColor.d.ts +1 -1
- package/esm/src/utils/random/$randomSeed.d.ts +1 -1
- package/esm/src/utils/random/$randomToken.d.ts +1 -1
- package/esm/src/utils/random/NamePool.d.ts +1 -1
- package/esm/src/utils/serialization/checkSerializableAsJson.d.ts +1 -1
- package/esm/src/utils/serialization/serializeToPromptbookJavascript.d.ts +1 -1
- package/esm/src/utils/toolCalls/mergeToolCalls.d.ts +1 -1
- package/esm/src/utils/validators/email/isValidEmail.d.ts +1 -1
- package/esm/src/utils/validators/filePath/isRootPath.d.ts +1 -2
- package/esm/src/utils/validators/filePath/isValidFilePath.d.ts +1 -1
- package/esm/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -1
- package/esm/src/utils/validators/parameterName/validateParameterName.d.ts +1 -1
- package/esm/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +1 -1
- package/esm/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +1 -1
- package/esm/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +2 -2
- package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +1 -1
- package/esm/src/utils/validators/url/isValidPipelineUrl.d.ts +1 -1
- package/esm/src/utils/validators/url/isValidUrl.d.ts +1 -1
- package/esm/src/utils/validators/uuid/isValidUuid.d.ts +1 -1
- package/esm/src/version.d.ts +1 -1
- package/esm/src/wizard/$getCompiledBook.d.ts +2 -1
- package/esm/src/wizard/wizard.d.ts +4 -1
- package/package.json +2 -3
- package/umd/index.umd.js +229 -223
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/core.index.d.ts +2 -0
- package/umd/src/avatars/AvatarOrImage.d.ts +2 -1
- package/umd/src/avatars/avatarRenderingUtils.d.ts +1 -1
- package/umd/src/avatars/renderAvatarVisual.d.ts +1 -2
- package/umd/src/avatars/types/AvatarDefinition.d.ts +2 -1
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +2 -1
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +5 -1
- package/umd/src/book-2.0/agent-source/AgentModelRequirements.d.ts +3 -2
- package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +1 -1
- package/umd/src/book-2.0/agent-source/computeAgentHash.d.ts +2 -2
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +4 -1
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.d.ts +1 -1
- package/umd/src/book-2.0/agent-source/createDefaultAgentName.d.ts +2 -2
- package/umd/src/book-2.0/agent-source/normalizeAgentName.d.ts +1 -1
- package/umd/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -1
- package/umd/src/book-2.0/agent-source/parseTeamCommitment.d.ts +1 -1
- package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +1 -1
- package/umd/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +3 -1
- package/umd/src/book-3.0/Book.d.ts +33 -0
- package/umd/src/book-3.0/Book.test.d.ts +1 -0
- package/umd/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +1 -1
- package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +1 -1
- package/umd/src/book-components/BookEditor/BookEditor.d.ts +4 -1
- package/umd/src/book-components/BookEditor/BookEditorActionbar.d.ts +1 -1
- package/umd/src/book-components/Chat/AgentChip/AgentChip.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +2 -2
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +4 -4
- package/umd/src/book-components/Chat/Chat/ChatRatingModal.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +2 -2
- package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -2
- package/umd/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.d.ts +2 -2
- package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/resolveRunBrowserToolCallDetailsState.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/useChatToolCallModalState.d.ts +3 -3
- package/umd/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +2 -2
- package/umd/src/book-components/Chat/LlmChat/useLlmChatMessageHandler.d.ts +1 -1
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -1
- package/umd/src/book-components/Chat/hooks/useChatRatings.d.ts +2 -2
- package/umd/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +2 -1
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +6 -2
- package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +5 -3
- package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +1 -1
- package/umd/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -1
- package/umd/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -1
- package/umd/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +2 -2
- package/umd/src/book-components/Chat/utils/loadAgentProfile.d.ts +2 -1
- package/umd/src/book-components/Chat/utils/resolveCitationUrl.d.ts +1 -1
- package/umd/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +1 -1
- package/umd/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +1 -1
- package/umd/src/book-components/Qr/useQrCode.d.ts +1 -1
- package/umd/src/book-components/_common/react-utils/classNames.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
- package/umd/src/cli/common/$provideLlmToolsForCli.d.ts +1 -1
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +3 -3
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
- package/umd/src/collection/pipeline-collection/PipelineCollection.d.ts +1 -1
- package/umd/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +1 -1
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -1
- package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +1 -1
- package/umd/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -1
- package/umd/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -1
- package/umd/src/commands/FOREACH/ForeachJson.d.ts +1 -1
- package/umd/src/commands/JOKER/JokerCommand.d.ts +1 -1
- package/umd/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -1
- package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +2 -2
- package/umd/src/commands/PARAMETER/ParameterCommand.d.ts +2 -2
- package/umd/src/commands/PERSONA/PersonaCommand.d.ts +2 -2
- package/umd/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -1
- package/umd/src/commands/_common/parseCommand.d.ts +1 -1
- package/umd/src/commands/_common/stringifyCommand.d.ts +1 -1
- package/umd/src/commands/_common/types/CommandParser.d.ts +2 -1
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +2 -2
- package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +1 -1
- package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +1 -1
- package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +1 -1
- package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +1 -1
- package/umd/src/commitments/TEAM/TEAM.d.ts +2 -2
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +2 -2
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +1 -1
- package/umd/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +1 -1
- package/umd/src/commitments/USE_CALENDAR/createUseCalendarToolFunctions.d.ts +1 -1
- package/umd/src/commitments/USE_CALENDAR/getUseCalendarToolTitles.d.ts +1 -1
- package/umd/src/commitments/USE_CALENDAR/resolveUseCalendarToolRuntimeOrWalletCredentialResult.d.ts +1 -1
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +2 -2
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +2 -2
- package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +1 -1
- package/umd/src/commitments/USE_POPUP/USE_POPUP.d.ts +2 -2
- package/umd/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +2 -2
- package/umd/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +1 -1
- package/umd/src/commitments/USE_PROJECT/createUseProjectToolFunctions.d.ts +1 -1
- package/umd/src/commitments/USE_PROJECT/getUseProjectToolTitles.d.ts +1 -1
- package/umd/src/commitments/USE_PROJECT/resolveUseProjectToolRuntimeOrWalletCredentialResult.d.ts +1 -1
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +2 -2
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +2 -2
- package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +1 -1
- package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +2 -2
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +1 -1
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +2 -2
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +1 -1
- package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +1 -1
- package/umd/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +2 -2
- package/umd/src/commitments/WALLET/WALLET.d.ts +2 -2
- package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +1 -1
- package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +1 -1
- package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +1 -1
- package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +1 -1
- package/umd/src/commitments/_base/BaseCommitmentDefinition.d.ts +2 -2
- package/umd/src/commitments/_base/CommitmentDefinition.d.ts +2 -2
- package/umd/src/commitments/_common/commitmentToolFunctions.d.ts +2 -2
- package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +1 -1
- package/umd/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +1 -1
- package/umd/src/commitments/_common/getAllCommitmentsToolTitles.d.ts +1 -1
- package/umd/src/commitments/_common/getGroupedCommitmentDefinitions.d.ts +1 -1
- package/umd/src/commitments/_common/toolExecutionEnvelope.d.ts +1 -1
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +1 -1
- package/umd/src/config.d.ts +5 -1
- package/umd/src/conversion/archive/loadArchive.d.ts +1 -1
- package/umd/src/conversion/archive/saveArchive.d.ts +1 -1
- package/umd/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +1 -1
- package/umd/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -1
- package/umd/src/errors/PipelineExecutionError.d.ts +1 -1
- package/umd/src/errors/utils/ErrorJson.d.ts +1 -1
- package/umd/src/executables/apps/locateLibreoffice.d.ts +1 -1
- package/umd/src/executables/apps/locatePandoc.d.ts +1 -1
- package/umd/src/executables/apps/locateVscode.d.ts +1 -1
- package/umd/src/executables/browsers/locateBrowser.d.ts +1 -1
- package/umd/src/executables/browsers/locateChrome.d.ts +1 -1
- package/umd/src/executables/browsers/locateDefaultSystemBrowser.d.ts +1 -1
- package/umd/src/executables/browsers/locateEdge.d.ts +1 -1
- package/umd/src/executables/browsers/locateFirefox.d.ts +1 -1
- package/umd/src/executables/browsers/locateInternetExplorer.d.ts +1 -1
- package/umd/src/executables/browsers/locateSafari.d.ts +1 -1
- package/umd/src/executables/locateApp.d.ts +1 -1
- package/umd/src/executables/platforms/locateAppOnLinux.d.ts +1 -1
- package/umd/src/executables/platforms/locateAppOnMacOs.d.ts +1 -1
- package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
- package/umd/src/execution/AbstractTaskResult.d.ts +1 -1
- package/umd/src/execution/AvailableModel.d.ts +5 -1
- package/umd/src/execution/CommonToolsOptions.d.ts +1 -1
- package/umd/src/execution/Executables.d.ts +1 -1
- package/umd/src/execution/ExecutionTask.d.ts +3 -2
- package/umd/src/execution/LlmExecutionTools.d.ts +2 -1
- package/umd/src/execution/PipelineExecutor.d.ts +1 -1
- package/umd/src/execution/PipelineExecutorResult.d.ts +2 -2
- package/umd/src/execution/PromptResult.d.ts +3 -1
- package/umd/src/execution/PromptbookFetch.d.ts +1 -1
- package/umd/src/execution/ScriptExecutionTools.d.ts +2 -2
- package/umd/src/execution/UncertainNumber.d.ts +2 -2
- package/umd/src/execution/UserInterfaceTools.d.ts +1 -2
- package/umd/src/execution/createPipelineExecutor/10-executePipeline.d.ts +1 -1
- package/umd/src/execution/createPipelineExecutor/20-executeTask.d.ts +1 -1
- package/umd/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +2 -1
- package/umd/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +1 -1
- package/umd/src/execution/createPipelineExecutor/getContextForTask.d.ts +2 -2
- package/umd/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +2 -2
- package/umd/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +3 -1
- package/umd/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +1 -2
- package/umd/src/execution/execution-report/ExecutionReportJson.d.ts +3 -3
- package/umd/src/execution/execution-report/ExecutionReportStringOptions.d.ts +1 -1
- package/umd/src/execution/utils/usageToHuman.d.ts +1 -1
- package/umd/src/execution/utils/validatePromptResult.d.ts +1 -1
- package/umd/src/file-security-checkers/FileSecurityCheckResult.d.ts +2 -1
- package/umd/src/file-security-checkers/FileSecurityChecker.d.ts +3 -1
- package/umd/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -1
- package/umd/src/formats/_common/FormatParser.d.ts +2 -2
- package/umd/src/formats/_common/FormatSubvalueParser.d.ts +2 -3
- package/umd/src/formats/csv/utils/csvParse.d.ts +1 -1
- package/umd/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +2 -3
- package/umd/src/import-plugins/FileImportPlugin.d.ts +1 -1
- package/umd/src/llm-providers/_common/register/$provideEnvFilename.d.ts +1 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -2
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +2 -1
- package/umd/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +1 -1
- package/umd/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +2 -1
- package/umd/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +3 -1
- package/umd/src/llm-providers/_common/utils/assertUniqueModels.d.ts +1 -1
- package/umd/src/llm-providers/_common/utils/cache/CacheItem.d.ts +2 -2
- package/umd/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +2 -1
- package/umd/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +2 -1
- package/umd/src/llm-providers/agent/Agent.d.ts +6 -2
- package/umd/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +3 -1
- package/umd/src/llm-providers/agent/RemoteAgent.d.ts +2 -2
- package/umd/src/llm-providers/agent/RemoteAgentOptions.d.ts +1 -1
- package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -1
- package/umd/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -1
- package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +2 -3
- package/umd/src/llm-providers/deepseek/deepseek-models.d.ts +1 -1
- package/umd/src/llm-providers/google/google-models.d.ts +1 -1
- package/umd/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -1
- package/umd/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -1
- package/umd/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +2 -1
- package/umd/src/llm-providers/ollama/OllamaExecutionTools.d.ts +2 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +3 -2
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +3 -1
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsOptions.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +3 -1
- package/umd/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -1
- package/umd/src/llm-providers/openai/OpenAiVectorStoreHandler.d.ts +2 -2
- package/umd/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +3 -1
- package/umd/src/llm-providers/openai/utils/OpenAiCompatibleUnsupportedParameterRetrier.d.ts +1 -1
- package/umd/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +2 -1
- package/umd/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +2 -1
- package/umd/src/other/templates/getBookTemplates.d.ts +1 -1
- package/umd/src/personas/preparePersona.d.ts +1 -1
- package/umd/src/pipeline/PipelineJson/CommonTaskJson.d.ts +4 -8
- package/umd/src/pipeline/PipelineJson/Expectations.d.ts +1 -2
- package/umd/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +4 -6
- package/umd/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +3 -3
- package/umd/src/pipeline/PipelineJson/ParameterJson.d.ts +2 -3
- package/umd/src/pipeline/PipelineJson/PersonaJson.d.ts +3 -3
- package/umd/src/pipeline/PipelineJson/PipelineJson.d.ts +6 -9
- package/umd/src/pipeline/PipelineJson/PreparationJson.d.ts +1 -1
- package/umd/src/pipeline/PipelineJson/PromptTaskJson.d.ts +1 -1
- package/umd/src/pipeline/prompt-notation.d.ts +1 -1
- package/umd/src/postprocessing/utils/extractBlock.d.ts +1 -1
- package/umd/src/postprocessing/utils/extractJsonBlock.d.ts +1 -2
- package/umd/src/prepare/PrepareAndScrapeOptions.d.ts +1 -1
- package/umd/src/remote-server/socket-types/_subtypes/Identification.d.ts +2 -2
- package/umd/src/remote-server/socket-types/_subtypes/identificationToPromptbookToken.d.ts +1 -1
- package/umd/src/remote-server/socket-types/_subtypes/promptbookTokenToIdentification.d.ts +1 -1
- package/umd/src/remote-server/startAgentServer.d.ts +1 -1
- package/umd/src/remote-server/types/RemoteClientOptions.d.ts +1 -1
- package/umd/src/remote-server/types/RemoteServerOptions.d.ts +2 -1
- package/umd/src/scrapers/_common/Scraper.d.ts +4 -4
- package/umd/src/scrapers/_common/ScraperIntermediateSource.d.ts +1 -1
- package/umd/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +1 -1
- package/umd/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +3 -1
- package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +1 -1
- package/umd/src/scrapers/website/WebsiteScraper.d.ts +2 -3
- package/umd/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +2 -2
- package/umd/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +2 -2
- package/umd/src/search-engines/SearchEngine.d.ts +2 -1
- package/umd/src/search-engines/SearchResult.d.ts +1 -1
- package/umd/src/search-engines/bing/BingSearchEngine.d.ts +2 -1
- package/umd/src/search-engines/dummy/DummySearchEngine.d.ts +2 -1
- package/umd/src/search-engines/google/GoogleSearchEngine.d.ts +2 -1
- package/umd/src/search-engines/serp/SerpSearchEngine.d.ts +2 -1
- package/umd/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +1 -1
- package/umd/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +1 -1
- package/umd/src/storage/local-storage/utils/IndexedDbStorageOptions.d.ts +1 -1
- package/umd/src/transpilers/_common/BookTranspiler.d.ts +4 -2
- package/umd/src/transpilers/_common/createTranspiledTeamRuntimeSection.d.ts +1 -1
- package/umd/src/transpilers/_common/formatUsedToolFunctions.d.ts +1 -1
- package/umd/src/transpilers/agent-os/AgentOsTranspiler.d.ts +1 -1
- package/umd/src/transpilers/anthropic-claude-managed/AnthropicClaudeManagedTranspiler.d.ts +1 -1
- package/umd/src/transpilers/anthropic-claude-sdk/AnthropicClaudeSdkTranspiler.d.ts +1 -1
- package/umd/src/transpilers/e2b/E2BTranspiler.d.ts +1 -1
- package/umd/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.d.ts +1 -1
- package/umd/src/transpilers/openai-agents/OpenAiAgentsTranspiler.d.ts +1 -1
- package/umd/src/transpilers/openai-sdk/OpenAiSdkTranspiler.d.ts +1 -1
- package/umd/src/types/LlmCall.d.ts +1 -1
- package/umd/src/types/LlmToolDefinition.d.ts +2 -1
- package/umd/src/types/Message.d.ts +4 -3
- package/umd/src/types/ModelRequirements.d.ts +4 -2
- package/umd/src/types/Prompt.d.ts +7 -12
- package/umd/src/types/SpeechRecognition.d.ts +1 -1
- package/umd/src/types/ToolCall.d.ts +1 -1
- package/umd/src/types/string_email.d.ts +1 -1
- package/umd/src/types/string_host.d.ts +1 -1
- package/umd/src/types/string_person_fullname.d.ts +1 -1
- package/umd/src/types/string_token.d.ts +1 -1
- package/umd/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -1
- package/umd/src/utils/color/Color.d.ts +2 -1
- package/umd/src/utils/color/internal-utils/hslToRgb.d.ts +2 -3
- package/umd/src/utils/color/internal-utils/rgbToHsl.d.ts +2 -3
- package/umd/src/utils/color/operators/darken.d.ts +1 -1
- package/umd/src/utils/color/operators/grayscale.d.ts +1 -1
- package/umd/src/utils/color/operators/lighten.d.ts +1 -1
- package/umd/src/utils/color/operators/mixWithColor.d.ts +1 -1
- package/umd/src/utils/color/operators/saturate.d.ts +1 -1
- package/umd/src/utils/color/parsers/parseHexColor.d.ts +1 -1
- package/umd/src/utils/color/parsers/parseHslColor.d.ts +1 -1
- package/umd/src/utils/color/parsers/parseRgbColor.d.ts +1 -1
- package/umd/src/utils/color/utils/colorToDataUrl.d.ts +3 -1
- package/umd/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +1 -1
- package/umd/src/utils/editable/types/PipelineEditableSerialized.d.ts +1 -1
- package/umd/src/utils/editable/utils/renamePipelineParameter.d.ts +1 -1
- package/umd/src/utils/editable/utils/stringifyPipelineJson.d.ts +1 -1
- package/umd/src/utils/files/$induceFileDownload.d.ts +1 -1
- package/umd/src/utils/files/ObjectUrl.d.ts +2 -1
- package/umd/src/utils/files/extensionToMimeType.d.ts +2 -2
- package/umd/src/utils/files/getFileExtension.d.ts +2 -2
- package/umd/src/utils/files/isDirectoryExisting.d.ts +1 -1
- package/umd/src/utils/files/isFileExisting.d.ts +1 -1
- package/umd/src/utils/files/listAllFiles.d.ts +1 -1
- package/umd/src/utils/files/mimeTypeToExtension.d.ts +2 -2
- package/umd/src/utils/filesystem/promptbookTemporaryPath.d.ts +27 -0
- package/umd/src/utils/filesystem/promptbookTemporaryPath.test.d.ts +1 -0
- package/umd/src/utils/knowledge/inlineKnowledgeSource.d.ts +3 -1
- package/umd/src/utils/markdown/addAutoGeneratedSection.d.ts +2 -2
- package/umd/src/utils/markdown/createMarkdownChart.d.ts +1 -1
- package/umd/src/utils/markdown/createMarkdownTable.d.ts +1 -2
- package/umd/src/utils/markdown/escapeMarkdownBlock.d.ts +1 -1
- package/umd/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
- package/umd/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
- package/umd/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -1
- package/umd/src/utils/markdown/flattenMarkdown.d.ts +1 -1
- package/umd/src/utils/markdown/humanizeAiText.d.ts +1 -1
- package/umd/src/utils/markdown/humanizeAiTextEllipsis.d.ts +1 -1
- package/umd/src/utils/markdown/humanizeAiTextEmdashed.d.ts +1 -1
- package/umd/src/utils/markdown/humanizeAiTextQuotes.d.ts +1 -1
- package/umd/src/utils/markdown/humanizeAiTextSources.d.ts +1 -1
- package/umd/src/utils/markdown/humanizeAiTextWhitespace.d.ts +1 -1
- package/umd/src/utils/markdown/parseMarkdownSection.d.ts +1 -1
- package/umd/src/utils/markdown/prettifyMarkdown.d.ts +1 -1
- package/umd/src/utils/markdown/promptbookifyAiText.d.ts +1 -1
- package/umd/src/utils/markdown/removeMarkdownComments.d.ts +1 -2
- package/umd/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -1
- package/umd/src/utils/markdown/splitMarkdownIntoSections.d.ts +1 -1
- package/umd/src/utils/misc/$Register.d.ts +1 -1
- package/umd/src/utils/misc/$getCurrentDate.d.ts +1 -1
- package/umd/src/utils/misc/aboutPromptbookInformation.d.ts +1 -1
- package/umd/src/utils/misc/computeHash.d.ts +2 -2
- package/umd/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +1 -1
- package/umd/src/utils/normalization/suffixUrl.d.ts +1 -1
- package/umd/src/utils/organization/keepImported.d.ts +1 -1
- package/umd/src/utils/parameters/extractParameterNames.d.ts +2 -2
- package/umd/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -1
- package/umd/src/utils/parameters/numberToString.d.ts +1 -1
- package/umd/src/utils/parameters/templateParameters.d.ts +2 -1
- package/umd/src/utils/parameters/valueToString.d.ts +1 -1
- package/umd/src/utils/random/$generateBookBoilerplate.d.ts +1 -1
- package/umd/src/utils/random/$randomAgentPersona.d.ts +1 -1
- package/umd/src/utils/random/$randomAgentRule.d.ts +1 -1
- package/umd/src/utils/random/$randomFullnameWithColor.d.ts +1 -1
- package/umd/src/utils/random/$randomSeed.d.ts +1 -1
- package/umd/src/utils/random/$randomToken.d.ts +1 -1
- package/umd/src/utils/random/NamePool.d.ts +1 -1
- package/umd/src/utils/serialization/checkSerializableAsJson.d.ts +1 -1
- package/umd/src/utils/serialization/serializeToPromptbookJavascript.d.ts +1 -1
- package/umd/src/utils/toolCalls/mergeToolCalls.d.ts +1 -1
- package/umd/src/utils/validators/email/isValidEmail.d.ts +1 -1
- package/umd/src/utils/validators/filePath/isRootPath.d.ts +1 -2
- package/umd/src/utils/validators/filePath/isValidFilePath.d.ts +1 -1
- package/umd/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -1
- package/umd/src/utils/validators/parameterName/validateParameterName.d.ts +1 -1
- package/umd/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +1 -1
- package/umd/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +1 -1
- package/umd/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +2 -2
- package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +1 -1
- package/umd/src/utils/validators/url/isValidPipelineUrl.d.ts +1 -1
- package/umd/src/utils/validators/url/isValidUrl.d.ts +1 -1
- package/umd/src/utils/validators/uuid/isValidUuid.d.ts +1 -1
- package/umd/src/version.d.ts +1 -1
- package/umd/src/wizard/$getCompiledBook.d.ts +2 -1
- package/umd/src/wizard/wizard.d.ts +4 -1
- package/esm/src/utils/files/getPromptbookTempPath.d.ts +0 -24
- package/umd/src/utils/files/getPromptbookTempPath.d.ts +0 -24
- /package/esm/src/{utils/files/getPromptbookTempPath.test.d.ts → book-3.0/Book.test.d.ts} +0 -0
- /package/{umd/src/utils/files/getPromptbookTempPath.test.d.ts → esm/src/utils/filesystem/promptbookTemporaryPath.test.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -412,7 +412,7 @@ In short: tools like Claude Code, Codex, or GitHub Copilot are the **engines**;
|
|
|
412
412
|
|
|
413
413
|
#### How the workflow works
|
|
414
414
|
|
|
415
|
-
1. `ptbk coder init` prepares the project for the coder workflow, seeds project-owned generic templates in `prompts/templates/`, creates a starter `AGENTS.md` context file, adds helper `npm run coder:*` scripts, ensures `.gitignore` ignores `/.
|
|
415
|
+
1. `ptbk coder init` prepares the project for the coder workflow, seeds project-owned generic templates in `prompts/templates/`, creates a starter `AGENTS.md` context file, adds helper `npm run coder:*` scripts, ensures `.gitignore` ignores `/.promptbook`, and configures VS Code prompt screenshots in `prompts/screenshots/`.
|
|
416
416
|
2. `ptbk coder generate-boilerplates` creates prompt files in `prompts/`.
|
|
417
417
|
3. You replace placeholder `@@@` sections with real coding tasks.
|
|
418
418
|
4. `ptbk coder run` sends the next ready `[ ]` prompt to the selected coding agent.
|
|
@@ -483,13 +483,13 @@ npx ptbk coder find-refactor-candidates --level xhigh
|
|
|
483
483
|
npx ptbk coder verify
|
|
484
484
|
```
|
|
485
485
|
|
|
486
|
-
`ptbk coder init` also bootstraps a starter `AGENTS.md`, adds `package.json` scripts for the four main coder commands, adds the
|
|
486
|
+
`ptbk coder init` also bootstraps a starter `AGENTS.md`, adds `package.json` scripts for the four main coder commands, adds the shared `/.promptbook` temp ignore to `.gitignore`, and configures `.vscode/settings.json` so pasted images from `prompts/*.md` land in `prompts/screenshots/`.
|
|
487
487
|
|
|
488
488
|
#### What each command does
|
|
489
489
|
|
|
490
490
|
| Command | What it does |
|
|
491
491
|
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
|
|
492
|
-
| `ptbk coder init` | Creates `prompts/`, `prompts/done/`, the project-generic template files materialized in `prompts/templates/` (currently `common.md`), and a starter `AGENTS.md`; ensures `.env` contains `CODING_AGENT_GIT_NAME`, `CODING_AGENT_GIT_EMAIL`, and `CODING_AGENT_GIT_SIGNING_KEY`; adds helper coder scripts to `package.json`; ensures `.gitignore` contains `/.
|
|
492
|
+
| `ptbk coder init` | Creates `prompts/`, `prompts/done/`, the project-generic template files materialized in `prompts/templates/` (currently `common.md`), and a starter `AGENTS.md`; ensures `.env` contains `CODING_AGENT_GIT_NAME`, `CODING_AGENT_GIT_EMAIL`, and `CODING_AGENT_GIT_SIGNING_KEY`; adds helper coder scripts to `package.json`; ensures `.gitignore` contains `/.promptbook`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
|
|
493
493
|
| `ptbk coder generate-boilerplates` | Creates new prompt markdown files with fresh emoji tags so you can quickly fill in coding tasks; `--template` accepts either a built-in alias or a markdown file path relative to the project root. |
|
|
494
494
|
| `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, can optionally verify each attempt with a shell test command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled. |
|
|
495
495
|
| `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <xlow | low | medium | high | xhigh | extreme>` ranges from a very benevolent scan to a very aggressive sweep. |
|
package/esm/index.es.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { spaceTrim as spaceTrim$1 } from 'spacetrim';
|
|
2
|
-
import { posix } from 'path';
|
|
3
2
|
import { randomBytes } from 'crypto';
|
|
4
3
|
import Bottleneck from 'bottleneck';
|
|
5
4
|
import colors from 'colors';
|
|
6
5
|
import OpenAI from 'openai';
|
|
7
|
-
import 'crypto-js';
|
|
8
|
-
import 'crypto-js/enc-hex';
|
|
9
6
|
|
|
10
7
|
// ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten
|
|
11
8
|
/**
|
|
@@ -21,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
21
18
|
* @generated
|
|
22
19
|
* @see https://github.com/webgptorg/promptbook
|
|
23
20
|
*/
|
|
24
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
21
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-69';
|
|
25
22
|
/**
|
|
26
23
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
27
24
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1088,27 +1085,33 @@ function saturate(amount) {
|
|
|
1088
1085
|
// TODO: Maybe implement by mix+hsl
|
|
1089
1086
|
|
|
1090
1087
|
/**
|
|
1091
|
-
*
|
|
1088
|
+
* Stable root directory used for Promptbook-owned temporary files and caches.
|
|
1092
1089
|
*
|
|
1093
|
-
* @private internal utility for Promptbook
|
|
1090
|
+
* @private internal utility for Promptbook temporary folders
|
|
1094
1091
|
*/
|
|
1095
|
-
const
|
|
1092
|
+
const PROMPTBOOK_TEMPORARY_DIRECTORY = '.promptbook';
|
|
1096
1093
|
/**
|
|
1097
|
-
* Builds one project-relative path inside
|
|
1094
|
+
* Builds one normalized project-relative path inside Promptbook's dedicated temporary root.
|
|
1098
1095
|
*
|
|
1099
|
-
*
|
|
1096
|
+
* The returned path intentionally uses `/` separators so the same helper can be reused from
|
|
1097
|
+
* Node.js and edge-safe code without depending on the Node `path` module.
|
|
1098
|
+
*
|
|
1099
|
+
* @private internal utility for Promptbook temporary folders
|
|
1100
1100
|
*/
|
|
1101
|
-
function
|
|
1102
|
-
|
|
1101
|
+
function getPromptbookTemporaryPath(...pathSegments) {
|
|
1102
|
+
const normalizedPathSegments = pathSegments.flatMap(splitPathSegments).filter(Boolean);
|
|
1103
|
+
return [PROMPTBOOK_TEMPORARY_DIRECTORY, ...normalizedPathSegments].join('/');
|
|
1103
1104
|
}
|
|
1104
1105
|
/**
|
|
1105
|
-
*
|
|
1106
|
-
*
|
|
1107
|
-
* @private internal utility for Promptbook-owned temp files
|
|
1106
|
+
* Normalizes one raw path segment into slash-delimited pieces without empty items.
|
|
1108
1107
|
*/
|
|
1109
|
-
function
|
|
1110
|
-
return
|
|
1108
|
+
function splitPathSegments(pathSegment) {
|
|
1109
|
+
return pathSegment
|
|
1110
|
+
.split(/[\\/]+/u)
|
|
1111
|
+
.map((segment) => segment.trim())
|
|
1112
|
+
.filter(Boolean);
|
|
1111
1113
|
}
|
|
1114
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
1112
1115
|
|
|
1113
1116
|
/**
|
|
1114
1117
|
* Name for the Promptbook
|
|
@@ -1219,7 +1222,7 @@ const CONNECTION_RETRIES_LIMIT = 5;
|
|
|
1219
1222
|
*
|
|
1220
1223
|
* @public exported from `@promptbook/core`
|
|
1221
1224
|
*/
|
|
1222
|
-
|
|
1225
|
+
`./${getPromptbookTemporaryPath('download-cache')}`;
|
|
1223
1226
|
/**
|
|
1224
1227
|
* Where to store the cache of executions for promptbook CLI
|
|
1225
1228
|
*
|
|
@@ -1227,7 +1230,7 @@ getPromptbookTempPath('download-cache');
|
|
|
1227
1230
|
*
|
|
1228
1231
|
* @public exported from `@promptbook/core`
|
|
1229
1232
|
*/
|
|
1230
|
-
|
|
1233
|
+
`./${getPromptbookTemporaryPath('execution-cache')}`;
|
|
1231
1234
|
/**
|
|
1232
1235
|
* Where to store the scrape cache
|
|
1233
1236
|
*
|
|
@@ -1235,7 +1238,7 @@ getPromptbookTempPath('execution-cache');
|
|
|
1235
1238
|
*
|
|
1236
1239
|
* @public exported from `@promptbook/core`
|
|
1237
1240
|
*/
|
|
1238
|
-
|
|
1241
|
+
`./${getPromptbookTemporaryPath('scrape-cache')}`;
|
|
1239
1242
|
// <- TODO: [🧜♂️]
|
|
1240
1243
|
/**
|
|
1241
1244
|
* Default settings for parsing and generating CSV files in Promptbook.
|
|
@@ -2990,6 +2993,105 @@ function templateParameters(template, parameters) {
|
|
|
2990
2993
|
return replacedTemplates;
|
|
2991
2994
|
}
|
|
2992
2995
|
|
|
2996
|
+
/**
|
|
2997
|
+
* Marker property stored inside serialized tool-execution envelopes.
|
|
2998
|
+
*
|
|
2999
|
+
* @private internal tool-execution transport
|
|
3000
|
+
*/
|
|
3001
|
+
const TOOL_EXECUTION_ENVELOPE_MARKER = '__promptbookToolExecutionEnvelope';
|
|
3002
|
+
/**
|
|
3003
|
+
* Parses one serialized tool-execution envelope when present.
|
|
3004
|
+
*
|
|
3005
|
+
* @private internal tool-execution transport
|
|
3006
|
+
*/
|
|
3007
|
+
function parseToolExecutionEnvelope(rawValue) {
|
|
3008
|
+
if (typeof rawValue !== 'string') {
|
|
3009
|
+
return null;
|
|
3010
|
+
}
|
|
3011
|
+
try {
|
|
3012
|
+
const parsedValue = JSON.parse(rawValue);
|
|
3013
|
+
if (!parsedValue ||
|
|
3014
|
+
typeof parsedValue !== 'object' ||
|
|
3015
|
+
parsedValue[TOOL_EXECUTION_ENVELOPE_MARKER] !== true ||
|
|
3016
|
+
typeof parsedValue.assistantMessage !== 'string') {
|
|
3017
|
+
return null;
|
|
3018
|
+
}
|
|
3019
|
+
return {
|
|
3020
|
+
assistantMessage: parsedValue.assistantMessage,
|
|
3021
|
+
toolResult: parsedValue.toolResult,
|
|
3022
|
+
};
|
|
3023
|
+
}
|
|
3024
|
+
catch (_a) {
|
|
3025
|
+
return null;
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3029
|
+
|
|
3030
|
+
/**
|
|
3031
|
+
* Prompt parameter key used to pass hidden runtime context to tool execution.
|
|
3032
|
+
*
|
|
3033
|
+
* @private internal runtime wiring for commitment tools
|
|
3034
|
+
*/
|
|
3035
|
+
const TOOL_RUNTIME_CONTEXT_PARAMETER = 'promptbookToolRuntimeContext';
|
|
3036
|
+
/**
|
|
3037
|
+
* Hidden argument key used to pass runtime context into individual tool calls.
|
|
3038
|
+
*
|
|
3039
|
+
* @private internal runtime wiring for commitment tools
|
|
3040
|
+
*/
|
|
3041
|
+
const TOOL_RUNTIME_CONTEXT_ARGUMENT = '__promptbookToolRuntimeContext';
|
|
3042
|
+
/**
|
|
3043
|
+
* Prompt parameter key used to pass a hidden tool-progress listener token into script execution.
|
|
3044
|
+
*
|
|
3045
|
+
* @private internal runtime wiring for commitment tools
|
|
3046
|
+
*/
|
|
3047
|
+
const TOOL_PROGRESS_TOKEN_PARAMETER = 'promptbookToolProgressToken';
|
|
3048
|
+
/**
|
|
3049
|
+
* Hidden argument key used to pass a tool-progress listener token into individual tool calls.
|
|
3050
|
+
*
|
|
3051
|
+
* @private internal runtime wiring for commitment tools
|
|
3052
|
+
*/
|
|
3053
|
+
const TOOL_PROGRESS_TOKEN_ARGUMENT = '__promptbookToolProgressToken';
|
|
3054
|
+
/**
|
|
3055
|
+
* Monotonic counter used for hidden progress-listener tokens.
|
|
3056
|
+
*
|
|
3057
|
+
* @private internal runtime wiring for commitment tools
|
|
3058
|
+
*/
|
|
3059
|
+
let toolCallProgressListenerCounter = 0;
|
|
3060
|
+
/**
|
|
3061
|
+
* Active tool-progress listeners keyed by hidden execution token.
|
|
3062
|
+
*
|
|
3063
|
+
* @private internal runtime wiring for commitment tools
|
|
3064
|
+
*/
|
|
3065
|
+
const toolCallProgressListeners = new Map();
|
|
3066
|
+
/**
|
|
3067
|
+
* Registers one in-memory listener that receives progress updates emitted by a running tool.
|
|
3068
|
+
*
|
|
3069
|
+
* The returned token is passed into script execution as a hidden argument so tool implementations
|
|
3070
|
+
* can stream progress without exposing extra parameters to the model.
|
|
3071
|
+
*
|
|
3072
|
+
* @param listener - Listener notified about tool progress.
|
|
3073
|
+
* @returns Hidden token used to route progress updates.
|
|
3074
|
+
*
|
|
3075
|
+
* @private internal runtime wiring for commitment tools
|
|
3076
|
+
*/
|
|
3077
|
+
function registerToolCallProgressListener(listener) {
|
|
3078
|
+
toolCallProgressListenerCounter += 1;
|
|
3079
|
+
const token = `tool-progress:${Date.now()}:${toolCallProgressListenerCounter}`;
|
|
3080
|
+
toolCallProgressListeners.set(token, listener);
|
|
3081
|
+
return token;
|
|
3082
|
+
}
|
|
3083
|
+
/**
|
|
3084
|
+
* Unregisters one in-memory progress listener.
|
|
3085
|
+
*
|
|
3086
|
+
* @param token - Token previously created by `registerToolCallProgressListener`.
|
|
3087
|
+
*
|
|
3088
|
+
* @private internal runtime wiring for commitment tools
|
|
3089
|
+
*/
|
|
3090
|
+
function unregisterToolCallProgressListener(token) {
|
|
3091
|
+
toolCallProgressListeners.delete(token);
|
|
3092
|
+
}
|
|
3093
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3094
|
+
|
|
2993
3095
|
/**
|
|
2994
3096
|
* This error indicates problems parsing the format value
|
|
2995
3097
|
*
|
|
@@ -3328,209 +3430,6 @@ function serializeError(error) {
|
|
|
3328
3430
|
};
|
|
3329
3431
|
}
|
|
3330
3432
|
|
|
3331
|
-
/**
|
|
3332
|
-
* Async version of Array.forEach
|
|
3333
|
-
*
|
|
3334
|
-
* @param array - Array to iterate over
|
|
3335
|
-
* @param options - Options for the function
|
|
3336
|
-
* @param callbackfunction - Function to call for each item
|
|
3337
|
-
* @deprecated [🪂] Use queues instead
|
|
3338
|
-
*
|
|
3339
|
-
* @public exported from `@promptbook/utils`
|
|
3340
|
-
*/
|
|
3341
|
-
async function forEachAsync(array, options, callbackfunction) {
|
|
3342
|
-
const { maxParallelCount = Infinity } = options;
|
|
3343
|
-
let index = 0;
|
|
3344
|
-
let runningTasks = [];
|
|
3345
|
-
const tasks = [];
|
|
3346
|
-
for (const item of array) {
|
|
3347
|
-
const currentIndex = index++;
|
|
3348
|
-
const task = callbackfunction(item, currentIndex, array);
|
|
3349
|
-
tasks.push(task);
|
|
3350
|
-
runningTasks.push(task);
|
|
3351
|
-
/* not await */ Promise.resolve(task).then(() => {
|
|
3352
|
-
runningTasks = runningTasks.filter((runningTask) => runningTask !== task);
|
|
3353
|
-
});
|
|
3354
|
-
if (maxParallelCount < runningTasks.length) {
|
|
3355
|
-
await Promise.race(runningTasks);
|
|
3356
|
-
}
|
|
3357
|
-
}
|
|
3358
|
-
await Promise.all(tasks);
|
|
3359
|
-
}
|
|
3360
|
-
|
|
3361
|
-
/**
|
|
3362
|
-
* Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
|
|
3363
|
-
*
|
|
3364
|
-
* Note: [🔂] This function is idempotent.
|
|
3365
|
-
*
|
|
3366
|
-
* @param text The text string to be converted to SCREAMING_CASE format.
|
|
3367
|
-
* @returns The normalized text in SCREAMING_CASE format.
|
|
3368
|
-
* @example 'HELLO_WORLD'
|
|
3369
|
-
* @example 'I_LOVE_PROMPTBOOK'
|
|
3370
|
-
*
|
|
3371
|
-
* @public exported from `@promptbook/utils`
|
|
3372
|
-
*/
|
|
3373
|
-
function normalizeTo_SCREAMING_CASE(text) {
|
|
3374
|
-
let charType;
|
|
3375
|
-
let lastCharType = 'OTHER';
|
|
3376
|
-
let normalizedName = '';
|
|
3377
|
-
for (const char of text) {
|
|
3378
|
-
let normalizedChar;
|
|
3379
|
-
if (/^[a-z]$/.test(char)) {
|
|
3380
|
-
charType = 'LOWERCASE';
|
|
3381
|
-
normalizedChar = char.toUpperCase();
|
|
3382
|
-
}
|
|
3383
|
-
else if (/^[A-Z]$/.test(char)) {
|
|
3384
|
-
charType = 'UPPERCASE';
|
|
3385
|
-
normalizedChar = char;
|
|
3386
|
-
}
|
|
3387
|
-
else if (/^[0-9]$/.test(char)) {
|
|
3388
|
-
charType = 'NUMBER';
|
|
3389
|
-
normalizedChar = char;
|
|
3390
|
-
}
|
|
3391
|
-
else {
|
|
3392
|
-
charType = 'OTHER';
|
|
3393
|
-
normalizedChar = '_';
|
|
3394
|
-
}
|
|
3395
|
-
if (charType !== lastCharType &&
|
|
3396
|
-
!(lastCharType === 'UPPERCASE' && charType === 'LOWERCASE') &&
|
|
3397
|
-
!(lastCharType === 'NUMBER') &&
|
|
3398
|
-
!(charType === 'NUMBER')) {
|
|
3399
|
-
normalizedName += '_';
|
|
3400
|
-
}
|
|
3401
|
-
normalizedName += normalizedChar;
|
|
3402
|
-
lastCharType = charType;
|
|
3403
|
-
}
|
|
3404
|
-
normalizedName = normalizedName.replace(/_+/g, '_');
|
|
3405
|
-
normalizedName = normalizedName.replace(/_?\/_?/g, '/');
|
|
3406
|
-
normalizedName = normalizedName.replace(/^_/, '');
|
|
3407
|
-
normalizedName = normalizedName.replace(/_$/, '');
|
|
3408
|
-
return normalizedName;
|
|
3409
|
-
}
|
|
3410
|
-
/**
|
|
3411
|
-
* TODO: Tests
|
|
3412
|
-
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: 'Moje tabule' })).toEqual('/VtG7sR9rRJqwNEdM2/Moje tabule');
|
|
3413
|
-
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: 'ěščřžžýáíúů' })).toEqual('/VtG7sR9rRJqwNEdM2/escrzyaieuu');
|
|
3414
|
-
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: ' ahoj ' })).toEqual('/VtG7sR9rRJqwNEdM2/ahoj');
|
|
3415
|
-
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: ' ahoj_ahojAhoj ahoj ' })).toEqual('/VtG7sR9rRJqwNEdM2/ahoj-ahoj-ahoj-ahoj');
|
|
3416
|
-
* TODO: [🌺] Use some intermediate util splitWords
|
|
3417
|
-
*/
|
|
3418
|
-
|
|
3419
|
-
/**
|
|
3420
|
-
* Normalizes a text string to snake_case format.
|
|
3421
|
-
*
|
|
3422
|
-
* Note: [🔂] This function is idempotent.
|
|
3423
|
-
*
|
|
3424
|
-
* @param text The text string to be converted to snake_case format.
|
|
3425
|
-
* @returns The normalized text in snake_case format.
|
|
3426
|
-
* @example 'hello_world'
|
|
3427
|
-
* @example 'i_love_promptbook'
|
|
3428
|
-
*
|
|
3429
|
-
* @public exported from `@promptbook/utils`
|
|
3430
|
-
*/
|
|
3431
|
-
function normalizeTo_snake_case(text) {
|
|
3432
|
-
return normalizeTo_SCREAMING_CASE(text).toLowerCase();
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
|
-
/**
|
|
3436
|
-
* Marker property stored inside serialized tool-execution envelopes.
|
|
3437
|
-
*
|
|
3438
|
-
* @private internal tool-execution transport
|
|
3439
|
-
*/
|
|
3440
|
-
const TOOL_EXECUTION_ENVELOPE_MARKER = '__promptbookToolExecutionEnvelope';
|
|
3441
|
-
/**
|
|
3442
|
-
* Parses one serialized tool-execution envelope when present.
|
|
3443
|
-
*
|
|
3444
|
-
* @private internal tool-execution transport
|
|
3445
|
-
*/
|
|
3446
|
-
function parseToolExecutionEnvelope(rawValue) {
|
|
3447
|
-
if (typeof rawValue !== 'string') {
|
|
3448
|
-
return null;
|
|
3449
|
-
}
|
|
3450
|
-
try {
|
|
3451
|
-
const parsedValue = JSON.parse(rawValue);
|
|
3452
|
-
if (!parsedValue ||
|
|
3453
|
-
typeof parsedValue !== 'object' ||
|
|
3454
|
-
parsedValue[TOOL_EXECUTION_ENVELOPE_MARKER] !== true ||
|
|
3455
|
-
typeof parsedValue.assistantMessage !== 'string') {
|
|
3456
|
-
return null;
|
|
3457
|
-
}
|
|
3458
|
-
return {
|
|
3459
|
-
assistantMessage: parsedValue.assistantMessage,
|
|
3460
|
-
toolResult: parsedValue.toolResult,
|
|
3461
|
-
};
|
|
3462
|
-
}
|
|
3463
|
-
catch (_a) {
|
|
3464
|
-
return null;
|
|
3465
|
-
}
|
|
3466
|
-
}
|
|
3467
|
-
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3468
|
-
|
|
3469
|
-
/**
|
|
3470
|
-
* Prompt parameter key used to pass hidden runtime context to tool execution.
|
|
3471
|
-
*
|
|
3472
|
-
* @private internal runtime wiring for commitment tools
|
|
3473
|
-
*/
|
|
3474
|
-
const TOOL_RUNTIME_CONTEXT_PARAMETER = 'promptbookToolRuntimeContext';
|
|
3475
|
-
/**
|
|
3476
|
-
* Hidden argument key used to pass runtime context into individual tool calls.
|
|
3477
|
-
*
|
|
3478
|
-
* @private internal runtime wiring for commitment tools
|
|
3479
|
-
*/
|
|
3480
|
-
const TOOL_RUNTIME_CONTEXT_ARGUMENT = '__promptbookToolRuntimeContext';
|
|
3481
|
-
/**
|
|
3482
|
-
* Prompt parameter key used to pass a hidden tool-progress listener token into script execution.
|
|
3483
|
-
*
|
|
3484
|
-
* @private internal runtime wiring for commitment tools
|
|
3485
|
-
*/
|
|
3486
|
-
const TOOL_PROGRESS_TOKEN_PARAMETER = 'promptbookToolProgressToken';
|
|
3487
|
-
/**
|
|
3488
|
-
* Hidden argument key used to pass a tool-progress listener token into individual tool calls.
|
|
3489
|
-
*
|
|
3490
|
-
* @private internal runtime wiring for commitment tools
|
|
3491
|
-
*/
|
|
3492
|
-
const TOOL_PROGRESS_TOKEN_ARGUMENT = '__promptbookToolProgressToken';
|
|
3493
|
-
/**
|
|
3494
|
-
* Monotonic counter used for hidden progress-listener tokens.
|
|
3495
|
-
*
|
|
3496
|
-
* @private internal runtime wiring for commitment tools
|
|
3497
|
-
*/
|
|
3498
|
-
let toolCallProgressListenerCounter = 0;
|
|
3499
|
-
/**
|
|
3500
|
-
* Active tool-progress listeners keyed by hidden execution token.
|
|
3501
|
-
*
|
|
3502
|
-
* @private internal runtime wiring for commitment tools
|
|
3503
|
-
*/
|
|
3504
|
-
const toolCallProgressListeners = new Map();
|
|
3505
|
-
/**
|
|
3506
|
-
* Registers one in-memory listener that receives progress updates emitted by a running tool.
|
|
3507
|
-
*
|
|
3508
|
-
* The returned token is passed into script execution as a hidden argument so tool implementations
|
|
3509
|
-
* can stream progress without exposing extra parameters to the model.
|
|
3510
|
-
*
|
|
3511
|
-
* @param listener - Listener notified about tool progress.
|
|
3512
|
-
* @returns Hidden token used to route progress updates.
|
|
3513
|
-
*
|
|
3514
|
-
* @private internal runtime wiring for commitment tools
|
|
3515
|
-
*/
|
|
3516
|
-
function registerToolCallProgressListener(listener) {
|
|
3517
|
-
toolCallProgressListenerCounter += 1;
|
|
3518
|
-
const token = `tool-progress:${Date.now()}:${toolCallProgressListenerCounter}`;
|
|
3519
|
-
toolCallProgressListeners.set(token, listener);
|
|
3520
|
-
return token;
|
|
3521
|
-
}
|
|
3522
|
-
/**
|
|
3523
|
-
* Unregisters one in-memory progress listener.
|
|
3524
|
-
*
|
|
3525
|
-
* @param token - Token previously created by `registerToolCallProgressListener`.
|
|
3526
|
-
*
|
|
3527
|
-
* @private internal runtime wiring for commitment tools
|
|
3528
|
-
*/
|
|
3529
|
-
function unregisterToolCallProgressListener(token) {
|
|
3530
|
-
toolCallProgressListeners.delete(token);
|
|
3531
|
-
}
|
|
3532
|
-
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3533
|
-
|
|
3534
3433
|
/**
|
|
3535
3434
|
* Function `addUsage` will add multiple usages into one
|
|
3536
3435
|
*
|
|
@@ -3585,6 +3484,36 @@ function addUsage(...usageItems) {
|
|
|
3585
3484
|
}, deepClone(ZERO_USAGE));
|
|
3586
3485
|
}
|
|
3587
3486
|
|
|
3487
|
+
/**
|
|
3488
|
+
* Async version of Array.forEach
|
|
3489
|
+
*
|
|
3490
|
+
* @param array - Array to iterate over
|
|
3491
|
+
* @param options - Options for the function
|
|
3492
|
+
* @param callbackfunction - Function to call for each item
|
|
3493
|
+
* @deprecated [🪂] Use queues instead
|
|
3494
|
+
*
|
|
3495
|
+
* @public exported from `@promptbook/utils`
|
|
3496
|
+
*/
|
|
3497
|
+
async function forEachAsync(array, options, callbackfunction) {
|
|
3498
|
+
const { maxParallelCount = Infinity } = options;
|
|
3499
|
+
let index = 0;
|
|
3500
|
+
let runningTasks = [];
|
|
3501
|
+
const tasks = [];
|
|
3502
|
+
for (const item of array) {
|
|
3503
|
+
const currentIndex = index++;
|
|
3504
|
+
const task = callbackfunction(item, currentIndex, array);
|
|
3505
|
+
tasks.push(task);
|
|
3506
|
+
runningTasks.push(task);
|
|
3507
|
+
/* not await */ Promise.resolve(task).then(() => {
|
|
3508
|
+
runningTasks = runningTasks.filter((runningTask) => runningTask !== task);
|
|
3509
|
+
});
|
|
3510
|
+
if (maxParallelCount < runningTasks.length) {
|
|
3511
|
+
await Promise.race(runningTasks);
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
await Promise.all(tasks);
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3588
3517
|
/**
|
|
3589
3518
|
* Builds a tool invocation script that injects hidden runtime context into tool args.
|
|
3590
3519
|
*
|
|
@@ -5186,6 +5115,80 @@ function $getGlobalScope() {
|
|
|
5186
5115
|
return Function('return this')();
|
|
5187
5116
|
}
|
|
5188
5117
|
|
|
5118
|
+
/**
|
|
5119
|
+
* Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
|
|
5120
|
+
*
|
|
5121
|
+
* Note: [🔂] This function is idempotent.
|
|
5122
|
+
*
|
|
5123
|
+
* @param text The text string to be converted to SCREAMING_CASE format.
|
|
5124
|
+
* @returns The normalized text in SCREAMING_CASE format.
|
|
5125
|
+
* @example 'HELLO_WORLD'
|
|
5126
|
+
* @example 'I_LOVE_PROMPTBOOK'
|
|
5127
|
+
*
|
|
5128
|
+
* @public exported from `@promptbook/utils`
|
|
5129
|
+
*/
|
|
5130
|
+
function normalizeTo_SCREAMING_CASE(text) {
|
|
5131
|
+
let charType;
|
|
5132
|
+
let lastCharType = 'OTHER';
|
|
5133
|
+
let normalizedName = '';
|
|
5134
|
+
for (const char of text) {
|
|
5135
|
+
let normalizedChar;
|
|
5136
|
+
if (/^[a-z]$/.test(char)) {
|
|
5137
|
+
charType = 'LOWERCASE';
|
|
5138
|
+
normalizedChar = char.toUpperCase();
|
|
5139
|
+
}
|
|
5140
|
+
else if (/^[A-Z]$/.test(char)) {
|
|
5141
|
+
charType = 'UPPERCASE';
|
|
5142
|
+
normalizedChar = char;
|
|
5143
|
+
}
|
|
5144
|
+
else if (/^[0-9]$/.test(char)) {
|
|
5145
|
+
charType = 'NUMBER';
|
|
5146
|
+
normalizedChar = char;
|
|
5147
|
+
}
|
|
5148
|
+
else {
|
|
5149
|
+
charType = 'OTHER';
|
|
5150
|
+
normalizedChar = '_';
|
|
5151
|
+
}
|
|
5152
|
+
if (charType !== lastCharType &&
|
|
5153
|
+
!(lastCharType === 'UPPERCASE' && charType === 'LOWERCASE') &&
|
|
5154
|
+
!(lastCharType === 'NUMBER') &&
|
|
5155
|
+
!(charType === 'NUMBER')) {
|
|
5156
|
+
normalizedName += '_';
|
|
5157
|
+
}
|
|
5158
|
+
normalizedName += normalizedChar;
|
|
5159
|
+
lastCharType = charType;
|
|
5160
|
+
}
|
|
5161
|
+
normalizedName = normalizedName.replace(/_+/g, '_');
|
|
5162
|
+
normalizedName = normalizedName.replace(/_?\/_?/g, '/');
|
|
5163
|
+
normalizedName = normalizedName.replace(/^_/, '');
|
|
5164
|
+
normalizedName = normalizedName.replace(/_$/, '');
|
|
5165
|
+
return normalizedName;
|
|
5166
|
+
}
|
|
5167
|
+
/**
|
|
5168
|
+
* TODO: Tests
|
|
5169
|
+
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: 'Moje tabule' })).toEqual('/VtG7sR9rRJqwNEdM2/Moje tabule');
|
|
5170
|
+
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: 'ěščřžžýáíúů' })).toEqual('/VtG7sR9rRJqwNEdM2/escrzyaieuu');
|
|
5171
|
+
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: ' ahoj ' })).toEqual('/VtG7sR9rRJqwNEdM2/ahoj');
|
|
5172
|
+
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: ' ahoj_ahojAhoj ahoj ' })).toEqual('/VtG7sR9rRJqwNEdM2/ahoj-ahoj-ahoj-ahoj');
|
|
5173
|
+
* TODO: [🌺] Use some intermediate util splitWords
|
|
5174
|
+
*/
|
|
5175
|
+
|
|
5176
|
+
/**
|
|
5177
|
+
* Normalizes a text string to snake_case format.
|
|
5178
|
+
*
|
|
5179
|
+
* Note: [🔂] This function is idempotent.
|
|
5180
|
+
*
|
|
5181
|
+
* @param text The text string to be converted to snake_case format.
|
|
5182
|
+
* @returns The normalized text in snake_case format.
|
|
5183
|
+
* @example 'hello_world'
|
|
5184
|
+
* @example 'i_love_promptbook'
|
|
5185
|
+
*
|
|
5186
|
+
* @public exported from `@promptbook/utils`
|
|
5187
|
+
*/
|
|
5188
|
+
function normalizeTo_snake_case(text) {
|
|
5189
|
+
return normalizeTo_SCREAMING_CASE(text).toLowerCase();
|
|
5190
|
+
}
|
|
5191
|
+
|
|
5189
5192
|
/**
|
|
5190
5193
|
* Global registry for storing and managing registered entities of a given type.
|
|
5191
5194
|
*
|