@promptbook/cli 0.112.0-99 → 0.112.0
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 +37 -21
- package/agents/default/developer.book +23 -0
- package/apps/agents-server/README.md +19 -2
- package/apps/agents-server/env-manual/GITHUB_APP.md +1 -1
- package/apps/agents-server/next.config.ts +20 -1
- package/apps/agents-server/package.json +1 -1
- package/apps/agents-server/playwright.config.ts +3 -0
- package/apps/agents-server/public/promptbook-logo-blue.png +0 -0
- package/apps/agents-server/public/promptbook-logo-white.png +0 -0
- package/apps/agents-server/scripts/prerender-homepage.js +76 -1
- package/apps/agents-server/src/app/AddAgentButton.tsx +0 -5
- package/apps/agents-server/src/app/[agentName]/layout.tsx +1 -0
- package/apps/agents-server/src/app/actions.ts +70 -9
- package/apps/agents-server/src/app/admin/about/page.tsx +1 -1
- package/apps/agents-server/src/app/admin/api-tokens/ApiTokensClient.tsx +4 -1
- package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackClient.tsx +3 -0
- package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackTable.tsx +13 -8
- package/apps/agents-server/src/app/admin/chat-feedback/page.tsx +2 -4
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryClient.tsx +3 -0
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryTable.tsx +13 -8
- package/apps/agents-server/src/app/admin/chat-history/page.tsx +2 -4
- package/apps/agents-server/src/app/admin/cli-access/CliAccessClient.tsx +1 -3
- package/apps/agents-server/src/app/admin/code-runners/CodeRunnersClient.tsx +19 -11
- package/apps/agents-server/src/app/admin/custom-css/CustomCssClient.tsx +4 -0
- package/apps/agents-server/src/app/admin/custom-css/CustomCssEditorPanel.tsx +7 -1
- package/apps/agents-server/src/app/admin/custom-css/CustomCssFilesPanel.tsx +7 -1
- package/apps/agents-server/src/app/admin/custom-js/CustomJsClient.tsx +11 -0
- package/apps/agents-server/src/app/admin/custom-js/CustomJsEditorPanel.tsx +7 -1
- package/apps/agents-server/src/app/admin/custom-js/CustomJsFilesPanel.tsx +7 -1
- package/apps/agents-server/src/app/admin/files/FilesGalleryClient.tsx +4 -0
- package/apps/agents-server/src/app/admin/files/FilesGalleryGrid.tsx +9 -11
- package/apps/agents-server/src/app/admin/files/FilesGalleryTable.tsx +9 -8
- package/apps/agents-server/src/app/admin/image-generator-test/ImageAttachmentsEditor.tsx +30 -9
- package/apps/agents-server/src/app/admin/images/ImagesGalleryClient.tsx +4 -0
- package/apps/agents-server/src/app/admin/images/ImagesGalleryGrid.tsx +16 -11
- package/apps/agents-server/src/app/admin/images/ImagesGalleryTable.tsx +18 -9
- package/apps/agents-server/src/app/admin/limits/LimitsClient.tsx +11 -12
- package/apps/agents-server/src/app/admin/login-methods/shibboleth/page.tsx +355 -0
- package/apps/agents-server/src/app/admin/logs/LogsClient.tsx +9 -3
- package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +7 -6
- package/apps/agents-server/src/app/admin/metadata/MetadataClient.tsx +671 -45
- package/apps/agents-server/src/app/admin/servers/CreateServerDialog.tsx +22 -1
- package/apps/agents-server/src/app/admin/servers/ServersRegistryTable.tsx +14 -13
- package/apps/agents-server/src/app/admin/servers/useCreateServerWizard.ts +57 -20
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +4 -2
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +14 -15
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTasksCard.tsx +4 -1
- package/apps/agents-server/src/app/admin/task-manager/useTaskManagerState.ts +6 -9
- package/apps/agents-server/src/app/admin/update/CustomCommitPicker.tsx +258 -0
- package/apps/agents-server/src/app/admin/update/UpdateClient.tsx +608 -137
- package/apps/agents-server/src/app/admin/usage/UsageClient.tsx +4 -2
- package/apps/agents-server/src/app/admin/usage/UsageClientAnalyticsPanels.tsx +6 -4
- package/apps/agents-server/src/app/admin/usage/UsageClientFormatting.ts +6 -12
- package/apps/agents-server/src/app/admin/usage/UsageClientTimelineChart.tsx +7 -4
- package/apps/agents-server/src/app/admin/usage/useUsageClientState.ts +12 -4
- package/apps/agents-server/src/app/admin/users/[userId]/UserDetailClient.tsx +27 -15
- package/apps/agents-server/src/app/agents/[agentName]/ActiveAgentBreadcrumbBinder.tsx +30 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +13 -2
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +20 -25
- package/apps/agents-server/src/app/agents/[agentName]/_utils.ts +7 -5
- package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +2 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/messages/route.ts +4 -11
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +85 -56
- package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +7 -1
- package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorHistory.ts +9 -2
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryPayloadState.ts +38 -4
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistorySyncOperations.ts +4 -1
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatPageLayout.tsx +2 -2
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatSidebarDefault.tsx +19 -13
- package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +30 -16
- package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatHistoryClientState.ts +2 -15
- package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatHistorySyncEffects.ts +7 -13
- package/apps/agents-server/src/app/agents/[agentName]/chat/useCanonicalAgentChatPanelState.ts +58 -7
- package/apps/agents-server/src/app/agents/[agentName]/history/page.tsx +6 -1
- package/apps/agents-server/src/app/agents/[agentName]/images/default-avatar.png/route.ts +6 -2
- package/apps/agents-server/src/app/agents/[agentName]/integration/CalendarIntegrationSection.tsx +23 -5
- package/apps/agents-server/src/app/agents/[agentName]/layout.tsx +47 -1
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsClient.tsx +4 -2
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsFiltersCard.tsx +9 -4
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableCard.tsx +4 -1
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableRow.tsx +10 -3
- package/apps/agents-server/src/app/api/admin/cli-access/route.ts +27 -123
- package/apps/agents-server/src/app/api/admin/code-runners/authentication/route.ts +33 -125
- package/apps/agents-server/src/app/api/admin/code-runners/route.ts +1 -1
- package/apps/agents-server/src/app/api/admin/servers/route.ts +5 -0
- package/apps/agents-server/src/app/api/admin/update/commits/route.ts +35 -0
- package/apps/agents-server/src/app/api/admin/update/log/route.ts +42 -0
- package/apps/agents-server/src/app/api/admin/update/route.ts +10 -2
- package/apps/agents-server/src/app/api/agents/[agentName]/route.ts +33 -9
- package/apps/agents-server/src/app/api/agents/export/route.ts +67 -0
- package/apps/agents-server/src/app/api/agents/import/route.ts +168 -0
- package/apps/agents-server/src/app/api/auth/change-password/route.ts +53 -6
- package/apps/agents-server/src/app/api/auth/login/route.ts +17 -16
- package/apps/agents-server/src/app/api/auth/logout/route.ts +2 -10
- package/apps/agents-server/src/app/api/auth/shibboleth/acs/route.ts +112 -0
- package/apps/agents-server/src/app/api/auth/shibboleth/login/route.ts +70 -0
- package/apps/agents-server/src/app/api/auth/shibboleth/metadata/route.ts +15 -0
- package/apps/agents-server/src/app/api/auth/shibboleth/status/route.ts +17 -0
- package/apps/agents-server/src/app/api/chat/citation-label/route.ts +133 -0
- package/apps/agents-server/src/app/api/chat/export/pdf/route.ts +167 -2
- package/apps/agents-server/src/app/api/chat/route.ts +29 -7
- package/apps/agents-server/src/app/api/chat-feedback/export/route.ts +2 -2
- package/apps/agents-server/src/app/api/chat-feedback/route.ts +3 -3
- package/apps/agents-server/src/app/api/chat-history/[id]/route.ts +2 -2
- package/apps/agents-server/src/app/api/chat-history/export/route.ts +2 -2
- package/apps/agents-server/src/app/api/chat-history/route.ts +3 -3
- package/apps/agents-server/src/app/api/chat-streaming/route.ts +29 -0
- package/apps/agents-server/src/app/api/elevenlabs/tts/route.ts +60 -2
- package/apps/agents-server/src/app/api/emails/incoming/sendgrid/route.ts +24 -2
- package/apps/agents-server/src/app/api/federated-agents/route.ts +1 -1
- package/apps/agents-server/src/app/api/health/route.ts +18 -0
- package/apps/agents-server/src/app/api/images/[filename]/route.ts +108 -2
- package/apps/agents-server/src/app/api/internal/agent-runner-limits/route.ts +52 -0
- package/apps/agents-server/src/app/api/internal/user-chat-jobs/run/route.ts +17 -4
- package/apps/agents-server/src/app/api/metadata/export/route.ts +34 -0
- package/apps/agents-server/src/app/api/metadata/import/route.ts +47 -0
- package/apps/agents-server/src/app/api/metadata/route.ts +4 -0
- package/apps/agents-server/src/app/api/openai/v1/audio/transcriptions/route.ts +111 -2
- package/apps/agents-server/src/app/api/page-preview/check/route.ts +49 -0
- package/apps/agents-server/src/app/api/page-preview/screenshot/route.ts +64 -0
- package/apps/agents-server/src/app/api/scrape/route.ts +18 -0
- package/apps/agents-server/src/app/api/team-agent-profile/route.ts +20 -0
- package/apps/agents-server/src/app/api/upload/route.ts +204 -220
- package/apps/agents-server/src/app/api/users/[username]/route.ts +3 -2
- package/apps/agents-server/src/app/api/users/route.ts +8 -7
- package/apps/agents-server/src/app/api/v1/agents/[agentId]/route.ts +4 -0
- package/apps/agents-server/src/app/api/v1/agents/route.ts +2 -0
- package/apps/agents-server/src/app/dashboard/page.tsx +12 -17
- package/apps/agents-server/src/app/docs/[docId]/page.tsx +1 -1
- package/apps/agents-server/src/app/docs/page.tsx +1 -1
- package/apps/agents-server/src/app/globals.css +179 -0
- package/apps/agents-server/src/app/layout.tsx +33 -4
- package/apps/agents-server/src/app/recycle-bin/actions.ts +3 -0
- package/apps/agents-server/src/app/recycle-bin/page.tsx +1 -1
- package/apps/agents-server/src/app/s3/[first]/[second]/[hash]/[filename]/route.ts +52 -0
- package/apps/agents-server/src/app/swagger/SwaggerApiKeysPanel.tsx +4 -1
- package/apps/agents-server/src/app/system/settings/KeybindingsSettingsClient.tsx +13 -7
- package/apps/agents-server/src/app/system/user-memory/UserMemoryClient.tsx +4 -2
- package/apps/agents-server/src/app/system/user-wallet/UserWalletClient.tsx +3 -0
- package/apps/agents-server/src/app/system/user-wallet/UserWalletRecordsTable.tsx +5 -1
- package/apps/agents-server/src/app/system/utilities/mocked-chats/MockedChatsEditorClient.tsx +3 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/MockedChatsEditorSidebar.tsx +7 -8
- package/apps/agents-server/src/components/AdminTerminal/AdminTerminalCard.tsx +13 -70
- package/apps/agents-server/src/components/AdminTerminal/AdminXtermTerminal.tsx +330 -0
- package/apps/agents-server/src/components/AdminTerminal/useAdminTerminalSession.ts +45 -5
- package/apps/agents-server/src/components/AgentContextMenu/useAgentContextMenuItems.ts +27 -19
- package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +4 -7
- package/apps/agents-server/src/components/AgentProfile/AgentProfileImage.tsx +8 -2
- package/apps/agents-server/src/components/ApplicationErrorPage/ApplicationErrorPage.tsx +118 -12
- package/apps/agents-server/src/components/DocsToolbar/DocsToolbar.tsx +4 -4
- package/apps/agents-server/src/components/DocumentationContent/DocumentationContent.tsx +9 -9
- package/apps/agents-server/src/components/FileUploadAvailability/FileUploadAvailabilityContext.tsx +50 -0
- package/apps/agents-server/src/components/FileUploadAvailability/FileUploadUnavailableNotice.tsx +45 -0
- package/apps/agents-server/src/components/Footer/Footer.tsx +10 -9
- package/apps/agents-server/src/components/Footer/getCommitFooterEmoji.ts +112 -0
- package/apps/agents-server/src/components/Header/ActiveAgentBreadcrumbContext.tsx +82 -0
- package/apps/agents-server/src/components/Header/Header.tsx +24 -15
- package/apps/agents-server/src/components/Header/HeaderTypes.ts +6 -0
- package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +51 -1
- package/apps/agents-server/src/components/Header/useHeaderActiveAgent.ts +26 -7
- package/apps/agents-server/src/components/Header/useHeaderAgentMenus.tsx +0 -5
- package/apps/agents-server/src/components/Homepage/AgentsList.tsx +19 -1
- package/apps/agents-server/src/components/Homepage/AgentsListHeader.tsx +44 -1
- package/apps/agents-server/src/components/Homepage/AgentsListListView.tsx +6 -0
- package/apps/agents-server/src/components/Homepage/AgentsListViewContent.tsx +6 -0
- package/apps/agents-server/src/components/Homepage/Card.tsx +1 -1
- package/apps/agents-server/src/components/Homepage/Section.tsx +3 -1
- package/apps/agents-server/src/components/Homepage/SortableFolderCard.tsx +7 -1
- package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +525 -0
- package/apps/agents-server/src/components/Homepage/useAgentsListState.ts +14 -0
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +93 -70
- package/apps/agents-server/src/components/LoginForm/LoginForm.tsx +52 -12
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/ManGoNewAgentWizard.tsx +151 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/ManGoOnboardingNavigation.tsx +50 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/BookLanguagePanel.tsx +125 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/DropZone.tsx +83 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/EmailTestRun.tsx +216 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/KnowledgeList.tsx +79 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/Logo.tsx +20 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/MarkdownBookEditor.tsx +154 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/MarkdownPreview.tsx +188 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/RailStepper.tsx +115 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/StepFrame.tsx +47 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/TestChat.tsx +159 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/WizardShell.tsx +114 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/brand/RailArtwork.tsx +60 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/BookStep.tsx +135 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/DoneStep.tsx +215 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/KnowledgeStep.tsx +152 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/TestStep.tsx +262 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/ZadaniStep.tsx +64 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Badge.tsx +41 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Banner.tsx +69 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Button.tsx +77 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Card.tsx +33 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Field.tsx +103 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/IconButton.tsx +40 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Spinner.tsx +14 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/tokens.ts +37 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/config/bookSections.ts +62 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/config/emailScenarios.ts +22 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/config/steps.ts +46 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/index.ts +11 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/lib/cn.ts +4 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/lib/format.ts +9 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/lib/id.ts +11 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/agentEvalService.ts +30 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/agentTestService.ts +69 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/bookService.ts +21 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/createManGoAgentSource.ts +107 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/draftService.ts +45 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/uploadService.ts +27 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/state/OnboardingProvider.tsx +121 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/types.ts +52 -0
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentDialog.tsx +7 -3
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardKnowledgeStep.tsx +6 -0
- package/apps/agents-server/src/components/NewAgentDialog/createNewAgentWizardSource.ts +1 -1
- package/apps/agents-server/src/components/NewAgentDialog/trackNewAgentCreationEvent.ts +1 -1
- package/apps/agents-server/src/components/NewAgentDialog/useNewAgentDialog.tsx +113 -14
- package/apps/agents-server/src/components/NewAgentDialog/useNewAgentWizardKnowledgeState.ts +8 -1
- package/apps/agents-server/src/components/PrintHeader/PrintHeader.tsx +4 -2
- package/apps/agents-server/src/components/Skeleton/ConsolePageLoadingSkeleton.tsx +1 -1
- package/apps/agents-server/src/components/Skeleton/DocumentationRouteLoadingSkeleton.tsx +1 -1
- package/apps/agents-server/src/components/Skeleton/HomepageLoadingSkeleton.tsx +1 -1
- package/apps/agents-server/src/components/UsersList/UsersList.tsx +24 -6
- package/apps/agents-server/src/components/UsersList/useUsersAdmin.ts +2 -7
- package/apps/agents-server/src/constants/defaultAgentAvatarVisual.ts +1 -1
- package/apps/agents-server/src/constants/newAgentWizard.ts +17 -8
- package/apps/agents-server/src/constants/serverLimits.ts +22 -2
- package/apps/agents-server/src/constants/shibbolethAuth.ts +139 -0
- package/apps/agents-server/src/database/$provideClientSql.ts +37 -0
- package/apps/agents-server/src/database/$provideSupabaseForServer.ts +41 -0
- package/apps/agents-server/src/database/customJavascript.ts +62 -1
- package/apps/agents-server/src/database/customStylesheet.ts +60 -1
- package/apps/agents-server/src/database/getMetadata.ts +121 -4
- package/apps/agents-server/src/database/loadAgentsServerEnvFile.ts +29 -0
- package/apps/agents-server/src/database/metadataDefaults.ts +85 -31
- package/apps/agents-server/src/database/migrate.ts +8 -2
- package/apps/agents-server/src/database/migrations/2026-06-0100-shibboleth-auth.sql +136 -0
- package/apps/agents-server/src/database/migrations/2026-06-0200-default-agent-avatar-visual-octopus3d3.sql +16 -0
- package/apps/agents-server/src/database/migrations/2026-06-1300-user-chat-active-read-indexes.sql +7 -0
- package/apps/agents-server/src/database/migrations/2026-06-2200-new-agent-wizard-metadata-key.sql +27 -0
- package/apps/agents-server/src/database/migrations/2026-06-2201-new-agent-wizard-mango-default.sql +11 -0
- package/apps/agents-server/src/database/migrations/2026-06-2600-agent-directory-performance-indexes.sql +14 -0
- package/apps/agents-server/src/database/migrations/2026-06-2700-default-agent-avatar-visual-octopus3d4.sql +16 -0
- package/apps/agents-server/src/database/seedCoreAgents.ts +236 -0
- package/apps/agents-server/src/database/seedDefaultAgents.ts +225 -0
- package/apps/agents-server/src/database/sqlite/$provideLocalSqliteSupabase.ts +234 -41
- package/apps/agents-server/src/generated/reservedPaths.ts +3 -0
- package/apps/agents-server/src/instrumentation-client.ts +28 -0
- package/apps/agents-server/src/instrumentation.ts +19 -0
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +4 -0
- package/apps/agents-server/src/languages/translations/czech.yaml +5 -1
- package/apps/agents-server/src/languages/translations/english.yaml +5 -1
- package/apps/agents-server/src/message-providers/email/sendgrid/verifySendgridInboundParseWebhook.ts +345 -0
- package/apps/agents-server/src/middleware/applyEmbeddingHeader.ts +4 -2
- package/apps/agents-server/src/middleware/contentSecurityPolicy.ts +97 -0
- package/apps/agents-server/src/middleware/resolveAccessControlResponse.ts +3 -2
- package/apps/agents-server/src/middleware/resolveMiddlewareResponse.ts +8 -3
- package/apps/agents-server/src/middleware.ts +15 -32
- package/apps/agents-server/src/search/createDefaultServerSearchProviders/createFederatedAgentsSearchProvider.ts +1 -1
- package/apps/agents-server/src/sentry.edge.config.ts +18 -0
- package/apps/agents-server/src/sentry.server.config.ts +19 -0
- package/apps/agents-server/src/tools/$provideAgentCollectionForServer.ts +2 -9
- package/apps/agents-server/src/tools/$provideCdnForServer.ts +187 -15
- package/apps/agents-server/src/tools/BrowserConnectionProvider.ts +2 -19
- package/apps/agents-server/src/tools/createAgentProgressTools.ts +8 -4
- package/apps/agents-server/src/tools/createChatAttachmentToolFunctions.ts +8 -4
- package/apps/agents-server/src/tools/createServerChromiumLaunchOptions.ts +44 -0
- package/apps/agents-server/src/utils/agentOwnership.ts +54 -5
- package/apps/agents-server/src/utils/agentRouting/resolveAgentRouteTarget.ts +101 -19
- package/apps/agents-server/src/utils/agentsTransfer/createAgentsExportZipStream.ts +81 -0
- package/apps/agents-server/src/utils/agentsTransfer/importAgentsFromFiles.ts +852 -0
- package/apps/agents-server/src/utils/assertSafeUrl.ts +136 -0
- package/apps/agents-server/src/utils/authenticateUser.ts +112 -4
- package/apps/agents-server/src/utils/authenticationAttemptRateLimit.ts +504 -0
- package/apps/agents-server/src/utils/backup/createBooksBackupZipStream.ts +91 -7
- package/apps/agents-server/src/utils/cdn/classes/DigitalOceanSpaces.ts +48 -4
- package/apps/agents-server/src/utils/cdn/classes/TrackedFilesStorage.ts +6 -5
- package/apps/agents-server/src/utils/cdn/interfaces/IFilesStorage.ts +5 -0
- package/apps/agents-server/src/utils/cdn/utils/getUserFileCdnKey.ts +10 -3
- package/apps/agents-server/src/utils/chat/resolveAgentsServerCitationLabel.ts +130 -0
- package/apps/agents-server/src/utils/chat/resolveCitationSourceLabel.ts +436 -0
- package/apps/agents-server/src/utils/chatExport/renderHtmlToPdfOnServer.ts +66 -17
- package/apps/agents-server/src/utils/chatExport/sanitizeChatPdfExportHtml.ts +193 -0
- package/apps/agents-server/src/utils/codeRunnerConfiguration.ts +1 -1
- package/apps/agents-server/src/utils/createAdminTerminalRouteHandlers.ts +264 -0
- package/apps/agents-server/src/utils/currentUserIdentity.ts +22 -9
- package/apps/agents-server/src/utils/defaultAgents/loadDefaultAgentBooks.ts +145 -0
- package/apps/agents-server/src/utils/errorReporting/agentsServerSentryContext.ts +203 -0
- package/apps/agents-server/src/utils/errorReporting/applicationErrorHandling.ts +45 -0
- package/apps/agents-server/src/utils/errorReporting/refreshApplicationDocument.ts +10 -0
- package/apps/agents-server/src/utils/errorReporting/registerServerErrorSentryLogging.ts +381 -0
- package/apps/agents-server/src/utils/errorReporting/sendApplicationErrorReportToSentry.ts +43 -152
- package/apps/agents-server/src/utils/errorReporting/sentrySdkConfig.ts +237 -0
- package/apps/agents-server/src/utils/errorReporting/sentryStore.ts +187 -0
- package/apps/agents-server/src/utils/externalChatRunner/createExternalAgentRepositoryFiles.ts +2 -2
- package/apps/agents-server/src/utils/externalChatRunner/processExternalUserChatJob.ts +22 -7
- package/apps/agents-server/src/utils/findAgentForCallerWriteAccess.ts +36 -0
- package/apps/agents-server/src/utils/getCurrentUser.ts +2 -1
- package/apps/agents-server/src/utils/getFederatedServers.ts +3 -74
- package/apps/agents-server/src/utils/getUserById.ts +19 -5
- package/apps/agents-server/src/utils/getWellKnownAgentUrl.ts +10 -4
- package/apps/agents-server/src/utils/iframe/checkIfUrlCanBeEmbedded.ts +68 -0
- package/apps/agents-server/src/utils/interactiveTerminalSession.ts +9 -4
- package/apps/agents-server/src/utils/isAdminPasswordEqual.ts +28 -0
- package/apps/agents-server/src/utils/isUserGlobalAdmin.ts +3 -1
- package/apps/agents-server/src/utils/knowledge/createInlineKnowledgeSourceUploader.ts +24 -5
- package/apps/agents-server/src/utils/knowledge/resolveWebsiteKnowledgeSourcesForServer.ts +10 -1
- package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +23 -8
- package/apps/agents-server/src/utils/localization/formatServerLanguageHumanReadableDate.ts +70 -0
- package/apps/agents-server/src/utils/localization/getRequestServerLanguage.ts +32 -0
- package/apps/agents-server/src/utils/metadataConfigurationTransfer.ts +442 -0
- package/apps/agents-server/src/utils/paidApiRequestGuard.ts +241 -0
- package/apps/agents-server/src/utils/publicUser.ts +59 -0
- package/apps/agents-server/src/utils/serverLimits.ts +26 -1
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/bootstrapManagedServer.ts +5 -6
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/normalizeCreateServerInput.ts +6 -0
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +162 -0
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +8 -88
- package/apps/agents-server/src/utils/serverManagement/createManagedServer.ts +5 -0
- package/apps/agents-server/src/utils/session.ts +72 -30
- package/apps/agents-server/src/utils/shareTargetPayloads.ts +37 -66
- package/apps/agents-server/src/utils/shibbolethAuthentication.ts +957 -0
- package/apps/agents-server/src/utils/transpilers/resolveTranspiledTeamExport.ts +10 -10
- package/apps/agents-server/src/utils/upload/createBookEditorUploadHandler.ts +19 -28
- package/apps/agents-server/src/utils/upload/fileUploadAvailability.ts +91 -0
- package/apps/agents-server/src/utils/upload/uploadFileToServer.ts +157 -0
- package/apps/agents-server/src/utils/userChat/createImmediateUserChatAnswerModelRequirements.ts +26 -12
- package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +45 -0
- package/apps/agents-server/src/utils/userChat/createRunUserChatJobPersistenceController.ts +17 -11
- package/apps/agents-server/src/utils/userChat/createUserChatDetailPayload.ts +33 -18
- package/apps/agents-server/src/utils/userChat/createUserChatHarnessProgressCard.ts +99 -0
- package/apps/agents-server/src/utils/userChat/createUserChatRunnerProgressCard.ts +63 -0
- package/apps/agents-server/src/utils/userChat/hasPotentiallyPendingAssistantMessages.ts +26 -0
- package/apps/agents-server/src/utils/userChat/listUserChats.ts +117 -6
- package/apps/agents-server/src/utils/userChat/persistUserChatJobProgressCard.ts +40 -0
- package/apps/agents-server/src/utils/userChat/resolveUserChatProgressToolHighlights.ts +100 -0
- package/apps/agents-server/src/utils/userChat/resolveUserChatWorkerInternalToken.ts +63 -9
- package/apps/agents-server/src/utils/userChat/runImmediateUserChatAnswer.ts +1 -1
- package/apps/agents-server/src/utils/userChat/runUserChatJob.ts +30 -0
- package/apps/agents-server/src/utils/userChat/triggerUserChatJobWorker.ts +54 -19
- package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +0 -1
- package/apps/agents-server/src/utils/userChat/userChatProgressCard.ts +366 -0
- package/apps/agents-server/src/utils/validateApiKey.ts +7 -3
- package/apps/agents-server/src/utils/vpsConfiguration.ts +8 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate.ts +816 -59
- package/esm/apps/agents-server/src/constants/federatedAgentImport.d.ts +42 -0
- package/esm/apps/agents-server/src/constants/serverLimits.d.ts +207 -0
- package/esm/apps/agents-server/src/constants/toolUsageLimits.d.ts +55 -0
- package/esm/index.es.js +23985 -18820
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-chat/executeAgentChatTurn.d.ts +28 -0
- package/esm/scripts/run-agent-chat/runAgentChat.d.ts +5 -0
- package/esm/scripts/run-agent-chat/runAgentExec.d.ts +11 -0
- package/esm/scripts/run-agent-messages/main/AgentMessageFailureTracker.d.ts +27 -0
- package/esm/scripts/run-agent-messages/main/handleAgentWatchError.d.ts +4 -0
- package/esm/scripts/run-agent-messages/main/runAgentMessages.d.ts +1 -0
- package/esm/scripts/run-agent-messages/messages/createAgentRunnerSystemMessage.d.ts +10 -0
- package/esm/scripts/run-agent-messages/messages/moveAgentMessageToFailed.d.ts +17 -0
- package/esm/scripts/run-codex-prompts/common/buildCoderRunProgressSnapshot.d.ts +5 -1
- package/esm/scripts/run-codex-prompts/common/cliProgressDisplay.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/common/coderRunEstimateCache.d.ts +31 -0
- package/esm/scripts/run-codex-prompts/common/parseDuration.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/common/progressFormatting.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/common/resolveAgentSystemMessage.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/common/resolveInlineOrFileText.d.ts +14 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/printLiveScriptChunk.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +12 -0
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +3 -1
- package/esm/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/main/runCodexPromptsServer.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/main/runPromptRound.d.ts +5 -3
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +3 -1
- package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +50 -0
- package/esm/scripts/run-codex-prompts/server/buildCoderServerRunState.d.ts +23 -0
- package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +35 -0
- package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +1 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +5 -1
- package/esm/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +1 -0
- package/esm/src/_packages/components.index.d.ts +4 -0
- package/esm/src/_packages/core.index.d.ts +0 -2
- package/esm/src/_packages/node.index.d.ts +40 -0
- package/esm/src/_packages/types.index.d.ts +18 -0
- package/esm/src/avatars/avatarAnimationScheduler.d.ts +4 -0
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/esm/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
- package/esm/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
- package/esm/src/book-3.0/CliAgent.d.ts +66 -0
- package/esm/src/book-3.0/CliAgent.test.d.ts +1 -0
- package/esm/src/book-3.0/LiteAgent.d.ts +68 -0
- package/esm/src/book-3.0/LiteAgent.test.d.ts +1 -0
- package/esm/src/book-3.0/agentFolderPaths.d.ts +30 -0
- package/esm/src/book-3.0/cliAgentEnv.d.ts +33 -0
- package/esm/src/book-components/BookEditor/BookEditor.d.ts +6 -5
- package/esm/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
- package/esm/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
- package/esm/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
- package/esm/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
- package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
- package/esm/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
- package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
- package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
- package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
- package/esm/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
- package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
- package/esm/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
- package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
- package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
- package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
- package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
- package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
- package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
- package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -1
- package/esm/src/book-components/icons/AboutIcon.d.ts +1 -1
- package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -1
- package/esm/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
- package/esm/src/book-components/icons/FullscreenIcon.d.ts +1 -1
- package/esm/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
- package/esm/src/cli/cli-commands/agent/chat.d.ts +10 -0
- package/esm/src/cli/cli-commands/agent/exec.d.ts +10 -0
- package/esm/src/cli/cli-commands/agent/run.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
- package/esm/src/cli/cli-commands/agent.d.ts +14 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +17 -1
- package/esm/src/cli/cli-commands/agents-server/run.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
- package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
- package/esm/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
- package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
- package/esm/src/cli/cli-commands/coder/server.d.ts +13 -0
- package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
- package/esm/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
- package/esm/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
- package/esm/src/utils/isTimingSafeEqualString.d.ts +25 -0
- package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +6 -1
- package/servers.ts +1 -16
- package/src/_packages/components.index.ts +4 -0
- package/src/_packages/core.index.ts +0 -2
- package/src/_packages/node.index.ts +40 -0
- package/src/_packages/types.index.ts +18 -0
- package/src/avatars/avatarAnimationScheduler.ts +76 -4
- package/src/avatars/types/AvatarVisualDefinition.ts +2 -0
- package/src/avatars/visuals/avatarVisualRegistry.ts +4 -0
- package/src/avatars/visuals/fractalAvatarVisual.ts +5 -4
- package/src/avatars/visuals/minecraft2AvatarVisual.ts +16 -11
- package/src/avatars/visuals/minecraftAvatarVisual.ts +21 -7
- package/src/avatars/visuals/octopus3d2AvatarVisual.ts +175 -38
- package/src/avatars/visuals/octopus3d3AvatarVisual.ts +1068 -0
- package/src/avatars/visuals/octopus3d4AvatarVisual.ts +1295 -0
- package/src/avatars/visuals/octopus3dAvatarVisual.ts +69 -17
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.ts +18 -2
- package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +7 -1
- package/src/book-3.0/Book.ts +3 -1
- package/src/book-3.0/BookNodeAgentSource.ts +135 -0
- package/src/book-3.0/CliAgent.ts +252 -0
- package/src/book-3.0/LiteAgent.ts +468 -0
- package/src/book-3.0/agentFolderPaths.ts +38 -0
- package/src/book-3.0/cliAgentEnv.ts +46 -0
- package/src/book-components/BookEditor/BookEditor.module.css +61 -0
- package/src/book-components/BookEditor/BookEditor.tsx +16 -13
- package/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.tsx +72 -0
- package/src/book-components/BookEditor/BookEditorActionbar.tsx +35 -5
- package/src/book-components/BookEditor/BookEditorBrowserConfig.ts +11 -0
- package/src/book-components/BookEditor/BookEditorForClient.tsx +33 -0
- package/src/book-components/BookEditor/BookEditorMonaco.tsx +4 -2
- package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +78 -27
- package/src/book-components/BookEditor/BookEditorTheme.ts +32 -0
- package/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.ts +11 -0
- package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +55 -89
- package/src/book-components/BookEditor/useBookEditorMonacoLifecycle.ts +1 -5
- package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +3 -2
- package/src/book-components/BookEditor/useBookEditorMonacoUploads.ts +1 -1
- package/src/book-components/Chat/Chat/Chat.module.css +50 -0
- package/src/book-components/Chat/Chat/Chat.tsx +4 -0
- package/src/book-components/Chat/Chat/ChatCitationModal.tsx +19 -5
- package/src/book-components/Chat/Chat/ChatMessageItem.tsx +22 -2
- package/src/book-components/Chat/Chat/ChatMessageList.tsx +6 -0
- package/src/book-components/Chat/Chat/ChatProps.tsx +6 -0
- package/src/book-components/Chat/Chat/ChatToolCallModal.tsx +4 -0
- package/src/book-components/Chat/Chat/ChatToolCallModalContent.tsx +4 -0
- package/src/book-components/Chat/Chat/CitationIframePreview.tsx +78 -0
- package/src/book-components/Chat/Chat/TeamToolCallModalContent.tsx +16 -3
- package/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.ts +2 -9
- package/src/book-components/Chat/Chat/useChatPostprocessedMessages.ts +13 -2
- package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +63 -4
- package/src/book-components/Chat/SourceChip/SourceChip.module.css +8 -0
- package/src/book-components/Chat/SourceChip/SourceChip.tsx +19 -5
- package/src/book-components/Chat/hooks/useResolvedCitationLabel.ts +65 -0
- package/src/book-components/Chat/save/html/htmlSaveFormatDefinition.ts +315 -88
- package/src/book-components/Chat/save/react/reactSaveFormatDefinition.ts +7 -1
- package/src/book-components/Chat/types/ChatMessage.ts +5 -0
- package/src/book-components/Chat/types/ChatParticipant.ts +1 -1
- package/src/book-components/Chat/types/CitationLabelResolver.ts +9 -0
- package/src/book-components/Chat/utils/citationHelpers.ts +90 -2
- package/src/book-components/Chat/utils/createCitationFootnoteRenderModel.ts +3 -0
- package/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.ts +178 -0
- package/src/book-components/Chat/utils/isVisibleChatToolCall.ts +23 -0
- package/src/book-components/Chat/utils/parseCitationsFromContent.ts +6 -0
- package/src/book-components/Chat/utils/renderMarkdown.ts +3 -2
- package/src/book-components/_common/Dropdown/Dropdown.tsx +1 -1
- package/src/book-components/_common/MenuHoisting/MenuHoistingContext.tsx +1 -1
- package/src/book-components/_common/Modal/Modal.tsx +1 -1
- package/src/book-components/icons/AboutIcon.tsx +1 -1
- package/src/book-components/icons/DownloadIcon.tsx +1 -1
- package/src/book-components/icons/ExitFullscreenIcon.tsx +1 -1
- package/src/book-components/icons/FullscreenIcon.tsx +1 -1
- package/src/cli/cli-commands/agent/agentCliOptions.ts +92 -0
- package/src/cli/cli-commands/agent/chat.ts +54 -0
- package/src/cli/cli-commands/agent/exec.ts +60 -0
- package/src/cli/cli-commands/agent-folder/agentProjectPaths.ts +15 -28
- package/src/cli/cli-commands/agent.ts +44 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer.ts +188 -24
- package/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.ts +15 -2
- package/src/cli/cli-commands/agents-server/run.ts +103 -31
- package/src/cli/cli-commands/agents-server/startAgentsServer.ts +250 -41
- package/src/cli/cli-commands/agents-server.ts +7 -1
- package/src/cli/cli-commands/coder/ThinkingLevel.ts +3 -1
- package/src/cli/cli-commands/coder/agentCodingFile.ts +1 -1
- package/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.ts +79 -0
- package/src/cli/cli-commands/coder/find-unwritten.ts +58 -0
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +2 -2
- package/src/cli/cli-commands/coder/init.ts +6 -1
- package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +10 -0
- package/src/cli/cli-commands/coder/printInitializationSummary.ts +3 -0
- package/src/cli/cli-commands/coder/run.ts +78 -13
- package/src/cli/cli-commands/coder/server.ts +259 -0
- package/src/cli/cli-commands/coder/waitOptions.ts +24 -0
- package/src/cli/cli-commands/coder.ts +6 -0
- package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +33 -49
- package/src/cli/common/$deprecateCliCommand.ts +10 -1
- package/src/cli/promptbookCli.ts +2 -0
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +91 -14
- package/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.ts +2 -2
- package/src/commitments/GOAL/GOAL.ts +7 -2
- package/src/commitments/LANGUAGE/LANGUAGE.ts +7 -2
- package/src/commitments/TEAM/TEAM.ts +12 -1
- package/src/commitments/USE_PROJECT/createUseProjectToolFunctions.ts +8 -1
- package/src/commitments/_common/teamInternalAgentAccess.ts +14 -8
- package/src/execution/createPipelineExecutor/getKnowledgeForTask.ts +1 -1
- package/src/formats/csv/CsvFormatParser.ts +4 -4
- package/src/formats/csv/utils/csvParse.ts +2 -2
- package/src/import-plugins/JsonFileImportPlugin.ts +15 -2
- package/src/import-plugins/TextFileImportPlugin.ts +8 -1
- package/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.ts +1 -1
- package/src/llm-providers/_common/register/$provideLlmToolsFromEnv.ts +1 -1
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage.ts +6 -1
- package/src/llm-providers/agent/AgentLlmExecutionTools.ts +2 -2
- package/src/llm-providers/agent/AgentLlmExecutionToolsAgentKitRunner.ts +2 -2
- package/src/llm-providers/agent/AgentLlmExecutionToolsOpenAiAssistantRunner.ts +2 -2
- package/src/llm-providers/anthropic-claude/register-configuration.ts +6 -3
- package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +3 -1
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.ts +1 -1
- package/src/llm-providers/openai/OpenAiVectorStoreKnowledgeSourcePreparer.ts +1 -1
- package/src/other/templates/getTemplatesPipelineCollection.ts +741 -788
- package/src/scrapers/_common/utils/getScraperIntermediateSource.ts +2 -2
- package/src/scrapers/website/WebsiteScraper.ts +1 -1
- package/src/scrapers/website/utils/createShowdownConverter.ts +2 -2
- package/src/scripting/javascript/JavascriptEvalExecutionTools.ts +1 -1
- package/src/utils/agents/resolveAgentAvatarImageUrl.ts +1 -1
- package/src/utils/chat/chatAttachments/resolveChatAttachmentContent.ts +8 -1
- package/src/utils/isTimingSafeEqualString.ts +43 -0
- package/src/utils/misc/computeHash.ts +2 -2
- package/src/utils/random/$randomToken.ts +2 -2
- package/src/utils/validators/url/isValidAgentUrl.ts +5 -7
- package/src/version.ts +2 -2
- package/src/versions.txt +32 -0
- package/umd/apps/agents-server/src/constants/federatedAgentImport.d.ts +42 -0
- package/umd/apps/agents-server/src/constants/serverLimits.d.ts +207 -0
- package/umd/apps/agents-server/src/constants/toolUsageLimits.d.ts +55 -0
- package/umd/index.umd.js +23723 -18556
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-chat/executeAgentChatTurn.d.ts +28 -0
- package/umd/scripts/run-agent-chat/runAgentChat.d.ts +5 -0
- package/umd/scripts/run-agent-chat/runAgentExec.d.ts +11 -0
- package/umd/scripts/run-agent-messages/main/AgentMessageFailureTracker.d.ts +27 -0
- package/umd/scripts/run-agent-messages/main/handleAgentWatchError.d.ts +4 -0
- package/umd/scripts/run-agent-messages/main/runAgentMessages.d.ts +1 -0
- package/umd/scripts/run-agent-messages/messages/createAgentRunnerSystemMessage.d.ts +10 -0
- package/umd/scripts/run-agent-messages/messages/moveAgentMessageToFailed.d.ts +17 -0
- package/umd/scripts/run-codex-prompts/common/buildCoderRunProgressSnapshot.d.ts +5 -1
- package/umd/scripts/run-codex-prompts/common/cliProgressDisplay.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/common/coderRunEstimateCache.d.ts +31 -0
- package/umd/scripts/run-codex-prompts/common/parseDuration.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/common/progressFormatting.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/common/resolveAgentSystemMessage.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/common/resolveInlineOrFileText.d.ts +14 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/printLiveScriptChunk.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +12 -0
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +3 -1
- package/umd/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/main/runCodexPromptsServer.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/main/runPromptRound.d.ts +5 -3
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +3 -1
- package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +50 -0
- package/umd/scripts/run-codex-prompts/server/buildCoderServerRunState.d.ts +23 -0
- package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +35 -0
- package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +1 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +5 -1
- package/umd/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +1 -0
- package/umd/src/_packages/components.index.d.ts +4 -0
- package/umd/src/_packages/core.index.d.ts +0 -2
- package/umd/src/_packages/node.index.d.ts +40 -0
- package/umd/src/_packages/types.index.d.ts +18 -0
- package/umd/src/avatars/avatarAnimationScheduler.d.ts +4 -0
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/umd/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
- package/umd/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
- package/umd/src/book-3.0/CliAgent.d.ts +66 -0
- package/umd/src/book-3.0/CliAgent.test.d.ts +1 -0
- package/umd/src/book-3.0/LiteAgent.d.ts +68 -0
- package/umd/src/book-3.0/LiteAgent.test.d.ts +1 -0
- package/umd/src/book-3.0/agentFolderPaths.d.ts +30 -0
- package/umd/src/book-3.0/cliAgentEnv.d.ts +33 -0
- package/umd/src/book-components/BookEditor/BookEditor.d.ts +6 -5
- package/umd/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
- package/umd/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
- package/umd/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
- package/umd/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
- package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
- package/umd/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
- package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
- package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
- package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
- package/umd/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
- package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
- package/umd/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
- package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
- package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
- package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
- package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
- package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
- package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
- package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -1
- package/umd/src/book-components/icons/AboutIcon.d.ts +1 -1
- package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -1
- package/umd/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
- package/umd/src/book-components/icons/FullscreenIcon.d.ts +1 -1
- package/umd/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
- package/umd/src/cli/cli-commands/agent/chat.d.ts +10 -0
- package/umd/src/cli/cli-commands/agent/exec.d.ts +10 -0
- package/umd/src/cli/cli-commands/agent/run.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
- package/umd/src/cli/cli-commands/agent.d.ts +14 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +17 -1
- package/umd/src/cli/cli-commands/agents-server/run.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
- package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
- package/umd/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
- package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
- package/umd/src/cli/cli-commands/coder/server.d.ts +13 -0
- package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
- package/umd/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
- package/umd/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
- package/umd/src/utils/isTimingSafeEqualString.d.ts +25 -0
- package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
- package/umd/src/version.d.ts +1 -1
- package/apps/agents-server/src/app/api/long-streaming/route.ts +0 -23
- package/apps/agents-server/src/message-providers/email/_common/utils/parseEmailAddress.test.ts.todo +0 -108
- package/apps/agents-server/src/message-providers/email/_common/utils/parseEmailAddresses.test.ts.todo +0 -117
- package/apps/agents-server/src/message-providers/email/_common/utils/stringifyEmailAddress.test.ts.todo +0 -119
- package/apps/agents-server/src/message-providers/email/_common/utils/stringifyEmailAddresses.test.ts.todo +0 -74
- package/apps/agents-server/src/utils/defaultFederatedAgents/DefaultFederatedAgentsSyncOptions.ts +0 -9
- package/apps/agents-server/src/utils/defaultFederatedAgents/ensureDefaultFederatedAgentExists.ts +0 -277
- package/apps/agents-server/src/utils/defaultFederatedAgents/fetchCoreOrganizationPayload.ts +0 -39
- package/apps/agents-server/src/utils/defaultFederatedAgents/fetchFederatedAgentBook.ts +0 -43
- package/apps/agents-server/src/utils/defaultFederatedAgents/fetchWithDefaultFederatedAgentTimeout.ts +0 -28
- package/apps/agents-server/src/utils/defaultFederatedAgents/getDefaultFederatedAgentSyncPool.ts +0 -38
- package/apps/agents-server/src/utils/defaultFederatedAgents/loadActiveLocalAgentIdsByNormalizedName.ts +0 -41
- package/apps/agents-server/src/utils/defaultFederatedAgents/loadDefaultFederatedAgentSyncMetadata.ts +0 -76
- package/apps/agents-server/src/utils/defaultFederatedAgents/quoteIdentifier.ts +0 -11
- package/apps/agents-server/src/utils/defaultFederatedAgents/scheduleDefaultFederatedAgentsSync.ts +0 -88
- package/apps/agents-server/src/utils/defaultFederatedAgents/selectDefaultFederatedAgentsFromOrganizationPayload.ts +0 -181
- package/apps/agents-server/src/utils/defaultFederatedAgents/synchronizeDefaultFederatedAgents.ts +0 -77
- package/apps/agents-server/src/utils/shibboleth/createShibbolethAuthenticationLogPayload.ts +0 -173
- package/apps/agents-server/src/utils/shibboleth/writeShibbolethAuthenticationLog.ts +0 -27
- package/apps/agents-server/tests/e2e/authentication-and-navigation.spec.ts.todo +0 -178
- package/src/_packages/browser.index.ts +0 -31
- package/src/_packages/browser.readme.md +0 -43
- package/src/book-2.0/agent-source/parseAgentSourceWithCommitments.test.ts.todo +0 -265
- package/src/book-components/BookEditor/BookEditorMonaco.test.tsx.todo +0 -115
- package/src/book-components/Chat/utils/renderMarkdown.test.ts.tmp +0 -199
- package/src/collection/agent-collection/constructors/agent-collection-in-directory/AgentCollectionInDirectory.test.ts.todo +0 -131
- package/src/commands/_common/parseCommand.test.ts.todo +0 -48
- package/src/commitments/META_LINK/META_LINK.test.ts.todo +0 -75
- package/src/conversion/validation/pipelineStringToJson-errors.test.ts.todo +0 -33
- package/src/dialogs/simple-prompt/SimplePromptInterfaceTools.ts +0 -51
- package/src/executables/browsers/locateSafari.test.ts.tmp +0 -15
- package/src/execution/PromptbookFetch.test-type.ts +0 -14
- package/src/execution/createPipelineExecutor/00-createPipelineExecutor.test.ts.todo +0 -0
- package/src/execution/execution-report/executionReportJsonToString.test.ts.todo +0 -83
- package/src/execution/utils/usageToHuman.test.ts.todo +0 -80
- package/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.ts +0 -76
- package/src/llm-providers/_common/utils/assertUniqueModels.ts +0 -27
- package/src/llm-providers/_multiple/playground/playground.ts +0 -141
- package/src/llm-providers/_multiple/playground/tsconfig.json +0 -19
- package/src/llm-providers/agent/playground/playground.ts +0 -190
- package/src/llm-providers/agent/playground/tsconfig.json +0 -19
- package/src/llm-providers/anthropic-claude/playground/playground.ts +0 -99
- package/src/llm-providers/anthropic-claude/playground/tsconfig.json +0 -19
- package/src/llm-providers/azure-openai/playground/playground.ts +0 -101
- package/src/llm-providers/azure-openai/playground/tsconfig.json +0 -19
- package/src/llm-providers/ollama/playground/playground.ts +0 -120
- package/src/llm-providers/ollama/playground/tsconfig.json +0 -19
- package/src/llm-providers/openai/playground/playground.ts +0 -406
- package/src/llm-providers/openai/playground/tsconfig.json +0 -19
- package/src/llm-providers/remote/playground/playground.ts +0 -144
- package/src/llm-providers/remote/playground/tsconfig.json +0 -19
- package/src/llm-providers/vercel/playground/playground.ts +0 -133
- package/src/llm-providers/vercel/playground/tsconfig.json +0 -19
- package/src/personas/preparePersona.test.ts.todo +0 -126
- package/src/playground/backup/_playground-boilerplate.ts.txt +0 -37
- package/src/playground/backup/playground-agent-os.txt +0 -62
- package/src/playground/backup/playground-brj-app.ts.txt +0 -302
- package/src/playground/backup/playground-browser-playwright.txt +0 -110
- package/src/playground/backup/playground-claude-mcp.txt +0 -43
- package/src/playground/backup/playground-document-conversion.txt +0 -84
- package/src/playground/backup/playground-glob.ts.txt +0 -42
- package/src/playground/backup/playground-mcp-server.txt +0 -1
- package/src/playground/backup/playground-openai-agent-kit.txt +0 -73
- package/src/playground/backup/playground-openai-function-calling.txt +0 -131
- package/src/playground/backup/playground-openai-streaming.ts.txt +0 -68
- package/src/playground/backup/playground-scrape-knowledge.txt +0 -65
- package/src/playground/backup/playground-scraperFetch.ts.txt +0 -44
- package/src/playground/backup/playground-using-openai-compatible-route-on-agents-server.ts.txt +0 -49
- package/src/playground/backup/playground-write-pavolhejny-bio.txt +0 -120
- package/src/playground/permanent/_boilerplate.ts +0 -54
- package/src/playground/permanent/agent-with-browser-playground.ts +0 -92
- package/src/playground/permanent/error-handling-playground.ts +0 -103
- package/src/playground/playground.ts +0 -36
- package/src/playground/tsconfig.json +0 -19
- package/src/scrapers/_boilerplate/BoilerplateScraper.test.ts.todo +0 -73
- package/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.ts +0 -79
- package/src/scrapers/_boilerplate/playground/tsconfig.json +0 -19
- package/src/scrapers/_common/utils/files/blobToDataurl.test.ts.todo +0 -17
- package/src/scrapers/_common/utils/files/dataurlToBlob.test.ts.todo +0 -52
- package/src/scrapers/_common/utils/files/isValidDataurl.test.ts.todo +0 -42
- package/src/scrapers/_common/utils/files/shorten.test.ts.todo +0 -13
- package/src/scrapers/document/playground/document-scraper-playground.ts +0 -80
- package/src/scrapers/document/playground/tsconfig.json +0 -19
- package/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.ts +0 -80
- package/src/scrapers/document-legacy/playground/tsconfig.json +0 -19
- package/src/scrapers/markdown/playground/markdown-scraper-playground.ts +0 -74
- package/src/scrapers/markdown/playground/tsconfig.json +0 -19
- package/src/scrapers/markitdown/MarkitdownScraper.test.ts.todo +0 -132
- package/src/scrapers/markitdown/playground/markitdown-scraper-playground.ts +0 -91
- package/src/scrapers/markitdown/playground/tsconfig.json +0 -19
- package/src/scrapers/pdf/PdfScraper.test.ts.todo +0 -52
- package/src/scrapers/pdf/playground/pdf-scraper-playground.ts +0 -75
- package/src/scrapers/pdf/playground/tsconfig.json +0 -19
- package/src/scrapers/website/playground/tsconfig.json +0 -19
- package/src/scrapers/website/playground/website-scraper-playground.ts +0 -82
- package/src/storage/_common/PromptbookStorage.test-type.ts +0 -14
- package/src/storage/local-storage/getIndexedDbStorage.ts +0 -36
- package/src/storage/local-storage/getLocalStorage.ts +0 -33
- package/src/storage/local-storage/getSessionStorage.ts +0 -33
- package/src/storage/local-storage/utils/IndexedDbStorageOptions.ts +0 -16
- package/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.ts +0 -58
- package/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.ts +0 -45
- package/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.test.ts.todo +0 -35
- package/src/transpilers/openai-sdk/playground/playground.ts +0 -85
- package/src/transpilers/openai-sdk/playground/tmp/chatbot-openaisdk-1.js +0 -194
- package/src/transpilers/openai-sdk/playground/tmp/package.json +0 -3
- package/src/transpilers/openai-sdk/playground/tsconfig.json +0 -18
- package/src/utils/editable/utils/findUsableParameters.test.ts.todo +0 -43
- package/src/utils/editable/utils/stringifyPipelineJson.test.ts.todo +0 -38
- package/src/utils/markdown/prettifyMarkdown.test.ts.tmp +0 -42
- package/src/utils/serialization/serializeToPromptbookJavascript.test.ts.todo +0 -116
|
@@ -60,6 +60,28 @@ export declare class AgentCollectionInSupabase {
|
|
|
60
60
|
* Gets all agents in the collection
|
|
61
61
|
*/
|
|
62
62
|
listAgents(): Promise<ReadonlyArray<AgentBasicInformation>>;
|
|
63
|
+
/**
|
|
64
|
+
* Finds one active agent profile by its human-readable name or permanent id.
|
|
65
|
+
*
|
|
66
|
+
* This keeps route-level lookups from loading the whole agent collection when only
|
|
67
|
+
* one canonical route identifier is needed.
|
|
68
|
+
*
|
|
69
|
+
* @param agentNameOrPermanentId - Agent name or stable permanent identifier.
|
|
70
|
+
* @returns Matching active agent profile or `null` when not found.
|
|
71
|
+
*
|
|
72
|
+
* @public exported from `@promptbook/core`
|
|
73
|
+
*/
|
|
74
|
+
findAgentBasicInformation(agentNameOrPermanentId: string_agent_name | string_agent_permanent_id): Promise<AgentBasicInformation | null>;
|
|
75
|
+
/**
|
|
76
|
+
* Converts one database row into public agent information.
|
|
77
|
+
*
|
|
78
|
+
* @param row - Database row carrying the persisted profile snapshot.
|
|
79
|
+
* @param isVerbose - Whether profile-name mismatches should be logged.
|
|
80
|
+
* @returns Agent profile with canonical database name and permanent id.
|
|
81
|
+
*
|
|
82
|
+
* @private internal helper of `AgentCollectionInSupabase`
|
|
83
|
+
*/
|
|
84
|
+
private mapAgentBasicInformationRow;
|
|
63
85
|
/**
|
|
64
86
|
* Retrieves the permanent ID of an agent by its name or permanent ID.
|
|
65
87
|
*/
|
|
@@ -26,7 +26,15 @@ export type TeamInternalAgentAccessHeadersOptions = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Resolves the internal token used by same-server TEAM calls.
|
|
28
28
|
*
|
|
29
|
-
*
|
|
29
|
+
* `PROMPTBOOK_TEAM_AGENT_ACCESS_TOKEN` must be a dedicated secret — falling
|
|
30
|
+
* back to `ADMIN_PASSWORD`, `SUPABASE_SERVICE_ROLE_KEY`, or any other shared
|
|
31
|
+
* credential would let a leak of one secret compromise both authentication
|
|
32
|
+
* boundaries (admin login and same-server teammate-agent access). When the
|
|
33
|
+
* dedicated variable is missing, this function returns `null` so the calling
|
|
34
|
+
* server fails closed — same-server TEAM access is disabled and no header is
|
|
35
|
+
* sent — instead of silently authorizing requests with the wrong secret.
|
|
36
|
+
*
|
|
37
|
+
* @returns Hashed token, or `null` when the dedicated secret is not configured.
|
|
30
38
|
*
|
|
31
39
|
* @private internal Agents Server access wiring
|
|
32
40
|
*/
|
|
@@ -6,7 +6,7 @@ import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
|
|
|
6
6
|
*
|
|
7
7
|
* It looks for environment variables:
|
|
8
8
|
* - `process.env.OPENAI_API_KEY`
|
|
9
|
-
* - `process.env.ANTHROPIC_CLAUDE_API_KEY`
|
|
9
|
+
* - `process.env.ANTHROPIC_API_KEY` (or the deprecated `process.env.ANTHROPIC_CLAUDE_API_KEY`)
|
|
10
10
|
* - ...
|
|
11
11
|
*
|
|
12
12
|
* @see Environment variables documentation or .env file for required variables.
|
|
@@ -13,7 +13,7 @@ import type { CreateLlmToolsFromConfigurationOptions } from './createLlmToolsFro
|
|
|
13
13
|
*
|
|
14
14
|
* It looks for environment variables:
|
|
15
15
|
* - `process.env.OPENAI_API_KEY`
|
|
16
|
-
* - `process.env.ANTHROPIC_CLAUDE_API_KEY`
|
|
16
|
+
* - `process.env.ANTHROPIC_API_KEY` (or the deprecated `process.env.ANTHROPIC_CLAUDE_API_KEY`)
|
|
17
17
|
* - ...
|
|
18
18
|
*
|
|
19
19
|
* @param options Configuration options for the LLM tools
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import showdown from 'showdown';
|
|
2
2
|
/**
|
|
3
3
|
* Create a new showdown converter instance
|
|
4
4
|
*
|
|
5
5
|
* @private utility of `WebsiteScraper`
|
|
6
6
|
*/
|
|
7
|
-
export declare function createShowdownConverter():
|
|
7
|
+
export declare function createShowdownConverter(): showdown.Converter;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compares two strings in constant time to prevent timing attacks.
|
|
3
|
+
*
|
|
4
|
+
* Plain JavaScript `===` / `!==` string comparisons short-circuit on the first
|
|
5
|
+
* byte that differs, which lets a remote attacker who can measure response
|
|
6
|
+
* timing recover the expected value one byte at a time. This helper performs
|
|
7
|
+
* the comparison through Node's `timingSafeEqual`, which always inspects every
|
|
8
|
+
* byte of the equal-length buffers.
|
|
9
|
+
*
|
|
10
|
+
* Returning `false` early when the byte lengths differ does not expose
|
|
11
|
+
* character content — only length — which is an acceptable trade-off, since
|
|
12
|
+
* `timingSafeEqual` requires equal-length buffers and length is typically not
|
|
13
|
+
* secret.
|
|
14
|
+
*
|
|
15
|
+
* `null` and `undefined` inputs are treated as non-matching so callers can
|
|
16
|
+
* forward raw request values (for example `request.headers.get(name)`) without
|
|
17
|
+
* an extra guard.
|
|
18
|
+
*
|
|
19
|
+
* @param candidate - Value supplied by the caller (for example a request header or cookie).
|
|
20
|
+
* @param expected - Value to compare against (for example a configured secret).
|
|
21
|
+
* @returns `true` when both values are strings of equal length with identical bytes.
|
|
22
|
+
*
|
|
23
|
+
* @private internal helper function
|
|
24
|
+
*/
|
|
25
|
+
export declare function isTimingSafeEqualString(candidate: string | null | undefined, expected: string | null | undefined): boolean;
|
|
@@ -8,6 +8,11 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
8
8
|
* - `isValidAgentUrl` *(this one)* which tests just agent URL
|
|
9
9
|
* - `isValidPipelineUrl` which tests just pipeline URL
|
|
10
10
|
*
|
|
11
|
+
* Note: This is a pure structural validator and does not block private/internal network
|
|
12
|
+
* addresses. Callers that fetch the URL server-side from an untrusted network context must
|
|
13
|
+
* additionally apply the `assertSafeUrl` SSRF guard from the Agents Server before any
|
|
14
|
+
* outbound request.
|
|
15
|
+
*
|
|
11
16
|
* @public exported from `@promptbook/utils`
|
|
12
17
|
*/
|
|
13
18
|
export declare function isValidAgentUrl(url: really_unknown): url is string_agent_url;
|
package/esm/src/version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-140`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/cli",
|
|
3
|
-
"version": "0.112.0
|
|
3
|
+
"version": "0.112.0",
|
|
4
4
|
"description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -150,14 +150,19 @@
|
|
|
150
150
|
"@elevenlabs/react": "0.12.3",
|
|
151
151
|
"@modelcontextprotocol/sdk": "1.24.3",
|
|
152
152
|
"@monaco-editor/react": "4.7.0",
|
|
153
|
+
"@node-saml/node-saml": "^5.1.0",
|
|
153
154
|
"@playwright/test": "^1.58.2",
|
|
154
155
|
"@prisma/studio-core": "0.27.3",
|
|
155
156
|
"@sendgrid/mail": "8.1.6",
|
|
157
|
+
"@sentry/nextjs": "^10.57.0",
|
|
156
158
|
"@types/formidable": "3.4.7",
|
|
157
159
|
"@types/mailparser": "3.4.6",
|
|
158
160
|
"@types/swagger-ui-react": "5.18.0",
|
|
159
161
|
"@types/turndown": "5.0.6",
|
|
160
162
|
"@vercel/blob": "1.1.1",
|
|
163
|
+
"@xmldom/xmldom": "^0.9.10",
|
|
164
|
+
"@xterm/addon-fit": "0.11.0",
|
|
165
|
+
"@xterm/xterm": "6.0.0",
|
|
161
166
|
"better-sqlite3": "^11.10.0",
|
|
162
167
|
"configchecker": "1.5.132",
|
|
163
168
|
"cross-fetch": "4.0.0",
|
package/servers.ts
CHANGED
|
@@ -32,21 +32,7 @@ type ServerConfiguration = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* Used for "Adam" agent which is built in as default ancestor for new agents and other well known agents
|
|
38
|
-
*
|
|
39
|
-
* @public exported from `@promptbook/core`
|
|
40
|
-
*/
|
|
41
|
-
export const CORE_AGENTS_SERVER: ServerConfiguration = {
|
|
42
|
-
title: 'Promptbook Core',
|
|
43
|
-
description: `Core Promptbook server used for Adam agent which is built in as default ancestor for new agents and other well known agents.`,
|
|
44
|
-
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
45
|
-
url: 'https://core.ptbk.io/',
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Names of well known agents hosted on Core Promptbook server
|
|
35
|
+
* Names of well known agents bundled in the local `.core` folder of every Agents Server
|
|
50
36
|
*
|
|
51
37
|
* - `Adam`: The default ancestor agent for new agents
|
|
52
38
|
* - `Teacher`: Agent that knows book syntax and can help with self-learning
|
|
@@ -74,7 +60,6 @@ export const CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES = {
|
|
|
74
60
|
* @public exported from `@promptbook/core`
|
|
75
61
|
*/
|
|
76
62
|
export const PUBLIC_AGENTS_SERVERS: Array<ServerConfiguration> = [
|
|
77
|
-
CORE_AGENTS_SERVER,
|
|
78
63
|
{
|
|
79
64
|
title: 'Promptbook Gallery',
|
|
80
65
|
description: `Gallery of ideas, AI professions,... like AI Agenta photobank.`,
|
|
@@ -17,6 +17,7 @@ import type { BookEditorUploadProgressCallback } from '../book-components/BookEd
|
|
|
17
17
|
import type { BookEditorUploadOptions } from '../book-components/BookEditor/BookEditor';
|
|
18
18
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
19
19
|
import { BookEditor } from '../book-components/BookEditor/BookEditor';
|
|
20
|
+
import { BookEditorForClient } from '../book-components/BookEditor/BookEditorForClient';
|
|
20
21
|
import { AgentChat } from '../book-components/Chat/AgentChat/AgentChat';
|
|
21
22
|
import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChatProps';
|
|
22
23
|
import { Chat } from '../book-components/Chat/Chat/Chat';
|
|
@@ -70,6 +71,7 @@ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage
|
|
|
70
71
|
import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
|
|
71
72
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
72
73
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
74
|
+
import type { CitationLabelResolver } from '../book-components/Chat/types/CitationLabelResolver';
|
|
73
75
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
74
76
|
import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageButtons';
|
|
75
77
|
import { ArrowIcon } from '../book-components/icons/ArrowIcon';
|
|
@@ -106,6 +108,7 @@ export type { BookEditorUploadProgressCallback };
|
|
|
106
108
|
export type { BookEditorUploadOptions };
|
|
107
109
|
export type { BookEditorProps };
|
|
108
110
|
export { BookEditor };
|
|
111
|
+
export { BookEditorForClient };
|
|
109
112
|
export { AgentChat };
|
|
110
113
|
export type { AgentChatProps };
|
|
111
114
|
export { Chat };
|
|
@@ -159,6 +162,7 @@ export type { ChatProgressCard };
|
|
|
159
162
|
export type { ChatMessageReplyingTo };
|
|
160
163
|
export type { ChatMessage };
|
|
161
164
|
export type { ChatParticipant };
|
|
165
|
+
export type { CitationLabelResolver };
|
|
162
166
|
export type { MessageButton };
|
|
163
167
|
export { parseMessageButtons };
|
|
164
168
|
export { ArrowIcon };
|
|
@@ -224,7 +224,6 @@ import { normalizeChatAttachments } from '../utils/chat/chatAttachments/normaliz
|
|
|
224
224
|
import { resolveChatAttachmentContents } from '../utils/chat/chatAttachments/resolveChatAttachmentContents';
|
|
225
225
|
import { aboutPromptbookInformation } from '../utils/misc/aboutPromptbookInformation';
|
|
226
226
|
import { $generateBookBoilerplate } from '../utils/random/$generateBookBoilerplate';
|
|
227
|
-
import { CORE_AGENTS_SERVER } from '../../servers';
|
|
228
227
|
import { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES } from '../../servers';
|
|
229
228
|
import { PUBLIC_AGENTS_SERVERS } from '../../servers';
|
|
230
229
|
|
|
@@ -456,6 +455,5 @@ export { normalizeChatAttachments };
|
|
|
456
455
|
export { resolveChatAttachmentContents };
|
|
457
456
|
export { aboutPromptbookInformation };
|
|
458
457
|
export { $generateBookBoilerplate };
|
|
459
|
-
export { CORE_AGENTS_SERVER };
|
|
460
458
|
export { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES };
|
|
461
459
|
export { PUBLIC_AGENTS_SERVERS };
|
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
// `@promptbook/node`
|
|
3
3
|
|
|
4
4
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
5
|
+
import { AGENT_BOOK_FILE_PATH } from '../book-3.0/agentFolderPaths';
|
|
6
|
+
import { AGENT_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
7
|
+
import { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
8
|
+
import { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
9
|
+
import { AGENT_FAILED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
10
|
+
import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
|
|
11
|
+
import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
|
|
12
|
+
import type { CliAgentHarness } from '../book-3.0/CliAgent';
|
|
13
|
+
import type { CliAgentThinkingLevel } from '../book-3.0/CliAgent';
|
|
14
|
+
import type { CliAgentRunOptions } from '../book-3.0/CliAgent';
|
|
15
|
+
import type { CliAgentOptions } from '../book-3.0/CliAgent';
|
|
16
|
+
import { CliAgent } from '../book-3.0/CliAgent';
|
|
17
|
+
import { CLI_AGENT_HARNESS_NAMES } from '../book-3.0/cliAgentEnv';
|
|
18
|
+
import { CLI_AGENT_THINKING_LEVEL_VALUES } from '../book-3.0/cliAgentEnv';
|
|
19
|
+
import { PTBK_HARNESS_ENV } from '../book-3.0/cliAgentEnv';
|
|
20
|
+
import { PTBK_MODEL_ENV } from '../book-3.0/cliAgentEnv';
|
|
21
|
+
import { PTBK_THINKING_LEVEL_ENV } from '../book-3.0/cliAgentEnv';
|
|
22
|
+
import type { LiteAgentOptions } from '../book-3.0/LiteAgent';
|
|
23
|
+
import type { LiteAgentRunOptions } from '../book-3.0/LiteAgent';
|
|
24
|
+
import { LiteAgent } from '../book-3.0/LiteAgent';
|
|
5
25
|
import { createPipelineCollectionFromDirectory } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory';
|
|
6
26
|
import { getAllCommitmentsToolFunctionsForNode } from '../commitments/_common/getAllCommitmentsToolFunctionsForNode';
|
|
7
27
|
import { $provideExecutablesForNode } from '../executables/$provideExecutablesForNode';
|
|
@@ -21,6 +41,26 @@ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
|
21
41
|
|
|
22
42
|
|
|
23
43
|
// Note: Entities of the `@promptbook/node`
|
|
44
|
+
export { AGENT_BOOK_FILE_PATH };
|
|
45
|
+
export { AGENT_MESSAGES_DIRECTORY_PATH };
|
|
46
|
+
export { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH };
|
|
47
|
+
export { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH };
|
|
48
|
+
export { AGENT_FAILED_MESSAGES_DIRECTORY_PATH };
|
|
49
|
+
export type { BookNodeAgentSource };
|
|
50
|
+
export type { BookNodeAgentSourceOptions };
|
|
51
|
+
export type { CliAgentHarness };
|
|
52
|
+
export type { CliAgentThinkingLevel };
|
|
53
|
+
export type { CliAgentRunOptions };
|
|
54
|
+
export type { CliAgentOptions };
|
|
55
|
+
export { CliAgent };
|
|
56
|
+
export { CLI_AGENT_HARNESS_NAMES };
|
|
57
|
+
export { CLI_AGENT_THINKING_LEVEL_VALUES };
|
|
58
|
+
export { PTBK_HARNESS_ENV };
|
|
59
|
+
export { PTBK_MODEL_ENV };
|
|
60
|
+
export { PTBK_THINKING_LEVEL_ENV };
|
|
61
|
+
export type { LiteAgentOptions };
|
|
62
|
+
export type { LiteAgentRunOptions };
|
|
63
|
+
export { LiteAgent };
|
|
24
64
|
export { createPipelineCollectionFromDirectory };
|
|
25
65
|
export { getAllCommitmentsToolFunctionsForNode };
|
|
26
66
|
export { $provideExecutablesForNode };
|
|
@@ -7,6 +7,14 @@ import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicI
|
|
|
7
7
|
import type { AgentModelRequirements } from '../book-2.0/agent-source/AgentModelRequirements';
|
|
8
8
|
import type { CreateAgentModelRequirementsOptions } from '../book-2.0/agent-source/CreateAgentModelRequirementsOptions';
|
|
9
9
|
import type { string_book } from '../book-2.0/agent-source/string_book';
|
|
10
|
+
import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
|
|
11
|
+
import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
|
|
12
|
+
import type { CliAgentHarness } from '../book-3.0/CliAgent';
|
|
13
|
+
import type { CliAgentThinkingLevel } from '../book-3.0/CliAgent';
|
|
14
|
+
import type { CliAgentRunOptions } from '../book-3.0/CliAgent';
|
|
15
|
+
import type { CliAgentOptions } from '../book-3.0/CliAgent';
|
|
16
|
+
import type { LiteAgentOptions } from '../book-3.0/LiteAgent';
|
|
17
|
+
import type { LiteAgentRunOptions } from '../book-3.0/LiteAgent';
|
|
10
18
|
import type { AvatarChipProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChip';
|
|
11
19
|
import type { AvatarChipFromSourceProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChipFromSource';
|
|
12
20
|
import type { AvatarProfileProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
|
|
@@ -50,6 +58,7 @@ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage
|
|
|
50
58
|
import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
|
|
51
59
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
52
60
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
61
|
+
import type { CitationLabelResolver } from '../book-components/Chat/types/CitationLabelResolver';
|
|
53
62
|
import type { ParsedCitation } from '../book-components/Chat/utils/parseCitationsFromContent';
|
|
54
63
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
55
64
|
import type { TeamToolResult } from '../book-components/Chat/utils/toolCallParsing/TeamToolResult';
|
|
@@ -442,6 +451,14 @@ export type { AgentBasicInformation };
|
|
|
442
451
|
export type { AgentModelRequirements };
|
|
443
452
|
export type { CreateAgentModelRequirementsOptions };
|
|
444
453
|
export type { string_book };
|
|
454
|
+
export type { BookNodeAgentSource };
|
|
455
|
+
export type { BookNodeAgentSourceOptions };
|
|
456
|
+
export type { CliAgentHarness };
|
|
457
|
+
export type { CliAgentThinkingLevel };
|
|
458
|
+
export type { CliAgentRunOptions };
|
|
459
|
+
export type { CliAgentOptions };
|
|
460
|
+
export type { LiteAgentOptions };
|
|
461
|
+
export type { LiteAgentRunOptions };
|
|
445
462
|
export type { AvatarChipProps };
|
|
446
463
|
export type { AvatarChipFromSourceProps };
|
|
447
464
|
export type { AvatarProfileProps };
|
|
@@ -485,6 +502,7 @@ export type { ChatProgressCard };
|
|
|
485
502
|
export type { ChatMessageReplyingTo };
|
|
486
503
|
export type { ChatMessage };
|
|
487
504
|
export type { ChatParticipant };
|
|
505
|
+
export type { CitationLabelResolver };
|
|
488
506
|
export type { ParsedCitation };
|
|
489
507
|
export type { MessageButton };
|
|
490
508
|
export type { TeamToolResult };
|
|
@@ -7,6 +7,48 @@
|
|
|
7
7
|
*/
|
|
8
8
|
type AvatarAnimationListener = (now: number) => void;
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* One scheduled avatar animation entry tracked by the shared loop.
|
|
12
|
+
*
|
|
13
|
+
* @private utility of the avatar rendering system
|
|
14
|
+
*/
|
|
15
|
+
type AvatarAnimationListenerEntry = {
|
|
16
|
+
readonly listener: AvatarAnimationListener;
|
|
17
|
+
lastRunAtMs: number;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Target frames per second for a single animated avatar.
|
|
22
|
+
*
|
|
23
|
+
* Animated octopus visuals change slowly enough that ~24 fps per avatar is indistinguishable
|
|
24
|
+
* from 60 fps in practice. Combined with `MAX_AVATAR_LISTENERS_PER_FRAME` this bounds total
|
|
25
|
+
* rendering work even when many avatars are visible.
|
|
26
|
+
*
|
|
27
|
+
* @private utility of the avatar rendering system
|
|
28
|
+
*/
|
|
29
|
+
const AVATAR_TARGET_FPS = 24;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Minimum elapsed time in milliseconds required between two consecutive renders of the same avatar.
|
|
33
|
+
*
|
|
34
|
+
* @private utility of the avatar rendering system
|
|
35
|
+
*/
|
|
36
|
+
const AVATAR_TARGET_FRAME_INTERVAL_MS = 1000 / AVATAR_TARGET_FPS;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Hard cap on how many avatar listeners can run inside the same animation frame.
|
|
40
|
+
*
|
|
41
|
+
* The default visual takes several milliseconds to render, so firing every visible avatar
|
|
42
|
+
* on the same animation frame stalls the main thread for tens of milliseconds and drops the
|
|
43
|
+
* overall page FPS to single digits. Bounding the number of listeners that fire per frame
|
|
44
|
+
* spreads the work across animation frames and keeps the UI responsive even with many
|
|
45
|
+
* visible avatars — each individual avatar still reaches `AVATAR_TARGET_FPS` because work
|
|
46
|
+
* is interleaved instead of skipped.
|
|
47
|
+
*
|
|
48
|
+
* @private utility of the avatar rendering system
|
|
49
|
+
*/
|
|
50
|
+
const MAX_AVATAR_LISTENERS_PER_FRAME = 2;
|
|
51
|
+
|
|
10
52
|
/**
|
|
11
53
|
* Next registration id used by the shared avatar animation scheduler.
|
|
12
54
|
*
|
|
@@ -19,7 +61,7 @@ let nextAvatarAnimationListenerId = 1;
|
|
|
19
61
|
*
|
|
20
62
|
* @private utility of the avatar rendering system
|
|
21
63
|
*/
|
|
22
|
-
const avatarAnimationListeners = new Map<number,
|
|
64
|
+
const avatarAnimationListeners = new Map<number, AvatarAnimationListenerEntry>();
|
|
23
65
|
|
|
24
66
|
/**
|
|
25
67
|
* Active shared animation-frame handle.
|
|
@@ -31,6 +73,10 @@ let avatarAnimationFrameId: number | null = null;
|
|
|
31
73
|
/**
|
|
32
74
|
* Registers one avatar animation callback in the shared animation loop.
|
|
33
75
|
*
|
|
76
|
+
* Each listener is staggered at registration time so it does not fire on the same animation
|
|
77
|
+
* frame as the existing listeners, and the shared loop further caps how many listeners run
|
|
78
|
+
* per frame, keeping the main thread responsive when many avatars are mounted.
|
|
79
|
+
*
|
|
34
80
|
* @param avatarAnimationListener Frame callback invoked on every animation frame.
|
|
35
81
|
* @returns Cleanup function that unregisters the callback.
|
|
36
82
|
*
|
|
@@ -42,7 +88,15 @@ export function retainAvatarAnimationListener(avatarAnimationListener: AvatarAni
|
|
|
42
88
|
}
|
|
43
89
|
|
|
44
90
|
const listenerId = nextAvatarAnimationListenerId++;
|
|
45
|
-
avatarAnimationListeners.
|
|
91
|
+
const existingListenerCount = avatarAnimationListeners.size;
|
|
92
|
+
const staggerOffsetMs =
|
|
93
|
+
((existingListenerCount % Math.max(1, MAX_AVATAR_LISTENERS_PER_FRAME)) * AVATAR_TARGET_FRAME_INTERVAL_MS) /
|
|
94
|
+
Math.max(1, MAX_AVATAR_LISTENERS_PER_FRAME);
|
|
95
|
+
avatarAnimationListeners.set(listenerId, {
|
|
96
|
+
listener: avatarAnimationListener,
|
|
97
|
+
// Phase the listener so multiple new listeners do not synchronize on the same frame.
|
|
98
|
+
lastRunAtMs: performance.now() - AVATAR_TARGET_FRAME_INTERVAL_MS + staggerOffsetMs,
|
|
99
|
+
});
|
|
46
100
|
ensureAvatarAnimationLoop();
|
|
47
101
|
|
|
48
102
|
return () => {
|
|
@@ -68,8 +122,26 @@ function ensureAvatarAnimationLoop(): void {
|
|
|
68
122
|
const runFrame = (now: number) => {
|
|
69
123
|
avatarAnimationFrameId = null;
|
|
70
124
|
|
|
71
|
-
|
|
72
|
-
|
|
125
|
+
const dueListenerEntries: Array<AvatarAnimationListenerEntry> = [];
|
|
126
|
+
|
|
127
|
+
for (const listenerEntry of avatarAnimationListeners.values()) {
|
|
128
|
+
if (now - listenerEntry.lastRunAtMs >= AVATAR_TARGET_FRAME_INTERVAL_MS) {
|
|
129
|
+
dueListenerEntries.push(listenerEntry);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Run the most stale listeners first so each avatar keeps its target FPS even when
|
|
134
|
+
// total work exceeds the per-frame budget.
|
|
135
|
+
dueListenerEntries.sort(
|
|
136
|
+
(firstListenerEntry, secondListenerEntry) => firstListenerEntry.lastRunAtMs - secondListenerEntry.lastRunAtMs,
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
const listenersToRunCount = Math.min(dueListenerEntries.length, MAX_AVATAR_LISTENERS_PER_FRAME);
|
|
140
|
+
|
|
141
|
+
for (let listenerIndex = 0; listenerIndex < listenersToRunCount; listenerIndex++) {
|
|
142
|
+
const listenerEntry = dueListenerEntries[listenerIndex]!;
|
|
143
|
+
listenerEntry.lastRunAtMs = now;
|
|
144
|
+
listenerEntry.listener(now);
|
|
73
145
|
}
|
|
74
146
|
|
|
75
147
|
ensureAvatarAnimationLoop();
|
|
@@ -7,6 +7,8 @@ import { octopus2AvatarVisual } from './octopus2AvatarVisual';
|
|
|
7
7
|
import { octopus3AvatarVisual } from './octopus3AvatarVisual';
|
|
8
8
|
import { octopus3dAvatarVisual } from './octopus3dAvatarVisual';
|
|
9
9
|
import { octopus3d2AvatarVisual } from './octopus3d2AvatarVisual';
|
|
10
|
+
import { octopus3d3AvatarVisual } from './octopus3d3AvatarVisual';
|
|
11
|
+
import { octopus3d4AvatarVisual } from './octopus3d4AvatarVisual';
|
|
10
12
|
import { octopusAvatarVisual } from './octopusAvatarVisual';
|
|
11
13
|
import { orbAvatarVisual } from './orbAvatarVisual';
|
|
12
14
|
import { pixelArtAvatarVisual } from './pixelArtAvatarVisual';
|
|
@@ -25,6 +27,8 @@ export const AVATAR_VISUALS: ReadonlyArray<AvatarVisualDefinition> = [
|
|
|
25
27
|
octopus3AvatarVisual,
|
|
26
28
|
octopus3dAvatarVisual,
|
|
27
29
|
octopus3d2AvatarVisual,
|
|
30
|
+
octopus3d3AvatarVisual,
|
|
31
|
+
octopus3d4AvatarVisual,
|
|
28
32
|
asciiOctopusAvatarVisual,
|
|
29
33
|
minecraftAvatarVisual,
|
|
30
34
|
minecraft2AvatarVisual,
|
|
@@ -290,7 +290,7 @@ function drawDragonCurveLayer(
|
|
|
290
290
|
layerIndex: number;
|
|
291
291
|
},
|
|
292
292
|
): void {
|
|
293
|
-
const {
|
|
293
|
+
const { primaryColor, secondaryColor, tertiaryColor, shadowColor, strokeWidth, timeMs, layerIndex } = options;
|
|
294
294
|
const firstPoint = points[0]!;
|
|
295
295
|
const lastPoint = points[points.length - 1]!;
|
|
296
296
|
const ribbonGradient = context.createLinearGradient(firstPoint.x, firstPoint.y, lastPoint.x, lastPoint.y);
|
|
@@ -298,14 +298,15 @@ function drawDragonCurveLayer(
|
|
|
298
298
|
ribbonGradient.addColorStop(0.5, `${secondaryColor}e6`);
|
|
299
299
|
ribbonGradient.addColorStop(1, `${tertiaryColor}f2`);
|
|
300
300
|
|
|
301
|
+
// Approximate the blurred shadow stroke with a wider semi-transparent stroke instead of
|
|
302
|
+
// context.filter blur, which triggers a costly software rasterization pass every frame.
|
|
301
303
|
context.save();
|
|
302
304
|
context.beginPath();
|
|
303
305
|
tracePolyline(context, points);
|
|
304
|
-
context.strokeStyle = `${shadowColor}
|
|
305
|
-
context.lineWidth = strokeWidth *
|
|
306
|
+
context.strokeStyle = `${shadowColor}48`;
|
|
307
|
+
context.lineWidth = strokeWidth * 4.5;
|
|
306
308
|
context.lineJoin = 'round';
|
|
307
309
|
context.lineCap = 'round';
|
|
308
|
-
context.filter = `blur(${size * 0.022}px)`;
|
|
309
310
|
context.stroke();
|
|
310
311
|
context.restore();
|
|
311
312
|
|
|
@@ -218,19 +218,24 @@ function drawMinecraftShadow(
|
|
|
218
218
|
},
|
|
219
219
|
timeMs: number,
|
|
220
220
|
): void {
|
|
221
|
+
const cx = size * 0.5 + interaction.gazeX * size * 0.03;
|
|
222
|
+
const cy = size * 0.85 + Math.sin(timeMs / 880) * size * 0.01;
|
|
223
|
+
const rx = size * (0.16 + interaction.intensity * 0.015);
|
|
224
|
+
const ry = size * 0.055;
|
|
225
|
+
|
|
226
|
+
// Radial gradient approximates the blurry ellipse shadow without context.filter blur.
|
|
221
227
|
context.save();
|
|
222
|
-
context.
|
|
223
|
-
context.
|
|
228
|
+
context.translate(cx, cy);
|
|
229
|
+
context.scale(1, ry / rx);
|
|
230
|
+
const blurRadius = rx * 1.4;
|
|
231
|
+
const shadowGradient = context.createRadialGradient(0, 0, 0, 0, 0, blurRadius);
|
|
232
|
+
shadowGradient.addColorStop(0, `${palette.shadow}7a`);
|
|
233
|
+
shadowGradient.addColorStop(0.45, `${palette.shadow}44`);
|
|
234
|
+
shadowGradient.addColorStop(0.8, `${palette.shadow}1a`);
|
|
235
|
+
shadowGradient.addColorStop(1, `${palette.shadow}00`);
|
|
236
|
+
context.fillStyle = shadowGradient;
|
|
224
237
|
context.beginPath();
|
|
225
|
-
context.
|
|
226
|
-
size * 0.5 + interaction.gazeX * size * 0.03,
|
|
227
|
-
size * 0.85 + Math.sin(timeMs / 880) * size * 0.01,
|
|
228
|
-
size * (0.16 + interaction.intensity * 0.015),
|
|
229
|
-
size * 0.055,
|
|
230
|
-
0,
|
|
231
|
-
0,
|
|
232
|
-
Math.PI * 2,
|
|
233
|
-
);
|
|
238
|
+
context.arc(0, 0, blurRadius, 0, Math.PI * 2);
|
|
234
239
|
context.fill();
|
|
235
240
|
context.restore();
|
|
236
241
|
}
|
|
@@ -45,13 +45,27 @@ export const minecraftAvatarVisual: AvatarVisualDefinition = {
|
|
|
45
45
|
context.fillStyle = spotlight;
|
|
46
46
|
context.fillRect(0, 0, size, size);
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
{
|
|
49
|
+
// Radial gradient approximates the blurry ellipse shadow without context.filter blur.
|
|
50
|
+
const cx = size * 0.5;
|
|
51
|
+
const cy = size * 0.86;
|
|
52
|
+
const rx = size * 0.2;
|
|
53
|
+
const ry = size * 0.06;
|
|
54
|
+
const blurRadius = rx * 1.4;
|
|
55
|
+
const shadowGradient = context.createRadialGradient(0, 0, 0, 0, 0, blurRadius);
|
|
56
|
+
shadowGradient.addColorStop(0, 'rgba(0,0,0,0.28)');
|
|
57
|
+
shadowGradient.addColorStop(0.45, 'rgba(0,0,0,0.14)');
|
|
58
|
+
shadowGradient.addColorStop(0.8, 'rgba(0,0,0,0.05)');
|
|
59
|
+
shadowGradient.addColorStop(1, 'rgba(0,0,0,0)');
|
|
60
|
+
context.save();
|
|
61
|
+
context.translate(cx, cy);
|
|
62
|
+
context.scale(1, ry / rx);
|
|
63
|
+
context.fillStyle = shadowGradient;
|
|
64
|
+
context.beginPath();
|
|
65
|
+
context.arc(0, 0, blurRadius, 0, Math.PI * 2);
|
|
66
|
+
context.fill();
|
|
67
|
+
context.restore();
|
|
68
|
+
}
|
|
55
69
|
|
|
56
70
|
drawVoxelCuboid(context, {
|
|
57
71
|
x: bodyX,
|