@promptbook/cli 0.103.0-10 → 0.103.0-100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -35
- package/apps/agents-server/README.md +3 -0
- package/apps/agents-server/TODO.txt +7 -0
- package/apps/agents-server/config.ts +128 -0
- package/apps/agents-server/next.config.ts +45 -0
- package/apps/agents-server/package-lock.json +1163 -0
- package/apps/agents-server/package.json +18 -0
- package/apps/agents-server/postcss.config.mjs +8 -0
- package/apps/agents-server/public/.gitkeep +0 -0
- package/apps/agents-server/public/favicon.ico +0 -0
- package/apps/agents-server/public/fonts/OpenMoji-black-glyf.woff2 +0 -0
- package/apps/agents-server/public/fonts/download-font.js +22 -0
- package/apps/agents-server/public/logo-blue-white-256.png +0 -0
- package/apps/agents-server/public/sw.js +16 -0
- package/apps/agents-server/src/app/AddAgentButton.tsx +41 -0
- package/apps/agents-server/src/app/[agentName]/[...rest]/page.tsx +11 -0
- package/apps/agents-server/src/app/[agentName]/page.tsx +1 -0
- package/apps/agents-server/src/app/actions.ts +51 -0
- package/apps/agents-server/src/app/admin/api-tokens/ApiTokensClient.tsx +186 -0
- package/apps/agents-server/src/app/admin/api-tokens/page.tsx +13 -0
- package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackClient.tsx +614 -0
- package/apps/agents-server/src/app/admin/chat-feedback/page.tsx +22 -0
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryClient.tsx +634 -0
- package/apps/agents-server/src/app/admin/chat-history/page.tsx +21 -0
- package/apps/agents-server/src/app/admin/metadata/MetadataClient.tsx +477 -0
- package/apps/agents-server/src/app/admin/metadata/page.tsx +13 -0
- package/apps/agents-server/src/app/admin/models/page.tsx +22 -0
- package/apps/agents-server/src/app/admin/users/[userId]/UserDetailClient.tsx +131 -0
- package/apps/agents-server/src/app/admin/users/[userId]/page.tsx +21 -0
- package/apps/agents-server/src/app/admin/users/page.tsx +18 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +78 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentOptionsMenu.tsx +216 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +78 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileView.tsx +233 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentQrCode.tsx +55 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentUrlCopy.tsx +40 -0
- package/apps/agents-server/src/app/agents/[agentName]/ClearAgentChatFeedbackButton.tsx +63 -0
- package/apps/agents-server/src/app/agents/[agentName]/ClearAgentChatHistoryButton.tsx +63 -0
- package/apps/agents-server/src/app/agents/[agentName]/CloneAgentButton.tsx +41 -0
- package/apps/agents-server/src/app/agents/[agentName]/CopyField.tsx +44 -0
- package/apps/agents-server/src/app/agents/[agentName]/InstallPwaButton.tsx +74 -0
- package/apps/agents-server/src/app/agents/[agentName]/QrCodeModal.tsx +90 -0
- package/apps/agents-server/src/app/agents/[agentName]/ServiceWorkerRegister.tsx +24 -0
- package/apps/agents-server/src/app/agents/[agentName]/TODO.txt +1 -0
- package/apps/agents-server/src/app/agents/[agentName]/_utils.ts +19 -0
- package/apps/agents-server/src/app/agents/[agentName]/agentLinks.tsx +80 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/agents/route.ts +67 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +88 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/book/test.http +37 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/chat/route.ts +174 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/feedback/route.ts +54 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/mcp/route.ts +203 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/modelRequirements/TODO.txt +1 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/modelRequirements/route.ts +55 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/modelRequirements/systemMessage/route.ts +47 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/openai/chat/completions/route.ts +10 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/openai/models/route.ts +93 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/openai/v1/chat/completions/route.ts +10 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/openai/v1/models/route.ts +93 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/openrouter/chat/completions/route.ts +10 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/profile/route.ts +76 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +181 -0
- package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +139 -0
- package/apps/agents-server/src/app/agents/[agentName]/book/page.tsx +35 -0
- package/apps/agents-server/src/app/agents/[agentName]/book+chat/AgentBookAndChat.tsx +75 -0
- package/apps/agents-server/src/app/agents/[agentName]/book+chat/AgentBookAndChatComponent.tsx.todo +160 -0
- package/apps/agents-server/src/app/agents/[agentName]/book+chat/page.tsx +32 -0
- package/apps/agents-server/src/app/agents/[agentName]/book+chat/page.tsx.todo +21 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatWrapper.tsx +68 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +33 -0
- package/apps/agents-server/src/app/agents/[agentName]/generateAgentMetadata.ts +42 -0
- package/apps/agents-server/src/app/agents/[agentName]/history/RestoreVersionButton.tsx +46 -0
- package/apps/agents-server/src/app/agents/[agentName]/history/actions.ts +12 -0
- package/apps/agents-server/src/app/agents/[agentName]/history/page.tsx +62 -0
- package/apps/agents-server/src/app/agents/[agentName]/images/icon-256.png/route.tsx +80 -0
- package/apps/agents-server/src/app/agents/[agentName]/images/screenshot-fullhd.png/route.tsx +92 -0
- package/apps/agents-server/src/app/agents/[agentName]/images/screenshot-phone.png/route.tsx +92 -0
- package/apps/agents-server/src/app/agents/[agentName]/integration/SdkCodeTabs.tsx +31 -0
- package/apps/agents-server/src/app/agents/[agentName]/integration/page.tsx +302 -0
- package/apps/agents-server/src/app/agents/[agentName]/links/page.tsx +182 -0
- package/apps/agents-server/src/app/agents/[agentName]/opengraph-image.tsx +102 -0
- package/apps/agents-server/src/app/agents/[agentName]/page.tsx +159 -0
- package/apps/agents-server/src/app/agents/[agentName]/website-integration/page.tsx +61 -0
- package/apps/agents-server/src/app/agents/page.tsx +11 -0
- package/apps/agents-server/src/app/api/agents/[agentName]/clone/route.ts +47 -0
- package/apps/agents-server/src/app/api/agents/[agentName]/route.ts +19 -0
- package/apps/agents-server/src/app/api/agents/route.ts +43 -0
- package/apps/agents-server/src/app/api/api-tokens/route.ts +76 -0
- package/apps/agents-server/src/app/api/auth/change-password/route.ts +75 -0
- package/apps/agents-server/src/app/api/auth/login/route.ts +27 -0
- package/apps/agents-server/src/app/api/auth/logout/route.ts +7 -0
- package/apps/agents-server/src/app/api/chat/route.ts +32 -0
- package/apps/agents-server/src/app/api/chat-feedback/[id]/route.ts +38 -0
- package/apps/agents-server/src/app/api/chat-feedback/export/route.ts +55 -0
- package/apps/agents-server/src/app/api/chat-feedback/route.ts +157 -0
- package/apps/agents-server/src/app/api/chat-history/[id]/route.ts +37 -0
- package/apps/agents-server/src/app/api/chat-history/export/route.ts +55 -0
- package/apps/agents-server/src/app/api/chat-history/route.ts +147 -0
- package/apps/agents-server/src/app/api/chat-streaming/route.ts +48 -0
- package/apps/agents-server/src/app/api/embed.js/route.ts +93 -0
- package/apps/agents-server/src/app/api/federated-agents/route.ts +17 -0
- package/apps/agents-server/src/app/api/long-running-task/route.ts +7 -0
- package/apps/agents-server/src/app/api/long-streaming/route.ts +20 -0
- package/apps/agents-server/src/app/api/metadata/route.ts +116 -0
- package/apps/agents-server/src/app/api/openai/v1/chat/completions/route.ts +6 -0
- package/apps/agents-server/src/app/api/openai/v1/models/route.ts +65 -0
- package/apps/agents-server/src/app/api/upload/route.ts +83 -0
- package/apps/agents-server/src/app/api/users/[username]/route.ts +75 -0
- package/apps/agents-server/src/app/api/users/route.ts +71 -0
- package/apps/agents-server/src/app/docs/[docId]/page.tsx +43 -0
- package/apps/agents-server/src/app/docs/page.tsx +59 -0
- package/apps/agents-server/src/app/embed/page.tsx +24 -0
- package/apps/agents-server/src/app/globals.css +276 -0
- package/apps/agents-server/src/app/layout.tsx +124 -0
- package/apps/agents-server/src/app/manifest.ts +109 -0
- package/apps/agents-server/src/app/not-found.tsx +5 -0
- package/apps/agents-server/src/app/page.tsx +96 -0
- package/apps/agents-server/src/app/recycle-bin/RestoreAgentButton.tsx +40 -0
- package/apps/agents-server/src/app/recycle-bin/actions.ts +27 -0
- package/apps/agents-server/src/app/recycle-bin/page.tsx +58 -0
- package/apps/agents-server/src/app/restricted/page.tsx +33 -0
- package/apps/agents-server/src/app/test/og-image/README.md +1 -0
- package/apps/agents-server/src/app/test/og-image/opengraph-image.tsx +37 -0
- package/apps/agents-server/src/app/test/og-image/page.tsx +22 -0
- package/apps/agents-server/src/components/Auth/AuthControls.tsx +123 -0
- package/apps/agents-server/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx +41 -0
- package/apps/agents-server/src/components/ChangePasswordForm/ChangePasswordForm.tsx +159 -0
- package/apps/agents-server/src/components/DocumentationContent/DocumentationContent.tsx +87 -0
- package/apps/agents-server/src/components/ErrorPage/ErrorPage.tsx +33 -0
- package/apps/agents-server/src/components/Footer/Footer.tsx +175 -0
- package/apps/agents-server/src/components/ForbiddenPage/ForbiddenPage.tsx +15 -0
- package/apps/agents-server/src/components/Header/Header.tsx +593 -0
- package/apps/agents-server/src/components/Homepage/AgentCard.tsx +60 -0
- package/apps/agents-server/src/components/Homepage/AgentsList.tsx +58 -0
- package/apps/agents-server/src/components/Homepage/Card.tsx +18 -0
- package/apps/agents-server/src/components/Homepage/ExternalAgentsSection.tsx +21 -0
- package/apps/agents-server/src/components/Homepage/ExternalAgentsSectionClient.tsx +183 -0
- package/apps/agents-server/src/components/Homepage/ModelCard.tsx +29 -0
- package/apps/agents-server/src/components/Homepage/ModelsSection.tsx +75 -0
- package/apps/agents-server/src/components/Homepage/Section.tsx +17 -0
- package/apps/agents-server/src/components/Homepage/TechInfoCard.tsx +20 -0
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +53 -0
- package/apps/agents-server/src/components/LoginDialog/LoginDialog.tsx +41 -0
- package/apps/agents-server/src/components/LoginForm/LoginForm.tsx +109 -0
- package/apps/agents-server/src/components/NotFoundPage/NotFoundPage.tsx +17 -0
- package/apps/agents-server/src/components/OpenMojiIcon/OpenMojiIcon.tsx +20 -0
- package/apps/agents-server/src/components/Portal/Portal.tsx +38 -0
- package/apps/agents-server/src/components/PrintButton/PrintButton.tsx +18 -0
- package/apps/agents-server/src/components/PrintHeader/PrintHeader.tsx +18 -0
- package/apps/agents-server/src/components/UsersList/UsersList.tsx +141 -0
- package/apps/agents-server/src/components/UsersList/useUsersAdmin.ts +139 -0
- package/apps/agents-server/src/components/VercelDeploymentCard/VercelDeploymentCard.tsx +55 -0
- package/apps/agents-server/src/database/$getTableName.ts +18 -0
- package/apps/agents-server/src/database/$provideSupabase.ts +29 -0
- package/apps/agents-server/src/database/$provideSupabaseForBrowser.ts +41 -0
- package/apps/agents-server/src/database/$provideSupabaseForServer.ts +48 -0
- package/apps/agents-server/src/database/$provideSupabaseForWorker.ts +43 -0
- package/apps/agents-server/src/database/getMetadata.ts +31 -0
- package/apps/agents-server/src/database/metadataDefaults.ts +69 -0
- package/apps/agents-server/src/database/migrate.ts +131 -0
- package/apps/agents-server/src/database/migrations/2025-11-0001-initial-schema.sql +163 -0
- package/apps/agents-server/src/database/migrations/2025-11-0002-metadata-table.sql +16 -0
- package/apps/agents-server/src/database/migrations/2025-12-0010-llm-cache.sql +12 -0
- package/apps/agents-server/src/database/migrations/2025-12-0060-api-tokens.sql +13 -0
- package/apps/agents-server/src/database/migrations/2025-12-0070-chat-history-source.sql +2 -0
- package/apps/agents-server/src/database/schema.ts +308 -0
- package/apps/agents-server/src/deamons/longRunningTask.ts +37 -0
- package/apps/agents-server/src/middleware.ts +301 -0
- package/apps/agents-server/src/tools/$provideAgentCollectionForServer.ts +54 -0
- package/apps/agents-server/src/tools/$provideCdnForServer.ts +24 -0
- package/apps/agents-server/src/tools/$provideExecutionToolsForServer.ts +117 -0
- package/apps/agents-server/src/tools/$provideOpenAiAssistantExecutionToolsForServer.ts +35 -0
- package/apps/agents-server/src/tools/$provideServer.ts +39 -0
- package/apps/agents-server/src/utils/auth.ts +33 -0
- package/apps/agents-server/src/utils/authenticateUser.ts +42 -0
- package/apps/agents-server/src/utils/cache/SupabaseCacheStorage.ts +55 -0
- package/apps/agents-server/src/utils/cdn/classes/VercelBlobStorage.ts +63 -0
- package/apps/agents-server/src/utils/cdn/interfaces/IFilesStorage.ts +32 -0
- package/apps/agents-server/src/utils/cdn/interfaces/IStorage.ts +14 -0
- package/apps/agents-server/src/utils/cdn/utils/getUserFileCdnKey.ts +28 -0
- package/apps/agents-server/src/utils/cdn/utils/nameToSubfolderPath.ts +9 -0
- package/apps/agents-server/src/utils/cdn/utils/nextRequestToNodeRequest.ts +27 -0
- package/apps/agents-server/src/utils/chatFeedbackAdmin.ts +96 -0
- package/apps/agents-server/src/utils/chatHistoryAdmin.ts +96 -0
- package/apps/agents-server/src/utils/convertToCsv.ts +31 -0
- package/apps/agents-server/src/utils/getCurrentUser.ts +32 -0
- package/apps/agents-server/src/utils/getEffectiveFederatedServers.ts +22 -0
- package/apps/agents-server/src/utils/getFederatedAgents.ts +89 -0
- package/apps/agents-server/src/utils/getFederatedServersFromMetadata.ts +10 -0
- package/apps/agents-server/src/utils/getVisibleCommitmentDefinitions.ts +12 -0
- package/apps/agents-server/src/utils/handleChatCompletion.ts +355 -0
- package/apps/agents-server/src/utils/isIpAllowed.ts +101 -0
- package/apps/agents-server/src/utils/isUserAdmin.ts +31 -0
- package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +100 -0
- package/apps/agents-server/src/utils/session.ts +50 -0
- package/apps/agents-server/src/utils/validateApiKey.ts +128 -0
- package/apps/agents-server/src/utils/validators/validateMimeType.ts +24 -0
- package/apps/agents-server/tailwind.config.ts +26 -0
- package/apps/agents-server/tsconfig.json +29 -0
- package/apps/agents-server/vercel.json +7 -0
- package/esm/index.es.js +5114 -383
- package/esm/index.es.js.map +1 -1
- package/esm/typings/books/index.d.ts +0 -81
- package/esm/typings/servers.d.ts +9 -7
- package/esm/typings/src/_packages/browser.index.d.ts +6 -0
- package/esm/typings/src/_packages/cli.index.d.ts +4 -0
- package/esm/typings/src/_packages/components.index.d.ts +20 -8
- package/esm/typings/src/_packages/core.index.d.ts +58 -18
- package/esm/typings/src/_packages/node.index.d.ts +2 -2
- package/esm/typings/src/_packages/remote-server.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +58 -8
- package/esm/typings/src/_packages/utils.index.d.ts +6 -0
- package/esm/typings/src/_packages/wizard.index.d.ts +4 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +19 -5
- package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +17 -1
- package/esm/typings/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +3 -2
- package/esm/typings/src/book-2.0/agent-source/computeAgentHash.d.ts +8 -0
- package/esm/typings/src/book-2.0/agent-source/createCommitmentRegex.d.ts +3 -3
- package/esm/typings/src/book-2.0/agent-source/createDefaultAgentName.d.ts +8 -0
- package/esm/typings/src/book-2.0/agent-source/normalizeAgentName.d.ts +9 -0
- package/esm/typings/src/book-2.0/agent-source/padBook.d.ts +18 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.d.ts +1 -1
- package/esm/typings/src/book-2.0/agent-source/string_book.d.ts +3 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +6 -1
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +77 -7
- package/esm/typings/src/book-components/BookEditor/BookEditorActionbar.d.ts +14 -0
- package/esm/typings/src/book-components/Chat/AgentChat/AgentChat.d.ts +14 -0
- package/esm/typings/src/book-components/Chat/AgentChat/AgentChatProps.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +10 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +15 -0
- package/esm/typings/src/book-components/Chat/MockedChat/MockedChat.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +4 -0
- package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
- package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgent.d.ts +29 -0
- package/esm/typings/src/book-components/Qr/BrandedQrCode.d.ts +18 -0
- package/esm/typings/src/book-components/Qr/GenericQrCode.d.ts +10 -0
- package/esm/typings/src/book-components/Qr/PromptbookQrCode.d.ts +18 -0
- package/esm/typings/src/book-components/Qr/useQrCode.d.ts +15 -0
- package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +15 -0
- package/esm/typings/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +12 -0
- package/esm/typings/src/book-components/_common/Modal/Modal.d.ts +2 -2
- package/esm/typings/src/book-components/_common/Tooltip/Tooltip.d.ts +47 -0
- package/esm/typings/src/book-components/icons/AboutIcon.d.ts +9 -0
- package/esm/typings/src/book-components/icons/CloseIcon.d.ts +4 -8
- package/esm/typings/src/book-components/icons/DownloadIcon.d.ts +9 -0
- package/esm/typings/src/book-components/icons/ExitFullscreenIcon.d.ts +7 -0
- package/esm/typings/src/book-components/icons/FullscreenIcon.d.ts +7 -0
- package/esm/typings/src/book-components/icons/MenuIcon.d.ts +12 -0
- package/esm/typings/src/book-components/icons/MicIcon.d.ts +8 -0
- package/esm/typings/src/cli/cli-commands/_boilerplate.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/about.d.ts +3 -1
- package/esm/typings/src/cli/cli-commands/hello.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/list-models.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/list-scrapers.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/login.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/make.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/run.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/{start-server.d.ts → start-agents-server.d.ts} +3 -2
- package/esm/typings/src/cli/cli-commands/start-pipelines-server.d.ts +15 -0
- package/esm/typings/src/cli/cli-commands/test-command.d.ts +2 -1
- package/esm/typings/src/cli/common/$addGlobalOptionsToCommand.d.ts +2 -1
- package/esm/typings/src/collection/agent-collection/AgentCollection.d.ts +12 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +75 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +10 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +154 -0
- package/esm/typings/src/collection/{PipelineCollection.d.ts → pipeline-collection/PipelineCollection.d.ts} +7 -3
- package/esm/typings/src/collection/{SimplePipelineCollection.d.ts → pipeline-collection/SimplePipelineCollection.d.ts} +5 -5
- package/esm/typings/src/collection/{constructors/createCollectionFromDirectory.d.ts → pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts} +8 -11
- package/esm/typings/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +13 -0
- package/esm/typings/src/collection/{constructors/createCollectionFromPromise.d.ts → pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts} +6 -5
- package/esm/typings/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.test.d.ts +1 -0
- package/esm/typings/src/collection/{constructors/createCollectionFromUrl.d.ts → pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts} +3 -3
- package/esm/typings/src/collection/{constructors/createSubcollection.d.ts → pipeline-collection/constructors/createPipelineSubcollection.d.ts} +3 -3
- package/esm/typings/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +13 -0
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +4 -5
- package/esm/typings/src/{book-2.0/commitments → commitments}/ACTION/ACTION.d.ts +5 -1
- package/esm/typings/src/commitments/CLOSED/CLOSED.d.ts +35 -0
- package/esm/typings/src/commitments/COMPONENT/COMPONENT.d.ts +28 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/DELETE/DELETE.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/FORMAT/FORMAT.d.ts +5 -1
- package/esm/typings/src/commitments/FROM/FROM.d.ts +34 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/GOAL/GOAL.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/KNOWLEDGE/KNOWLEDGE.d.ts +5 -5
- package/esm/typings/src/commitments/LANGUAGE/LANGUAGE.d.ts +35 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/MEMORY/MEMORY.d.ts +5 -1
- package/esm/typings/src/commitments/MESSAGE/AgentMessageCommitmentDefinition.d.ts +32 -0
- package/esm/typings/src/commitments/MESSAGE/InitialMessageCommitmentDefinition.d.ts +32 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/MESSAGE/MESSAGE.d.ts +5 -1
- package/esm/typings/src/commitments/MESSAGE/UserMessageCommitmentDefinition.d.ts +32 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/META/META.d.ts +5 -1
- package/esm/typings/src/commitments/META_COLOR/META_COLOR.d.ts +48 -0
- package/esm/typings/src/commitments/META_FONT/META_FONT.d.ts +42 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/META_IMAGE/META_IMAGE.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/META_LINK/META_LINK.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/MODEL/MODEL.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/NOTE/NOTE.d.ts +5 -1
- package/esm/typings/src/commitments/OPEN/OPEN.d.ts +35 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/PERSONA/PERSONA.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/RULE/RULE.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/SAMPLE/SAMPLE.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/SCENARIO/SCENARIO.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/STYLE/STYLE.d.ts +5 -1
- package/esm/typings/src/commitments/USE/USE.d.ts +53 -0
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +38 -0
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_MCP/USE_MCP.d.ts +37 -0
- package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +38 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/_base/BaseCommitmentDefinition.d.ts +8 -2
- package/esm/typings/src/{book-2.0/commitments → commitments}/_base/CommitmentDefinition.d.ts +6 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/_base/NotYetImplementedCommitmentDefinition.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/_base/createEmptyAgentModelRequirements.d.ts +1 -1
- package/esm/typings/src/commitments/index.d.ts +93 -0
- package/esm/typings/src/config.d.ts +24 -3
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +2 -0
- package/esm/typings/src/errors/0-index.d.ts +6 -0
- package/esm/typings/src/errors/DatabaseError.d.ts +12 -0
- package/esm/typings/src/errors/NotAllowed.d.ts +9 -0
- package/esm/typings/src/errors/WrappedError.d.ts +2 -2
- package/esm/typings/src/execution/AvailableModel.d.ts +1 -0
- package/esm/typings/src/execution/Executables.d.ts +3 -0
- package/esm/typings/src/execution/ExecutionTask.d.ts +12 -3
- package/esm/typings/src/execution/ExecutionTools.d.ts +5 -0
- package/esm/typings/src/execution/FilesystemTools.d.ts +1 -1
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +21 -1
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +5 -0
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +5 -0
- package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +5 -0
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +5 -0
- package/esm/typings/src/execution/utils/usage-constants.d.ts +4 -124
- package/esm/typings/src/execution/utils/validatePromptResult.d.ts +2 -0
- package/esm/typings/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/utils/assertUniqueModels.d.ts +12 -0
- package/esm/typings/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +70 -0
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +26 -4
- package/esm/typings/src/llm-providers/agent/AgentOptions.d.ts +19 -0
- package/esm/typings/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +17 -0
- package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +50 -0
- package/esm/typings/src/llm-providers/agent/RemoteAgentOptions.d.ts +11 -0
- package/esm/typings/src/llm-providers/agent/createAgentLlmExecutionTools.d.ts +1 -19
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +60 -2
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionToolsOptions.d.ts +7 -1
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/openai-models.test.d.ts +4 -0
- package/esm/typings/src/other/templates/getTemplatesPipelineCollection.d.ts +1 -1
- package/esm/typings/src/pipeline/validatePipelineString.d.ts +2 -0
- package/esm/typings/src/playground/permanent/_boilerplate.d.ts +5 -0
- package/esm/typings/src/playground/permanent/agent-with-browser-playground.d.ts +5 -0
- package/esm/typings/src/prepare/PrepareAndScrapeOptions.d.ts +1 -0
- package/esm/typings/src/remote-server/startAgentServer.d.ts +26 -0
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +4 -1
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +3 -8
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/document/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/markitdown/createMarkitdownScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/website/register-metadata.d.ts +1 -9
- package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -0
- package/esm/typings/src/storage/env-storage/$EnvStorage.d.ts +2 -1
- package/esm/typings/src/transpilers/_common/BookTranspiler.d.ts +33 -0
- package/esm/typings/src/transpilers/_common/BookTranspilerOptions.d.ts +18 -0
- package/esm/typings/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +15 -0
- package/esm/typings/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.d.ts +16 -0
- package/esm/typings/src/transpilers/formatted-book-in-markdown/register.d.ts +15 -0
- package/esm/typings/src/transpilers/openai-sdk/OpenAiSdkTranspiler.d.ts +16 -0
- package/esm/typings/src/transpilers/openai-sdk/OpenAiSdkTranspiler.test.d.ts +1 -0
- package/esm/typings/src/transpilers/openai-sdk/playground/playground.d.ts +5 -0
- package/esm/typings/src/transpilers/openai-sdk/register.d.ts +15 -0
- package/esm/typings/src/types/LlmCall.d.ts +20 -0
- package/esm/typings/src/types/Updatable.d.ts +19 -0
- package/esm/typings/src/types/typeAliases.d.ts +32 -2
- package/esm/typings/src/utils/color/$randomColor.d.ts +1 -0
- package/esm/typings/src/utils/color/Color.d.ts +15 -0
- package/esm/typings/src/utils/color/Color.test.d.ts +1 -0
- package/esm/typings/src/utils/color/css-colors.d.ts +1 -0
- package/esm/typings/src/utils/color/internal-utils/checkChannelValue.d.ts +0 -3
- package/esm/typings/src/utils/color/operators/darken.d.ts +1 -1
- package/esm/typings/src/utils/color/operators/grayscale.d.ts +1 -1
- package/esm/typings/src/utils/color/operators/lighten.d.ts +1 -1
- package/esm/typings/src/utils/color/operators/mixWithColor.d.ts +1 -1
- package/esm/typings/src/utils/color/operators/saturate.d.ts +1 -1
- package/esm/typings/src/utils/environment/$detectRuntimeEnvironment.d.ts +16 -0
- package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -2
- package/esm/typings/src/utils/execCommand/$execCommand.d.ts +2 -1
- package/esm/typings/src/utils/execCommand/$execCommands.d.ts +2 -1
- package/esm/typings/src/utils/files/$induceBookDownload.d.ts +13 -0
- package/esm/typings/src/utils/files/$induceFileDownload.d.ts +13 -0
- package/esm/typings/src/utils/files/ObjectUrl.d.ts +46 -0
- package/esm/typings/src/utils/files/listAllFiles.d.ts +2 -3
- package/esm/typings/src/utils/misc/aboutPromptbookInformation.d.ts +27 -0
- package/esm/typings/src/utils/misc/computeHash.d.ts +11 -0
- package/esm/typings/src/utils/misc/computeHash.test.d.ts +1 -0
- package/esm/typings/src/utils/misc/xAboutPromptbookInformation.d.ts +13 -0
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -0
- package/esm/typings/src/utils/normalization/normalizeMessageText.d.ts +9 -0
- package/esm/typings/src/utils/normalization/normalizeMessageText.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +3 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -0
- package/esm/typings/src/utils/normalization/titleToName.d.ts +2 -0
- package/esm/typings/src/utils/organization/$sideEffect.d.ts +2 -2
- package/esm/typings/src/utils/organization/$side_effect.d.ts +7 -0
- package/esm/typings/src/utils/organization/TODO_USE.d.ts +2 -2
- package/esm/typings/src/utils/organization/keepUnused.d.ts +2 -2
- package/esm/typings/src/utils/organization/preserve.d.ts +3 -3
- package/esm/typings/src/utils/organization/really_any.d.ts +7 -0
- package/esm/typings/src/utils/random/$generateBookBoilerplate.d.ts +25 -0
- package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +9 -0
- package/esm/typings/src/utils/random/$randomFullnameWithColor.d.ts +13 -0
- package/esm/typings/src/utils/random/$randomItem.d.ts +9 -0
- package/esm/typings/src/utils/random/$randomSeed.d.ts +3 -0
- package/esm/typings/src/utils/random/$randomToken.d.ts +2 -0
- package/esm/typings/src/utils/serialization/$deepFreeze.d.ts +2 -1
- package/esm/typings/src/utils/serialization/asSerializable.d.ts +2 -2
- package/esm/typings/src/utils/serialization/serializeToPromptbookJavascript.d.ts +2 -2
- package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +2 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/esm/typings/src/wizard/$getCompiledBook.d.ts +1 -2
- package/package.json +15 -15
- package/umd/index.umd.js +5089 -356
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/book-2.0/commitments/index.d.ts +0 -60
- package/esm/typings/src/book-components/BookEditor/config.d.ts +0 -11
- package/esm/typings/src/book-components/Chat/utils/renderMarkdown.d.ts +0 -21
- package/esm/typings/src/collection/collectionToJson.d.ts +0 -13
- package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +0 -13
- /package/esm/typings/src/{book-components/Chat/utils/renderMarkdown.test.d.ts → book-2.0/agent-source/computeAgentHash.test.d.ts} +0 -0
- /package/esm/typings/src/{collection/constructors/createCollectionFromDirectory.test.d.ts → book-2.0/agent-source/normalizeAgentName.test.d.ts} +0 -0
- /package/esm/typings/src/{collection/constructors/createCollectionFromJson.test.d.ts → book-components/Chat/AgentChat/AgentChat.test.d.ts} +0 -0
- /package/esm/typings/src/collection/{constructors/createCollectionFromPromise.test.d.ts → pipeline-collection/constructors/createPipelineCollectionFromDirectory.test.d.ts} +0 -0
- /package/esm/typings/src/{commands/_common/parseCommand.test.d.ts → collection/pipeline-collection/constructors/createPipelineCollectionFromJson.test.d.ts} +0 -0
- /package/esm/typings/src/collection/{collectionToJson.test.d.ts → pipeline-collection/pipelineCollectionToJson.test.d.ts} +0 -0
- /package/esm/typings/src/{book-2.0/commitments → commitments}/_base/BookCommitment.d.ts +0 -0
- /package/esm/typings/src/{book-2.0/commitments → commitments}/_base/ParsedCommitment.d.ts +0 -0
|
@@ -2,14 +2,12 @@ import type { BookParameter } from '../book-2.0/agent-source/AgentBasicInformati
|
|
|
2
2
|
import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicInformation';
|
|
3
3
|
import type { AgentModelRequirements } from '../book-2.0/agent-source/AgentModelRequirements';
|
|
4
4
|
import type { string_book } from '../book-2.0/agent-source/string_book';
|
|
5
|
-
import type { BookCommitment } from '../book-2.0/commitments/_base/BookCommitment';
|
|
6
|
-
import type { CommitmentDefinition } from '../book-2.0/commitments/_base/CommitmentDefinition';
|
|
7
|
-
import type { ParsedCommitment } from '../book-2.0/commitments/_base/ParsedCommitment';
|
|
8
5
|
import type { AvatarChipProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChip';
|
|
9
6
|
import type { AvatarChipFromSourceProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChipFromSource';
|
|
10
7
|
import type { AvatarProfileProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
|
|
11
8
|
import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
|
12
9
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
10
|
+
import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChatProps';
|
|
13
11
|
import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
|
|
14
12
|
import type { ChatAutoScrollConfig } from '../book-components/Chat/hooks/useChatAutoScroll';
|
|
15
13
|
import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
|
|
@@ -21,7 +19,17 @@ import type { string_chat_format_name } from '../book-components/Chat/save/_comm
|
|
|
21
19
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
22
20
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
23
21
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
24
|
-
import type {
|
|
22
|
+
import type { QrCodeOptions } from '../book-components/Qr/useQrCode';
|
|
23
|
+
import type { AgentCollection } from '../collection/agent-collection/AgentCollection';
|
|
24
|
+
import type { AgentCollectionInSupabaseOptions } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions';
|
|
25
|
+
import type { Json } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
|
|
26
|
+
import type { AgentsDatabaseSchema } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
|
|
27
|
+
import type { Tables } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
|
|
28
|
+
import type { TablesInsert } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
|
|
29
|
+
import type { TablesUpdate } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
|
|
30
|
+
import type { Enums } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
|
|
31
|
+
import type { CompositeTypes } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
|
|
32
|
+
import type { PipelineCollection } from '../collection/pipeline-collection/PipelineCollection';
|
|
25
33
|
import type { Command } from '../commands/_common/types/Command';
|
|
26
34
|
import type { CommandParser } from '../commands/_common/types/CommandParser';
|
|
27
35
|
import type { PipelineBothCommandParser } from '../commands/_common/types/CommandParser';
|
|
@@ -46,6 +54,10 @@ import type { SectionCommand } from '../commands/SECTION/SectionCommand';
|
|
|
46
54
|
import type { UrlCommand } from '../commands/URL/UrlCommand';
|
|
47
55
|
import type { ActionCommand } from '../commands/X_ACTION/ActionCommand';
|
|
48
56
|
import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand';
|
|
57
|
+
import type { BookCommitment } from '../commitments/_base/BookCommitment';
|
|
58
|
+
import type { CommitmentDefinition } from '../commitments/_base/CommitmentDefinition';
|
|
59
|
+
import type { ParsedCommitment } from '../commitments/_base/ParsedCommitment';
|
|
60
|
+
import type { GroupedCommitmentDefinition } from '../commitments/index';
|
|
49
61
|
import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions';
|
|
50
62
|
import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions';
|
|
51
63
|
import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions';
|
|
@@ -98,7 +110,9 @@ import type { LlmToolsOptions } from '../llm-providers/_common/register/LlmTools
|
|
|
98
110
|
import type { CacheItem } from '../llm-providers/_common/utils/cache/CacheItem';
|
|
99
111
|
import type { CacheLlmToolsOptions } from '../llm-providers/_common/utils/cache/CacheLlmToolsOptions';
|
|
100
112
|
import type { LlmExecutionToolsWithTotalUsage } from '../llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage';
|
|
101
|
-
import type {
|
|
113
|
+
import type { AgentOptions } from '../llm-providers/agent/AgentOptions';
|
|
114
|
+
import type { CreateAgentLlmExecutionToolsOptions } from '../llm-providers/agent/CreateAgentLlmExecutionToolsOptions';
|
|
115
|
+
import type { RemoteAgentOptions } from '../llm-providers/agent/RemoteAgentOptions';
|
|
102
116
|
import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
103
117
|
import type { AnthropicClaudeExecutionToolsNonProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
104
118
|
import type { AnthropicClaudeExecutionToolsProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
@@ -166,7 +180,10 @@ import type { PostprocessingFunction } from '../scripting/javascript/JavascriptE
|
|
|
166
180
|
import type { PromptbookStorage } from '../storage/_common/PromptbookStorage';
|
|
167
181
|
import type { FileCacheStorageOptions } from '../storage/file-cache-storage/FileCacheStorageOptions';
|
|
168
182
|
import type { IndexedDbStorageOptions } from '../storage/local-storage/utils/IndexedDbStorageOptions';
|
|
183
|
+
import type { BookTranspiler } from '../transpilers/_common/BookTranspiler';
|
|
184
|
+
import type { BookTranspilerOptions } from '../transpilers/_common/BookTranspilerOptions';
|
|
169
185
|
import type { IntermediateFilesStrategy } from '../types/IntermediateFilesStrategy';
|
|
186
|
+
import type { LlmCall } from '../types/LlmCall';
|
|
170
187
|
import type { ModelRequirements } from '../types/ModelRequirements';
|
|
171
188
|
import type { CompletionModelRequirements } from '../types/ModelRequirements';
|
|
172
189
|
import type { ChatModelRequirements } from '../types/ModelRequirements';
|
|
@@ -203,6 +220,8 @@ import type { string_reserved_parameter_name } from '../types/typeAliases';
|
|
|
203
220
|
import type { ReservedParameters } from '../types/typeAliases';
|
|
204
221
|
import type { string_title } from '../types/typeAliases';
|
|
205
222
|
import type { string_agent_name } from '../types/typeAliases';
|
|
223
|
+
import type { string_agent_name_in_book } from '../types/typeAliases';
|
|
224
|
+
import type { string_agent_hash } from '../types/typeAliases';
|
|
206
225
|
import type { string_persona_description } from '../types/typeAliases';
|
|
207
226
|
import type { string_model_description } from '../types/typeAliases';
|
|
208
227
|
import type { string_knowledge_source_content } from '../types/typeAliases';
|
|
@@ -232,6 +251,7 @@ import type { string_url } from '../types/typeAliases';
|
|
|
232
251
|
import type { string_promptbook_server_url } from '../types/typeAliases';
|
|
233
252
|
import type { string_base_url } from '../types/typeAliases';
|
|
234
253
|
import type { string_pipeline_root_url } from '../types/typeAliases';
|
|
254
|
+
import type { string_agent_url } from '../types/typeAliases';
|
|
235
255
|
import type { string_pipeline_url } from '../types/typeAliases';
|
|
236
256
|
import type { string_pipeline_url_with_task_hash } from '../types/typeAliases';
|
|
237
257
|
import type { string_data_url } from '../types/typeAliases';
|
|
@@ -261,6 +281,8 @@ import type { string_absolute_dirname } from '../types/typeAliases';
|
|
|
261
281
|
import type { string_relative_dirname } from '../types/typeAliases';
|
|
262
282
|
import type { string_dirname } from '../types/typeAliases';
|
|
263
283
|
import type { string_person_fullname } from '../types/typeAliases';
|
|
284
|
+
import type { string_person_firstname } from '../types/typeAliases';
|
|
285
|
+
import type { string_person_lastname } from '../types/typeAliases';
|
|
264
286
|
import type { string_person_profile } from '../types/typeAliases';
|
|
265
287
|
import type { string_license } from '../types/typeAliases';
|
|
266
288
|
import type { string_legal_entity } from '../types/typeAliases';
|
|
@@ -306,6 +328,7 @@ import type { number_kilobytes } from '../types/typeAliases';
|
|
|
306
328
|
import type { number_megabytes } from '../types/typeAliases';
|
|
307
329
|
import type { number_gigabytes } from '../types/typeAliases';
|
|
308
330
|
import type { number_terabytes } from '../types/typeAliases';
|
|
331
|
+
import type { Updatable } from '../types/Updatable';
|
|
309
332
|
import type { ColorTransformer } from '../utils/color/operators/ColorTransformer';
|
|
310
333
|
import type { PipelineEditableSerialized } from '../utils/editable/types/PipelineEditableSerialized';
|
|
311
334
|
import type { ExecCommandOptions } from '../utils/execCommand/ExecCommandOptions';
|
|
@@ -314,6 +337,7 @@ import type { CodeBlock } from '../utils/markdown/extractAllBlocksFromMarkdown';
|
|
|
314
337
|
import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection';
|
|
315
338
|
import type { Registered } from '../utils/misc/$Register';
|
|
316
339
|
import type { Registration } from '../utils/misc/$Register';
|
|
340
|
+
import type { AboutPromptbookInformationOptions } from '../utils/misc/aboutPromptbookInformation';
|
|
317
341
|
import type { FromtoItems } from '../utils/misc/FromtoItems';
|
|
318
342
|
import type { InjectCssModuleIntoShadowRootOptions } from '../utils/misc/injectCssModuleIntoShadowRoot';
|
|
319
343
|
import type { string_keyword } from '../utils/normalization/IKeywords';
|
|
@@ -327,6 +351,7 @@ import type { OrderJsonOptions } from '../utils/normalization/orderJson';
|
|
|
327
351
|
import type { empty_object } from '../utils/organization/empty_object';
|
|
328
352
|
import type { really_any } from '../utils/organization/really_any';
|
|
329
353
|
import type { TODO_any } from '../utils/organization/TODO_any';
|
|
354
|
+
import type { RandomFullnameWithColorResult } from '../utils/random/$randomFullnameWithColor';
|
|
330
355
|
import type { CheckSerializableAsJsonOptions } from '../utils/serialization/checkSerializableAsJson';
|
|
331
356
|
import type { ExportJsonOptions } from '../utils/serialization/exportJson';
|
|
332
357
|
import type { ITakeChain } from '../utils/take/interfaces/ITakeChain';
|
|
@@ -335,14 +360,12 @@ export type { BookParameter };
|
|
|
335
360
|
export type { AgentBasicInformation };
|
|
336
361
|
export type { AgentModelRequirements };
|
|
337
362
|
export type { string_book };
|
|
338
|
-
export type { BookCommitment };
|
|
339
|
-
export type { CommitmentDefinition };
|
|
340
|
-
export type { ParsedCommitment };
|
|
341
363
|
export type { AvatarChipProps };
|
|
342
364
|
export type { AvatarChipFromSourceProps };
|
|
343
365
|
export type { AvatarProfileProps };
|
|
344
366
|
export type { AvatarProfileFromSourceProps };
|
|
345
367
|
export type { BookEditorProps };
|
|
368
|
+
export type { AgentChatProps };
|
|
346
369
|
export type { ChatProps };
|
|
347
370
|
export type { ChatAutoScrollConfig };
|
|
348
371
|
export type { SendMessageToLlmChatFunction };
|
|
@@ -354,6 +377,16 @@ export type { string_chat_format_name };
|
|
|
354
377
|
export type { ChatMessage };
|
|
355
378
|
export type { ChatParticipant };
|
|
356
379
|
export type { MessageButton };
|
|
380
|
+
export type { QrCodeOptions };
|
|
381
|
+
export type { AgentCollection };
|
|
382
|
+
export type { AgentCollectionInSupabaseOptions };
|
|
383
|
+
export type { Json };
|
|
384
|
+
export type { AgentsDatabaseSchema };
|
|
385
|
+
export type { Tables };
|
|
386
|
+
export type { TablesInsert };
|
|
387
|
+
export type { TablesUpdate };
|
|
388
|
+
export type { Enums };
|
|
389
|
+
export type { CompositeTypes };
|
|
357
390
|
export type { PipelineCollection };
|
|
358
391
|
export type { Command };
|
|
359
392
|
export type { CommandParser };
|
|
@@ -379,6 +412,10 @@ export type { SectionCommand };
|
|
|
379
412
|
export type { UrlCommand };
|
|
380
413
|
export type { ActionCommand };
|
|
381
414
|
export type { InstrumentCommand };
|
|
415
|
+
export type { BookCommitment };
|
|
416
|
+
export type { CommitmentDefinition };
|
|
417
|
+
export type { ParsedCommitment };
|
|
418
|
+
export type { GroupedCommitmentDefinition };
|
|
382
419
|
export type { PrettifyOptions };
|
|
383
420
|
export type { renderPipelineMermaidOptions };
|
|
384
421
|
export type { CallbackInterfaceToolsOptions };
|
|
@@ -431,7 +468,9 @@ export type { LlmToolsOptions };
|
|
|
431
468
|
export type { CacheItem };
|
|
432
469
|
export type { CacheLlmToolsOptions };
|
|
433
470
|
export type { LlmExecutionToolsWithTotalUsage };
|
|
471
|
+
export type { AgentOptions };
|
|
434
472
|
export type { CreateAgentLlmExecutionToolsOptions };
|
|
473
|
+
export type { RemoteAgentOptions };
|
|
435
474
|
export type { AnthropicClaudeExecutionToolsOptions };
|
|
436
475
|
export type { AnthropicClaudeExecutionToolsNonProxiedOptions };
|
|
437
476
|
export type { AnthropicClaudeExecutionToolsProxiedOptions };
|
|
@@ -499,7 +538,10 @@ export type { PostprocessingFunction };
|
|
|
499
538
|
export type { PromptbookStorage };
|
|
500
539
|
export type { FileCacheStorageOptions };
|
|
501
540
|
export type { IndexedDbStorageOptions };
|
|
541
|
+
export type { BookTranspiler };
|
|
542
|
+
export type { BookTranspilerOptions };
|
|
502
543
|
export type { IntermediateFilesStrategy };
|
|
544
|
+
export type { LlmCall };
|
|
503
545
|
export type { ModelRequirements };
|
|
504
546
|
export type { CompletionModelRequirements };
|
|
505
547
|
export type { ChatModelRequirements };
|
|
@@ -536,6 +578,8 @@ export type { string_reserved_parameter_name };
|
|
|
536
578
|
export type { ReservedParameters };
|
|
537
579
|
export type { string_title };
|
|
538
580
|
export type { string_agent_name };
|
|
581
|
+
export type { string_agent_name_in_book };
|
|
582
|
+
export type { string_agent_hash };
|
|
539
583
|
export type { string_persona_description };
|
|
540
584
|
export type { string_model_description };
|
|
541
585
|
export type { string_knowledge_source_content };
|
|
@@ -565,6 +609,7 @@ export type { string_url };
|
|
|
565
609
|
export type { string_promptbook_server_url };
|
|
566
610
|
export type { string_base_url };
|
|
567
611
|
export type { string_pipeline_root_url };
|
|
612
|
+
export type { string_agent_url };
|
|
568
613
|
export type { string_pipeline_url };
|
|
569
614
|
export type { string_pipeline_url_with_task_hash };
|
|
570
615
|
export type { string_data_url };
|
|
@@ -594,6 +639,8 @@ export type { string_absolute_dirname };
|
|
|
594
639
|
export type { string_relative_dirname };
|
|
595
640
|
export type { string_dirname };
|
|
596
641
|
export type { string_person_fullname };
|
|
642
|
+
export type { string_person_firstname };
|
|
643
|
+
export type { string_person_lastname };
|
|
597
644
|
export type { string_person_profile };
|
|
598
645
|
export type { string_license };
|
|
599
646
|
export type { string_legal_entity };
|
|
@@ -639,6 +686,7 @@ export type { number_kilobytes };
|
|
|
639
686
|
export type { number_megabytes };
|
|
640
687
|
export type { number_gigabytes };
|
|
641
688
|
export type { number_terabytes };
|
|
689
|
+
export type { Updatable };
|
|
642
690
|
export type { ColorTransformer };
|
|
643
691
|
export type { PipelineEditableSerialized };
|
|
644
692
|
export type { ExecCommandOptions };
|
|
@@ -647,6 +695,7 @@ export type { CodeBlock };
|
|
|
647
695
|
export type { MarkdownSection };
|
|
648
696
|
export type { Registered };
|
|
649
697
|
export type { Registration };
|
|
698
|
+
export type { AboutPromptbookInformationOptions };
|
|
650
699
|
export type { FromtoItems };
|
|
651
700
|
export type { InjectCssModuleIntoShadowRootOptions };
|
|
652
701
|
export type { string_keyword };
|
|
@@ -660,6 +709,7 @@ export type { OrderJsonOptions };
|
|
|
660
709
|
export type { empty_object };
|
|
661
710
|
export type { really_any };
|
|
662
711
|
export type { TODO_any };
|
|
712
|
+
export type { RandomFullnameWithColorResult };
|
|
663
713
|
export type { CheckSerializableAsJsonOptions };
|
|
664
714
|
export type { ExportJsonOptions };
|
|
665
715
|
export type { ITakeChain };
|
|
@@ -11,6 +11,7 @@ import { jsonParse } from '../formats/json/utils/jsonParse';
|
|
|
11
11
|
import { isValidXmlString } from '../formats/xml/utils/isValidXmlString';
|
|
12
12
|
import { prompt } from '../pipeline/prompt-notation';
|
|
13
13
|
import { promptTemplate } from '../pipeline/prompt-notation';
|
|
14
|
+
import { $detectRuntimeEnvironment } from '../utils/environment/$detectRuntimeEnvironment';
|
|
14
15
|
import { $isRunningInBrowser } from '../utils/environment/$isRunningInBrowser';
|
|
15
16
|
import { $isRunningInJest } from '../utils/environment/$isRunningInJest';
|
|
16
17
|
import { $isRunningInNode } from '../utils/environment/$isRunningInNode';
|
|
@@ -26,6 +27,7 @@ import { countSentences } from '../utils/expectation-counters/countSentences';
|
|
|
26
27
|
import { countWords } from '../utils/expectation-counters/countWords';
|
|
27
28
|
import { CountUtils } from '../utils/expectation-counters/index';
|
|
28
29
|
import { $getCurrentDate } from '../utils/misc/$getCurrentDate';
|
|
30
|
+
import { computeHash } from '../utils/misc/computeHash';
|
|
29
31
|
import { debounce } from '../utils/misc/debounce';
|
|
30
32
|
import { parseNumber } from '../utils/misc/parseNumber';
|
|
31
33
|
import { capitalize } from '../utils/normalization/capitalize';
|
|
@@ -38,6 +40,7 @@ import { nameToUriPart } from '../utils/normalization/nameToUriPart';
|
|
|
38
40
|
import { nameToUriParts } from '../utils/normalization/nameToUriParts';
|
|
39
41
|
import type { string_kebab_case } from '../utils/normalization/normalize-to-kebab-case';
|
|
40
42
|
import { normalizeToKebabCase } from '../utils/normalization/normalize-to-kebab-case';
|
|
43
|
+
import { normalizeMessageText } from '../utils/normalization/normalizeMessageText';
|
|
41
44
|
import type { string_camelCase } from '../utils/normalization/normalizeTo_camelCase';
|
|
42
45
|
import { normalizeTo_camelCase } from '../utils/normalization/normalizeTo_camelCase';
|
|
43
46
|
import type { string_PascalCase } from '../utils/normalization/normalizeTo_PascalCase';
|
|
@@ -96,6 +99,7 @@ export { jsonParse };
|
|
|
96
99
|
export { isValidXmlString };
|
|
97
100
|
export { prompt };
|
|
98
101
|
export { promptTemplate };
|
|
102
|
+
export { $detectRuntimeEnvironment };
|
|
99
103
|
export { $isRunningInBrowser };
|
|
100
104
|
export { $isRunningInJest };
|
|
101
105
|
export { $isRunningInNode };
|
|
@@ -111,6 +115,7 @@ export { countSentences };
|
|
|
111
115
|
export { countWords };
|
|
112
116
|
export { CountUtils };
|
|
113
117
|
export { $getCurrentDate };
|
|
118
|
+
export { computeHash };
|
|
114
119
|
export { debounce };
|
|
115
120
|
export { parseNumber };
|
|
116
121
|
export { capitalize };
|
|
@@ -123,6 +128,7 @@ export { nameToUriPart };
|
|
|
123
128
|
export { nameToUriParts };
|
|
124
129
|
export type { string_kebab_case };
|
|
125
130
|
export { normalizeToKebabCase };
|
|
131
|
+
export { normalizeMessageText };
|
|
126
132
|
export type { string_camelCase };
|
|
127
133
|
export { normalizeTo_camelCase };
|
|
128
134
|
export type { string_PascalCase };
|
|
@@ -29,6 +29,8 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
|
|
|
29
29
|
import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
|
|
30
30
|
import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
|
|
31
31
|
import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
|
|
32
|
+
import { _FormattedBookInMarkdownTranspilerRegistration } from '../transpilers/formatted-book-in-markdown/register';
|
|
33
|
+
import { _OpenAiSdkTranspilerRegistration } from '../transpilers/openai-sdk/register';
|
|
32
34
|
import { wizard } from '../wizard/wizard';
|
|
33
35
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
34
36
|
export { _AnthropicClaudeMetadataRegistration };
|
|
@@ -61,4 +63,6 @@ export { _PdfScraperRegistration };
|
|
|
61
63
|
export { _PdfScraperMetadataRegistration };
|
|
62
64
|
export { _WebsiteScraperRegistration };
|
|
63
65
|
export { _WebsiteScraperMetadataRegistration };
|
|
66
|
+
export { _FormattedBookInMarkdownTranspilerRegistration };
|
|
67
|
+
export { _OpenAiSdkTranspilerRegistration };
|
|
64
68
|
export { wizard };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { string_agent_name, string_url_image } from '../../types/typeAliases';
|
|
1
|
+
import type { string_agent_hash, string_agent_name, string_agent_url, string_color, string_url_image } from '../../types/typeAliases';
|
|
2
2
|
/**
|
|
3
3
|
* Unified parameter representation that supports two different notations:
|
|
4
4
|
* 1. @Parameter - single word parameter starting with @
|
|
@@ -28,24 +28,37 @@ export type AgentBasicInformation = {
|
|
|
28
28
|
* Name of the agent
|
|
29
29
|
* This is the first line of the agent source
|
|
30
30
|
*/
|
|
31
|
-
agentName: string_agent_name
|
|
31
|
+
agentName: string_agent_name;
|
|
32
|
+
/**
|
|
33
|
+
* Hash of the agent source for integrity verification
|
|
34
|
+
*/
|
|
35
|
+
agentHash: string_agent_hash;
|
|
32
36
|
/**
|
|
33
37
|
* Optional description of the agent
|
|
34
38
|
* This is the line starting with "PERSONA"
|
|
35
39
|
*/
|
|
36
40
|
personaDescription: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* The initial message shown to the user when the chat starts
|
|
43
|
+
* This is the line starting with "INITIAL MESSAGE"
|
|
44
|
+
*/
|
|
45
|
+
initialMessage: string | null;
|
|
37
46
|
/**
|
|
38
47
|
* Metadata commitments parsed from META lines
|
|
39
48
|
* Each META commitment has the format "META TYPE content"
|
|
40
49
|
* When there are multiple meta commitments of the same type, later overrides earlier
|
|
41
50
|
*/
|
|
42
51
|
meta: {
|
|
52
|
+
fullname?: string;
|
|
43
53
|
image?: string_url_image;
|
|
44
|
-
|
|
45
|
-
title?: string;
|
|
46
|
-
description?: string;
|
|
54
|
+
color?: string_color;
|
|
47
55
|
[key: string]: string | undefined;
|
|
48
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Links found in the agent source
|
|
59
|
+
* This corresponds to META LINK commitments
|
|
60
|
+
*/
|
|
61
|
+
links: Array<string_agent_url>;
|
|
49
62
|
/**
|
|
50
63
|
* Parameters found in the agent source
|
|
51
64
|
* Supports two different notations for the same syntax feature:
|
|
@@ -55,5 +68,6 @@ export type AgentBasicInformation = {
|
|
|
55
68
|
parameters: BookParameter[];
|
|
56
69
|
};
|
|
57
70
|
/**
|
|
71
|
+
* TODO: [🐱🚀] Make all properties of `AgentBasicInformation` readonly
|
|
58
72
|
* TODO: [🕛] Unite `AgentBasicInformation`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
|
|
59
73
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { string_knowledge_source_link } from '../../types/typeAliases';
|
|
1
2
|
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
2
3
|
/**
|
|
3
4
|
* Model requirements for an agent
|
|
@@ -16,7 +17,22 @@ export type AgentModelRequirements = {
|
|
|
16
17
|
/**
|
|
17
18
|
* Optional list of MCP servers that the agent can connect to
|
|
18
19
|
*/
|
|
19
|
-
readonly mcpServers?: string
|
|
20
|
+
readonly mcpServers?: ReadonlyArray<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Optional link to the parent agent from which this agent inherits
|
|
23
|
+
*/
|
|
24
|
+
readonly parentAgentUrl?: string_knowledge_source_link;
|
|
25
|
+
/**
|
|
26
|
+
* Optional list of knowledge source links that the agent can use
|
|
27
|
+
*/
|
|
28
|
+
readonly knowledgeSources?: ReadonlyArray<string_knowledge_source_link>;
|
|
29
|
+
/**
|
|
30
|
+
* List of sample conversations (question/answer pairs)
|
|
31
|
+
*/
|
|
32
|
+
readonly samples?: ReadonlyArray<{
|
|
33
|
+
question: string;
|
|
34
|
+
answer: string;
|
|
35
|
+
}>;
|
|
20
36
|
/**
|
|
21
37
|
* Temperature for the agent's responses, controlling randomness
|
|
22
38
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ParsedCommitment } from '
|
|
1
|
+
import type { ParsedCommitment } from '../../commitments/_base/ParsedCommitment';
|
|
2
|
+
import { string_agent_name } from '../../types/typeAliases';
|
|
2
3
|
/**
|
|
3
4
|
* Result of parsing agent source for commitments
|
|
4
5
|
*
|
|
@@ -8,7 +9,7 @@ export type AgentSourceParseResult = {
|
|
|
8
9
|
/**
|
|
9
10
|
* The agent name (first line)
|
|
10
11
|
*/
|
|
11
|
-
agentName:
|
|
12
|
+
agentName: string_agent_name | null;
|
|
12
13
|
/**
|
|
13
14
|
* All parsed commitments
|
|
14
15
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { string_agent_hash } from '../../types/typeAliases';
|
|
2
|
+
import { string_book } from './string_book';
|
|
3
|
+
/**
|
|
4
|
+
* Computes SHA-256 hash of the agent source
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/core`
|
|
7
|
+
*/
|
|
8
|
+
export declare function computeAgentHash(agentSource: string_book): string_agent_hash;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BookCommitment } from '
|
|
1
|
+
import type { BookCommitment } from '../../commitments/_base/BookCommitment';
|
|
2
2
|
/**
|
|
3
3
|
* Generates a regex pattern to match a specific commitment
|
|
4
4
|
*
|
|
@@ -7,7 +7,7 @@ import type { BookCommitment } from '../commitments/_base/BookCommitment';
|
|
|
7
7
|
*
|
|
8
8
|
* @private - TODO: [🧠] Maybe should be public?
|
|
9
9
|
*/
|
|
10
|
-
export declare function createCommitmentRegex(commitment: BookCommitment): RegExp;
|
|
10
|
+
export declare function createCommitmentRegex(commitment: BookCommitment, aliases?: BookCommitment[]): RegExp;
|
|
11
11
|
/**
|
|
12
12
|
* Generates a regex pattern to match a specific commitment type
|
|
13
13
|
*
|
|
@@ -17,4 +17,4 @@ export declare function createCommitmentRegex(commitment: BookCommitment): RegEx
|
|
|
17
17
|
*
|
|
18
18
|
* @private
|
|
19
19
|
*/
|
|
20
|
-
export declare function createCommitmentTypeRegex(commitment: BookCommitment): RegExp;
|
|
20
|
+
export declare function createCommitmentTypeRegex(commitment: BookCommitment, aliases?: BookCommitment[]): RegExp;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { string_agent_name } from '../../types/typeAliases';
|
|
2
|
+
import { string_book } from './string_book';
|
|
3
|
+
/**
|
|
4
|
+
* Creates temporary default agent name based on agent source hash
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/core`
|
|
7
|
+
*/
|
|
8
|
+
export declare function createDefaultAgentName(agentSource: string_book): string_agent_name;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { string_agent_name } from '../../types/typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Normalizes agent name from arbitrary string to valid agent name
|
|
4
|
+
*
|
|
5
|
+
* Note: [🔂] This function is idempotent.
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/core`
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeAgentName(rawAgentName: string): string_agent_name;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { string_book } from './string_book';
|
|
2
|
+
/**
|
|
3
|
+
* Number of padding lines to add at the end of the book content
|
|
4
|
+
*
|
|
5
|
+
* @public exported from `@promptbook/core`
|
|
6
|
+
*/
|
|
7
|
+
export declare const PADDING_LINES = 11;
|
|
8
|
+
/**
|
|
9
|
+
* A function that adds padding to the book content
|
|
10
|
+
*
|
|
11
|
+
* Note: [🔂] This function is idempotent.
|
|
12
|
+
*
|
|
13
|
+
* @public exported from `@promptbook/core`
|
|
14
|
+
*/
|
|
15
|
+
export declare function padBook(content: string_book): string_book;
|
|
16
|
+
/**
|
|
17
|
+
* TODO: [🧠] Maybe export
|
|
18
|
+
*/
|
|
@@ -6,4 +6,4 @@ import type { string_book } from './string_book';
|
|
|
6
6
|
*
|
|
7
7
|
* @private internal utility of `parseAgentSource`
|
|
8
8
|
*/
|
|
9
|
-
export declare function parseAgentSourceWithCommitments(agentSource: string_book): AgentSourceParseResult
|
|
9
|
+
export declare function parseAgentSourceWithCommitments(agentSource: string_book): Omit<AgentSourceParseResult, 'agentHash'>;
|
|
@@ -15,12 +15,15 @@ export declare function isValidBook(value: string): value is string_book;
|
|
|
15
15
|
* This function should be used when you have a string that you know represents agent source
|
|
16
16
|
* but need to convert it to the branded type for type safety
|
|
17
17
|
*
|
|
18
|
+
* Note: [🔂] This function is idempotent.
|
|
19
|
+
*
|
|
18
20
|
* @public exported from `@promptbook/core`
|
|
19
21
|
*/
|
|
20
22
|
export declare function validateBook(source: string): string_book;
|
|
21
23
|
/**
|
|
22
24
|
* Default book
|
|
23
25
|
*
|
|
26
|
+
* @deprecated Use `$generateBookBoilerplate` instead
|
|
24
27
|
* @public exported from `@promptbook/core`
|
|
25
28
|
*/
|
|
26
29
|
export declare const DEFAULT_BOOK: string_book;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
1
2
|
import type { AgentBasicInformation } from '../../../book-2.0/agent-source/AgentBasicInformation';
|
|
2
3
|
import type { string_book } from '../../../book-2.0/agent-source/string_book';
|
|
3
4
|
import type { string_css_class } from '../../../types/typeAliases';
|
|
@@ -14,11 +15,15 @@ export type AvatarProfileProps = {
|
|
|
14
15
|
/**
|
|
15
16
|
* The source of the agent, which will be displayed in the BookEditor.
|
|
16
17
|
*/
|
|
17
|
-
readonly agentSource
|
|
18
|
+
readonly agentSource?: string_book;
|
|
18
19
|
/**
|
|
19
20
|
* Optional CSS class name which will be added to root <div> element
|
|
20
21
|
*/
|
|
21
22
|
readonly className?: string_css_class;
|
|
23
|
+
/**
|
|
24
|
+
* Optional CSS style which will be added to root <div/> element
|
|
25
|
+
*/
|
|
26
|
+
readonly style?: CSSProperties;
|
|
22
27
|
};
|
|
23
28
|
/**
|
|
24
29
|
* Shows a box with user avatar, name and description
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
3
|
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
4
|
-
import type { string_knowledge_source_content } from '../../types/typeAliases';
|
|
4
|
+
import type { number_percent, number_positive, string_css_value, string_knowledge_source_content } from '../../types/typeAliases';
|
|
5
|
+
/**
|
|
6
|
+
* Default height of the book editor
|
|
7
|
+
*
|
|
8
|
+
* Note: This height is computed based on the number of lines in the default book + padding multiplied by an estimated line height.
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/components`
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_BOOK_EDITOR_HEIGHT: number;
|
|
5
13
|
/**
|
|
6
14
|
* Props of `BookEditor`
|
|
7
15
|
*
|
|
@@ -20,6 +28,22 @@ export type BookEditorProps = {
|
|
|
20
28
|
* Optional CSS style which will be added to root <div/> element
|
|
21
29
|
*/
|
|
22
30
|
readonly style?: CSSProperties;
|
|
31
|
+
/**
|
|
32
|
+
* Height of the `BookEditor` component
|
|
33
|
+
*
|
|
34
|
+
* - You can use any valid CSS value, e.g., `500px`, `100%`, `50vh`, etc.
|
|
35
|
+
* - If not set, the default height is `DEFAULT_BOOK_EDITOR_HEIGHT`.
|
|
36
|
+
* - If set to `null`, the height should be controlled entirely via `className` or `style`, otherwise the editor will have zero height.
|
|
37
|
+
*
|
|
38
|
+
* @default `DEFAULT_BOOK_EDITOR_HEIGHT`
|
|
39
|
+
*/
|
|
40
|
+
readonly height?: string_css_value | null;
|
|
41
|
+
/**
|
|
42
|
+
* Zoom level of the editor
|
|
43
|
+
*
|
|
44
|
+
* @default 1 (100%)
|
|
45
|
+
*/
|
|
46
|
+
readonly zoom?: number_percent & number_positive;
|
|
23
47
|
/**
|
|
24
48
|
* The book which is being edited.
|
|
25
49
|
*/
|
|
@@ -40,17 +64,63 @@ export type BookEditorProps = {
|
|
|
40
64
|
* If true, disables border radius making the editor have sharp corners
|
|
41
65
|
*/
|
|
42
66
|
readonly isBorderRadiusDisabled?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* If true, shows the footer with book title and version information.
|
|
45
|
-
* By default, the footer is hidden.
|
|
46
|
-
*/
|
|
47
|
-
readonly isFooterShown?: boolean;
|
|
48
67
|
/**
|
|
49
68
|
* If true, the editor is in read-only mode
|
|
50
69
|
*
|
|
51
70
|
* @default false
|
|
52
71
|
*/
|
|
53
72
|
readonly isReadonly?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Optional translations for the component
|
|
75
|
+
*/
|
|
76
|
+
readonly translations?: {
|
|
77
|
+
/**
|
|
78
|
+
* Message to show when trying to edit a readonly editor
|
|
79
|
+
*
|
|
80
|
+
* @default "You cannot edit this book"
|
|
81
|
+
*/
|
|
82
|
+
readonly readonlyMessage?: string;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* If true, shows the download button in the action bar.
|
|
86
|
+
* By default, the download button is shown.
|
|
87
|
+
*/
|
|
88
|
+
readonly isDownloadButtonShown?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* If true, shows the about button in the action bar.
|
|
91
|
+
* By default, the about button is shown.
|
|
92
|
+
*/
|
|
93
|
+
readonly isAboutButtonShown?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* If true, shows the fullscreen button in the action bar.
|
|
96
|
+
* By default, the fullscreen button is shown.
|
|
97
|
+
*/
|
|
98
|
+
readonly isFullscreenButtonShown?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Callback function to handle fullscreen button click.
|
|
101
|
+
* Note: This is for internal use between BookEditor and BookEditorMonaco
|
|
102
|
+
* @private
|
|
103
|
+
*/
|
|
104
|
+
onFullscreenClick?(): void;
|
|
105
|
+
/**
|
|
106
|
+
* If true, the editor is in fullscreen mode.
|
|
107
|
+
* Note: This is for internal use between BookEditor and BookEditorMonaco
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
110
|
+
readonly isFullscreen?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* If defined, the editor will be synced with other editors with the same sync configuration.
|
|
113
|
+
*/
|
|
114
|
+
readonly sync?: {
|
|
115
|
+
/**
|
|
116
|
+
* The URL of the y-websocket server.
|
|
117
|
+
*/
|
|
118
|
+
readonly serverUrl: string;
|
|
119
|
+
/**
|
|
120
|
+
* The name of the room to join.
|
|
121
|
+
*/
|
|
122
|
+
readonly roomName: string;
|
|
123
|
+
};
|
|
54
124
|
};
|
|
55
125
|
/**
|
|
56
126
|
* Renders a book editor
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type BookEditorActionbarProps = {
|
|
2
|
+
value: string | undefined;
|
|
3
|
+
isDownloadButtonShown?: boolean;
|
|
4
|
+
isAboutButtonShown?: boolean;
|
|
5
|
+
isFullscreenButtonShown?: boolean;
|
|
6
|
+
onFullscreenClick?: () => void;
|
|
7
|
+
isFullscreen?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @private Internal component used by `BookEditor`
|
|
12
|
+
*/
|
|
13
|
+
export declare function BookEditorActionbar(props: BookEditorActionbarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgentChatProps } from './AgentChatProps';
|
|
2
|
+
/**
|
|
3
|
+
* AgentChat component that provides chat functionality with LLM integration
|
|
4
|
+
*
|
|
5
|
+
* This component internally manages messages, participants, and task progress,
|
|
6
|
+
* and uses the provided LLM tools to generate responses via `LlmExecutionTools.callChatModel`.
|
|
7
|
+
*
|
|
8
|
+
* Note: There are multiple chat components:
|
|
9
|
+
* - `<Chat/>` renders chat as it is without any logic
|
|
10
|
+
* - `<AgentChat/>` connected to LLM Execution Tools of Promptbook
|
|
11
|
+
*
|
|
12
|
+
* @public exported from `@promptbook/components`
|
|
13
|
+
*/
|
|
14
|
+
export declare function AgentChat(props: AgentChatProps): import("react/jsx-runtime").JSX.Element;
|