@promptbook/remote-server 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 +128 -89
- 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 +128 -89
- 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/esm/index.es.js
CHANGED
|
@@ -40,7 +40,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
40
40
|
* @generated
|
|
41
41
|
* @see https://github.com/webgptorg/promptbook
|
|
42
42
|
*/
|
|
43
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
43
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-34';
|
|
44
44
|
/**
|
|
45
45
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
46
46
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1388,9 +1388,7 @@ function $execCommand(options) {
|
|
|
1388
1388
|
}
|
|
1389
1389
|
});
|
|
1390
1390
|
}
|
|
1391
|
-
/**
|
|
1392
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
1393
|
-
*/
|
|
1391
|
+
/** Note: [🟢] Code for Node command-execution helper [$execCommand](src/utils/execCommand/$execCommand.ts) should never be published into packages that could be imported into browser environment */
|
|
1394
1392
|
|
|
1395
1393
|
/**
|
|
1396
1394
|
* [🐱🚀]
|
|
@@ -1417,9 +1415,7 @@ async function startAgentServer(options) {
|
|
|
1417
1415
|
isVerbose: true,
|
|
1418
1416
|
});
|
|
1419
1417
|
}
|
|
1420
|
-
/**
|
|
1421
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
1422
|
-
*/
|
|
1418
|
+
/** Note: [🟢] Code for Node server bootstrap [startAgentServer](src/remote-server/startAgentServer.ts) should never be published into packages that could be imported into browser environment */
|
|
1423
1419
|
|
|
1424
1420
|
/**
|
|
1425
1421
|
* Make error report URL for the given error
|
|
@@ -1932,10 +1928,8 @@ async function locateAppOnLinux({ linuxWhich, }) {
|
|
|
1932
1928
|
return null;
|
|
1933
1929
|
}
|
|
1934
1930
|
}
|
|
1935
|
-
/**
|
|
1936
|
-
|
|
1937
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
1938
|
-
*/
|
|
1931
|
+
/** Note: [🟢] Code for Node executable locator [locateAppOnLinux](src/executables/platforms/locateAppOnLinux.ts) should never be published into packages that could be imported into browser environment */
|
|
1932
|
+
/** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
|
|
1939
1933
|
|
|
1940
1934
|
/**
|
|
1941
1935
|
* Provides filesystem access (for example for Node.js-based scrapers)
|
|
@@ -1958,10 +1952,8 @@ function $provideFilesystemForNode(options) {
|
|
|
1958
1952
|
watch,
|
|
1959
1953
|
};
|
|
1960
1954
|
}
|
|
1961
|
-
/**
|
|
1962
|
-
|
|
1963
|
-
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
1964
|
-
*/
|
|
1955
|
+
/** Note: [🟢] Code for Node scraper registration helper [$provideFilesystemForNode](src/scrapers/_common/register/$provideFilesystemForNode.ts) should never be published into packages that could be imported into browser environment */
|
|
1956
|
+
/** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
|
|
1965
1957
|
|
|
1966
1958
|
/**
|
|
1967
1959
|
* Checks if the file is executable
|
|
@@ -2014,10 +2006,8 @@ async function locateAppOnMacOs({ macOsName, }) {
|
|
|
2014
2006
|
return null;
|
|
2015
2007
|
}
|
|
2016
2008
|
}
|
|
2017
|
-
/**
|
|
2018
|
-
|
|
2019
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
2020
|
-
*/
|
|
2009
|
+
/** Note: [🟢] Code for Node executable locator [locateAppOnMacOs](src/executables/platforms/locateAppOnMacOs.ts) should never be published into packages that could be imported into browser environment */
|
|
2010
|
+
/** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
|
|
2021
2011
|
|
|
2022
2012
|
/**
|
|
2023
2013
|
* Attempts to locate the specified application on a Windows system by searching common installation directories.
|
|
@@ -2046,10 +2036,8 @@ async function locateAppOnWindows({ appName, windowsSuffix, }) {
|
|
|
2046
2036
|
return null;
|
|
2047
2037
|
}
|
|
2048
2038
|
}
|
|
2049
|
-
/**
|
|
2050
|
-
|
|
2051
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
2052
|
-
*/
|
|
2039
|
+
/** Note: [🟢] Code for Node executable locator [locateAppOnWindows](src/executables/platforms/locateAppOnWindows.ts) should never be published into packages that could be imported into browser environment */
|
|
2040
|
+
/** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
|
|
2053
2041
|
|
|
2054
2042
|
/**
|
|
2055
2043
|
* Locates an application on the system
|
|
@@ -2086,10 +2074,8 @@ function locateApp(options) {
|
|
|
2086
2074
|
}
|
|
2087
2075
|
}
|
|
2088
2076
|
}
|
|
2089
|
-
/**
|
|
2090
|
-
|
|
2091
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
2092
|
-
*/
|
|
2077
|
+
/** Note: [🟢] Code for Node executable locator [locateApp](src/executables/locateApp.ts) should never be published into packages that could be imported into browser environment */
|
|
2078
|
+
/** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
|
|
2093
2079
|
|
|
2094
2080
|
/**
|
|
2095
2081
|
* Locates the LibreOffice executable on the current system by searching platform-specific paths.
|
|
@@ -2105,10 +2091,8 @@ function locateLibreoffice() {
|
|
|
2105
2091
|
macOsName: 'LibreOffice',
|
|
2106
2092
|
});
|
|
2107
2093
|
}
|
|
2108
|
-
/**
|
|
2109
|
-
|
|
2110
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
2111
|
-
*/
|
|
2094
|
+
/** Note: [🟢] Code for Node executable locator [locateLibreoffice](src/executables/apps/locateLibreoffice.ts) should never be published into packages that could be imported into browser environment */
|
|
2095
|
+
/** TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/legacy-documents` */
|
|
2112
2096
|
|
|
2113
2097
|
/**
|
|
2114
2098
|
* Locates the Pandoc executable on the current system by searching platform-specific paths.
|
|
@@ -2124,10 +2108,8 @@ function locatePandoc() {
|
|
|
2124
2108
|
macOsName: 'Pandoc',
|
|
2125
2109
|
});
|
|
2126
2110
|
}
|
|
2127
|
-
/**
|
|
2128
|
-
|
|
2129
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
2130
|
-
*/
|
|
2111
|
+
/** Note: [🟢] Code for Node executable locator [locatePandoc](src/executables/apps/locatePandoc.ts) should never be published into packages that could be imported into browser environment */
|
|
2112
|
+
/** TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/documents` */
|
|
2131
2113
|
|
|
2132
2114
|
/**
|
|
2133
2115
|
* Provides paths to required executables (i.e. as Pandoc and LibreOffice) for Node.js environments.
|
|
@@ -2144,9 +2126,9 @@ async function $provideExecutablesForNode(options) {
|
|
|
2144
2126
|
// <- TODO: [🧠] `null` vs `undefined`
|
|
2145
2127
|
};
|
|
2146
2128
|
}
|
|
2129
|
+
/** Note: [🟢] Code for Node executable locator [$provideExecutablesForNode](src/executables/$provideExecutablesForNode.ts) should never be published into packages that could be imported into browser environment */
|
|
2147
2130
|
/**
|
|
2148
2131
|
* TODO: [🧠] Allow to override the executables without need to call `locatePandoc` / `locateLibreoffice` in case of provided
|
|
2149
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
2150
2132
|
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
2151
2133
|
*/
|
|
2152
2134
|
|
|
@@ -8079,10 +8061,8 @@ async function $provideScrapersForNode(tools, options) {
|
|
|
8079
8061
|
}
|
|
8080
8062
|
return scrapers;
|
|
8081
8063
|
}
|
|
8082
|
-
/**
|
|
8083
|
-
|
|
8084
|
-
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
8085
|
-
*/
|
|
8064
|
+
/** Note: [🟢] Code for Node scraper registration helper [$provideScrapersForNode](src/scrapers/_common/register/$provideScrapersForNode.ts) should never be published into packages that could be imported into browser environment */
|
|
8065
|
+
/** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
|
|
8086
8066
|
|
|
8087
8067
|
/**
|
|
8088
8068
|
* Normalizes a given text to camelCase format.
|
|
@@ -10405,12 +10385,12 @@ async function getScraperIntermediateSource(source, options) {
|
|
|
10405
10385
|
};
|
|
10406
10386
|
return fileHandler;
|
|
10407
10387
|
}
|
|
10388
|
+
/** Note: [🟢] Code for Node scraper helper [getScraperIntermediateSource](src/scrapers/_common/utils/getScraperIntermediateSource.ts) should never be published into packages that could be imported into browser environment */
|
|
10408
10389
|
/**
|
|
10409
10390
|
* Note: Not using `FileCacheStorage` for two reasons:
|
|
10410
10391
|
* 1) Need to store more than serialized JSONs
|
|
10411
10392
|
* 2) Need to switch between a `rootDirname` and `cacheDirname` <- TODO: [😡]
|
|
10412
10393
|
* TODO: [🐱🐉][🧠] Make some smart crop
|
|
10413
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
10414
10394
|
*/
|
|
10415
10395
|
|
|
10416
10396
|
/**
|
|
@@ -10742,11 +10722,11 @@ class WebsiteScraper {
|
|
|
10742
10722
|
return knowledge;
|
|
10743
10723
|
}
|
|
10744
10724
|
}
|
|
10725
|
+
/** Note: [🟢] Code for Node scraper implementation [WebsiteScraper](src/scrapers/website/WebsiteScraper.ts) should never be published into packages that could be imported into browser environment */
|
|
10745
10726
|
/**
|
|
10746
10727
|
* TODO: [👣] Scraped website in .md can act as cache item - there is no need to run conversion each time
|
|
10747
10728
|
* TODO: [🪂] Do it in parallel 11:11
|
|
10748
10729
|
* Note: No need to aggregate usage here, it is done by intercepting the llmTools
|
|
10749
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
10750
10730
|
*/
|
|
10751
10731
|
|
|
10752
10732
|
/**
|
|
@@ -10869,9 +10849,7 @@ async function fetchUrlContent(url) {
|
|
|
10869
10849
|
`);
|
|
10870
10850
|
}
|
|
10871
10851
|
}
|
|
10872
|
-
/**
|
|
10873
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
10874
|
-
*/
|
|
10852
|
+
/** Note: [🟢] Code for Node browser-fetch helper [fetchUrlContent](src/commitments/USE_BROWSER/fetchUrlContent.ts) should never be published into packages that could be imported into browser environment */
|
|
10875
10853
|
|
|
10876
10854
|
/**
|
|
10877
10855
|
* Cached implementation of `run_browser` when it can be resolved.
|
|
@@ -15462,10 +15440,6 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
15462
15440
|
* Prefix used for TEAM tool names.
|
|
15463
15441
|
*/
|
|
15464
15442
|
const TEAM_TOOL_PREFIX = 'team_chat_';
|
|
15465
|
-
/**
|
|
15466
|
-
* Length of URL hash suffix appended to TEAM tool names.
|
|
15467
|
-
*/
|
|
15468
|
-
const TEAM_TOOL_HASH_LENGTH = 10;
|
|
15469
15443
|
/**
|
|
15470
15444
|
* Fallback normalized name when teammate label is empty.
|
|
15471
15445
|
*/
|
|
@@ -15482,20 +15456,19 @@ function normalizeTeammateToolNamePart(teammateLabel) {
|
|
|
15482
15456
|
return normalized || TEAM_TOOL_FALLBACK_NAME;
|
|
15483
15457
|
}
|
|
15484
15458
|
/**
|
|
15485
|
-
* Builds a deterministic TEAM tool name from teammate
|
|
15459
|
+
* Builds a deterministic TEAM tool name from the teammate label.
|
|
15486
15460
|
*
|
|
15487
|
-
* The
|
|
15488
|
-
*
|
|
15461
|
+
* The tool name is derived solely from the human-readable label so that it
|
|
15462
|
+
* remains stable and predictable regardless of internal technical identifiers.
|
|
15489
15463
|
*
|
|
15490
|
-
* @param
|
|
15491
|
-
* @param teammateLabel - Human-readable teammate label.
|
|
15492
|
-
* @returns
|
|
15464
|
+
* @param _teammateUrl - Canonical teammate URL (kept for API compatibility, not used).
|
|
15465
|
+
* @param teammateLabel - Human-readable teammate label used as the basis for the name.
|
|
15466
|
+
* @returns TEAM tool name derived from the label.
|
|
15493
15467
|
* @private internal utility of TEAM commitments and chat UI mapping
|
|
15494
15468
|
*/
|
|
15495
|
-
function createTeamToolName(
|
|
15469
|
+
function createTeamToolName(_teammateUrl, teammateLabel) {
|
|
15496
15470
|
const normalizedLabel = normalizeTeammateToolNamePart(teammateLabel);
|
|
15497
|
-
|
|
15498
|
-
return `${TEAM_TOOL_PREFIX}${normalizedLabel}_${hash}`;
|
|
15471
|
+
return `${TEAM_TOOL_PREFIX}${normalizedLabel}`;
|
|
15499
15472
|
}
|
|
15500
15473
|
|
|
15501
15474
|
const urlRegex = /https?:\/\/[^\s]+/gi;
|
|
@@ -15700,7 +15673,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
15700
15673
|
`);
|
|
15701
15674
|
}
|
|
15702
15675
|
applyToAgentModelRequirements(requirements, content) {
|
|
15703
|
-
var _a, _b;
|
|
15676
|
+
var _a, _b, _c;
|
|
15704
15677
|
const trimmedContent = content.trim();
|
|
15705
15678
|
if (!trimmedContent) {
|
|
15706
15679
|
return requirements;
|
|
@@ -15712,14 +15685,18 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
15712
15685
|
}
|
|
15713
15686
|
const agentName = ((_a = requirements._metadata) === null || _a === void 0 ? void 0 : _a.agentName) || 'Agent';
|
|
15714
15687
|
const existingTeammates = ((_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.teammates) || [];
|
|
15688
|
+
const preResolvedProfiles = (((_c = requirements._metadata) === null || _c === void 0 ? void 0 : _c.preResolvedTeammateProfiles) || {});
|
|
15715
15689
|
const resolvedTeammates = resolveTeamTeammateLabels(trimmedContent, teammates);
|
|
15716
15690
|
const teamEntries = resolvedTeammates.map((teammate) => {
|
|
15691
|
+
const profile = preResolvedProfiles[teammate.url];
|
|
15692
|
+
const resolvedLabel = (profile === null || profile === void 0 ? void 0 : profile.agentName) || teammate.label;
|
|
15717
15693
|
const existingTeammate = existingTeammates.find((entry) => entry.url === teammate.url);
|
|
15718
15694
|
return {
|
|
15719
15695
|
toolName: ((existingTeammate === null || existingTeammate === void 0 ? void 0 : existingTeammate.toolName) ||
|
|
15720
|
-
createTeamToolName(teammate.url,
|
|
15721
|
-
teammate,
|
|
15696
|
+
createTeamToolName(teammate.url, resolvedLabel)),
|
|
15697
|
+
teammate: { ...teammate, label: resolvedLabel },
|
|
15722
15698
|
agentName,
|
|
15699
|
+
description: (profile === null || profile === void 0 ? void 0 : profile.personaDescription) || null,
|
|
15723
15700
|
};
|
|
15724
15701
|
});
|
|
15725
15702
|
for (const entry of teamEntries) {
|
|
@@ -15731,9 +15708,12 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
15731
15708
|
if (updatedTools.some((tool) => tool.name === entry.toolName)) {
|
|
15732
15709
|
continue;
|
|
15733
15710
|
}
|
|
15711
|
+
const toolDescription = entry.description
|
|
15712
|
+
? `Consult teammate ${entry.teammate.label}\n${entry.description}`
|
|
15713
|
+
: `Consult teammate ${entry.teammate.label}`;
|
|
15734
15714
|
updatedTools.push({
|
|
15735
15715
|
name: entry.toolName,
|
|
15736
|
-
description:
|
|
15716
|
+
description: toolDescription,
|
|
15737
15717
|
parameters: {
|
|
15738
15718
|
type: 'object',
|
|
15739
15719
|
properties: {
|
|
@@ -15762,8 +15742,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
15762
15742
|
toolName: entry.toolName,
|
|
15763
15743
|
});
|
|
15764
15744
|
}
|
|
15765
|
-
const
|
|
15766
|
-
const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamOverviewText, teamEntries));
|
|
15745
|
+
const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamEntries));
|
|
15767
15746
|
return this.appendToSystemMessage({
|
|
15768
15747
|
...requirements,
|
|
15769
15748
|
tools: updatedTools,
|
|
@@ -15800,25 +15779,24 @@ function resolveTeamTeammateLabels(teamContent, teammates) {
|
|
|
15800
15779
|
};
|
|
15801
15780
|
});
|
|
15802
15781
|
}
|
|
15803
|
-
/**
|
|
15804
|
-
* Rewrites TEAM commitment content into a URL-free teammate overview text.
|
|
15805
|
-
*/
|
|
15806
|
-
function createTeamOverviewText(teamContent, teamEntries) {
|
|
15807
|
-
let overviewText = teamContent;
|
|
15808
|
-
for (const entry of teamEntries) {
|
|
15809
|
-
overviewText = overviewText.split(entry.teammate.url).join(entry.teammate.label);
|
|
15810
|
-
}
|
|
15811
|
-
return overviewText.trim();
|
|
15812
|
-
}
|
|
15813
15782
|
/**
|
|
15814
15783
|
* Builds the textual TEAM section body for the final system message.
|
|
15784
|
+
*
|
|
15785
|
+
* Each teammate is listed with its tool name and, when available, a one-line description.
|
|
15786
|
+
* Uses `spaceTrim` to ensure consistent whitespace and indentation.
|
|
15815
15787
|
*/
|
|
15816
|
-
function buildTeamSystemMessageBody(
|
|
15817
|
-
const
|
|
15818
|
-
|
|
15819
|
-
|
|
15820
|
-
|
|
15821
|
-
|
|
15788
|
+
function buildTeamSystemMessageBody(teamEntries) {
|
|
15789
|
+
const lines = teamEntries.map((entry, index) => {
|
|
15790
|
+
const toolLine = `${index + 1}) ${entry.teammate.label} tool \`${entry.toolName}\``;
|
|
15791
|
+
if (!entry.description) {
|
|
15792
|
+
return toolLine;
|
|
15793
|
+
}
|
|
15794
|
+
return spaceTrim$1(`
|
|
15795
|
+
${toolLine}
|
|
15796
|
+
${entry.description}
|
|
15797
|
+
`);
|
|
15798
|
+
});
|
|
15799
|
+
return lines.join('\n');
|
|
15822
15800
|
}
|
|
15823
15801
|
/**
|
|
15824
15802
|
* Registers tool function and title for a teammate tool.
|
|
@@ -22642,10 +22620,8 @@ async function $provideScriptingForNode(options) {
|
|
|
22642
22620
|
// TODO: [🔱] Do here auto-installation
|
|
22643
22621
|
return [new JavascriptExecutionTools({ ...options, functions: getAllCommitmentsToolFunctionsForNode() })];
|
|
22644
22622
|
}
|
|
22645
|
-
/**
|
|
22646
|
-
|
|
22647
|
-
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
22648
|
-
*/
|
|
22623
|
+
/** Note: [🟢] Code for Node scraper registration helper [$provideScriptingForNode](src/scrapers/_common/register/$provideScriptingForNode.ts) should never be published into packages that could be imported into browser environment */
|
|
22624
|
+
/** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
|
|
22649
22625
|
|
|
22650
22626
|
// TODO: [🥺] List running services from REMOTE_SERVER_URLS
|
|
22651
22627
|
// TODO: [🥺] Import directly from YML
|
|
@@ -23851,8 +23827,8 @@ function startRemoteServer(options) {
|
|
|
23851
23827
|
},
|
|
23852
23828
|
};
|
|
23853
23829
|
}
|
|
23830
|
+
/** Note: [🟢] Code for Node server bootstrap [startRemoteServer](src/remote-server/startRemoteServer.ts) should never be published into packages that could be imported into browser environment */
|
|
23854
23831
|
/**
|
|
23855
|
-
|
|
23856
23832
|
* TODO: [🕋] Use here `aboutPromptbookInformation`
|
|
23857
23833
|
* TODO: [🌡] Add CORS and security - probably via `helmet`
|
|
23858
23834
|
* TODO: Split this file into multiple functions - handler for each request
|
|
@@ -23865,7 +23841,6 @@ function startRemoteServer(options) {
|
|
|
23865
23841
|
* TODO: [🃏] Pass here some security token to prevent malitious usage and/or DDoS
|
|
23866
23842
|
* TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
|
|
23867
23843
|
* TODO: Allow to constrain anonymous mode for specific models / providers
|
|
23868
|
-
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
23869
23844
|
*/
|
|
23870
23845
|
|
|
23871
23846
|
/**
|
|
@@ -24161,13 +24136,23 @@ function getToolCallIdentity(toolCall) {
|
|
|
24161
24136
|
*/
|
|
24162
24137
|
function mergeToolCalls(existingToolCalls, incomingToolCalls) {
|
|
24163
24138
|
if (!existingToolCalls || existingToolCalls.length === 0) {
|
|
24164
|
-
return incomingToolCalls ? [...incomingToolCalls] : [];
|
|
24139
|
+
return incomingToolCalls ? deduplicatePreparationToolCalls([...incomingToolCalls]) : [];
|
|
24165
24140
|
}
|
|
24166
24141
|
if (!incomingToolCalls || incomingToolCalls.length === 0) {
|
|
24167
24142
|
return [...existingToolCalls];
|
|
24168
24143
|
}
|
|
24169
24144
|
const mergedToolCalls = [...existingToolCalls];
|
|
24170
24145
|
for (const incomingToolCall of incomingToolCalls) {
|
|
24146
|
+
if (isAssistantPreparationToolCall(incomingToolCall)) {
|
|
24147
|
+
// A new preparation phase always replaces any previous assistant_preparation tool
|
|
24148
|
+
// call, regardless of phase argument, so only one chip is ever shown at a time.
|
|
24149
|
+
const existingPreparationIndex = mergedToolCalls.findIndex(isAssistantPreparationToolCall);
|
|
24150
|
+
if (existingPreparationIndex !== -1) {
|
|
24151
|
+
mergedToolCalls.splice(existingPreparationIndex, 1);
|
|
24152
|
+
}
|
|
24153
|
+
mergedToolCalls.push(incomingToolCall);
|
|
24154
|
+
continue;
|
|
24155
|
+
}
|
|
24171
24156
|
const incomingIdentity = getToolCallIdentity(incomingToolCall);
|
|
24172
24157
|
const existingIndex = mergedToolCalls.findIndex((existingToolCall) => getToolCallIdentity(existingToolCall) === incomingIdentity);
|
|
24173
24158
|
if (existingIndex === -1) {
|
|
@@ -24279,6 +24264,30 @@ function serializeValueForMerge(value) {
|
|
|
24279
24264
|
return String(value);
|
|
24280
24265
|
}
|
|
24281
24266
|
}
|
|
24267
|
+
/**
|
|
24268
|
+
* Ensures at most one `assistant_preparation` tool call survives in the list,
|
|
24269
|
+
* keeping the last occurrence so the most recent preparation phase is shown.
|
|
24270
|
+
*
|
|
24271
|
+
* @param toolCalls - Mutable list to deduplicate in-place.
|
|
24272
|
+
* @returns The same array after removing redundant preparation entries.
|
|
24273
|
+
* @private helper of `mergeToolCalls`
|
|
24274
|
+
*/
|
|
24275
|
+
function deduplicatePreparationToolCalls(toolCalls) {
|
|
24276
|
+
let lastPreparationIndex = -1;
|
|
24277
|
+
for (let index = toolCalls.length - 1; index >= 0; index--) {
|
|
24278
|
+
if (!isAssistantPreparationToolCall(toolCalls[index])) {
|
|
24279
|
+
continue;
|
|
24280
|
+
}
|
|
24281
|
+
if (lastPreparationIndex === -1) {
|
|
24282
|
+
lastPreparationIndex = index;
|
|
24283
|
+
}
|
|
24284
|
+
else {
|
|
24285
|
+
// Remove earlier duplicate — keep only the last (most recent) one.
|
|
24286
|
+
toolCalls.splice(index, 1);
|
|
24287
|
+
}
|
|
24288
|
+
}
|
|
24289
|
+
return toolCalls;
|
|
24290
|
+
}
|
|
24282
24291
|
|
|
24283
24292
|
/**
|
|
24284
24293
|
* Computes SHA-256 hash of the agent source
|
|
@@ -25211,7 +25220,7 @@ function getSafeReferenceCommitmentFallback(commitmentType, originalContent) {
|
|
|
25211
25220
|
* @private @@@
|
|
25212
25221
|
*/
|
|
25213
25222
|
async function createAgentModelRequirementsWithCommitments(agentSource, modelName, options) {
|
|
25214
|
-
var _a;
|
|
25223
|
+
var _a, _b, _c;
|
|
25215
25224
|
const agentReferenceResolver = options === null || options === void 0 ? void 0 : options.agentReferenceResolver;
|
|
25216
25225
|
// Parse the agent source to extract commitments
|
|
25217
25226
|
const parseResult = parseAgentSourceWithCommitments(agentSource);
|
|
@@ -25279,6 +25288,36 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
|
|
|
25279
25288
|
if (commitment.type === 'CLOSED' && i !== filteredCommitments.length - 1) {
|
|
25280
25289
|
continue;
|
|
25281
25290
|
}
|
|
25291
|
+
// For TEAM commitments, pre-resolve teammate profiles if a resolver is provided
|
|
25292
|
+
// and store them in metadata before the commitment is applied.
|
|
25293
|
+
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;
|
|
25294
|
+
if (commitment.type === 'TEAM' && (profileResolver === null || profileResolver === void 0 ? void 0 : profileResolver.resolveTeammateProfile)) {
|
|
25295
|
+
try {
|
|
25296
|
+
const parsedTeammates = parseTeamCommitmentContent(commitmentContent, { strict: false });
|
|
25297
|
+
const preResolved = {
|
|
25298
|
+
...(_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.preResolvedTeammateProfiles,
|
|
25299
|
+
};
|
|
25300
|
+
for (const teammate of parsedTeammates) {
|
|
25301
|
+
if (preResolved[teammate.url]) {
|
|
25302
|
+
continue;
|
|
25303
|
+
}
|
|
25304
|
+
const profile = await profileResolver.resolveTeammateProfile(teammate.url);
|
|
25305
|
+
if (profile) {
|
|
25306
|
+
preResolved[teammate.url] = profile;
|
|
25307
|
+
}
|
|
25308
|
+
}
|
|
25309
|
+
requirements = {
|
|
25310
|
+
...requirements,
|
|
25311
|
+
_metadata: {
|
|
25312
|
+
...requirements._metadata,
|
|
25313
|
+
preResolvedTeammateProfiles: preResolved,
|
|
25314
|
+
},
|
|
25315
|
+
};
|
|
25316
|
+
}
|
|
25317
|
+
catch (error) {
|
|
25318
|
+
console.warn('Failed to pre-resolve teammate profiles for TEAM commitment:', error);
|
|
25319
|
+
}
|
|
25320
|
+
}
|
|
25282
25321
|
const definition = getCommitmentDefinition(commitment.type);
|
|
25283
25322
|
if (definition) {
|
|
25284
25323
|
try {
|
|
@@ -25374,7 +25413,7 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
|
|
|
25374
25413
|
// Add example interactions to the system message
|
|
25375
25414
|
const examples = [];
|
|
25376
25415
|
// 1. Initial message as an example agent response
|
|
25377
|
-
const initialMessage = (
|
|
25416
|
+
const initialMessage = (_c = parseResult.commitments.find((c) => c.type === 'INITIAL MESSAGE')) === null || _c === void 0 ? void 0 : _c.content;
|
|
25378
25417
|
if (initialMessage) {
|
|
25379
25418
|
examples.push(`Agent: ${initialMessage}`);
|
|
25380
25419
|
}
|