@promptbook/ollama 0.112.0-65 → 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 +258 -207
- 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 +3 -2
- package/esm/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
- 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-3.0/Book.test.d.ts +1 -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 +8 -4
- 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/filesystem/promptbookTemporaryPath.test.d.ts +1 -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 +260 -206
- 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 +3 -2
- package/umd/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
- 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 +8 -4
- 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/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
|
@@ -3,9 +3,6 @@ import { randomBytes } from 'crypto';
|
|
|
3
3
|
import Bottleneck from 'bottleneck';
|
|
4
4
|
import colors from 'colors';
|
|
5
5
|
import OpenAI from 'openai';
|
|
6
|
-
import 'path';
|
|
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
|
|
@@ -1087,6 +1084,35 @@ function saturate(amount) {
|
|
|
1087
1084
|
}
|
|
1088
1085
|
// TODO: Maybe implement by mix+hsl
|
|
1089
1086
|
|
|
1087
|
+
/**
|
|
1088
|
+
* Stable root directory used for Promptbook-owned temporary files and caches.
|
|
1089
|
+
*
|
|
1090
|
+
* @private internal utility for Promptbook temporary folders
|
|
1091
|
+
*/
|
|
1092
|
+
const PROMPTBOOK_TEMPORARY_DIRECTORY = '.promptbook';
|
|
1093
|
+
/**
|
|
1094
|
+
* Builds one normalized project-relative path inside Promptbook's dedicated temporary root.
|
|
1095
|
+
*
|
|
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
|
+
*/
|
|
1101
|
+
function getPromptbookTemporaryPath(...pathSegments) {
|
|
1102
|
+
const normalizedPathSegments = pathSegments.flatMap(splitPathSegments).filter(Boolean);
|
|
1103
|
+
return [PROMPTBOOK_TEMPORARY_DIRECTORY, ...normalizedPathSegments].join('/');
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Normalizes one raw path segment into slash-delimited pieces without empty items.
|
|
1107
|
+
*/
|
|
1108
|
+
function splitPathSegments(pathSegment) {
|
|
1109
|
+
return pathSegment
|
|
1110
|
+
.split(/[\\/]+/u)
|
|
1111
|
+
.map((segment) => segment.trim())
|
|
1112
|
+
.filter(Boolean);
|
|
1113
|
+
}
|
|
1114
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
1115
|
+
|
|
1090
1116
|
/**
|
|
1091
1117
|
* Name for the Promptbook
|
|
1092
1118
|
*
|
|
@@ -1188,6 +1214,31 @@ const SMALL_NUMBER = 0.001;
|
|
|
1188
1214
|
* @private within the repository - too low-level in comparison with other `MAX_...`
|
|
1189
1215
|
*/
|
|
1190
1216
|
const CONNECTION_RETRIES_LIMIT = 5;
|
|
1217
|
+
// <- TODO: [🕝] Make also `AGENTS_DIRNAME_ALTERNATIVES`
|
|
1218
|
+
/**
|
|
1219
|
+
* Where to store the temporary downloads
|
|
1220
|
+
*
|
|
1221
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1222
|
+
*
|
|
1223
|
+
* @public exported from `@promptbook/core`
|
|
1224
|
+
*/
|
|
1225
|
+
`./${getPromptbookTemporaryPath('download-cache')}`;
|
|
1226
|
+
/**
|
|
1227
|
+
* Where to store the cache of executions for promptbook CLI
|
|
1228
|
+
*
|
|
1229
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1230
|
+
*
|
|
1231
|
+
* @public exported from `@promptbook/core`
|
|
1232
|
+
*/
|
|
1233
|
+
`./${getPromptbookTemporaryPath('execution-cache')}`;
|
|
1234
|
+
/**
|
|
1235
|
+
* Where to store the scrape cache
|
|
1236
|
+
*
|
|
1237
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1238
|
+
*
|
|
1239
|
+
* @public exported from `@promptbook/core`
|
|
1240
|
+
*/
|
|
1241
|
+
`./${getPromptbookTemporaryPath('scrape-cache')}`;
|
|
1191
1242
|
// <- TODO: [🧜♂️]
|
|
1192
1243
|
/**
|
|
1193
1244
|
* Default settings for parsing and generating CSV files in Promptbook.
|
|
@@ -2942,6 +2993,105 @@ function templateParameters(template, parameters) {
|
|
|
2942
2993
|
return replacedTemplates;
|
|
2943
2994
|
}
|
|
2944
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
|
+
|
|
2945
3095
|
/**
|
|
2946
3096
|
* This error indicates problems parsing the format value
|
|
2947
3097
|
*
|
|
@@ -3280,209 +3430,6 @@ function serializeError(error) {
|
|
|
3280
3430
|
};
|
|
3281
3431
|
}
|
|
3282
3432
|
|
|
3283
|
-
/**
|
|
3284
|
-
* Async version of Array.forEach
|
|
3285
|
-
*
|
|
3286
|
-
* @param array - Array to iterate over
|
|
3287
|
-
* @param options - Options for the function
|
|
3288
|
-
* @param callbackfunction - Function to call for each item
|
|
3289
|
-
* @deprecated [🪂] Use queues instead
|
|
3290
|
-
*
|
|
3291
|
-
* @public exported from `@promptbook/utils`
|
|
3292
|
-
*/
|
|
3293
|
-
async function forEachAsync(array, options, callbackfunction) {
|
|
3294
|
-
const { maxParallelCount = Infinity } = options;
|
|
3295
|
-
let index = 0;
|
|
3296
|
-
let runningTasks = [];
|
|
3297
|
-
const tasks = [];
|
|
3298
|
-
for (const item of array) {
|
|
3299
|
-
const currentIndex = index++;
|
|
3300
|
-
const task = callbackfunction(item, currentIndex, array);
|
|
3301
|
-
tasks.push(task);
|
|
3302
|
-
runningTasks.push(task);
|
|
3303
|
-
/* not await */ Promise.resolve(task).then(() => {
|
|
3304
|
-
runningTasks = runningTasks.filter((runningTask) => runningTask !== task);
|
|
3305
|
-
});
|
|
3306
|
-
if (maxParallelCount < runningTasks.length) {
|
|
3307
|
-
await Promise.race(runningTasks);
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
await Promise.all(tasks);
|
|
3311
|
-
}
|
|
3312
|
-
|
|
3313
|
-
/**
|
|
3314
|
-
* Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
|
|
3315
|
-
*
|
|
3316
|
-
* Note: [🔂] This function is idempotent.
|
|
3317
|
-
*
|
|
3318
|
-
* @param text The text string to be converted to SCREAMING_CASE format.
|
|
3319
|
-
* @returns The normalized text in SCREAMING_CASE format.
|
|
3320
|
-
* @example 'HELLO_WORLD'
|
|
3321
|
-
* @example 'I_LOVE_PROMPTBOOK'
|
|
3322
|
-
*
|
|
3323
|
-
* @public exported from `@promptbook/utils`
|
|
3324
|
-
*/
|
|
3325
|
-
function normalizeTo_SCREAMING_CASE(text) {
|
|
3326
|
-
let charType;
|
|
3327
|
-
let lastCharType = 'OTHER';
|
|
3328
|
-
let normalizedName = '';
|
|
3329
|
-
for (const char of text) {
|
|
3330
|
-
let normalizedChar;
|
|
3331
|
-
if (/^[a-z]$/.test(char)) {
|
|
3332
|
-
charType = 'LOWERCASE';
|
|
3333
|
-
normalizedChar = char.toUpperCase();
|
|
3334
|
-
}
|
|
3335
|
-
else if (/^[A-Z]$/.test(char)) {
|
|
3336
|
-
charType = 'UPPERCASE';
|
|
3337
|
-
normalizedChar = char;
|
|
3338
|
-
}
|
|
3339
|
-
else if (/^[0-9]$/.test(char)) {
|
|
3340
|
-
charType = 'NUMBER';
|
|
3341
|
-
normalizedChar = char;
|
|
3342
|
-
}
|
|
3343
|
-
else {
|
|
3344
|
-
charType = 'OTHER';
|
|
3345
|
-
normalizedChar = '_';
|
|
3346
|
-
}
|
|
3347
|
-
if (charType !== lastCharType &&
|
|
3348
|
-
!(lastCharType === 'UPPERCASE' && charType === 'LOWERCASE') &&
|
|
3349
|
-
!(lastCharType === 'NUMBER') &&
|
|
3350
|
-
!(charType === 'NUMBER')) {
|
|
3351
|
-
normalizedName += '_';
|
|
3352
|
-
}
|
|
3353
|
-
normalizedName += normalizedChar;
|
|
3354
|
-
lastCharType = charType;
|
|
3355
|
-
}
|
|
3356
|
-
normalizedName = normalizedName.replace(/_+/g, '_');
|
|
3357
|
-
normalizedName = normalizedName.replace(/_?\/_?/g, '/');
|
|
3358
|
-
normalizedName = normalizedName.replace(/^_/, '');
|
|
3359
|
-
normalizedName = normalizedName.replace(/_$/, '');
|
|
3360
|
-
return normalizedName;
|
|
3361
|
-
}
|
|
3362
|
-
/**
|
|
3363
|
-
* TODO: Tests
|
|
3364
|
-
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: 'Moje tabule' })).toEqual('/VtG7sR9rRJqwNEdM2/Moje tabule');
|
|
3365
|
-
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: 'ěščřžžýáíúů' })).toEqual('/VtG7sR9rRJqwNEdM2/escrzyaieuu');
|
|
3366
|
-
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: ' ahoj ' })).toEqual('/VtG7sR9rRJqwNEdM2/ahoj');
|
|
3367
|
-
* > expect(encodeRoutePath({ uriId: 'VtG7sR9rRJqwNEdM2', name: ' ahoj_ahojAhoj ahoj ' })).toEqual('/VtG7sR9rRJqwNEdM2/ahoj-ahoj-ahoj-ahoj');
|
|
3368
|
-
* TODO: [🌺] Use some intermediate util splitWords
|
|
3369
|
-
*/
|
|
3370
|
-
|
|
3371
|
-
/**
|
|
3372
|
-
* Normalizes a text string to snake_case format.
|
|
3373
|
-
*
|
|
3374
|
-
* Note: [🔂] This function is idempotent.
|
|
3375
|
-
*
|
|
3376
|
-
* @param text The text string to be converted to snake_case format.
|
|
3377
|
-
* @returns The normalized text in snake_case format.
|
|
3378
|
-
* @example 'hello_world'
|
|
3379
|
-
* @example 'i_love_promptbook'
|
|
3380
|
-
*
|
|
3381
|
-
* @public exported from `@promptbook/utils`
|
|
3382
|
-
*/
|
|
3383
|
-
function normalizeTo_snake_case(text) {
|
|
3384
|
-
return normalizeTo_SCREAMING_CASE(text).toLowerCase();
|
|
3385
|
-
}
|
|
3386
|
-
|
|
3387
|
-
/**
|
|
3388
|
-
* Marker property stored inside serialized tool-execution envelopes.
|
|
3389
|
-
*
|
|
3390
|
-
* @private internal tool-execution transport
|
|
3391
|
-
*/
|
|
3392
|
-
const TOOL_EXECUTION_ENVELOPE_MARKER = '__promptbookToolExecutionEnvelope';
|
|
3393
|
-
/**
|
|
3394
|
-
* Parses one serialized tool-execution envelope when present.
|
|
3395
|
-
*
|
|
3396
|
-
* @private internal tool-execution transport
|
|
3397
|
-
*/
|
|
3398
|
-
function parseToolExecutionEnvelope(rawValue) {
|
|
3399
|
-
if (typeof rawValue !== 'string') {
|
|
3400
|
-
return null;
|
|
3401
|
-
}
|
|
3402
|
-
try {
|
|
3403
|
-
const parsedValue = JSON.parse(rawValue);
|
|
3404
|
-
if (!parsedValue ||
|
|
3405
|
-
typeof parsedValue !== 'object' ||
|
|
3406
|
-
parsedValue[TOOL_EXECUTION_ENVELOPE_MARKER] !== true ||
|
|
3407
|
-
typeof parsedValue.assistantMessage !== 'string') {
|
|
3408
|
-
return null;
|
|
3409
|
-
}
|
|
3410
|
-
return {
|
|
3411
|
-
assistantMessage: parsedValue.assistantMessage,
|
|
3412
|
-
toolResult: parsedValue.toolResult,
|
|
3413
|
-
};
|
|
3414
|
-
}
|
|
3415
|
-
catch (_a) {
|
|
3416
|
-
return null;
|
|
3417
|
-
}
|
|
3418
|
-
}
|
|
3419
|
-
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3420
|
-
|
|
3421
|
-
/**
|
|
3422
|
-
* Prompt parameter key used to pass hidden runtime context to tool execution.
|
|
3423
|
-
*
|
|
3424
|
-
* @private internal runtime wiring for commitment tools
|
|
3425
|
-
*/
|
|
3426
|
-
const TOOL_RUNTIME_CONTEXT_PARAMETER = 'promptbookToolRuntimeContext';
|
|
3427
|
-
/**
|
|
3428
|
-
* Hidden argument key used to pass runtime context into individual tool calls.
|
|
3429
|
-
*
|
|
3430
|
-
* @private internal runtime wiring for commitment tools
|
|
3431
|
-
*/
|
|
3432
|
-
const TOOL_RUNTIME_CONTEXT_ARGUMENT = '__promptbookToolRuntimeContext';
|
|
3433
|
-
/**
|
|
3434
|
-
* Prompt parameter key used to pass a hidden tool-progress listener token into script execution.
|
|
3435
|
-
*
|
|
3436
|
-
* @private internal runtime wiring for commitment tools
|
|
3437
|
-
*/
|
|
3438
|
-
const TOOL_PROGRESS_TOKEN_PARAMETER = 'promptbookToolProgressToken';
|
|
3439
|
-
/**
|
|
3440
|
-
* Hidden argument key used to pass a tool-progress listener token into individual tool calls.
|
|
3441
|
-
*
|
|
3442
|
-
* @private internal runtime wiring for commitment tools
|
|
3443
|
-
*/
|
|
3444
|
-
const TOOL_PROGRESS_TOKEN_ARGUMENT = '__promptbookToolProgressToken';
|
|
3445
|
-
/**
|
|
3446
|
-
* Monotonic counter used for hidden progress-listener tokens.
|
|
3447
|
-
*
|
|
3448
|
-
* @private internal runtime wiring for commitment tools
|
|
3449
|
-
*/
|
|
3450
|
-
let toolCallProgressListenerCounter = 0;
|
|
3451
|
-
/**
|
|
3452
|
-
* Active tool-progress listeners keyed by hidden execution token.
|
|
3453
|
-
*
|
|
3454
|
-
* @private internal runtime wiring for commitment tools
|
|
3455
|
-
*/
|
|
3456
|
-
const toolCallProgressListeners = new Map();
|
|
3457
|
-
/**
|
|
3458
|
-
* Registers one in-memory listener that receives progress updates emitted by a running tool.
|
|
3459
|
-
*
|
|
3460
|
-
* The returned token is passed into script execution as a hidden argument so tool implementations
|
|
3461
|
-
* can stream progress without exposing extra parameters to the model.
|
|
3462
|
-
*
|
|
3463
|
-
* @param listener - Listener notified about tool progress.
|
|
3464
|
-
* @returns Hidden token used to route progress updates.
|
|
3465
|
-
*
|
|
3466
|
-
* @private internal runtime wiring for commitment tools
|
|
3467
|
-
*/
|
|
3468
|
-
function registerToolCallProgressListener(listener) {
|
|
3469
|
-
toolCallProgressListenerCounter += 1;
|
|
3470
|
-
const token = `tool-progress:${Date.now()}:${toolCallProgressListenerCounter}`;
|
|
3471
|
-
toolCallProgressListeners.set(token, listener);
|
|
3472
|
-
return token;
|
|
3473
|
-
}
|
|
3474
|
-
/**
|
|
3475
|
-
* Unregisters one in-memory progress listener.
|
|
3476
|
-
*
|
|
3477
|
-
* @param token - Token previously created by `registerToolCallProgressListener`.
|
|
3478
|
-
*
|
|
3479
|
-
* @private internal runtime wiring for commitment tools
|
|
3480
|
-
*/
|
|
3481
|
-
function unregisterToolCallProgressListener(token) {
|
|
3482
|
-
toolCallProgressListeners.delete(token);
|
|
3483
|
-
}
|
|
3484
|
-
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
3485
|
-
|
|
3486
3433
|
/**
|
|
3487
3434
|
* Function `addUsage` will add multiple usages into one
|
|
3488
3435
|
*
|
|
@@ -3537,6 +3484,36 @@ function addUsage(...usageItems) {
|
|
|
3537
3484
|
}, deepClone(ZERO_USAGE));
|
|
3538
3485
|
}
|
|
3539
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
|
+
|
|
3540
3517
|
/**
|
|
3541
3518
|
* Builds a tool invocation script that injects hidden runtime context into tool args.
|
|
3542
3519
|
*
|
|
@@ -5138,6 +5115,80 @@ function $getGlobalScope() {
|
|
|
5138
5115
|
return Function('return this')();
|
|
5139
5116
|
}
|
|
5140
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
|
+
|
|
5141
5192
|
/**
|
|
5142
5193
|
* Global registry for storing and managing registered entities of a given type.
|
|
5143
5194
|
*
|