@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
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { $getTableName } from '@/src/database/$getTableName';
|
|
2
|
+
import { $provideSupabaseForServer } from '../../../database/$provideSupabaseForServer';
|
|
3
|
+
import { hashPassword } from '../../../utils/auth';
|
|
4
|
+
import { isUserAdmin } from '../../../utils/isUserAdmin';
|
|
5
|
+
import { NextResponse } from 'next/server';
|
|
6
|
+
|
|
7
|
+
export async function GET() {
|
|
8
|
+
if (!(await isUserAdmin())) {
|
|
9
|
+
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const supabase = $provideSupabaseForServer();
|
|
14
|
+
const { data: users, error } = await supabase
|
|
15
|
+
.from(await $getTableName('User'))
|
|
16
|
+
.select('id, username, createdAt, updatedAt, isAdmin')
|
|
17
|
+
.order('username');
|
|
18
|
+
|
|
19
|
+
if (error) {
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return NextResponse.json(users);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.error('List users error:', error);
|
|
26
|
+
return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function POST(request: Request) {
|
|
31
|
+
if (!(await isUserAdmin())) {
|
|
32
|
+
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const body = await request.json();
|
|
37
|
+
const { username, password, isAdmin } = body;
|
|
38
|
+
|
|
39
|
+
if (!username || !password) {
|
|
40
|
+
return NextResponse.json({ error: 'Username and password are required' }, { status: 400 });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const passwordHash = await hashPassword(password);
|
|
44
|
+
const supabase = $provideSupabaseForServer();
|
|
45
|
+
|
|
46
|
+
const { data: newUser, error } = await supabase
|
|
47
|
+
.from(await $getTableName('User'))
|
|
48
|
+
.insert({
|
|
49
|
+
username,
|
|
50
|
+
passwordHash,
|
|
51
|
+
isAdmin: !!isAdmin,
|
|
52
|
+
createdAt: new Date().toISOString(),
|
|
53
|
+
updatedAt: new Date().toISOString(),
|
|
54
|
+
})
|
|
55
|
+
.select('id, username, createdAt, updatedAt, isAdmin')
|
|
56
|
+
.single();
|
|
57
|
+
|
|
58
|
+
if (error) {
|
|
59
|
+
if (error.code === '23505') { // unique_violation
|
|
60
|
+
return NextResponse.json({ error: 'Username already exists' }, { status: 409 });
|
|
61
|
+
}
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return NextResponse.json(newUser);
|
|
66
|
+
|
|
67
|
+
} catch (error) {
|
|
68
|
+
console.error('Create user error:', error);
|
|
69
|
+
return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { notFound } from 'next/navigation';
|
|
2
|
+
import { BookCommitment } from '../../../../../../src/commitments/_base/BookCommitment';
|
|
3
|
+
import { getVisibleCommitmentDefinitions } from '../../../utils/getVisibleCommitmentDefinitions';
|
|
4
|
+
import { PrintButton } from '../../../components/PrintButton/PrintButton';
|
|
5
|
+
import { PrintHeader } from '../../../components/PrintHeader/PrintHeader';
|
|
6
|
+
import { DocumentationContent } from '../../../components/DocumentationContent/DocumentationContent';
|
|
7
|
+
|
|
8
|
+
type DocPageProps = {
|
|
9
|
+
params: Promise<{
|
|
10
|
+
docId: string;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default async function DocPage(props: DocPageProps) {
|
|
15
|
+
const { docId } = await props.params;
|
|
16
|
+
|
|
17
|
+
// Decode the docId in case it contains encoded characters (though types usually don't)
|
|
18
|
+
const commitmentType = decodeURIComponent(docId) as BookCommitment;
|
|
19
|
+
const groupedCommitments = getVisibleCommitmentDefinitions();
|
|
20
|
+
const group = groupedCommitments.find((g) => g.primary.type === commitmentType || g.aliases.includes(commitmentType));
|
|
21
|
+
|
|
22
|
+
if (!group) {
|
|
23
|
+
notFound();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const { primary, aliases } = group;
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50">
|
|
30
|
+
<PrintButton />
|
|
31
|
+
|
|
32
|
+
<div className="container mx-auto px-4 py-16">
|
|
33
|
+
<PrintHeader title={primary.type} />
|
|
34
|
+
|
|
35
|
+
<DocumentationContent
|
|
36
|
+
primary={primary}
|
|
37
|
+
aliases={aliases}
|
|
38
|
+
isPrintOnly={false}
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import { Card } from '../../components/Homepage/Card';
|
|
3
|
+
import { Section } from '../../components/Homepage/Section';
|
|
4
|
+
import { OpenMojiIcon } from '../../components/OpenMojiIcon/OpenMojiIcon';
|
|
5
|
+
import { getVisibleCommitmentDefinitions } from '../../utils/getVisibleCommitmentDefinitions';
|
|
6
|
+
import { PrintButton } from '../../components/PrintButton/PrintButton';
|
|
7
|
+
import { PrintHeader } from '../../components/PrintHeader/PrintHeader';
|
|
8
|
+
import { DocumentationContent } from '../../components/DocumentationContent/DocumentationContent';
|
|
9
|
+
|
|
10
|
+
export default function DocsPage() {
|
|
11
|
+
const groupedCommitments = getVisibleCommitmentDefinitions();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className="min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50">
|
|
15
|
+
<PrintButton />
|
|
16
|
+
|
|
17
|
+
<div className="container mx-auto px-4 py-16">
|
|
18
|
+
<PrintHeader title="Full Documentation" />
|
|
19
|
+
|
|
20
|
+
{/* Screen view: Cards */}
|
|
21
|
+
<div className="print:hidden">
|
|
22
|
+
<Section title="Documentation">
|
|
23
|
+
{groupedCommitments.map(({ primary, aliases }) => (
|
|
24
|
+
<Link key={primary.type} href={`/docs/${primary.type}`} className="block h-full group">
|
|
25
|
+
<Card className="h-full group-hover:border-blue-500 transition-colors">
|
|
26
|
+
<h3 className="text-xl font-semibold mb-2 group-hover:text-blue-600 transition-colors">
|
|
27
|
+
<OpenMojiIcon icon={primary.icon} className="mr-2" />
|
|
28
|
+
{primary.type}
|
|
29
|
+
{aliases.length > 0 && (
|
|
30
|
+
<span className="text-gray-400 font-normal text-lg">
|
|
31
|
+
{' / '}
|
|
32
|
+
{aliases.join(' / ')}
|
|
33
|
+
</span>
|
|
34
|
+
)}
|
|
35
|
+
</h3>
|
|
36
|
+
{primary.description && <p className="text-gray-600 line-clamp-3">{primary.description}</p>}
|
|
37
|
+
</Card>
|
|
38
|
+
</Link>
|
|
39
|
+
))}
|
|
40
|
+
</Section>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
{/* Print view: Full Content */}
|
|
44
|
+
<div className="hidden print:block space-y-12">
|
|
45
|
+
{groupedCommitments.map(({ primary, aliases }) => (
|
|
46
|
+
<div key={primary.type} className="break-inside-avoid page-break-after-always">
|
|
47
|
+
<DocumentationContent
|
|
48
|
+
primary={primary}
|
|
49
|
+
aliases={aliases}
|
|
50
|
+
isPrintOnly={true}
|
|
51
|
+
/>
|
|
52
|
+
<hr className="my-8 border-gray-200" />
|
|
53
|
+
</div>
|
|
54
|
+
))}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { PromptbookAgent } from '@promptbook-local/components';
|
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
|
5
|
+
|
|
6
|
+
export default function EmbedPage() {
|
|
7
|
+
const searchParams = useSearchParams();
|
|
8
|
+
const agentUrl = searchParams.get('agentUrl');
|
|
9
|
+
|
|
10
|
+
if (!agentUrl) {
|
|
11
|
+
return <div className="text-red-500">Missing agentUrl parameter</div>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="w-full h-full bg-transparent">
|
|
16
|
+
<PromptbookAgent
|
|
17
|
+
agentUrl={agentUrl}
|
|
18
|
+
onOpenChange={(isOpen) => {
|
|
19
|
+
window.parent.postMessage({ type: 'PROMPTBOOK_AGENT_RESIZE', isOpen }, '*');
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
@import 'tailwindcss/base';
|
|
2
|
+
@import 'tailwindcss/components';
|
|
3
|
+
@import 'tailwindcss/utilities';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* OpenMoji black and white CSS
|
|
7
|
+
*
|
|
8
|
+
* https://github.com/hfg-gmuend/openmoji/blob/master/font/OpenMoji-black-glyf/openmoji.css
|
|
9
|
+
*/
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: 'OpenMojiBlack';
|
|
12
|
+
src: url('/fonts/OpenMoji-black-glyf.woff2') format('woff2');
|
|
13
|
+
unicode-range: U+23, U+2A, U+2D, U+30-39, U+A9, U+AE, U+200D, U+203C, U+2049, U+20E3, U+2117, U+2120, U+2122,
|
|
14
|
+
U+2139, U+2194-2199, U+21A9, U+21AA, U+229C, U+231A, U+231B, U+2328, U+23CF, U+23E9-23F3, U+23F8-23FE, U+24C2,
|
|
15
|
+
U+25A1, U+25AA-25AE, U+25B6, U+25C0, U+25C9, U+25D0, U+25D1, U+25E7-25EA, U+25ED, U+25EE, U+25FB-25FE,
|
|
16
|
+
U+2600-2605, U+260E, U+2611, U+2614, U+2615, U+2618, U+261D, U+2620, U+2622, U+2623, U+2626, U+262A, U+262E,
|
|
17
|
+
U+262F, U+2638-263A, U+2640, U+2642, U+2648-2653, U+265F, U+2660, U+2663, U+2665, U+2666, U+2668, U+267B,
|
|
18
|
+
U+267E, U+267F, U+2691-2697, U+2699, U+269B, U+269C, U+26A0, U+26A1, U+26A7, U+26AA, U+26AB, U+26B0, U+26B1,
|
|
19
|
+
U+26BD, U+26BE, U+26C4, U+26C5, U+26C8, U+26CE, U+26CF, U+26D1, U+26D3, U+26D4, U+26E9, U+26EA, U+26F0-26F5,
|
|
20
|
+
U+26F7-26FA, U+26FD, U+2702, U+2705, U+2708-270D, U+270F, U+2712, U+2714, U+2716, U+271D, U+2721, U+2728,
|
|
21
|
+
U+2733, U+2734, U+2744, U+2747, U+274C, U+274E, U+2753-2755, U+2757, U+2763, U+2764, U+2795-2797, U+27A1,
|
|
22
|
+
U+27B0, U+27BF, U+2934, U+2935, U+2B05-2B07, U+2B0C, U+2B0D, U+2B1B, U+2B1C, U+2B1F-2B24, U+2B2E, U+2B2F,
|
|
23
|
+
U+2B50, U+2B55, U+2B58, U+2B8F, U+2BBA-2BBC, U+2BC3, U+2BC4, U+2BEA, U+2BEB, U+3030, U+303D, U+3297, U+3299,
|
|
24
|
+
U+E000-E009, U+E010, U+E011, U+E040-E06D, U+E080-E0B4, U+E0C0-E0CC, U+E0FF-E10D, U+E140-E14A, U+E150-E157,
|
|
25
|
+
U+E181-E189, U+E1C0-E1C4, U+E1C6-E1D9, U+E200-E216, U+E240-E269, U+E280-E283, U+E2C0-E2C4, U+E2C6-E2DA,
|
|
26
|
+
U+E300-E303, U+E305-E30F, U+E312-E316, U+E318-E322, U+E324-E329, U+E32B, U+E340-E348, U+E380, U+E381, U+F000,
|
|
27
|
+
U+F77A, U+F8FF, U+FE0F, U+1F004, U+1F0CF, U+1F10D-1F10F, U+1F12F, U+1F16D-1F171, U+1F17E, U+1F17F, U+1F18E,
|
|
28
|
+
U+1F191-1F19A, U+1F1E6-1F1FF, U+1F201, U+1F202, U+1F21A, U+1F22F, U+1F232-1F23A, U+1F250, U+1F251,
|
|
29
|
+
U+1F260-1F265, U+1F300-1F321, U+1F324-1F393, U+1F396, U+1F397, U+1F399-1F39B, U+1F39E-1F3F0, U+1F3F3-1F3F5,
|
|
30
|
+
U+1F3F7-1F4FD, U+1F4FF-1F53D, U+1F549-1F54E, U+1F550-1F567, U+1F56F, U+1F570, U+1F573-1F57A, U+1F587,
|
|
31
|
+
U+1F58A-1F58D, U+1F590, U+1F595, U+1F596, U+1F5A4, U+1F5A5, U+1F5A8, U+1F5B1, U+1F5B2, U+1F5BC, U+1F5C2-1F5C4,
|
|
32
|
+
U+1F5D1-1F5D3, U+1F5DC-1F5DE, U+1F5E1, U+1F5E3, U+1F5E8, U+1F5EF, U+1F5F3, U+1F5FA-1F64F, U+1F680-1F6C5,
|
|
33
|
+
U+1F6CB-1F6D2, U+1F6D5-1F6D7, U+1F6DC-1F6E5, U+1F6E9, U+1F6EB, U+1F6EC, U+1F6F0, U+1F6F3-1F6FC, U+1F7E0-1F7EB,
|
|
34
|
+
U+1F7F0, U+1F90C-1F93A, U+1F93C-1F945, U+1F947-1F9FF, U+1FA70-1FA7C, U+1FA80-1FA88, U+1FA90-1FABD,
|
|
35
|
+
U+1FABF-1FAC5, U+1FACE-1FADB, U+1FAE0-1FAE8, U+1FAF0-1FAF8, U+1FBC5-1FBC9, U+E0061-E0067, U+E0069,
|
|
36
|
+
U+E006C-E0079, U+E007F;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:root {
|
|
40
|
+
--background: #ffffff;
|
|
41
|
+
--foreground: #171717;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (prefers-color-scheme: dark) {
|
|
45
|
+
:root {
|
|
46
|
+
--background: #0a0a0a;
|
|
47
|
+
--foreground: #ededed;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
body {
|
|
52
|
+
background: var(--background);
|
|
53
|
+
color: var(--foreground);
|
|
54
|
+
font-family: var(--font-barlow-condensed), 'OpenMojiBlack', Arial, Helvetica, sans-serif;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Poppins font for agent names and headings */
|
|
58
|
+
.font-poppins {
|
|
59
|
+
font-family: var(--font-poppins), 'Poppins', system-ui, -apple-system, sans-serif;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Custom utilities */
|
|
63
|
+
.line-clamp-2 {
|
|
64
|
+
display: -webkit-box;
|
|
65
|
+
-webkit-line-clamp: 2;
|
|
66
|
+
line-clamp: 2;
|
|
67
|
+
-webkit-box-orient: vertical;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.line-clamp-3 {
|
|
72
|
+
display: -webkit-box;
|
|
73
|
+
-webkit-line-clamp: 3;
|
|
74
|
+
line-clamp: 3;
|
|
75
|
+
-webkit-box-orient: vertical;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Mermaid diagram styling */
|
|
80
|
+
.mermaid-container {
|
|
81
|
+
display: flex;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
align-items: center;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.mermaid-container svg {
|
|
87
|
+
max-width: 100%;
|
|
88
|
+
height: auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Code block styling */
|
|
92
|
+
pre code {
|
|
93
|
+
font-family: var(--font-mono), 'Courier New', monospace;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Smooth transitions */
|
|
97
|
+
* {
|
|
98
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow,
|
|
99
|
+
transform, filter, backdrop-filter;
|
|
100
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
101
|
+
transition-duration: 150ms;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Focus styles */
|
|
105
|
+
button:focus-visible,
|
|
106
|
+
a:focus-visible,
|
|
107
|
+
input:focus-visible,
|
|
108
|
+
textarea:focus-visible {
|
|
109
|
+
outline: 2px solid #3b82f6;
|
|
110
|
+
outline-offset: 2px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Custom scrollbar */
|
|
114
|
+
::-webkit-scrollbar {
|
|
115
|
+
width: 8px;
|
|
116
|
+
height: 8px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
::-webkit-scrollbar-track {
|
|
120
|
+
background: #f1f5f9;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
::-webkit-scrollbar-thumb {
|
|
124
|
+
background: #cbd5e1;
|
|
125
|
+
border-radius: 4px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
::-webkit-scrollbar-thumb:hover {
|
|
129
|
+
background: #94a3b8;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Loading animation */
|
|
133
|
+
@keyframes spin {
|
|
134
|
+
to {
|
|
135
|
+
transform: rotate(360deg);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.animate-spin {
|
|
140
|
+
animation: spin 1s linear infinite;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Tailwind CSS animation utilities */
|
|
144
|
+
@keyframes fade-in {
|
|
145
|
+
from {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
}
|
|
148
|
+
to {
|
|
149
|
+
opacity: 1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@keyframes slide-in-from-top-2 {
|
|
154
|
+
from {
|
|
155
|
+
transform: translateY(-0.5rem);
|
|
156
|
+
}
|
|
157
|
+
to {
|
|
158
|
+
transform: translateY(0);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@keyframes zoom-in-95 {
|
|
163
|
+
from {
|
|
164
|
+
opacity: 0;
|
|
165
|
+
transform: scale(0.95);
|
|
166
|
+
}
|
|
167
|
+
to {
|
|
168
|
+
opacity: 1;
|
|
169
|
+
transform: scale(1);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.animate-in {
|
|
174
|
+
animation-duration: 200ms;
|
|
175
|
+
animation-fill-mode: both;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.fade-in {
|
|
179
|
+
animation-name: fade-in;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.slide-in-from-top-2 {
|
|
183
|
+
animation-name: slide-in-from-top-2;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.zoom-in-95 {
|
|
187
|
+
animation-name: zoom-in-95;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Gradient backgrounds */
|
|
191
|
+
.bg-gradient-to-br {
|
|
192
|
+
background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Component preview container */
|
|
196
|
+
.component-preview {
|
|
197
|
+
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
|
198
|
+
border: 1px solid #e2e8f0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Print styles */
|
|
202
|
+
@media print {
|
|
203
|
+
@page {
|
|
204
|
+
margin: 2cm;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Hide UI elements */
|
|
208
|
+
header,
|
|
209
|
+
footer,
|
|
210
|
+
nav,
|
|
211
|
+
aside,
|
|
212
|
+
button:not(.print:block),
|
|
213
|
+
.no-print,
|
|
214
|
+
[role="complementary"],
|
|
215
|
+
#portal-root {
|
|
216
|
+
display: none !important;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Reset layout */
|
|
220
|
+
body,
|
|
221
|
+
main {
|
|
222
|
+
padding: 0 !important;
|
|
223
|
+
margin: 0 !important;
|
|
224
|
+
background: white !important;
|
|
225
|
+
min-height: auto !important;
|
|
226
|
+
width: 100% !important;
|
|
227
|
+
color: black !important;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Remove shadows and backgrounds for clean print */
|
|
231
|
+
* {
|
|
232
|
+
box-shadow: none !important;
|
|
233
|
+
text-shadow: none !important;
|
|
234
|
+
background-color: transparent !important;
|
|
235
|
+
background-image: none !important;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Ensure text visibility */
|
|
239
|
+
h1, h2, h3, h4, h5, h6, p, li, span, div {
|
|
240
|
+
color: black !important;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Links */
|
|
244
|
+
a {
|
|
245
|
+
text-decoration: underline;
|
|
246
|
+
color: black !important;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* Preserve borders */
|
|
250
|
+
.border, .border-b, .border-t, .border-l, .border-r {
|
|
251
|
+
border-color: #ddd !important;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* Page break control */
|
|
255
|
+
h1, h2 {
|
|
256
|
+
break-after: avoid;
|
|
257
|
+
page-break-after: avoid;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
p, li, pre, code {
|
|
261
|
+
break-inside: avoid;
|
|
262
|
+
page-break-inside: avoid;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Specific component overrides */
|
|
266
|
+
.card, .bg-white {
|
|
267
|
+
border: none !important;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* Code blocks */
|
|
271
|
+
pre, code {
|
|
272
|
+
background-color: #f5f5f5 !important;
|
|
273
|
+
border: 1px solid #ddd !important;
|
|
274
|
+
white-space: pre-wrap !important;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import faviconLogoImage from '@/public/favicon.ico';
|
|
2
|
+
import { LayoutWrapper } from '@/src/components/LayoutWrapper/LayoutWrapper';
|
|
3
|
+
import type { Metadata } from 'next';
|
|
4
|
+
import { Barlow_Condensed, Poppins } from 'next/font/google';
|
|
5
|
+
import { getMetadata } from '../database/getMetadata';
|
|
6
|
+
import { $provideAgentCollectionForServer } from '../tools/$provideAgentCollectionForServer';
|
|
7
|
+
import { $provideServer } from '../tools/$provideServer';
|
|
8
|
+
import { isUserAdmin } from '../utils/isUserAdmin';
|
|
9
|
+
import { getCurrentUser } from '../utils/getCurrentUser';
|
|
10
|
+
import './globals.css';
|
|
11
|
+
|
|
12
|
+
const barlowCondensed = Barlow_Condensed({
|
|
13
|
+
subsets: ['latin'],
|
|
14
|
+
weight: ['300', '400', '500', '600', '700'],
|
|
15
|
+
variable: '--font-barlow-condensed',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const poppins = Poppins({
|
|
19
|
+
subsets: ['latin'],
|
|
20
|
+
weight: ['400', '500', '600', '700', '800'],
|
|
21
|
+
variable: '--font-poppins',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export async function generateMetadata(): Promise<Metadata> {
|
|
25
|
+
const { publicUrl } = await $provideServer();
|
|
26
|
+
const serverName = (await getMetadata('SERVER_NAME')) || 'Promptbook Agents Server';
|
|
27
|
+
const serverDescription = (await getMetadata('SERVER_DESCRIPTION')) || 'Agents server powered by Promptbook';
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
title: serverName,
|
|
31
|
+
description: serverDescription,
|
|
32
|
+
// TODO: keywords: ['@@@'],
|
|
33
|
+
authors: [{ name: 'Promptbook Team' }],
|
|
34
|
+
openGraph: {
|
|
35
|
+
title: serverName,
|
|
36
|
+
description: serverDescription,
|
|
37
|
+
type: 'website',
|
|
38
|
+
images: [
|
|
39
|
+
/*
|
|
40
|
+
TODO:
|
|
41
|
+
{
|
|
42
|
+
url: 'https://www.ptbk.io/design',
|
|
43
|
+
width: 1200,
|
|
44
|
+
height: 630,
|
|
45
|
+
alt: 'Promptbook agents server',
|
|
46
|
+
},
|
|
47
|
+
*/
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
twitter: {
|
|
51
|
+
card: 'summary_large_image',
|
|
52
|
+
title: serverName,
|
|
53
|
+
description: serverDescription,
|
|
54
|
+
// TODO: images: ['https://www.ptbk.io/design'],
|
|
55
|
+
},
|
|
56
|
+
metadataBase: publicUrl,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default async function RootLayout({
|
|
61
|
+
children,
|
|
62
|
+
}: Readonly<{
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
}>) {
|
|
65
|
+
const isAdmin = await isUserAdmin();
|
|
66
|
+
const currentUser = await getCurrentUser();
|
|
67
|
+
const serverName = (await getMetadata('SERVER_NAME')) || 'Promptbook Agents Server';
|
|
68
|
+
const serverLogoUrl = (await getMetadata('SERVER_LOGO_URL')) || null;
|
|
69
|
+
const serverFaviconUrl = (await getMetadata('SERVER_FAVICON_URL')) || faviconLogoImage.src;
|
|
70
|
+
const isFooterShown = ((await getMetadata('IS_FOOTER_SHOWN')) || 'true') === 'true';
|
|
71
|
+
|
|
72
|
+
let footerLinks = [];
|
|
73
|
+
try {
|
|
74
|
+
const footerLinksString = (await getMetadata('FOOTER_LINKS')) || '[]';
|
|
75
|
+
footerLinks = JSON.parse(footerLinksString);
|
|
76
|
+
} catch (error) {
|
|
77
|
+
console.error('Failed to parse FOOTER_LINKS', error);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const collection = await $provideAgentCollectionForServer();
|
|
81
|
+
const agents = await collection.listAgents();
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<html lang="en">
|
|
85
|
+
<head>
|
|
86
|
+
{/* Favicon for light mode */}
|
|
87
|
+
{/*
|
|
88
|
+
<link
|
|
89
|
+
rel="icon"
|
|
90
|
+
href="https://www.ptbk.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flogo-blue-transparent-256.493b7e49.png&w=64&q=75"
|
|
91
|
+
media="(prefers-color-scheme: light)"
|
|
92
|
+
type="image/svg+xml"
|
|
93
|
+
/>
|
|
94
|
+
*/}
|
|
95
|
+
{/* Favicon for dark mode */}
|
|
96
|
+
{/*
|
|
97
|
+
<link
|
|
98
|
+
rel="icon"
|
|
99
|
+
href="https://www.ptbk.io/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flogo-blue-transparent-256.493b7e49.png&w=64&q=75"
|
|
100
|
+
media="(prefers-color-scheme: dark)"
|
|
101
|
+
type="image/svg+xml"
|
|
102
|
+
/>
|
|
103
|
+
*/}
|
|
104
|
+
{/* Default favicon as a fallback */}
|
|
105
|
+
<link rel="icon" href={serverFaviconUrl} type="image/x-icon" />
|
|
106
|
+
</head>
|
|
107
|
+
<body className={`${barlowCondensed.variable} ${poppins.variable} antialiased bg-white text-gray-900`}>
|
|
108
|
+
<LayoutWrapper
|
|
109
|
+
isAdmin={isAdmin}
|
|
110
|
+
currentUser={currentUser}
|
|
111
|
+
serverName={serverName}
|
|
112
|
+
serverLogoUrl={serverLogoUrl}
|
|
113
|
+
agents={JSON.parse(JSON.stringify(agents))}
|
|
114
|
+
isFooterShown={isFooterShown}
|
|
115
|
+
footerLinks={footerLinks}
|
|
116
|
+
>
|
|
117
|
+
{children}
|
|
118
|
+
</LayoutWrapper>
|
|
119
|
+
{/* Global portal root for modals/popups */}
|
|
120
|
+
<div id="portal-root" />
|
|
121
|
+
</body>
|
|
122
|
+
</html>
|
|
123
|
+
);
|
|
124
|
+
}
|