@promptbook/browser 0.112.0-31 → 0.112.0-34
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/esm/index.es.js +112 -64
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/components.index.d.ts +6 -0
- package/esm/src/_packages/types.index.d.ts +55 -49
- package/esm/src/book-2.0/agent-source/AgentReferenceResolver.d.ts +11 -0
- package/esm/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +8 -0
- package/esm/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +33 -0
- package/esm/src/book-2.0/agent-source/createTeamToolName.d.ts +7 -7
- package/esm/src/book-components/Chat/Chat/ChatActionsBar.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +42 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +18 -15
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.test.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +14 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageToolCallChips.d.ts +22 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +290 -0
- package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +16 -0
- package/esm/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +33 -0
- package/esm/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.d.ts +76 -0
- package/esm/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +16 -0
- package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +4 -0
- package/esm/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +26 -0
- package/esm/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +31 -0
- package/esm/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +31 -0
- package/esm/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +31 -0
- package/esm/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +38 -0
- package/esm/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +38 -0
- package/esm/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +46 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +33 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +10 -1
- package/esm/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +29 -0
- package/esm/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +26 -0
- package/esm/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +9 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaAttachments.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +76 -0
- package/esm/src/book-components/Chat/Chat/useChatMessageAvatarTooltip.d.ts +31 -0
- package/esm/src/book-components/Chat/Chat/useChatMessageSpeechPlayback.d.ts +29 -0
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -1
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.test.d.ts +2 -0
- package/esm/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +18 -0
- package/esm/src/book-components/Chat/hooks/useChatCompleteNotification.test.d.ts +2 -0
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +77 -1
- package/esm/src/book-components/Chat/utils/formatToolCallDateTime.d.ts +37 -0
- package/esm/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +11 -0
- package/esm/src/book-components/Chat/utils/formatToolCallTranslationTemplate.d.ts +10 -0
- package/esm/src/book-components/Chat/utils/getChatMessageTimingDisplay.d.ts +5 -1
- package/esm/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +26 -1
- package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +26 -3
- package/esm/src/cli/$runPromptbookCli.d.ts +1 -3
- package/esm/src/cli/cli-commands/_boilerplate.d.ts +2 -4
- package/esm/src/cli/cli-commands/about.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +2 -4
- package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +2 -4
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +2 -4
- package/esm/src/cli/cli-commands/coder/init.d.ts +2 -4
- package/esm/src/cli/cli-commands/coder/run.d.ts +2 -4
- package/esm/src/cli/cli-commands/coder/verify.d.ts +2 -4
- package/esm/src/cli/cli-commands/coder.d.ts +2 -4
- package/esm/src/cli/cli-commands/hello.d.ts +1 -1
- package/esm/src/cli/cli-commands/list-models.d.ts +2 -4
- package/esm/src/cli/cli-commands/list-scrapers.d.ts +2 -4
- package/esm/src/cli/cli-commands/login.d.ts +1 -1
- package/esm/src/cli/cli-commands/make.d.ts +1 -1
- package/esm/src/cli/cli-commands/prettify.d.ts +1 -1
- package/esm/src/cli/cli-commands/run.d.ts +1 -1
- package/esm/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -1
- package/esm/src/cli/cli-commands/start-agents-server.d.ts +2 -4
- package/esm/src/cli/cli-commands/start-pipelines-server.d.ts +1 -1
- package/esm/src/cli/cli-commands/test-command.d.ts +1 -1
- package/esm/src/cli/main.d.ts +2 -4
- package/esm/src/cli/promptbookCli.d.ts +1 -1
- package/esm/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +1 -3
- package/esm/src/conversion/archive/loadArchive.d.ts +1 -3
- package/esm/src/conversion/archive/saveArchive.d.ts +1 -1
- package/esm/src/conversion/validation/_importPipeline.d.ts +2 -4
- package/esm/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -3
- package/esm/src/executables/$provideExecutablesForNode.d.ts +1 -1
- package/esm/src/executables/apps/locateLibreoffice.d.ts +2 -4
- package/esm/src/executables/apps/locatePandoc.d.ts +2 -4
- package/esm/src/executables/locateApp.d.ts +2 -4
- package/esm/src/executables/platforms/locateAppOnLinux.d.ts +2 -4
- package/esm/src/executables/platforms/locateAppOnMacOs.d.ts +2 -4
- package/esm/src/executables/platforms/locateAppOnWindows.d.ts +2 -4
- package/esm/src/execution/translation/automatic-translate/translateMessages.d.ts +2 -4
- package/esm/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
- package/esm/src/llm-providers/_common/register/$provideEnvFilename.d.ts +1 -3
- package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -3
- package/esm/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +1 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -3
- package/esm/src/llm-providers/_multiple/playground/playground.d.ts +1 -3
- package/esm/src/llm-providers/agent/playground/playground.d.ts +1 -1
- package/esm/src/llm-providers/anthropic-claude/playground/playground.d.ts +1 -1
- package/esm/src/llm-providers/azure-openai/playground/playground.d.ts +2 -4
- package/esm/src/llm-providers/ollama/playground/playground.d.ts +2 -4
- package/esm/src/llm-providers/openai/playground/playground.d.ts +2 -4
- package/esm/src/llm-providers/remote/playground/playground.d.ts +1 -3
- package/esm/src/llm-providers/vercel/playground/playground.d.ts +2 -4
- package/esm/src/playground/permanent/_boilerplate.d.ts +1 -3
- package/esm/src/playground/permanent/agent-with-browser-playground.d.ts +1 -3
- package/esm/src/playground/permanent/error-handling-playground.d.ts +1 -3
- package/esm/src/playground/playground.d.ts +2 -4
- package/esm/src/remote-server/startAgentServer.d.ts +1 -3
- package/esm/src/remote-server/startRemoteServer.d.ts +1 -2
- package/esm/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +4 -6
- package/esm/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +1 -3
- package/esm/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -4
- package/esm/src/scrapers/_common/register/$provideScrapersForNode.d.ts +2 -4
- package/esm/src/scrapers/_common/register/$provideScriptingForNode.d.ts +2 -4
- package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +1 -1
- package/esm/src/scrapers/document/DocumentScraper.d.ts +1 -1
- package/esm/src/scrapers/document/playground/document-scraper-playground.d.ts +1 -3
- package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -1
- package/esm/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +1 -3
- package/esm/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +1 -3
- package/esm/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
- package/esm/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +1 -3
- package/esm/src/scrapers/pdf/PdfScraper.d.ts +1 -1
- package/esm/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +1 -3
- package/esm/src/scrapers/website/WebsiteScraper.d.ts +1 -1
- package/esm/src/scrapers/website/playground/website-scraper-playground.d.ts +1 -3
- package/esm/src/speech-recognition/BrowserSpeechRecognition.d.ts +2 -4
- package/esm/src/storage/file-cache-storage/FileCacheStorage.d.ts +2 -4
- package/esm/src/storage/local-storage/getIndexedDbStorage.d.ts +1 -3
- package/esm/src/storage/local-storage/getLocalStorage.d.ts +1 -3
- package/esm/src/storage/local-storage/getSessionStorage.d.ts +1 -3
- package/esm/src/transpilers/openai-sdk/playground/playground.d.ts +1 -3
- package/esm/src/types/InputParameters_private.d.ts +11 -0
- package/esm/src/types/Parameters_private.d.ts +16 -0
- package/esm/src/types/ReservedParameters_private.d.ts +10 -0
- package/esm/src/types/number_bytes.d.ts +21 -0
- package/esm/src/types/number_id.d.ts +13 -0
- package/esm/src/types/number_likeness.d.ts +8 -0
- package/esm/src/types/number_milliseconds.d.ts +33 -0
- package/esm/src/types/number_percent.d.ts +18 -0
- package/esm/src/types/number_positive.d.ts +16 -0
- package/esm/src/types/number_usd.d.ts +6 -106
- package/esm/src/types/string_agent_hash_private.d.ts +9 -0
- package/esm/src/types/string_agent_name_in_book_private.d.ts +8 -0
- package/esm/src/types/string_agent_name_private.d.ts +9 -0
- package/esm/src/types/string_agent_permanent_id_private.d.ts +10 -0
- package/esm/src/types/string_base64_private.d.ts +17 -0
- package/esm/src/types/string_business_category_name_private.d.ts +6 -0
- package/esm/src/types/string_char_private.d.ts +8 -0
- package/esm/src/types/string_chat_prompt_private.d.ts +9 -0
- package/esm/src/types/string_completion_prompt_private.d.ts +9 -0
- package/esm/src/types/string_email_private.d.ts +16 -0
- package/esm/src/types/string_host_private.d.ts +55 -0
- package/esm/src/types/string_mime_type_private.d.ts +17 -0
- package/esm/src/types/string_model_description_private.d.ts +8 -0
- package/esm/src/types/string_model_name_private.d.ts +8 -0
- package/esm/src/types/string_name_private.d.ts +9 -0
- package/esm/src/types/string_page_private.d.ts +9 -0
- package/esm/src/types/string_parameter_name.d.ts +74 -31
- package/esm/src/types/string_parameter_value_private.d.ts +9 -0
- package/esm/src/types/string_persona_description_private.d.ts +8 -0
- package/esm/src/types/string_prompt_image_private.d.ts +8 -0
- package/esm/src/types/string_prompt_private.d.ts +8 -0
- package/esm/src/types/string_reserved_parameter_name_private.d.ts +11 -0
- package/esm/src/types/string_system_message_private.d.ts +9 -0
- package/esm/src/types/string_template_private.d.ts +8 -0
- package/esm/src/types/string_text_prompt_private.d.ts +9 -0
- package/esm/src/types/string_title_private.d.ts +9 -0
- package/esm/src/types/string_url.d.ts +50 -46
- package/esm/src/types/string_url_private.d.ts +88 -0
- package/esm/src/types/typeAliases.d.ts +7 -1
- package/esm/src/utils/execCommand/$execCommand.d.ts +1 -3
- package/esm/src/utils/execCommand/$execCommands.d.ts +1 -3
- package/esm/src/utils/files/$induceBookDownload.d.ts +1 -3
- package/esm/src/utils/files/$induceFileDownload.d.ts +1 -3
- package/esm/src/utils/files/ObjectUrl.d.ts +1 -3
- package/esm/src/utils/toolCalls/mergeToolCalls.d.ts +1 -1
- package/esm/src/version.d.ts +1 -1
- package/esm/src/wizard/$getCompiledBook.d.ts +2 -4
- package/esm/src/wizard/wizard.d.ts +2 -4
- package/package.json +2 -2
- package/umd/index.umd.js +112 -64
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/components.index.d.ts +6 -0
- package/umd/src/_packages/types.index.d.ts +55 -49
- package/umd/src/book-2.0/agent-source/AgentReferenceResolver.d.ts +11 -0
- package/umd/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +8 -0
- package/umd/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +33 -0
- package/umd/src/book-2.0/agent-source/createTeamToolName.d.ts +7 -7
- package/umd/src/book-components/Chat/Chat/ChatActionsBar.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +42 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +18 -15
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.test.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +14 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageToolCallChips.d.ts +22 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +290 -0
- package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +16 -0
- package/umd/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +33 -0
- package/umd/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.d.ts +76 -0
- package/umd/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +16 -0
- package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +4 -0
- package/umd/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +26 -0
- package/umd/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +31 -0
- package/umd/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +31 -0
- package/umd/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +31 -0
- package/umd/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +38 -0
- package/umd/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +38 -0
- package/umd/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +46 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +33 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +10 -1
- package/umd/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +29 -0
- package/umd/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +26 -0
- package/umd/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +9 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaAttachments.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +76 -0
- package/umd/src/book-components/Chat/Chat/useChatMessageAvatarTooltip.d.ts +31 -0
- package/umd/src/book-components/Chat/Chat/useChatMessageSpeechPlayback.d.ts +29 -0
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -1
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.test.d.ts +2 -0
- package/umd/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +18 -0
- package/umd/src/book-components/Chat/hooks/useChatCompleteNotification.test.d.ts +2 -0
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +77 -1
- package/umd/src/book-components/Chat/utils/formatToolCallDateTime.d.ts +37 -0
- package/umd/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +11 -0
- package/umd/src/book-components/Chat/utils/formatToolCallTranslationTemplate.d.ts +10 -0
- package/umd/src/book-components/Chat/utils/getChatMessageTimingDisplay.d.ts +5 -1
- package/umd/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +26 -1
- package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +26 -3
- package/umd/src/cli/$runPromptbookCli.d.ts +1 -3
- package/umd/src/cli/cli-commands/_boilerplate.d.ts +2 -4
- package/umd/src/cli/cli-commands/about.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +2 -4
- package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +2 -4
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +2 -4
- package/umd/src/cli/cli-commands/coder/init.d.ts +2 -4
- package/umd/src/cli/cli-commands/coder/run.d.ts +2 -4
- package/umd/src/cli/cli-commands/coder/verify.d.ts +2 -4
- package/umd/src/cli/cli-commands/coder.d.ts +2 -4
- package/umd/src/cli/cli-commands/hello.d.ts +1 -1
- package/umd/src/cli/cli-commands/list-models.d.ts +2 -4
- package/umd/src/cli/cli-commands/list-scrapers.d.ts +2 -4
- package/umd/src/cli/cli-commands/login.d.ts +1 -1
- package/umd/src/cli/cli-commands/make.d.ts +1 -1
- package/umd/src/cli/cli-commands/prettify.d.ts +1 -1
- package/umd/src/cli/cli-commands/run.d.ts +1 -1
- package/umd/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -1
- package/umd/src/cli/cli-commands/start-agents-server.d.ts +2 -4
- package/umd/src/cli/cli-commands/start-pipelines-server.d.ts +1 -1
- package/umd/src/cli/cli-commands/test-command.d.ts +1 -1
- package/umd/src/cli/main.d.ts +2 -4
- package/umd/src/cli/promptbookCli.d.ts +1 -1
- package/umd/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +1 -3
- package/umd/src/conversion/archive/loadArchive.d.ts +1 -3
- package/umd/src/conversion/archive/saveArchive.d.ts +1 -1
- package/umd/src/conversion/validation/_importPipeline.d.ts +2 -4
- package/umd/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -3
- package/umd/src/executables/$provideExecutablesForNode.d.ts +1 -1
- package/umd/src/executables/apps/locateLibreoffice.d.ts +2 -4
- package/umd/src/executables/apps/locatePandoc.d.ts +2 -4
- package/umd/src/executables/locateApp.d.ts +2 -4
- package/umd/src/executables/platforms/locateAppOnLinux.d.ts +2 -4
- package/umd/src/executables/platforms/locateAppOnMacOs.d.ts +2 -4
- package/umd/src/executables/platforms/locateAppOnWindows.d.ts +2 -4
- package/umd/src/execution/translation/automatic-translate/translateMessages.d.ts +2 -4
- package/umd/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
- package/umd/src/llm-providers/_common/register/$provideEnvFilename.d.ts +1 -3
- package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -3
- package/umd/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +1 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -3
- package/umd/src/llm-providers/_multiple/playground/playground.d.ts +1 -3
- package/umd/src/llm-providers/agent/playground/playground.d.ts +1 -1
- package/umd/src/llm-providers/anthropic-claude/playground/playground.d.ts +1 -1
- package/umd/src/llm-providers/azure-openai/playground/playground.d.ts +2 -4
- package/umd/src/llm-providers/ollama/playground/playground.d.ts +2 -4
- package/umd/src/llm-providers/openai/playground/playground.d.ts +2 -4
- package/umd/src/llm-providers/remote/playground/playground.d.ts +1 -3
- package/umd/src/llm-providers/vercel/playground/playground.d.ts +2 -4
- package/umd/src/playground/permanent/_boilerplate.d.ts +1 -3
- package/umd/src/playground/permanent/agent-with-browser-playground.d.ts +1 -3
- package/umd/src/playground/permanent/error-handling-playground.d.ts +1 -3
- package/umd/src/playground/playground.d.ts +2 -4
- package/umd/src/remote-server/startAgentServer.d.ts +1 -3
- package/umd/src/remote-server/startRemoteServer.d.ts +1 -2
- package/umd/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +4 -6
- package/umd/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +1 -3
- package/umd/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -4
- package/umd/src/scrapers/_common/register/$provideScrapersForNode.d.ts +2 -4
- package/umd/src/scrapers/_common/register/$provideScriptingForNode.d.ts +2 -4
- package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +1 -1
- package/umd/src/scrapers/document/DocumentScraper.d.ts +1 -1
- package/umd/src/scrapers/document/playground/document-scraper-playground.d.ts +1 -3
- package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -1
- package/umd/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +1 -3
- package/umd/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +1 -3
- package/umd/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
- package/umd/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +1 -3
- package/umd/src/scrapers/pdf/PdfScraper.d.ts +1 -1
- package/umd/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +1 -3
- package/umd/src/scrapers/website/WebsiteScraper.d.ts +1 -1
- package/umd/src/scrapers/website/playground/website-scraper-playground.d.ts +1 -3
- package/umd/src/speech-recognition/BrowserSpeechRecognition.d.ts +2 -4
- package/umd/src/storage/file-cache-storage/FileCacheStorage.d.ts +2 -4
- package/umd/src/storage/local-storage/getIndexedDbStorage.d.ts +1 -3
- package/umd/src/storage/local-storage/getLocalStorage.d.ts +1 -3
- package/umd/src/storage/local-storage/getSessionStorage.d.ts +1 -3
- package/umd/src/transpilers/openai-sdk/playground/playground.d.ts +1 -3
- package/umd/src/types/InputParameters_private.d.ts +11 -0
- package/umd/src/types/Parameters_private.d.ts +16 -0
- package/umd/src/types/ReservedParameters_private.d.ts +10 -0
- package/umd/src/types/number_bytes.d.ts +21 -0
- package/umd/src/types/number_id.d.ts +13 -0
- package/umd/src/types/number_likeness.d.ts +8 -0
- package/umd/src/types/number_milliseconds.d.ts +33 -0
- package/umd/src/types/number_percent.d.ts +18 -0
- package/umd/src/types/number_positive.d.ts +16 -0
- package/umd/src/types/number_usd.d.ts +6 -106
- package/umd/src/types/string_agent_hash_private.d.ts +9 -0
- package/umd/src/types/string_agent_name_in_book_private.d.ts +8 -0
- package/umd/src/types/string_agent_name_private.d.ts +9 -0
- package/umd/src/types/string_agent_permanent_id_private.d.ts +10 -0
- package/umd/src/types/string_base64_private.d.ts +17 -0
- package/umd/src/types/string_business_category_name_private.d.ts +6 -0
- package/umd/src/types/string_char_private.d.ts +8 -0
- package/umd/src/types/string_chat_prompt_private.d.ts +9 -0
- package/umd/src/types/string_completion_prompt_private.d.ts +9 -0
- package/umd/src/types/string_email_private.d.ts +16 -0
- package/umd/src/types/string_host_private.d.ts +55 -0
- package/umd/src/types/string_mime_type_private.d.ts +17 -0
- package/umd/src/types/string_model_description_private.d.ts +8 -0
- package/umd/src/types/string_model_name_private.d.ts +8 -0
- package/umd/src/types/string_name_private.d.ts +9 -0
- package/umd/src/types/string_page_private.d.ts +9 -0
- package/umd/src/types/string_parameter_name.d.ts +74 -31
- package/umd/src/types/string_parameter_value_private.d.ts +9 -0
- package/umd/src/types/string_persona_description_private.d.ts +8 -0
- package/umd/src/types/string_prompt_image_private.d.ts +8 -0
- package/umd/src/types/string_prompt_private.d.ts +8 -0
- package/umd/src/types/string_reserved_parameter_name_private.d.ts +11 -0
- package/umd/src/types/string_system_message_private.d.ts +9 -0
- package/umd/src/types/string_template_private.d.ts +8 -0
- package/umd/src/types/string_text_prompt_private.d.ts +9 -0
- package/umd/src/types/string_title_private.d.ts +9 -0
- package/umd/src/types/string_url.d.ts +50 -46
- package/umd/src/types/string_url_private.d.ts +88 -0
- package/umd/src/types/typeAliases.d.ts +7 -1
- package/umd/src/utils/execCommand/$execCommand.d.ts +1 -3
- package/umd/src/utils/execCommand/$execCommands.d.ts +1 -3
- package/umd/src/utils/files/$induceBookDownload.d.ts +1 -3
- package/umd/src/utils/files/$induceFileDownload.d.ts +1 -3
- package/umd/src/utils/files/ObjectUrl.d.ts +1 -3
- package/umd/src/utils/toolCalls/mergeToolCalls.d.ts +1 -1
- package/umd/src/version.d.ts +1 -1
- package/umd/src/wizard/$getCompiledBook.d.ts +2 -4
- package/umd/src/wizard/wizard.d.ts +2 -4
package/umd/index.umd.js
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
30
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-34';
|
|
31
31
|
/**
|
|
32
32
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
33
33
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -9898,10 +9898,6 @@
|
|
|
9898
9898
|
* Prefix used for TEAM tool names.
|
|
9899
9899
|
*/
|
|
9900
9900
|
const TEAM_TOOL_PREFIX = 'team_chat_';
|
|
9901
|
-
/**
|
|
9902
|
-
* Length of URL hash suffix appended to TEAM tool names.
|
|
9903
|
-
*/
|
|
9904
|
-
const TEAM_TOOL_HASH_LENGTH = 10;
|
|
9905
9901
|
/**
|
|
9906
9902
|
* Fallback normalized name when teammate label is empty.
|
|
9907
9903
|
*/
|
|
@@ -9918,20 +9914,19 @@
|
|
|
9918
9914
|
return normalized || TEAM_TOOL_FALLBACK_NAME;
|
|
9919
9915
|
}
|
|
9920
9916
|
/**
|
|
9921
|
-
* Builds a deterministic TEAM tool name from teammate
|
|
9917
|
+
* Builds a deterministic TEAM tool name from the teammate label.
|
|
9922
9918
|
*
|
|
9923
|
-
* The
|
|
9924
|
-
*
|
|
9919
|
+
* The tool name is derived solely from the human-readable label so that it
|
|
9920
|
+
* remains stable and predictable regardless of internal technical identifiers.
|
|
9925
9921
|
*
|
|
9926
|
-
* @param
|
|
9927
|
-
* @param teammateLabel - Human-readable teammate label.
|
|
9928
|
-
* @returns
|
|
9922
|
+
* @param _teammateUrl - Canonical teammate URL (kept for API compatibility, not used).
|
|
9923
|
+
* @param teammateLabel - Human-readable teammate label used as the basis for the name.
|
|
9924
|
+
* @returns TEAM tool name derived from the label.
|
|
9929
9925
|
* @private internal utility of TEAM commitments and chat UI mapping
|
|
9930
9926
|
*/
|
|
9931
|
-
function createTeamToolName(
|
|
9927
|
+
function createTeamToolName(_teammateUrl, teammateLabel) {
|
|
9932
9928
|
const normalizedLabel = normalizeTeammateToolNamePart(teammateLabel);
|
|
9933
|
-
|
|
9934
|
-
return `${TEAM_TOOL_PREFIX}${normalizedLabel}_${hash}`;
|
|
9929
|
+
return `${TEAM_TOOL_PREFIX}${normalizedLabel}`;
|
|
9935
9930
|
}
|
|
9936
9931
|
|
|
9937
9932
|
const urlRegex = /https?:\/\/[^\s]+/gi;
|
|
@@ -10136,7 +10131,7 @@
|
|
|
10136
10131
|
`);
|
|
10137
10132
|
}
|
|
10138
10133
|
applyToAgentModelRequirements(requirements, content) {
|
|
10139
|
-
var _a, _b;
|
|
10134
|
+
var _a, _b, _c;
|
|
10140
10135
|
const trimmedContent = content.trim();
|
|
10141
10136
|
if (!trimmedContent) {
|
|
10142
10137
|
return requirements;
|
|
@@ -10148,14 +10143,18 @@
|
|
|
10148
10143
|
}
|
|
10149
10144
|
const agentName = ((_a = requirements._metadata) === null || _a === void 0 ? void 0 : _a.agentName) || 'Agent';
|
|
10150
10145
|
const existingTeammates = ((_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.teammates) || [];
|
|
10146
|
+
const preResolvedProfiles = (((_c = requirements._metadata) === null || _c === void 0 ? void 0 : _c.preResolvedTeammateProfiles) || {});
|
|
10151
10147
|
const resolvedTeammates = resolveTeamTeammateLabels(trimmedContent, teammates);
|
|
10152
10148
|
const teamEntries = resolvedTeammates.map((teammate) => {
|
|
10149
|
+
const profile = preResolvedProfiles[teammate.url];
|
|
10150
|
+
const resolvedLabel = (profile === null || profile === void 0 ? void 0 : profile.agentName) || teammate.label;
|
|
10153
10151
|
const existingTeammate = existingTeammates.find((entry) => entry.url === teammate.url);
|
|
10154
10152
|
return {
|
|
10155
10153
|
toolName: ((existingTeammate === null || existingTeammate === void 0 ? void 0 : existingTeammate.toolName) ||
|
|
10156
|
-
createTeamToolName(teammate.url,
|
|
10157
|
-
teammate,
|
|
10154
|
+
createTeamToolName(teammate.url, resolvedLabel)),
|
|
10155
|
+
teammate: { ...teammate, label: resolvedLabel },
|
|
10158
10156
|
agentName,
|
|
10157
|
+
description: (profile === null || profile === void 0 ? void 0 : profile.personaDescription) || null,
|
|
10159
10158
|
};
|
|
10160
10159
|
});
|
|
10161
10160
|
for (const entry of teamEntries) {
|
|
@@ -10167,9 +10166,12 @@
|
|
|
10167
10166
|
if (updatedTools.some((tool) => tool.name === entry.toolName)) {
|
|
10168
10167
|
continue;
|
|
10169
10168
|
}
|
|
10169
|
+
const toolDescription = entry.description
|
|
10170
|
+
? `Consult teammate ${entry.teammate.label}\n${entry.description}`
|
|
10171
|
+
: `Consult teammate ${entry.teammate.label}`;
|
|
10170
10172
|
updatedTools.push({
|
|
10171
10173
|
name: entry.toolName,
|
|
10172
|
-
description:
|
|
10174
|
+
description: toolDescription,
|
|
10173
10175
|
parameters: {
|
|
10174
10176
|
type: 'object',
|
|
10175
10177
|
properties: {
|
|
@@ -10198,8 +10200,7 @@
|
|
|
10198
10200
|
toolName: entry.toolName,
|
|
10199
10201
|
});
|
|
10200
10202
|
}
|
|
10201
|
-
const
|
|
10202
|
-
const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamOverviewText, teamEntries));
|
|
10203
|
+
const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamEntries));
|
|
10203
10204
|
return this.appendToSystemMessage({
|
|
10204
10205
|
...requirements,
|
|
10205
10206
|
tools: updatedTools,
|
|
@@ -10236,25 +10237,24 @@
|
|
|
10236
10237
|
};
|
|
10237
10238
|
});
|
|
10238
10239
|
}
|
|
10239
|
-
/**
|
|
10240
|
-
* Rewrites TEAM commitment content into a URL-free teammate overview text.
|
|
10241
|
-
*/
|
|
10242
|
-
function createTeamOverviewText(teamContent, teamEntries) {
|
|
10243
|
-
let overviewText = teamContent;
|
|
10244
|
-
for (const entry of teamEntries) {
|
|
10245
|
-
overviewText = overviewText.split(entry.teammate.url).join(entry.teammate.label);
|
|
10246
|
-
}
|
|
10247
|
-
return overviewText.trim();
|
|
10248
|
-
}
|
|
10249
10240
|
/**
|
|
10250
10241
|
* Builds the textual TEAM section body for the final system message.
|
|
10242
|
+
*
|
|
10243
|
+
* Each teammate is listed with its tool name and, when available, a one-line description.
|
|
10244
|
+
* Uses `spaceTrim` to ensure consistent whitespace and indentation.
|
|
10251
10245
|
*/
|
|
10252
|
-
function buildTeamSystemMessageBody(
|
|
10253
|
-
const
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10246
|
+
function buildTeamSystemMessageBody(teamEntries) {
|
|
10247
|
+
const lines = teamEntries.map((entry, index) => {
|
|
10248
|
+
const toolLine = `${index + 1}) ${entry.teammate.label} tool \`${entry.toolName}\``;
|
|
10249
|
+
if (!entry.description) {
|
|
10250
|
+
return toolLine;
|
|
10251
|
+
}
|
|
10252
|
+
return spacetrim.spaceTrim(`
|
|
10253
|
+
${toolLine}
|
|
10254
|
+
${entry.description}
|
|
10255
|
+
`);
|
|
10256
|
+
});
|
|
10257
|
+
return lines.join('\n');
|
|
10258
10258
|
}
|
|
10259
10259
|
/**
|
|
10260
10260
|
* Registers tool function and title for a teammate tool.
|
|
@@ -16754,9 +16754,7 @@
|
|
|
16754
16754
|
return answer;
|
|
16755
16755
|
}
|
|
16756
16756
|
}
|
|
16757
|
-
/**
|
|
16758
|
-
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
|
|
16759
|
-
*/
|
|
16757
|
+
/** Note: [🔵] Code for browser dialog helper [SimplePromptInterfaceTools](src/dialogs/simple-prompt/SimplePromptInterfaceTools.ts) should never be published outside of `@promptbook/browser` */
|
|
16760
16758
|
|
|
16761
16759
|
/**
|
|
16762
16760
|
* Safely retrieves the global scope object (window in browser, global in Node.js)
|
|
@@ -16955,10 +16953,8 @@
|
|
|
16955
16953
|
}
|
|
16956
16954
|
}
|
|
16957
16955
|
}
|
|
16958
|
-
/**
|
|
16959
|
-
|
|
16960
|
-
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
|
|
16961
|
-
*/
|
|
16956
|
+
/** Note: [🔵] Code for browser speech-recognition adapter [BrowserSpeechRecognition](src/speech-recognition/BrowserSpeechRecognition.ts) should never be published outside of `@promptbook/browser` */
|
|
16957
|
+
/** TODO: !!!! Search ACRY for `window` and put -> [🔵] */
|
|
16962
16958
|
|
|
16963
16959
|
/**
|
|
16964
16960
|
* Creates a PromptbookStorage backed by IndexedDB.
|
|
@@ -17035,9 +17031,7 @@
|
|
|
17035
17031
|
indexedDbStorageCache.set(cacheKey, storage);
|
|
17036
17032
|
return storage;
|
|
17037
17033
|
}
|
|
17038
|
-
/**
|
|
17039
|
-
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
|
|
17040
|
-
*/
|
|
17034
|
+
/** Note: [🔵] Code for browser storage helper [getIndexedDbStorage](src/storage/local-storage/getIndexedDbStorage.ts) should never be published outside of `@promptbook/browser` */
|
|
17041
17035
|
|
|
17042
17036
|
/**
|
|
17043
17037
|
* Stringify the PipelineJson with proper formatting
|
|
@@ -17127,9 +17121,7 @@
|
|
|
17127
17121
|
promptbookLocalStorage = makePromptbookStorageFromWebStorage(localStorage);
|
|
17128
17122
|
return promptbookLocalStorage;
|
|
17129
17123
|
}
|
|
17130
|
-
/**
|
|
17131
|
-
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
|
|
17132
|
-
*/
|
|
17124
|
+
/** Note: [🔵] Code for browser storage helper [getLocalStorage](src/storage/local-storage/getLocalStorage.ts) should never be published outside of `@promptbook/browser` */
|
|
17133
17125
|
|
|
17134
17126
|
/**
|
|
17135
17127
|
* Cache storage
|
|
@@ -17152,9 +17144,7 @@
|
|
|
17152
17144
|
promptbookSessionStorage = makePromptbookStorageFromWebStorage(sessionStorage);
|
|
17153
17145
|
return promptbookSessionStorage;
|
|
17154
17146
|
}
|
|
17155
|
-
/**
|
|
17156
|
-
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
|
|
17157
|
-
*/
|
|
17147
|
+
/** Note: [🔵] Code for browser storage helper [getSessionStorage](src/storage/local-storage/getSessionStorage.ts) should never be published outside of `@promptbook/browser` */
|
|
17158
17148
|
|
|
17159
17149
|
/**
|
|
17160
17150
|
* Normalizes a domain-like string into a comparable hostname form.
|
|
@@ -17909,9 +17899,7 @@
|
|
|
17909
17899
|
return new URL(this.src);
|
|
17910
17900
|
}
|
|
17911
17901
|
}
|
|
17912
|
-
/**
|
|
17913
|
-
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
|
|
17914
|
-
*/
|
|
17902
|
+
/** Note: [🔵] Code for browser file helper [ObjectUrl](src/utils/files/ObjectUrl.ts) should never be published outside of `@promptbook/browser` */
|
|
17915
17903
|
|
|
17916
17904
|
/**
|
|
17917
17905
|
* Download a File in a browser
|
|
@@ -17931,9 +17919,7 @@
|
|
|
17931
17919
|
link.click();
|
|
17932
17920
|
await objectUrl.destroy();
|
|
17933
17921
|
}
|
|
17934
|
-
/**
|
|
17935
|
-
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
|
|
17936
|
-
*/
|
|
17922
|
+
/** Note: [🔵] Code for browser file helper [$induceFileDownload](src/utils/files/$induceFileDownload.ts) should never be published outside of `@promptbook/browser` */
|
|
17937
17923
|
|
|
17938
17924
|
/**
|
|
17939
17925
|
* Download a Book in a browser
|
|
@@ -17952,9 +17938,7 @@
|
|
|
17952
17938
|
});
|
|
17953
17939
|
return /* not await */ $induceFileDownload(bookFile);
|
|
17954
17940
|
}
|
|
17955
|
-
/**
|
|
17956
|
-
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
|
|
17957
|
-
*/
|
|
17941
|
+
/** Note: [🔵] Code for browser file helper [$induceBookDownload](src/utils/files/$induceBookDownload.ts) should never be published outside of `@promptbook/browser` */
|
|
17958
17942
|
|
|
17959
17943
|
/**
|
|
17960
17944
|
* Keep-alive helpers used for streaming chat responses.
|
|
@@ -18280,13 +18264,23 @@
|
|
|
18280
18264
|
*/
|
|
18281
18265
|
function mergeToolCalls(existingToolCalls, incomingToolCalls) {
|
|
18282
18266
|
if (!existingToolCalls || existingToolCalls.length === 0) {
|
|
18283
|
-
return incomingToolCalls ? [...incomingToolCalls] : [];
|
|
18267
|
+
return incomingToolCalls ? deduplicatePreparationToolCalls([...incomingToolCalls]) : [];
|
|
18284
18268
|
}
|
|
18285
18269
|
if (!incomingToolCalls || incomingToolCalls.length === 0) {
|
|
18286
18270
|
return [...existingToolCalls];
|
|
18287
18271
|
}
|
|
18288
18272
|
const mergedToolCalls = [...existingToolCalls];
|
|
18289
18273
|
for (const incomingToolCall of incomingToolCalls) {
|
|
18274
|
+
if (isAssistantPreparationToolCall(incomingToolCall)) {
|
|
18275
|
+
// A new preparation phase always replaces any previous assistant_preparation tool
|
|
18276
|
+
// call, regardless of phase argument, so only one chip is ever shown at a time.
|
|
18277
|
+
const existingPreparationIndex = mergedToolCalls.findIndex(isAssistantPreparationToolCall);
|
|
18278
|
+
if (existingPreparationIndex !== -1) {
|
|
18279
|
+
mergedToolCalls.splice(existingPreparationIndex, 1);
|
|
18280
|
+
}
|
|
18281
|
+
mergedToolCalls.push(incomingToolCall);
|
|
18282
|
+
continue;
|
|
18283
|
+
}
|
|
18290
18284
|
const incomingIdentity = getToolCallIdentity(incomingToolCall);
|
|
18291
18285
|
const existingIndex = mergedToolCalls.findIndex((existingToolCall) => getToolCallIdentity(existingToolCall) === incomingIdentity);
|
|
18292
18286
|
if (existingIndex === -1) {
|
|
@@ -18398,6 +18392,30 @@
|
|
|
18398
18392
|
return String(value);
|
|
18399
18393
|
}
|
|
18400
18394
|
}
|
|
18395
|
+
/**
|
|
18396
|
+
* Ensures at most one `assistant_preparation` tool call survives in the list,
|
|
18397
|
+
* keeping the last occurrence so the most recent preparation phase is shown.
|
|
18398
|
+
*
|
|
18399
|
+
* @param toolCalls - Mutable list to deduplicate in-place.
|
|
18400
|
+
* @returns The same array after removing redundant preparation entries.
|
|
18401
|
+
* @private helper of `mergeToolCalls`
|
|
18402
|
+
*/
|
|
18403
|
+
function deduplicatePreparationToolCalls(toolCalls) {
|
|
18404
|
+
let lastPreparationIndex = -1;
|
|
18405
|
+
for (let index = toolCalls.length - 1; index >= 0; index--) {
|
|
18406
|
+
if (!isAssistantPreparationToolCall(toolCalls[index])) {
|
|
18407
|
+
continue;
|
|
18408
|
+
}
|
|
18409
|
+
if (lastPreparationIndex === -1) {
|
|
18410
|
+
lastPreparationIndex = index;
|
|
18411
|
+
}
|
|
18412
|
+
else {
|
|
18413
|
+
// Remove earlier duplicate — keep only the last (most recent) one.
|
|
18414
|
+
toolCalls.splice(index, 1);
|
|
18415
|
+
}
|
|
18416
|
+
}
|
|
18417
|
+
return toolCalls;
|
|
18418
|
+
}
|
|
18401
18419
|
|
|
18402
18420
|
/**
|
|
18403
18421
|
* Gets all tool titles provided by all commitments
|
|
@@ -22653,7 +22671,7 @@
|
|
|
22653
22671
|
* @private @@@
|
|
22654
22672
|
*/
|
|
22655
22673
|
async function createAgentModelRequirementsWithCommitments(agentSource, modelName, options) {
|
|
22656
|
-
var _a;
|
|
22674
|
+
var _a, _b, _c;
|
|
22657
22675
|
const agentReferenceResolver = options === null || options === void 0 ? void 0 : options.agentReferenceResolver;
|
|
22658
22676
|
// Parse the agent source to extract commitments
|
|
22659
22677
|
const parseResult = parseAgentSourceWithCommitments(agentSource);
|
|
@@ -22721,6 +22739,36 @@
|
|
|
22721
22739
|
if (commitment.type === 'CLOSED' && i !== filteredCommitments.length - 1) {
|
|
22722
22740
|
continue;
|
|
22723
22741
|
}
|
|
22742
|
+
// For TEAM commitments, pre-resolve teammate profiles if a resolver is provided
|
|
22743
|
+
// and store them in metadata before the commitment is applied.
|
|
22744
|
+
const profileResolver = (_a = options === null || options === void 0 ? void 0 : options.teammateProfileResolver) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.agentReferenceResolver;
|
|
22745
|
+
if (commitment.type === 'TEAM' && (profileResolver === null || profileResolver === void 0 ? void 0 : profileResolver.resolveTeammateProfile)) {
|
|
22746
|
+
try {
|
|
22747
|
+
const parsedTeammates = parseTeamCommitmentContent(commitmentContent, { strict: false });
|
|
22748
|
+
const preResolved = {
|
|
22749
|
+
...(_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.preResolvedTeammateProfiles,
|
|
22750
|
+
};
|
|
22751
|
+
for (const teammate of parsedTeammates) {
|
|
22752
|
+
if (preResolved[teammate.url]) {
|
|
22753
|
+
continue;
|
|
22754
|
+
}
|
|
22755
|
+
const profile = await profileResolver.resolveTeammateProfile(teammate.url);
|
|
22756
|
+
if (profile) {
|
|
22757
|
+
preResolved[teammate.url] = profile;
|
|
22758
|
+
}
|
|
22759
|
+
}
|
|
22760
|
+
requirements = {
|
|
22761
|
+
...requirements,
|
|
22762
|
+
_metadata: {
|
|
22763
|
+
...requirements._metadata,
|
|
22764
|
+
preResolvedTeammateProfiles: preResolved,
|
|
22765
|
+
},
|
|
22766
|
+
};
|
|
22767
|
+
}
|
|
22768
|
+
catch (error) {
|
|
22769
|
+
console.warn('Failed to pre-resolve teammate profiles for TEAM commitment:', error);
|
|
22770
|
+
}
|
|
22771
|
+
}
|
|
22724
22772
|
const definition = getCommitmentDefinition(commitment.type);
|
|
22725
22773
|
if (definition) {
|
|
22726
22774
|
try {
|
|
@@ -22816,7 +22864,7 @@
|
|
|
22816
22864
|
// Add example interactions to the system message
|
|
22817
22865
|
const examples = [];
|
|
22818
22866
|
// 1. Initial message as an example agent response
|
|
22819
|
-
const initialMessage = (
|
|
22867
|
+
const initialMessage = (_c = parseResult.commitments.find((c) => c.type === 'INITIAL MESSAGE')) === null || _c === void 0 ? void 0 : _c.content;
|
|
22820
22868
|
if (initialMessage) {
|
|
22821
22869
|
examples.push(`Agent: ${initialMessage}`);
|
|
22822
22870
|
}
|