@promptbook/cli 0.113.0-8 → 0.114.0-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 +4 -3
- package/apps/agents-server/next.config.ts +8 -3
- package/apps/agents-server/package.json +3 -3
- package/apps/agents-server/playwright.config.ts +7 -2
- package/apps/agents-server/scripts/clearNextGeneratedTypes.js +25 -0
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/CloudflareDnsRecordSyncPlan.ts +10 -80
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/createCloudflareDnsRecordSyncPlan.ts +1 -1
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/describeCloudflareDnsRecordUpdateReasons.ts +1 -1
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/resolveDesiredCloudflareDnsRecord.ts +1 -1
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/resolveDesiredCloudflareDnsRecords.ts +1 -29
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/selectCloudflareRecordForManagedDomain.ts +1 -1
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/syncCloudflareDnsRecords.ts +4 -4
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/updateManagedCloudflareDnsRecord.ts +26 -0
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan.ts +1 -1
- package/apps/agents-server/scripts/next-cli.js +16 -0
- package/apps/agents-server/src/app/admin/_components/AdminConfigurationShell.tsx +10 -34
- package/apps/agents-server/src/app/admin/_components/AdminRouteTabs.tsx +72 -0
- package/apps/agents-server/src/app/admin/_components/AdminSortableTableHeaderCell.tsx +80 -0
- package/apps/agents-server/src/app/admin/_components/AdminStorageTabs.tsx +47 -0
- package/apps/agents-server/src/app/admin/_components/S3BrowserPanel.tsx +292 -0
- package/apps/agents-server/src/app/admin/_components/adminTableSorting.ts +266 -0
- package/apps/agents-server/src/app/admin/api-tokens/ApiTokensClient.tsx +57 -7
- package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackClient.tsx +1 -1
- package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackTable.tsx +23 -22
- package/apps/agents-server/src/app/admin/chat-feedback/useChatFeedbackState.ts +13 -11
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryChatView.tsx +134 -0
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryClient.tsx +52 -26
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryFiltersCard.tsx +53 -1
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryTable.tsx +88 -69
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryThreadList.tsx +67 -0
- package/apps/agents-server/src/app/admin/chat-history/page.tsx +17 -2
- package/apps/agents-server/src/app/admin/chat-history/useChatHistoryState.ts +232 -39
- package/apps/agents-server/src/app/admin/core-agents/page.tsx +143 -0
- package/apps/agents-server/src/app/admin/email-server/actions.ts +33 -0
- package/apps/agents-server/src/app/admin/email-server/page.tsx +160 -0
- package/apps/agents-server/src/app/admin/files/FilesGalleryClient.tsx +23 -4
- package/apps/agents-server/src/app/admin/files/FilesGalleryGrid.tsx +126 -58
- package/apps/agents-server/src/app/admin/files/FilesGalleryStatusBadge.tsx +1 -1
- package/apps/agents-server/src/app/admin/files/FilesGalleryTable.tsx +125 -60
- package/apps/agents-server/src/app/admin/files/actions.ts +84 -34
- package/apps/agents-server/src/app/admin/files/filesGalleryLinks.ts +31 -0
- package/apps/agents-server/src/app/admin/files/filesGalleryRows.ts +119 -0
- package/apps/agents-server/src/app/admin/files/filesGalleryTypes.ts +43 -0
- package/apps/agents-server/src/app/admin/files/page.tsx +13 -2
- package/apps/agents-server/src/app/admin/files/useFilesGalleryState.ts +58 -16
- package/apps/agents-server/src/app/admin/images/ImagesGalleryClient.tsx +3 -0
- package/apps/agents-server/src/app/admin/images/ImagesGalleryTable.tsx +56 -6
- package/apps/agents-server/src/app/admin/images/actions.ts +18 -2
- package/apps/agents-server/src/app/admin/images/useImagesGalleryState.ts +57 -16
- package/apps/agents-server/src/app/admin/internal-s3/page.tsx +369 -0
- package/apps/agents-server/src/app/admin/login-methods/shibboleth/ShibbolethSortableTables.tsx +361 -0
- package/apps/agents-server/src/app/admin/login-methods/shibboleth/page.tsx +7 -108
- package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +69 -5
- package/apps/agents-server/src/app/admin/metadata/MetadataClient.tsx +77 -9
- package/apps/agents-server/src/app/admin/projects/actions.ts +158 -0
- package/apps/agents-server/src/app/admin/projects/agentProjectCustomDomainForm.ts +4 -0
- package/apps/agents-server/src/app/admin/projects/page.tsx +502 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +47 -10
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerScopeTabs.tsx +74 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskLogActions.tsx +150 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +124 -256
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskTargetLink.tsx +57 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskTerminalDialog.tsx +127 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTasksCard.tsx +120 -11
- package/apps/agents-server/src/app/admin/task-manager/[taskId]/TaskManagerTaskDetailClient.tsx +312 -0
- package/apps/agents-server/src/app/admin/task-manager/[taskId]/page.tsx +34 -0
- package/apps/agents-server/src/app/admin/task-manager/adminChatTaskActionDialogs.ts +232 -0
- package/apps/agents-server/src/app/admin/task-manager/page.tsx +3 -2
- package/apps/agents-server/src/app/admin/task-manager/taskManagerTaskPresentation.tsx +275 -0
- package/apps/agents-server/src/app/admin/task-manager/useTaskManagerState.ts +111 -114
- package/apps/agents-server/src/app/admin/task-manager-vps/page.tsx +8 -0
- package/apps/agents-server/src/app/admin/usage/UsageClientAnalyticsPanels.tsx +123 -8
- package/apps/agents-server/src/app/admin/users/[userId]/UserActivityTable.tsx +134 -0
- package/apps/agents-server/src/app/admin/users/[userId]/UserDetailClient.tsx +3 -8
- package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +35 -4
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +17 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileWrapper.tsx +7 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/book/download/route.ts +71 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/messages/route.ts +8 -4
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/route.ts +10 -5
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/resolveUserChatScope.ts +11 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/route.ts +9 -2
- package/apps/agents-server/src/app/agents/[agentName]/book+chat/page.tsx +18 -5
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryClient.tsx +32 -1
- package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatPanel.tsx +23 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +48 -6
- package/apps/agents-server/src/app/agents/[agentName]/chat/ExternalUserChatAdminActions.tsx +125 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +49 -9
- package/apps/agents-server/src/app/agents/[agentName]/chat/resolveAgentChatDisplayName.ts +27 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatHistoryClientState.ts +12 -1
- package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatHistoryOptimisticState.ts +1 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/useCanonicalAgentChatPanelState.ts +4 -10
- package/apps/agents-server/src/app/agents/[agentName]/layout.tsx +9 -1
- package/apps/agents-server/src/app/agents/[agentName]/page.tsx +69 -5
- package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/AgentProjectVscodeKeyboardShortcut.tsx +75 -0
- package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/actions.ts +77 -0
- package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/files/[...filePath]/route.ts +86 -0
- package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/page.tsx +795 -0
- package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/vscode/route.ts +76 -0
- package/apps/agents-server/src/app/agents/[agentName]/projects/page.tsx +91 -0
- package/apps/agents-server/src/app/api/admin/chat-tasks/[taskId]/cancel/route.ts +19 -77
- package/apps/agents-server/src/app/api/admin/chat-tasks/[taskId]/retry/route.ts +22 -4
- package/apps/agents-server/src/app/api/admin/chat-tasks/[taskId]/route.ts +31 -0
- package/apps/agents-server/src/app/api/admin/chat-tasks/[taskId]/terminal/route.ts +61 -0
- package/apps/agents-server/src/app/api/admin/chat-tasks/cancel-all/route.ts +45 -0
- package/apps/agents-server/src/app/api/admin/default-agents/reinstate/route.ts +62 -0
- package/apps/agents-server/src/app/api/admin/dns-records/cloudflare/route.ts +116 -0
- package/apps/agents-server/src/app/api/admin/{code-runners → harness-auth}/authentication/route.ts +17 -17
- package/apps/agents-server/src/app/api/admin/{code-runners → harness-auth}/route.ts +15 -13
- package/apps/agents-server/src/app/api/admin/servers/[serverId]/route.ts +54 -48
- package/apps/agents-server/src/app/api/admin/servers/route.ts +197 -25
- package/apps/agents-server/src/app/api/admin/update/route.ts +55 -8
- package/apps/agents-server/src/app/api/admin/update/versions/route.ts +34 -0
- package/apps/agents-server/src/app/api/admin/vps/chat-tasks/cancel-all/route.ts +37 -0
- package/apps/agents-server/src/app/api/admin/vps/chat-tasks/route.ts +26 -0
- package/apps/agents-server/src/app/api/agent-project-runtime-auth/route.ts +32 -0
- package/apps/agents-server/src/app/api/agent-project-vscode-auth/[sessionId]/route.ts +54 -0
- package/apps/agents-server/src/app/api/auth/shibboleth/acs/route.ts +4 -2
- package/apps/agents-server/src/app/api/auth/shibboleth/login/route.ts +3 -1
- package/apps/agents-server/src/app/api/auth/shibboleth/metadata/route.ts +5 -2
- package/apps/agents-server/src/app/api/auth/shibboleth/status/route.ts +5 -2
- package/apps/agents-server/src/app/api/chat-history/export/route.ts +13 -0
- package/apps/agents-server/src/app/api/chat-history/route.ts +16 -14
- package/apps/agents-server/src/app/api/chat-history/threads/route.ts +68 -0
- package/apps/agents-server/src/app/api/docs/book-language.md/route.ts +11 -3
- package/apps/agents-server/src/app/api/docs/book-language.pdf/route.ts +29 -0
- package/apps/agents-server/src/app/api/docs/book.md/route.ts +11 -3
- package/apps/agents-server/src/app/api/emails/incoming/stalwart/route.ts +85 -0
- package/apps/agents-server/src/app/api/internal/agent-project-runtimes/route.ts +178 -0
- package/apps/agents-server/src/app/api/internal/user-chat-jobs/run/route.ts +7 -18
- package/apps/agents-server/src/app/api/messages/route.ts +24 -2
- package/apps/agents-server/src/app/api/onboarding/book/route.ts +22 -0
- package/apps/agents-server/src/app/api/onboarding/draft/route.ts +23 -0
- package/apps/agents-server/src/app/api/onboarding/evaluate/route.ts +25 -0
- package/apps/agents-server/src/app/api/onboarding/test/route.ts +29 -0
- package/apps/agents-server/src/app/api/page-preview/input/route.ts +22 -133
- package/apps/agents-server/src/app/api/page-preview/state/route.ts +46 -0
- package/apps/agents-server/src/app/api/page-preview/stream/route.ts +24 -0
- package/apps/agents-server/src/app/docs/[docId]/page.tsx +8 -8
- package/apps/agents-server/src/app/docs/page.tsx +7 -3
- package/apps/agents-server/src/app/globals.css +0 -59
- package/apps/agents-server/src/app/layout.tsx +205 -27
- package/apps/agents-server/src/app/page.tsx +23 -1
- package/apps/agents-server/src/app/superadmin/email-server/actions.ts +28 -0
- package/apps/agents-server/src/app/superadmin/email-server/page.tsx +127 -0
- package/apps/agents-server/src/app/superadmin/environment/EnvironmentVariablesClient.tsx +498 -0
- package/apps/agents-server/src/app/{admin → superadmin}/environment/page.tsx +1 -1
- package/apps/agents-server/src/app/{admin/code-runners/CodeRunnersClient.tsx → superadmin/harness-auth/HarnessAuthClient.tsx} +107 -66
- package/apps/agents-server/src/app/superadmin/harness-auth/OpenAiCodexAuthWizard.tsx +208 -0
- package/apps/agents-server/src/app/{admin/code-runners → superadmin/harness-auth}/page.tsx +4 -4
- package/apps/agents-server/src/app/superadmin/internal-s3/page.tsx +53 -0
- package/apps/agents-server/src/app/superadmin/loading.tsx +14 -0
- package/apps/agents-server/src/app/superadmin/resource-monitor/ResourceMonitorSortableTables.tsx +539 -0
- package/apps/agents-server/src/app/superadmin/resource-monitor/actions.ts +25 -0
- package/apps/agents-server/src/app/superadmin/resource-monitor/page.tsx +444 -0
- package/apps/agents-server/src/app/superadmin/resource-monitor/resourceMonitorDisplay.ts +13 -0
- package/apps/agents-server/src/app/{admin → superadmin}/servers/ServersClient.tsx +12 -4
- package/apps/agents-server/src/app/{admin → superadmin}/servers/ServersRegistryApi.ts +1 -1
- package/apps/agents-server/src/app/{admin → superadmin}/servers/ServersRegistryDnsTypes.ts +24 -32
- package/apps/agents-server/src/app/{admin → superadmin}/servers/ServersRegistryTable.tsx +291 -89
- package/apps/agents-server/src/app/{admin → superadmin}/servers/useCreateServerWizard.ts +2 -2
- package/apps/agents-server/src/app/{admin → superadmin}/servers/useServersRegistryState.ts +68 -3
- package/apps/agents-server/src/app/superadmin/task-manager/page.tsx +14 -0
- package/apps/agents-server/src/app/{admin → superadmin}/update/AdvancedOriginRepositoryPanel.tsx +14 -9
- package/apps/agents-server/src/app/superadmin/update/AutomaticSelfUpdateConfigurationCard.tsx +90 -0
- package/apps/agents-server/src/app/{admin → superadmin}/update/CurrentDeploymentCard.tsx +15 -13
- package/apps/agents-server/src/app/{admin → superadmin}/update/CustomCommitPicker.tsx +10 -10
- package/apps/agents-server/src/app/superadmin/update/InstalledVersionsCard.tsx +112 -0
- package/apps/agents-server/src/app/{admin → superadmin}/update/PendingCommitsCard.tsx +9 -8
- package/apps/agents-server/src/app/{admin → superadmin}/update/TargetEnvironmentCard.tsx +14 -14
- package/apps/agents-server/src/app/{admin → superadmin}/update/UpdateClient.tsx +18 -8
- package/apps/agents-server/src/app/superadmin/update/UpdateDatabaseMigrationsPanel.tsx +305 -0
- package/apps/agents-server/src/app/{admin → superadmin}/update/UpdateJobCard.tsx +45 -10
- package/apps/agents-server/src/app/{admin → superadmin}/update/UpdateOverview.ts +68 -0
- package/apps/agents-server/src/app/superadmin/update/updatePageCardClassName.ts +6 -0
- package/apps/agents-server/src/app/{admin → superadmin}/update/useUpdateClientState.ts +241 -7
- package/apps/agents-server/src/app/system/user-wallet/UserWalletClient.tsx +5 -1
- package/apps/agents-server/src/app/system/user-wallet/UserWalletDraft.ts +9 -1
- package/apps/agents-server/src/app/system/user-wallet/UserWalletRecordFormFields.tsx +13 -0
- package/apps/agents-server/src/app/system/user-wallet/UserWalletRecordValue.tsx +12 -0
- package/apps/agents-server/src/app/system/user-wallet/page.tsx +4 -1
- package/apps/agents-server/src/components/AdminTerminal/AdminTerminalCard.tsx +32 -24
- package/apps/agents-server/src/components/AdminTerminal/useAdminTerminalSession.ts +22 -1
- package/apps/agents-server/src/components/AgentAvatar/AgentAvatar.tsx +1 -1
- package/apps/agents-server/src/components/AgentAvatar/DefaultAgentAvatarVisualProvider.tsx +1 -1
- package/apps/agents-server/src/components/AgentContextMenu/AgentContextMenu.tsx +4 -0
- package/apps/agents-server/src/components/AgentContextMenu/useAgentContextMenuActions.ts +31 -0
- package/apps/agents-server/src/components/AgentContextMenu/useAgentContextMenuItems.ts +28 -0
- package/apps/agents-server/src/components/AgentNaming/legacyAgentTextTranslations.cs.yaml +7 -0
- package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +182 -0
- package/apps/agents-server/src/components/AgentProjects/AgentProjectDnsWarning.tsx +24 -0
- package/apps/agents-server/src/components/AgentProjects/AgentProjectItem.tsx +190 -0
- package/apps/agents-server/src/components/AgentProjects/AgentProjectReferencesList.tsx +73 -0
- package/apps/agents-server/src/components/AgentProjects/AgentProjectRuntimeStatusBadge.tsx +37 -0
- package/apps/agents-server/src/components/AgentProjects/AgentProjectsBoard.tsx +61 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsApiTokenImportStep.tsx +137 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsCheckStep.tsx +28 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsExcludedRecordsNote.tsx +37 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsManualStep.tsx +75 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsWizard.tsx +88 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsWizardStepNavigation.tsx +53 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsWizardSteps.ts +36 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsZoneFileImportStep.tsx +109 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/useCloudflareDnsRecordImport.ts +71 -0
- package/apps/agents-server/src/components/CronJobConfiguration/CronJobConfiguration.tsx +834 -0
- package/apps/agents-server/src/components/DefaultAgents/ReinstateBundledAgentsButton.tsx +119 -0
- package/apps/agents-server/src/components/DnsProviderGuides/DnsProviderGuides.tsx +35 -0
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsInstructions.tsx +125 -0
- package/apps/agents-server/src/components/DocsToolbar/DocsToolbar.tsx +284 -25
- package/apps/agents-server/src/components/FileUploadAvailability/FileUploadUnavailableNotice.tsx +1 -1
- package/apps/agents-server/src/components/Footer/Footer.tsx +38 -15
- package/apps/agents-server/src/components/Header/ActiveAgentBreadcrumbContext.tsx +6 -1
- package/apps/agents-server/src/components/Header/Header.tsx +51 -6
- package/apps/agents-server/src/components/Header/HeaderDesktopTopMenuNavigation.tsx +22 -2
- package/apps/agents-server/src/components/Header/HeaderMobileDrawer.tsx +22 -2
- package/apps/agents-server/src/components/Header/HeaderTypes.ts +42 -1
- package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +9 -0
- package/apps/agents-server/src/components/Header/buildAgentMenuStructure.tsx +6 -4
- package/apps/agents-server/src/components/Header/buildDocumentationDropdownItems.tsx +198 -3
- package/apps/agents-server/src/components/Header/buildHeaderMenuItems.ts +9 -1
- package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +299 -41
- package/apps/agents-server/src/components/Header/createAgentViewLabel.tsx +11 -2
- package/apps/agents-server/src/components/Header/resolveActiveAgentNavigation.ts +4 -0
- package/apps/agents-server/src/components/Header/resolveHeaderSystemWarnings.ts +215 -0
- package/apps/agents-server/src/components/Header/useHeaderActiveAgent.ts +25 -3
- package/apps/agents-server/src/components/Header/useHeaderAgentMenus.tsx +5 -1
- package/apps/agents-server/src/components/Homepage/AgentsList.tsx +6 -30
- package/apps/agents-server/src/components/Homepage/AgentsListHeader.tsx +25 -111
- package/apps/agents-server/src/components/Homepage/DefaultAgentsStatusNotice.tsx +121 -0
- package/apps/agents-server/src/components/Homepage/ExternalAgentsSectionClient.tsx +5 -11
- package/apps/agents-server/src/components/Homepage/HomepagePrimarySections.tsx +1 -6
- package/apps/agents-server/src/components/Homepage/agentOrganizationUtils.ts +0 -60
- package/apps/agents-server/src/components/Homepage/normalizeServerUrl.ts +2 -2
- package/apps/agents-server/src/components/Homepage/useAgentsListDerivedState.ts +4 -66
- package/apps/agents-server/src/components/Homepage/useAgentsListNavigationState.ts +18 -29
- package/apps/agents-server/src/components/Homepage/useAgentsListOverlayDetailsState.ts +3 -3
- package/apps/agents-server/src/components/Homepage/useAgentsListQueryState.ts +2 -26
- package/apps/agents-server/src/components/Homepage/useAgentsListState.ts +10 -52
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +73 -6
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/ManGoNewAgentWizard.tsx +8 -2
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/WizardShell.tsx +125 -21
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/agentEvalService.ts +19 -15
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/agentTestService.ts +33 -37
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/bookService.ts +12 -12
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/createManGoAgentSource.ts +6 -1
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/createManGoOpenEditorRequest.ts +23 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/draftService.ts +11 -24
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/postManGoOnboardingJson.ts +104 -0
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentOpenEditorRequest.ts +19 -0
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizard.tsx +2 -11
- package/apps/agents-server/src/components/NewAgentDialog/createNewAgentWizardSubmissionActions.ts +2 -4
- package/apps/agents-server/src/components/NewAgentDialog/useNewAgentDialog.tsx +9 -7
- package/apps/agents-server/src/components/Skeleton/HomepageLoadingSkeleton.tsx +1 -18
- package/apps/agents-server/src/components/StalwartSynchronizeButton/StalwartSynchronizeButton.tsx +52 -0
- package/apps/agents-server/src/components/UsersList/CreateUserDialog.tsx +153 -0
- package/apps/agents-server/src/components/UsersList/UsersList.tsx +229 -103
- package/apps/agents-server/src/components/UsersList/generateSecurePassword.ts +50 -0
- package/apps/agents-server/src/components/UsersList/useUserActivity.ts +78 -0
- package/apps/agents-server/src/constants/defaultAgentAvatarVisual.ts +4 -3
- package/apps/agents-server/src/constants/harnessAuthRoutes.ts +20 -0
- package/apps/agents-server/src/constants/serverLimits.ts +2 -2
- package/apps/agents-server/src/constants/shibbolethAuth.ts +13 -0
- package/apps/agents-server/src/database/$provideDatabaseAdminExecutor.ts +12 -13
- package/apps/agents-server/src/database/createMissingAgentsFromBooks.ts +77 -0
- package/apps/agents-server/src/database/metadataDefaults.ts +3 -3
- package/apps/agents-server/src/database/migrate.ts +25 -1
- package/apps/agents-server/src/database/migratePrefix.ts +24 -0
- package/apps/agents-server/src/database/migrations/2026-07-1400-wallet-browser-profile-record-type.sql +16 -0
- package/apps/agents-server/src/database/migrations/2026-07-1700-chat-history-chat-task-links.sql +10 -0
- package/apps/agents-server/src/database/migrations/2026-07-2500-user-chat-email-source.sql +13 -0
- package/apps/agents-server/src/database/reinstateDefaultAgents.ts +111 -0
- package/apps/agents-server/src/database/runDatabaseMigrations.ts +9 -1
- package/apps/agents-server/src/database/schema.ts +9 -3
- package/apps/agents-server/src/database/seedCoreAgents.ts +8 -30
- package/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.ts +48 -16
- package/apps/agents-server/src/database/sqlite/$provideCurrentServerSqliteDatabase.ts +18 -0
- package/apps/agents-server/src/database/sqlite/$provideLocalSqliteSupabase.ts +15 -13
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/LocalSqliteSupabaseClient.ts +15 -3
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.ts +5 -2
- package/apps/agents-server/src/database/sqlite/resolveLocalSqliteTableLocation.ts +104 -0
- package/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.ts +72 -0
- package/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.ts +479 -0
- package/apps/agents-server/src/generated/reservedPaths.ts +1 -1
- package/apps/agents-server/src/instrumentation-node.ts +73 -0
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +51 -1
- package/apps/agents-server/src/languages/translations/czech.yaml +54 -4
- package/apps/agents-server/src/languages/translations/english.yaml +53 -3
- package/apps/agents-server/src/message-providers/email/_common/parseInboundEmail.ts +71 -0
- package/apps/agents-server/src/message-providers/email/sendgrid/parseInboundSendgridEmail.ts +2 -42
- package/apps/agents-server/src/message-providers/email/smtp/SmtpMessageProvider.ts +43 -0
- package/apps/agents-server/src/message-providers/email/stalwart/StalwartMessageProvider.ts +74 -0
- package/apps/agents-server/src/message-providers/email/stalwart/StalwartMtaHookPayload.ts +32 -0
- package/apps/agents-server/src/message-providers/email/stalwart/parseInboundStalwartEmail.ts +74 -0
- package/apps/agents-server/src/message-providers/index.ts +9 -0
- package/apps/agents-server/src/middleware.ts +2 -1
- package/apps/agents-server/src/search/createDefaultServerSearchProviders/createConversationsSearchProvider.ts +10 -3
- package/apps/agents-server/src/tools/$provideBrowserForServer.ts +4 -1
- package/apps/agents-server/src/tools/$provideServer.ts +14 -2
- package/apps/agents-server/src/tools/BrowserConnectionProvider.ts +250 -51
- package/apps/agents-server/src/tools/mapRegisteredServerContexts.ts +104 -0
- package/apps/agents-server/src/tools/runBrowserWorkflow.ts +5 -0
- package/apps/agents-server/src/tools/run_browser.ts +8 -0
- package/apps/agents-server/src/tools/serverContextOverride.ts +42 -0
- package/apps/agents-server/src/utils/adminChatTaskLinks.ts +170 -0
- package/apps/agents-server/src/utils/agentAccess.ts +1 -1
- package/apps/agents-server/src/utils/agentBook/createAgentBookDownloadFilename.ts +51 -0
- package/apps/agents-server/src/utils/agentBook/downloadAgentBook.ts +86 -0
- package/apps/agents-server/src/utils/agentBrowserProfile/$provideAgentBrowserProfile.ts +92 -0
- package/apps/agents-server/src/utils/agentBrowserProfile/$provideAgentBrowserProfileForToolArgs.ts +36 -0
- package/apps/agents-server/src/utils/agentBrowserProfile/agentBrowserProfileWalletConstants.ts +9 -0
- package/apps/agents-server/src/utils/agentBrowserProfile/findAgentBrowserProfileWalletRecord.ts +37 -0
- package/apps/agents-server/src/utils/agentBrowserProfile/resolveAgentBrowserProfileDirectory.ts +62 -0
- package/apps/agents-server/src/utils/agentIdentifier.ts +27 -4
- package/apps/agents-server/src/{components/Homepage → utils/agentOrganization}/hiddenFolders.ts +49 -29
- package/apps/agents-server/src/utils/agentOwnership.ts +3 -3
- package/apps/agents-server/src/utils/agentProjects/AgentProjectInfo.ts +153 -0
- package/apps/agents-server/src/utils/agentProjects/AgentProjectReferenceInfo.ts +19 -0
- package/apps/agents-server/src/utils/agentProjects/AgentProjectRuntimeInfo.ts +117 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectAccess.ts +71 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectCodeServerRegistry.ts +808 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectHrefs.ts +147 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeConstants.ts +49 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDisplay.ts +42 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDomains.ts +733 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePaths.ts +102 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePm2.ts +378 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeRegistry.ts +984 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectsPaths.ts +129 -0
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectDnsRecords.ts +67 -0
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +69 -0
- package/apps/agents-server/src/utils/agentProjects/createStaticAgentProjectServer.ts +275 -0
- package/apps/agents-server/src/utils/agentProjects/findFreeTcpPort.ts +48 -0
- package/apps/agents-server/src/utils/agentProjects/hasAgentProjectDevScript.ts +68 -0
- package/apps/agents-server/src/utils/agentProjects/hasAgentProjects.ts +24 -0
- package/apps/agents-server/src/utils/agentProjects/isMissingPathError.ts +14 -0
- package/apps/agents-server/src/utils/agentProjects/isTcpPortListening.ts +99 -0
- package/apps/agents-server/src/utils/agentProjects/killProcessListeningOnPort.ts +164 -0
- package/apps/agents-server/src/utils/agentProjects/listAgentProjectChatReferences.ts +33 -0
- package/apps/agents-server/src/utils/agentProjects/listAgentProjectDirectoryEntries.ts +188 -0
- package/apps/agents-server/src/utils/agentProjects/listAgentProjectDnsDiagnostics.ts +138 -0
- package/apps/agents-server/src/utils/agentProjects/listAgentProjectFiles.ts +105 -0
- package/apps/agents-server/src/utils/agentProjects/listAgentProjects.ts +41 -0
- package/apps/agents-server/src/utils/agentProjects/listAllAgentProjectSummaries.ts +199 -0
- package/apps/agents-server/src/utils/agentProjects/measureDirectoryUsage.ts +105 -0
- package/apps/agents-server/src/utils/agentProjects/readAgentProjectFile.ts +78 -0
- package/apps/agents-server/src/utils/agentProjects/readAgentProjectReadme.ts +71 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectFileContentType.ts +46 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectInfo.ts +94 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectReadmeProfile.ts +219 -0
- package/apps/agents-server/src/utils/agentProjects/resolveCurrentAgentProjectServerDomain.ts +12 -0
- package/apps/agents-server/src/utils/agentRouting/agentRouteHrefs.ts +14 -0
- package/apps/agents-server/src/utils/agentRouting/resolveAgentRouteTarget.ts +2 -1
- package/apps/agents-server/src/utils/applyPagePreviewBrowserInput.ts +170 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/BookLanguageDocumentationAgent.ts +25 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/bookLanguageDocumentationExportParameters.ts +9 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationMarkdownResponse.ts +88 -7
- package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationPdfResponse.ts +160 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationPdfStyles.ts +251 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/getBookLanguageDocumentationAgents.ts +60 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/groupHtmlHeadingSections.ts +77 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/highlightBookCodeBlocksInHtml.ts +68 -0
- package/apps/agents-server/src/utils/buildDomainTablePrefix.ts +24 -0
- package/apps/agents-server/src/utils/cancelAdminChatTaskById.ts +152 -0
- package/apps/agents-server/src/utils/cancelAllActiveAdminChatTasks.ts +199 -0
- package/apps/agents-server/src/utils/chat/createAttachmentAwareCitationLabelResolver.ts +147 -0
- package/apps/agents-server/src/utils/chat/createChatHistoryRecorder.ts +32 -13
- package/apps/agents-server/src/utils/chat/resolveCitationSourceLabel.ts +77 -0
- package/apps/agents-server/src/utils/chatExport/renderHtmlToPdfOnServer.ts +3 -84
- package/apps/agents-server/src/utils/chatFeedbackMode.ts +1 -1
- package/apps/agents-server/src/utils/chatHistoryAdmin.ts +44 -0
- package/apps/agents-server/src/utils/chatHistoryMessage.ts +218 -0
- package/apps/agents-server/src/utils/chatTasksAdmin.ts +177 -13
- package/apps/agents-server/src/utils/cloudflare/CloudflareApi.ts +159 -0
- package/apps/agents-server/src/utils/cloudflare/CloudflareDnsBatchApplication.ts +49 -0
- package/apps/agents-server/src/utils/cloudflare/applyCloudflareDnsRecordInstructions.ts +142 -0
- package/apps/agents-server/src/utils/cloudflare/createCloudflareDnsRecord.ts +21 -0
- package/apps/agents-server/src/utils/cloudflare/createCloudflareDnsRecordRequestBody.ts +86 -0
- package/apps/agents-server/src/utils/cloudflare/findBestMatchingCloudflareZoneForDomain.ts +41 -0
- package/apps/agents-server/{scripts/createCloudflareDnsRecordSyncPlan → src/utils/cloudflare}/listAllCloudflareDnsRecords.ts +1 -3
- package/apps/agents-server/{scripts/createCloudflareDnsRecordSyncPlan → src/utils/cloudflare}/listCloudflareZones.ts +1 -3
- package/apps/agents-server/{scripts/createCloudflareDnsRecordSyncPlan → src/utils/cloudflare}/normalizeCloudflareDnsRecordContent.ts +0 -2
- package/apps/agents-server/{scripts/createCloudflareDnsRecordSyncPlan → src/utils/cloudflare}/requestCloudflare.ts +4 -6
- package/apps/agents-server/src/utils/cloudflare/resolveCloudflareDnsRecordApplyAction.ts +157 -0
- package/apps/agents-server/src/utils/cloudflare/updateCloudflareDnsRecord.ts +26 -0
- package/apps/agents-server/src/utils/createPagePreviewBrowserStream.ts +123 -31
- package/apps/agents-server/src/utils/createPagePreviewFramePump.ts +117 -0
- package/apps/agents-server/src/utils/customDomainRouting.ts +3 -1
- package/apps/agents-server/src/utils/defaultAgents/coreAgentExplanations.ts +53 -0
- package/apps/agents-server/src/utils/defaultAgents/resolveDefaultAgentsStatus.ts +249 -0
- package/apps/agents-server/src/utils/dnsProviderGuides.ts +38 -0
- package/apps/agents-server/src/utils/dnsRecords/DnsRecordInstruction.ts +33 -0
- package/apps/agents-server/src/utils/dnsRecords/createDnsZoneFileExport.ts +91 -0
- package/apps/agents-server/src/utils/dnsRecords/resolveDnsRecordBatchPlan.ts +81 -0
- package/apps/agents-server/src/utils/email/EmailUserChatContext.ts +64 -0
- package/apps/agents-server/src/utils/email/agentEmailAddress.ts +115 -0
- package/apps/agents-server/src/utils/email/emailSystemAddresses.ts +15 -0
- package/apps/agents-server/src/utils/email/findOrCreateEmailAdHocUser.ts +94 -0
- package/apps/agents-server/src/utils/email/listAgentEmailIdentities.ts +102 -0
- package/apps/agents-server/src/utils/email/processInboundAgentEmail.ts +375 -0
- package/apps/agents-server/src/utils/email/sendEmailChatReply.ts +155 -0
- package/apps/agents-server/src/utils/email/sendEmailThroughStalwart.ts +39 -0
- package/apps/agents-server/src/utils/externalChatRunner/processExternalUserChatJob.ts +53 -6
- package/apps/agents-server/src/utils/getAdminChatTaskById.ts +72 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/adminChatTaskInjection.ts +326 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/GetAdminChatTasksData.ts +12 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +347 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlValues.ts +35 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskTimeUtilities.ts +30 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/compareAdminChatTasks.ts +303 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/createAdminChatTaskCounters.ts +29 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/filterAdminChatTasks.ts +78 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/getAdminChatTasksViaClientSql.ts +62 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/getAdminChatTasksViaSupabaseQuery.ts +29 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/loadAdminChatTaskFallbackData.ts +194 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +101 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +98 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks.ts +4 -947
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/mapVpsSelfUpdateJobToAdminChatTask.ts +26 -7
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/parseAdminChatTaskQuery.ts +34 -1
- package/apps/agents-server/src/utils/getAdminChatTasksResponse.ts +19 -210
- package/apps/agents-server/src/utils/getPagePreviewBrowserSessionState.ts +41 -0
- package/apps/agents-server/src/utils/getVpsAdminChatTasksResponse.ts +150 -0
- package/apps/agents-server/src/utils/{codeRunnerAuthentication.ts → harnessAuthentication.ts} +72 -56
- package/apps/agents-server/src/utils/harnessConfiguration.ts +232 -0
- package/apps/agents-server/src/utils/internalS3/createInternalS3Client.ts +48 -0
- package/apps/agents-server/src/utils/internalS3/internalS3Types.ts +241 -0
- package/apps/agents-server/src/utils/internalS3/probeInternalS3Health.ts +135 -0
- package/apps/agents-server/src/utils/internalS3/readInternalS3Configuration.ts +51 -0
- package/apps/agents-server/src/utils/internalS3/readInternalS3Directory.ts +385 -0
- package/apps/agents-server/src/utils/internalS3/readInternalS3Snapshot.ts +56 -0
- package/apps/agents-server/src/utils/internalS3/resolveInternalS3ErrorMessage.ts +36 -0
- package/apps/agents-server/src/utils/internalS3/resolveInternalS3Status.ts +86 -0
- package/apps/agents-server/src/utils/localChatRunner/ensureLocalAgentFolder.ts +2 -0
- package/apps/agents-server/src/utils/localChatRunner/persistLocalUserChatJobProgressFromRuntimeLog.ts +136 -0
- package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +62 -5
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +86 -0
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentRuntime.ts +426 -0
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingApiRequest.ts +100 -0
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingApiResponses.ts +28 -0
- package/apps/agents-server/src/utils/messagesAdmin.ts +20 -0
- package/apps/agents-server/src/utils/mockedChats/$saveMockedChatPresetFromMessages.ts +61 -0
- package/apps/agents-server/src/utils/mockedChats/createMockedChatPresetFromChatMessages.ts +143 -0
- package/apps/agents-server/src/utils/mockedChatsSchema/normalizeMockedChatPreset.ts +3 -2
- package/apps/agents-server/src/utils/pagePreviewBrowserSessions.ts +68 -28
- package/apps/agents-server/src/utils/parsePositiveUserId.ts +20 -0
- package/apps/agents-server/src/utils/pdf/getPromptbookLogoDataUrl.ts +40 -0
- package/apps/agents-server/src/utils/pdf/renderHtmlToPdfOnServer.ts +86 -0
- package/apps/agents-server/src/utils/readRequiredAdminReason.ts +19 -0
- package/apps/agents-server/src/utils/resolveAgentHash.ts +36 -0
- package/apps/agents-server/src/utils/resourceMonitor/formatResourceMonitorValue.ts +50 -0
- package/apps/agents-server/src/utils/resourceMonitor/readAgentProjectRuntimesResourceUsage.ts +28 -0
- package/apps/agents-server/src/utils/resourceMonitor/readAgentProjectsResourceUsage.ts +49 -0
- package/apps/agents-server/src/utils/resourceMonitor/readCpuResourceUsage.ts +75 -0
- package/apps/agents-server/src/utils/resourceMonitor/readDiskResourceUsage.ts +42 -0
- package/apps/agents-server/src/utils/resourceMonitor/readMemoryResourceUsage.ts +28 -0
- package/apps/agents-server/src/utils/resourceMonitor/readNetworkResourceUsage.ts +271 -0
- package/apps/agents-server/src/utils/resourceMonitor/readServerResourceMonitorSnapshot.ts +53 -0
- package/apps/agents-server/src/utils/resourceMonitor/resolveServerResourceWarningStatus.ts +72 -0
- package/apps/agents-server/src/utils/resourceMonitor/resourceMonitorConstants.ts +29 -0
- package/apps/agents-server/src/utils/resourceMonitor/resourceMonitorTypes.ts +240 -0
- package/apps/agents-server/src/utils/resourceMonitor/waitForResourceMonitorSample.ts +11 -0
- package/apps/agents-server/src/utils/serverManagement/createManagedServer.ts +21 -1
- package/apps/agents-server/src/utils/serverManagement/resolveServersDnsWarningStatus.ts +64 -0
- package/apps/agents-server/src/utils/serverManagement/standaloneVpsServerMetadata.ts +121 -40
- package/apps/agents-server/src/utils/serverRegistry.ts +31 -22
- package/apps/agents-server/src/utils/shibbolethAuthentication/createShibbolethSamlClient.ts +35 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/createShibbolethServiceProviderMetadataXml.ts +25 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/extractShibbolethProfileAttributes.ts +173 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/fetchIdentityProviderMetadataXml.ts +21 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/findOrCreateShibbolethUser.ts +323 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/getShibbolethAuthenticationAttemptTableName.ts +13 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/getShibbolethRequestDetails.ts +19 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/getShibbolethUserIdentityTableName.ts +13 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/parseIdentityProviderMetadataXml.ts +110 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/recordShibbolethAuthenticationAttempt.ts +57 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/resolveShibbolethAuthenticationConfiguration.ts +78 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/resolveShibbolethPublicRequestUrl.ts +101 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/resolveShibbolethServiceProviderUrls.ts +63 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/sanitizeShibbolethRelayState.ts +17 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/shibbolethAuthenticationConstants.ts +62 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/shibbolethAuthenticationTypes.ts +105 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication.ts +25 -957
- package/apps/agents-server/src/utils/stalwart/StalwartConfiguration.ts +36 -0
- package/apps/agents-server/src/utils/stalwart/captureStalwartSynchronizationResult.ts +30 -0
- package/apps/agents-server/src/utils/stalwart/createEmailDnsInstructions.ts +69 -0
- package/apps/agents-server/src/utils/stalwart/readStalwartEmailSnapshot.ts +105 -0
- package/apps/agents-server/src/utils/stalwart/resolveStalwartApiUrl.ts +50 -0
- package/apps/agents-server/src/utils/stalwart/stalwartBootstrap.ts +116 -0
- package/apps/agents-server/src/utils/stalwart/stalwartJmapClient.ts +258 -0
- package/apps/agents-server/src/utils/stalwart/stalwartJmapValues.ts +33 -0
- package/apps/agents-server/src/utils/stalwart/stalwartMailBridge.ts +18 -0
- package/apps/agents-server/src/utils/stalwart/synchronizeAllStalwartEmailDomains.ts +28 -0
- package/apps/agents-server/src/utils/stalwart/synchronizeStalwartEmailDomain.ts +143 -0
- package/apps/agents-server/src/utils/standaloneVpsDnsDiagnostics.ts +21 -31
- package/apps/agents-server/src/utils/startPagePreviewScreencast.ts +105 -0
- package/apps/agents-server/src/utils/taskTerminal/resolveAdminTaskTerminalSession.ts +535 -0
- package/apps/agents-server/src/utils/taskTerminal/runWithTaskTerminalCapture.ts +134 -0
- package/apps/agents-server/src/utils/taskTerminal/taskTerminalLog.ts +360 -0
- package/apps/agents-server/src/utils/thinkingMessages.ts +20 -2
- package/apps/agents-server/src/utils/userChat/UserChatRecord.ts +16 -0
- package/apps/agents-server/src/utils/userChat/UserChatSource.ts +9 -0
- package/apps/agents-server/src/utils/userChat/appendQueuedUserChatTurn.ts +31 -0
- package/apps/agents-server/src/utils/userChat/createUserChat.ts +2 -1
- package/apps/agents-server/src/utils/userChat/createUserChatDetailPayload.ts +15 -1
- package/apps/agents-server/src/utils/userChat/createUserChatSummary.ts +13 -1
- package/apps/agents-server/src/utils/userChat/expiredRunningUserChatJobDiagnostics.ts +2 -0
- package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +16 -0
- package/apps/agents-server/src/utils/userChat/getUserChat.ts +8 -3
- package/apps/agents-server/src/utils/userChat/isUserChatViewOnly.ts +16 -0
- package/apps/agents-server/src/utils/userChat/listUserChats.ts +39 -11
- package/apps/agents-server/src/utils/userChat/persistUserChatJobTerminalState.ts +38 -0
- package/apps/agents-server/src/utils/userChat/recordUserChatMessageInChatHistory.ts +107 -0
- package/apps/agents-server/src/utils/userChat/resolveUserChatWorkerInternalToken.ts +3 -2
- package/apps/agents-server/src/utils/userChat/runDurableUserChatJobWorkerTick.ts +70 -0
- package/apps/agents-server/src/utils/userChat/userChatJobRunReport.ts +76 -0
- package/apps/agents-server/src/utils/userChat.ts +5 -0
- package/apps/agents-server/src/utils/userChatClient.ts +5 -0
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/updateUserChatTimeoutTerminalState.ts +3 -0
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +4 -1
- package/apps/agents-server/src/utils/userWallet/UserWalletRecord.ts +6 -1
- package/apps/agents-server/src/utils/userWallet/normalizeWalletPayload.ts +15 -1
- package/apps/agents-server/src/utils/vpsCertificateScheduler.ts +171 -0
- package/apps/agents-server/src/utils/vpsConfiguration.ts +87 -61
- package/apps/agents-server/src/utils/vpsSelfUpdate/deleteVpsSelfUpdateInstalledVersion.ts +81 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/listVpsSelfUpdateCandidateCommits.ts +217 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/readAgentsServerFooterVersion.ts +335 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/readPersistedVpsSelfUpdateJob.ts +317 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/readVpsSelfUpdateOverview.ts +178 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/resolveVpsSelfUpdateJobForOverview.ts +42 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/startVpsSelfUpdate.ts +201 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateAutomaticConfiguration.ts +152 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateConfiguration.ts +81 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateCron.ts +357 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateEnvironment.ts +120 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateInstalledVersions.ts +162 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateJobConstants.ts +15 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateJobHistory.ts +490 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateJobIdentity.ts +26 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateOriginRepository.ts +90 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateRepository.ts +286 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateScheduler.ts +191 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateStateFiles.ts +221 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateTypes.ts +452 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate.ts +66 -1547
- package/apps/agents-server/src/utils/vpsTask/runWithVpsServerSetupTask.ts +192 -0
- package/apps/agents-server/src/utils/vpsTask/vpsTaskHistory.ts +189 -0
- package/apps/agents-server/src/utils/vpsTask/vpsTaskTypes.ts +67 -0
- package/esm/apps/agents-server/src/constants/serverLimits.d.ts +1 -1
- package/esm/apps/agents-server/src/database/migratePrefix.d.ts +19 -0
- package/esm/apps/agents-server/src/database/runDatabaseMigrations.d.ts +4 -0
- package/esm/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +69 -0
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +7 -0
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +30 -0
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +76 -0
- package/esm/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +4 -0
- package/esm/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +28 -0
- package/esm/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +110 -0
- package/esm/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeConstants.d.ts +40 -0
- package/esm/apps/agents-server/src/utils/buildDomainTablePrefix.d.ts +13 -0
- package/esm/apps/agents-server/src/utils/serverRegistry.d.ts +5 -1
- package/esm/book/scripts/import-markdown/increaseHeadings.d.ts +8 -0
- package/esm/index.es.js +32003 -28835
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-messages/main/loadAgentMessageQueueSnapshot.d.ts +1 -1
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentAutoPuller.d.ts +27 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentGithubSynchronizer.d.ts +26 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentRunUiPresenter.d.ts +66 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/RunMultipleAgentMessageTaskScheduler.d.ts +67 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/formatProjectPath.d.ts +6 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/loadLocalAgentRunnerProjectSummaries.d.ts +11 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/wait.d.ts +6 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages.d.ts +1 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +6 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +39 -0
- package/esm/scripts/run-agent-messages/messages/resolveAgentProjectRuntimePromptApi.d.ts +8 -0
- package/esm/scripts/run-agent-messages/messages/resolveAgentProjectsUrlPath.d.ts +12 -0
- package/esm/scripts/run-agent-messages/messages/writeAgentMessageRunReport.d.ts +22 -0
- package/esm/scripts/run-agent-messages/ui/buildAgentRunUiFrame.d.ts +6 -1
- package/esm/scripts/run-codex-prompts/common/buildCoderRunProgressSnapshot.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/cliProgressDisplay.d.ts +4 -2
- package/esm/scripts/run-codex-prompts/common/formatUnknownErrorMessage.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +1 -0
- package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +49 -1
- package/esm/scripts/run-codex-prompts/common/waitUntilWorldTimeDeadline.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +3 -1
- package/esm/scripts/run-codex-prompts/git/gitBranchContext.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/git/gitLongPathsSupport.d.ts +17 -0
- package/esm/scripts/run-codex-prompts/isolation/coderIsolationCheckoutFailureReport.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/isolation/coderIsolationMergeFailureReport.d.ts +17 -0
- package/esm/scripts/run-codex-prompts/isolation/coderIsolationNaming.d.ts +26 -0
- package/esm/scripts/run-codex-prompts/isolation/copyCoderIsolationEnvironment.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/isolation/createCoderIsolationWorktree.d.ts +22 -0
- package/esm/scripts/run-codex-prompts/isolation/markPromptIsolationMergeFailed.d.ts +10 -0
- package/esm/scripts/run-codex-prompts/isolation/mergeCoderIsolationWorktree.d.ts +24 -0
- package/esm/scripts/run-codex-prompts/isolation/removeCoderIsolationWorktree.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/isolation/runIsolatedPromptRound.d.ts +14 -0
- package/esm/scripts/run-codex-prompts/main/runPromptRound.d.ts +9 -3
- package/esm/scripts/run-codex-prompts/prompts/buildPromptSectionSuffix.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/prompts/findNextTodoPrompt.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/isPromptInPriorityFilter.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/prompts/listPromptsToBeWritten.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/listRunnablePrompts.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +5 -4
- package/esm/scripts/run-codex-prompts/prompts/printPromptsToBeWritten.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/printStats.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/priorityFilter.d.ts +39 -0
- package/esm/scripts/run-codex-prompts/prompts/summarizePrompts.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/writePromptErrorLog.d.ts +3 -1
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeSessionResurrection.d.ts +37 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +47 -0
- package/esm/scripts/run-codex-prompts/runners/openai-codex/parseCodexLoginMethodFromOutput.d.ts +10 -0
- package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +7 -1
- package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +8 -5
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +17 -5
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +8 -1
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +18 -1
- package/esm/scripts/run-codex-prompts/ui/coderRunUiRefresh.d.ts +2 -2
- package/esm/src/_packages/components.index.d.ts +8 -0
- package/esm/src/_packages/core.index.d.ts +4 -0
- package/esm/src/_packages/types.index.d.ts +14 -2
- package/esm/src/avatars/renderAvatarVisualAsciiArt.d.ts +24 -1
- package/esm/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +1 -1
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.d.ts +1 -1
- package/esm/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +5 -13
- package/esm/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +195 -0
- package/esm/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +2 -1
- package/esm/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +43 -1
- package/esm/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.d.ts +10 -0
- package/esm/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.d.ts +10 -0
- package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +33 -0
- package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualDictionary.d.ts +15 -0
- package/esm/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +10 -0
- package/esm/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +30 -0
- package/esm/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +2 -1
- package/esm/src/book-2.0/book-language-documentation/toStableAnchorId.d.ts +12 -0
- package/esm/src/book-3.0/AgentMessageRunReport.d.ts +78 -0
- package/esm/src/book-3.0/agentFolderPaths.d.ts +9 -0
- package/esm/src/book-3.0/codexLoginMethod.d.ts +38 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +1 -1
- package/esm/src/book-components/BookEditor/BookEditorSyntaxTokenStyles.d.ts +39 -0
- package/esm/src/book-components/BookEditor/createBookSourceHighlightStyles.d.ts +12 -0
- package/esm/src/book-components/BookEditor/highlightBookSourceToHtml.d.ts +20 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.d.ts +120 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.d.ts +6 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.d.ts +26 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.d.ts +23 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.d.ts +21 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.d.ts +12 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.d.ts +27 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.d.ts +12 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +5 -58
- package/esm/src/book-components/Chat/Chat/ChatCitationModal.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatCitationModal.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatFeedbackStar.d.ts +37 -0
- package/esm/src/book-components/Chat/Chat/ChatImageAttachmentModal.d.ts +25 -0
- package/esm/src/book-components/Chat/Chat/ChatInputArea.d.ts +3 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageAttachments.d.ts +27 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +21 -0
- package/esm/src/book-components/Chat/Chat/ChatRatingModal.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +25 -2
- package/esm/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.d.ts +39 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreviewToolbar.d.ts +71 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewInputEvent.d.ts +72 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.d.ts +64 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.test.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewSessionState.d.ts +14 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewViewport.d.ts +37 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/createPagePreviewSessionId.d.ts +20 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.d.ts +13 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.test.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/resolveChatRatingMessageKey.d.ts +8 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaComposer.d.ts +12 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaComposer.draftMessage.test.d.ts +2 -0
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -0
- package/esm/src/book-components/Chat/SourceChip/SourceChip.test.d.ts +2 -0
- package/esm/src/book-components/Chat/hooks/useResolvedCitationLabel.test.d.ts +2 -0
- package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +1 -1
- package/esm/src/book-components/Chat/utils/parseMessageButtons.d.ts +16 -2
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +78 -0
- package/esm/src/book-components/Chat/utils/resolveCitationSourceDisplay.d.ts +149 -0
- package/esm/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +9 -0
- package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -2
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.d.ts +10 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.d.ts +10 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.d.ts +18 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +28 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.d.ts +19 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.d.ts +11 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.d.ts +8 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.d.ts +12 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.d.ts +11 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +8 -109
- package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts +17 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.d.ts +30 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts +19 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts +37 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts +13 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts +24 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +13 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts +18 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +20 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +15 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.d.ts +8 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts +16 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +3 -30
- package/esm/src/cli/cli-commands/coder/add.d.ts +36 -0
- package/esm/src/cli/cli-commands/coder/add.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +24 -0
- package/esm/src/cli/cli-commands/coder.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/createNonNegativeIntegerOptionParser.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +13 -0
- package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +13 -0
- package/esm/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +40 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +35 -0
- package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +11 -0
- package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
- package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +1 -1
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.d.ts +18 -0
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.test.d.ts +1 -0
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
- package/esm/src/commitments/META/META.d.ts +4 -2
- package/esm/src/commitments/META_AVATAR/META_AVATAR.d.ts +9 -4
- package/esm/src/commitments/META_THINKING_MESSAGE/META_THINKING_MESSAGE.d.ts +26 -0
- package/esm/src/commitments/index.d.ts +2 -1
- package/esm/src/conversion/validation/validatePipeline/createPipelineValidationContext.d.ts +16 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineMetadata.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineParameters.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineTasks.d.ts +7 -0
- package/esm/src/execution/utils/formatUsagePrice.d.ts +12 -0
- package/esm/src/execution/utils/formatUsagePrice.test.d.ts +1 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.d.ts +46 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.d.ts +11 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.d.ts +14 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.d.ts +9 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.d.ts +8 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/esm/src/utils/agent-message-runtime/agentMessageRuntimePaths.d.ts +24 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +16 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.test.d.ts +1 -0
- package/esm/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -2
- package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +104 -0
- package/esm/src/utils/agents/terminalAgentAvatarVisual.test.d.ts +1 -0
- package/esm/src/utils/color/Color.d.ts +1 -1
- package/esm/src/utils/html/escapeHtml.d.ts +9 -0
- package/esm/src/utils/markdown/shiftMarkdownHeadingLevels.d.ts +15 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -4
- package/src/_packages/components.index.ts +8 -0
- package/src/_packages/core.index.ts +4 -0
- package/src/_packages/types.index.ts +14 -2
- package/src/avatars/renderAvatarVisualAsciiArt.ts +137 -18
- package/src/avatars/visuals/avatarVisualRegistry.ts +1 -1
- package/src/avatars/visuals/minecraft2AvatarVisual.ts +1 -2
- package/src/avatars/visuals/octopus3d2AvatarVisual.ts +3 -3
- package/src/avatars/visuals/octopus3d3AvatarVisual.ts +3 -3
- package/src/avatars/visuals/octopus3d4AvatarVisual.ts +3 -3
- package/src/avatars/visuals/octopus3dAvatarVisual.ts +3 -3
- package/src/avatars/visuals/octopus3dAvatarVisualShared.ts +2 -7
- package/src/book-2.0/agent-source/AgentBasicInformation.ts +8 -0
- package/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.ts +1 -1
- package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +15 -1
- package/src/book-2.0/agent-source/parseAgentSource/extractParsedAgentProfile.ts +2 -0
- package/src/book-2.0/agent-source/parseAgentSource.ts +1 -0
- package/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.ts +5 -16
- package/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.ts +219 -0
- package/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.ts +2 -57
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +357 -273
- package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +349 -0
- package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +346 -0
- package/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.ts +61 -0
- package/src/book-2.0/book-language-documentation/getBookLanguageManualDictionary.ts +39 -0
- package/src/book-2.0/book-language-documentation/getSafeCodeBlock.ts +14 -0
- package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +110 -0
- package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +45 -8
- package/src/book-2.0/book-language-documentation/toStableAnchorId.ts +18 -0
- package/src/book-3.0/AgentMessageRunReport.ts +164 -0
- package/src/book-3.0/LiteAgent.ts +5 -5
- package/src/book-3.0/agentFolderPaths.ts +10 -0
- package/src/book-3.0/codexLoginMethod.ts +52 -0
- package/src/book-components/BookEditor/BookEditor.tsx +2 -2
- package/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.tsx +3 -2
- package/src/book-components/BookEditor/BookEditorActionbar.tsx +1 -1
- package/src/book-components/BookEditor/BookEditorMonaco.tsx +2 -2
- package/src/book-components/BookEditor/BookEditorMonacoUploadPanel.tsx +1 -1
- package/src/book-components/BookEditor/BookEditorSyntaxTokenStyles.ts +88 -0
- package/src/book-components/BookEditor/createBookSourceHighlightStyles.ts +49 -0
- package/src/book-components/BookEditor/highlightBookSourceToHtml.ts +208 -0
- package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +2 -37
- package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +1 -1
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.ts +142 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.ts +10 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.ts +209 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.ts +164 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.ts +121 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.ts +81 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.ts +370 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.ts +47 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads.ts +10 -1067
- package/src/book-components/Chat/Chat/Chat.module.css +360 -27
- package/src/book-components/Chat/Chat/Chat.tsx +20 -1
- package/src/book-components/Chat/Chat/ChatCitationModal.tsx +110 -69
- package/src/book-components/Chat/Chat/ChatFeedbackStar.tsx +103 -0
- package/src/book-components/Chat/Chat/ChatImageAttachmentModal.tsx +108 -0
- package/src/book-components/Chat/Chat/ChatInputArea.tsx +44 -27
- package/src/book-components/Chat/Chat/ChatMessageAttachments.tsx +212 -0
- package/src/book-components/Chat/Chat/ChatMessageItem.tsx +56 -43
- package/src/book-components/Chat/Chat/ChatMessageList.tsx +13 -2
- package/src/book-components/Chat/Chat/ChatMessageRichContent.tsx +8 -1
- package/src/book-components/Chat/Chat/ChatProps.tsx +24 -0
- package/src/book-components/Chat/Chat/ChatRatingModal.tsx +8 -39
- package/src/book-components/Chat/Chat/CitationIframePreview.tsx +42 -146
- package/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.tsx +548 -0
- package/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreviewToolbar.tsx +223 -0
- package/src/book-components/Chat/Chat/pagePreview/PagePreviewInputEvent.ts +84 -0
- package/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.ts +149 -0
- package/src/book-components/Chat/Chat/pagePreview/PagePreviewSessionState.ts +14 -0
- package/src/book-components/Chat/Chat/pagePreview/PagePreviewViewport.ts +66 -0
- package/src/book-components/Chat/Chat/pagePreview/createPagePreviewSessionId.ts +51 -0
- package/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.ts +242 -0
- package/src/book-components/Chat/Chat/resolveChatRatingMessageKey.ts +11 -0
- package/src/book-components/Chat/Chat/useChatInputAreaComposer.ts +52 -0
- package/src/book-components/Chat/MarkdownContent/MarkdownContent.module.css +135 -0
- package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +6 -2
- package/src/book-components/Chat/SourceChip/SourceChip.module.css +21 -2
- package/src/book-components/Chat/SourceChip/SourceChip.tsx +84 -45
- package/src/book-components/Chat/hooks/useChatRatings.ts +2 -10
- package/src/book-components/Chat/hooks/useResolvedCitationLabel.ts +117 -10
- package/src/book-components/Chat/save/html/htmlSaveFormatDefinition.ts +2 -3
- package/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.ts +2 -2
- package/src/book-components/Chat/save/pdf/buildChatPdf.ts +1 -1
- package/src/book-components/Chat/utils/citationHelpers.ts +11 -165
- package/src/book-components/Chat/utils/isVisibleChatToolCall.ts +2 -1
- package/src/book-components/Chat/utils/messagesToHtml.ts +1 -1
- package/src/book-components/Chat/utils/parseMessageButtons.ts +27 -2
- package/src/book-components/Chat/utils/renderMarkdown.ts +274 -4
- package/src/book-components/Chat/utils/resolveCitationSourceDisplay.ts +1017 -0
- package/src/book-components/Chat/utils/thinkingMessageVariants.ts +16 -6
- package/src/cli/cli-commands/agent-folder/agentProjectPaths.ts +2 -0
- package/src/cli/cli-commands/agent-folder/init.ts +4 -5
- package/src/cli/cli-commands/agent-folder/initializeAgentProjectConfiguration.ts +6 -4
- package/src/cli/cli-commands/agent-folder/printAgentInitializationSummary.ts +6 -4
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.ts +6 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.ts +6 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.ts +6 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.ts +11 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.ts +9 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.ts +6 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.ts +19 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.ts +75 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.ts +69 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.ts +59 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.ts +23 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.ts +20 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.ts +17 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.ts +27 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.ts +21 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.ts +22 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.ts +30 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.ts +41 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.ts +14 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.ts +10 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.ts +10 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.ts +31 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.ts +35 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.ts +33 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.ts +30 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.ts +19 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.ts +21 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.ts +19 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.ts +183 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.ts +48 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.ts +179 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.ts +28 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer.ts +22 -1045
- package/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.ts +2 -1
- package/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.ts +2 -1
- package/src/cli/cli-commands/agents-server/run.ts +4 -6
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.ts +75 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.ts +43 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.ts +44 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.ts +59 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.ts +9 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.ts +14 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.ts +26 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.ts +19 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +29 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.ts +33 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.ts +18 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.ts +79 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.ts +52 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.ts +17 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.ts +98 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.ts +133 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.ts +14 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.ts +132 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer.ts +63 -795
- package/src/cli/cli-commands/coder/add.ts +330 -0
- package/src/cli/cli-commands/coder/agentCodingFile.ts +8 -2
- package/src/cli/cli-commands/coder/boilerplateTemplates.ts +40 -0
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +7 -10
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +2 -1
- package/src/cli/cli-commands/coder/init.ts +43 -17
- package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +1 -1
- package/src/cli/cli-commands/coder/run.ts +42 -17
- package/src/cli/cli-commands/coder/server.ts +33 -19
- package/src/cli/cli-commands/coder.ts +4 -0
- package/src/cli/cli-commands/common/createNonNegativeIntegerOptionParser.ts +31 -0
- package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +48 -0
- package/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.ts +31 -0
- package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +46 -0
- package/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.ts +48 -0
- package/src/cli/cli-commands/common/harness/$installHarness.ts +56 -0
- package/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts +29 -0
- package/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.ts +34 -0
- package/src/cli/cli-commands/common/harness/HarnessDefinition.ts +102 -0
- package/src/cli/cli-commands/common/harness/HarnessInstallationStatus.ts +42 -0
- package/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.ts +15 -0
- package/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.ts +28 -0
- package/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.ts +28 -0
- package/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.ts +39 -0
- package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +2 -2
- package/src/cli/cli-commands/make.ts +1 -1
- package/src/cli/cli-commands/run/runCommandAction.ts +1 -1
- package/src/collection/agent-collection/CreateAgentInput.ts +2 -5
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +1 -13
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.ts +38 -0
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.ts +1 -1
- package/src/commitments/META/META.ts +8 -4
- package/src/commitments/META_AVATAR/META_AVATAR.ts +16 -10
- package/src/commitments/META_THINKING_MESSAGE/META_THINKING_MESSAGE.ts +76 -0
- package/src/commitments/USE_BROWSER/USE_BROWSER.ts +1 -0
- package/src/commitments/index.ts +3 -0
- package/src/conversion/parsePipeline/applyPipelineHead.ts +1 -1
- package/src/conversion/parsePipeline/createUniqueSectionNameResolver.ts +1 -1
- package/src/conversion/parsePipeline/processPipelineSection.ts +1 -1
- package/src/conversion/validation/validatePipeline/createPipelineValidationContext.ts +43 -0
- package/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.ts +72 -0
- package/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.ts +220 -0
- package/src/conversion/validation/validatePipeline/validatePipelineMetadata.ts +66 -0
- package/src/conversion/validation/validatePipeline/validatePipelineParameters.ts +136 -0
- package/src/conversion/validation/validatePipeline/validatePipelineTasks.ts +243 -0
- package/src/conversion/validation/validatePipeline.ts +7 -750
- package/src/executables/locateApp.ts +1 -1
- package/src/execution/utils/formatUsagePrice.ts +31 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.ts +51 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.ts +30 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.ts +59 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.ts +10 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.ts +75 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.ts +101 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.ts +24 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.ts +17 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.ts +15 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.ts +19 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.ts +44 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.ts +21 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.ts +94 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.ts +17 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.ts +30 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.ts +29 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage.ts +5 -568
- package/src/llm-providers/openai/OpenAiAgentKitExecutionTools.ts +2 -2
- package/src/llm-providers/openai/OpenAiAssistantExecutionTools.ts +1 -1
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.ts +2 -2
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.ts +1 -1
- package/src/llm-providers/openai/OpenAiCompatibleExecutionTools.ts +1 -1
- package/src/llm-providers/openai/utils/OpenAiCompatibleChatPromptBuilder.ts +1 -1
- package/src/llm-providers/openai/utils/OpenAiCompatibleChatToolCaller.ts +2 -2
- package/src/other/templates/getTemplatesPipelineCollection.ts +992 -731
- package/src/remote-server/startRemoteServer/registerExecutionRoutes.ts +1 -1
- package/src/remote-server/startRemoteServer/registerServerIndexRoute.ts +1 -1
- package/src/utils/agent-message-runtime/agentMessageRuntimePaths.ts +66 -0
- package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +119 -0
- package/src/utils/agents/resolveAgentAvatarImageUrl.ts +2 -2
- package/src/utils/agents/terminalAgentAvatarVisual.ts +309 -0
- package/src/utils/color/Color.ts +2 -2
- package/src/utils/html/escapeHtml.ts +24 -0
- package/src/utils/markdown/shiftMarkdownHeadingLevels.ts +63 -0
- package/src/version.ts +2 -2
- package/src/versions.txt +8 -0
- package/umd/apps/agents-server/src/constants/serverLimits.d.ts +1 -1
- package/umd/apps/agents-server/src/database/migratePrefix.d.ts +19 -0
- package/umd/apps/agents-server/src/database/runDatabaseMigrations.d.ts +4 -0
- package/umd/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +69 -0
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +7 -0
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +30 -0
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +76 -0
- package/umd/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +4 -0
- package/umd/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +28 -0
- package/umd/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +110 -0
- package/umd/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeConstants.d.ts +40 -0
- package/umd/apps/agents-server/src/utils/buildDomainTablePrefix.d.ts +13 -0
- package/umd/apps/agents-server/src/utils/serverRegistry.d.ts +5 -1
- package/umd/book/scripts/import-markdown/increaseHeadings.d.ts +8 -0
- package/umd/index.umd.js +33860 -30692
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-messages/main/loadAgentMessageQueueSnapshot.d.ts +1 -1
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentAutoPuller.d.ts +27 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentGithubSynchronizer.d.ts +26 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentRunUiPresenter.d.ts +66 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/RunMultipleAgentMessageTaskScheduler.d.ts +67 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/formatProjectPath.d.ts +6 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/loadLocalAgentRunnerProjectSummaries.d.ts +11 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/wait.d.ts +6 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages.d.ts +1 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +6 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +39 -0
- package/umd/scripts/run-agent-messages/messages/resolveAgentProjectRuntimePromptApi.d.ts +8 -0
- package/umd/scripts/run-agent-messages/messages/resolveAgentProjectsUrlPath.d.ts +12 -0
- package/umd/scripts/run-agent-messages/messages/writeAgentMessageRunReport.d.ts +22 -0
- package/umd/scripts/run-agent-messages/ui/buildAgentRunUiFrame.d.ts +6 -1
- package/umd/scripts/run-codex-prompts/common/buildCoderRunProgressSnapshot.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/cliProgressDisplay.d.ts +4 -2
- package/umd/scripts/run-codex-prompts/common/formatUnknownErrorMessage.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +1 -0
- package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +49 -1
- package/umd/scripts/run-codex-prompts/common/waitUntilWorldTimeDeadline.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +3 -1
- package/umd/scripts/run-codex-prompts/git/gitBranchContext.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/git/gitLongPathsSupport.d.ts +17 -0
- package/umd/scripts/run-codex-prompts/isolation/coderIsolationCheckoutFailureReport.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/isolation/coderIsolationMergeFailureReport.d.ts +17 -0
- package/umd/scripts/run-codex-prompts/isolation/coderIsolationNaming.d.ts +26 -0
- package/umd/scripts/run-codex-prompts/isolation/copyCoderIsolationEnvironment.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/isolation/createCoderIsolationWorktree.d.ts +22 -0
- package/umd/scripts/run-codex-prompts/isolation/markPromptIsolationMergeFailed.d.ts +10 -0
- package/umd/scripts/run-codex-prompts/isolation/mergeCoderIsolationWorktree.d.ts +24 -0
- package/umd/scripts/run-codex-prompts/isolation/removeCoderIsolationWorktree.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/isolation/runIsolatedPromptRound.d.ts +14 -0
- package/umd/scripts/run-codex-prompts/main/runPromptRound.d.ts +9 -3
- package/umd/scripts/run-codex-prompts/prompts/buildPromptSectionSuffix.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/prompts/findNextTodoPrompt.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/isPromptInPriorityFilter.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/prompts/listPromptsToBeWritten.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/listRunnablePrompts.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +5 -4
- package/umd/scripts/run-codex-prompts/prompts/printPromptsToBeWritten.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/printStats.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/priorityFilter.d.ts +39 -0
- package/umd/scripts/run-codex-prompts/prompts/summarizePrompts.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/writePromptErrorLog.d.ts +3 -1
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeSessionResurrection.d.ts +37 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +47 -0
- package/umd/scripts/run-codex-prompts/runners/openai-codex/parseCodexLoginMethodFromOutput.d.ts +10 -0
- package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +7 -1
- package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +8 -5
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +17 -5
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +8 -1
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +18 -1
- package/umd/scripts/run-codex-prompts/ui/coderRunUiRefresh.d.ts +2 -2
- package/umd/src/_packages/components.index.d.ts +8 -0
- package/umd/src/_packages/core.index.d.ts +4 -0
- package/umd/src/_packages/types.index.d.ts +14 -2
- package/umd/src/avatars/renderAvatarVisualAsciiArt.d.ts +24 -1
- package/umd/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +1 -1
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.d.ts +1 -1
- package/umd/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +5 -13
- package/umd/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +195 -0
- package/umd/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +2 -1
- package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +43 -1
- package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.test.d.ts +1 -0
- package/umd/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.d.ts +10 -0
- package/umd/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.d.ts +10 -0
- package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +33 -0
- package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualDictionary.d.ts +15 -0
- package/umd/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +10 -0
- package/umd/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +30 -0
- package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +2 -1
- package/umd/src/book-2.0/book-language-documentation/toStableAnchorId.d.ts +12 -0
- package/umd/src/book-3.0/AgentMessageRunReport.d.ts +78 -0
- package/umd/src/book-3.0/AgentMessageRunReport.test.d.ts +1 -0
- package/umd/src/book-3.0/agentFolderPaths.d.ts +9 -0
- package/umd/src/book-3.0/codexLoginMethod.d.ts +38 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +1 -1
- package/umd/src/book-components/BookEditor/BookEditorSyntaxTokenStyles.d.ts +39 -0
- package/umd/src/book-components/BookEditor/createBookSourceHighlightStyles.d.ts +12 -0
- package/umd/src/book-components/BookEditor/highlightBookSourceToHtml.d.ts +20 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.d.ts +120 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.d.ts +6 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.d.ts +26 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.d.ts +23 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.d.ts +21 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.d.ts +12 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.d.ts +27 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.d.ts +12 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +5 -58
- package/umd/src/book-components/Chat/Chat/ChatCitationModal.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatCitationModal.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatFeedbackStar.d.ts +37 -0
- package/umd/src/book-components/Chat/Chat/ChatImageAttachmentModal.d.ts +25 -0
- package/umd/src/book-components/Chat/Chat/ChatInputArea.d.ts +3 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageAttachments.d.ts +27 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +21 -0
- package/umd/src/book-components/Chat/Chat/ChatRatingModal.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +25 -2
- package/umd/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.d.ts +39 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreviewToolbar.d.ts +71 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewInputEvent.d.ts +72 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.d.ts +64 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewSessionState.d.ts +14 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewViewport.d.ts +37 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/createPagePreviewSessionId.d.ts +20 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.d.ts +13 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/resolveChatRatingMessageKey.d.ts +8 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaComposer.d.ts +12 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaComposer.draftMessage.test.d.ts +2 -0
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -0
- package/umd/src/book-components/Chat/SourceChip/SourceChip.test.d.ts +2 -0
- package/umd/src/book-components/Chat/hooks/useResolvedCitationLabel.test.d.ts +2 -0
- package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +1 -1
- package/umd/src/book-components/Chat/utils/parseMessageButtons.d.ts +16 -2
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +78 -0
- package/umd/src/book-components/Chat/utils/resolveCitationSourceDisplay.d.ts +149 -0
- package/umd/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +9 -0
- package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -2
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.d.ts +10 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.d.ts +10 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.d.ts +18 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +28 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.d.ts +19 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.d.ts +11 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.d.ts +8 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.d.ts +12 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.d.ts +11 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +8 -109
- package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts +17 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.d.ts +30 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts +19 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts +37 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts +13 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts +24 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +13 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts +18 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +20 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +15 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.d.ts +8 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts +16 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +3 -30
- package/umd/src/cli/cli-commands/coder/add.d.ts +36 -0
- package/umd/src/cli/cli-commands/coder/add.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +24 -0
- package/umd/src/cli/cli-commands/coder.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/createNonNegativeIntegerOptionParser.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +13 -0
- package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +13 -0
- package/umd/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +40 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +35 -0
- package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +11 -0
- package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.d.ts +7 -0
- package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
- package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +1 -1
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.d.ts +18 -0
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.test.d.ts +1 -0
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
- package/umd/src/commitments/META/META.d.ts +4 -2
- package/umd/src/commitments/META_AVATAR/META_AVATAR.d.ts +9 -4
- package/umd/src/commitments/META_THINKING_MESSAGE/META_THINKING_MESSAGE.d.ts +26 -0
- package/umd/src/commitments/index.d.ts +2 -1
- package/umd/src/conversion/validation/validatePipeline/createPipelineValidationContext.d.ts +16 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineMetadata.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineParameters.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineTasks.d.ts +7 -0
- package/umd/src/execution/utils/formatUsagePrice.d.ts +12 -0
- package/umd/src/execution/utils/formatUsagePrice.test.d.ts +1 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.d.ts +46 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.d.ts +11 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.d.ts +14 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.d.ts +9 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.d.ts +8 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/umd/src/utils/agent-message-runtime/agentMessageRuntimePaths.d.ts +24 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +16 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.test.d.ts +1 -0
- package/umd/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -2
- package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +104 -0
- package/umd/src/utils/agents/terminalAgentAvatarVisual.test.d.ts +1 -0
- package/umd/src/utils/color/Color.d.ts +1 -1
- package/umd/src/utils/html/escapeHtml.d.ts +9 -0
- package/umd/src/utils/markdown/shiftMarkdownHeadingLevels.d.ts +15 -0
- package/umd/src/version.d.ts +1 -1
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/createCloudflareDnsRecord.ts +0 -34
- package/apps/agents-server/scripts/createCloudflareDnsRecordSyncPlan/updateCloudflareDnsRecord.ts +0 -41
- package/apps/agents-server/src/app/admin/environment/EnvironmentVariablesClient.tsx +0 -259
- package/apps/agents-server/src/app/pixel-agents-assets/[...assetPath]/route.ts +0 -148
- package/apps/agents-server/src/components/Homepage/AgentGraphNode.tsx +0 -78
- package/apps/agents-server/src/components/Homepage/AgentsGraph.tsx +0 -30
- package/apps/agents-server/src/components/Homepage/AgentsGraphCanvas.tsx +0 -181
- package/apps/agents-server/src/components/Homepage/AgentsGraphToolbar.tsx +0 -300
- package/apps/agents-server/src/components/Homepage/AgentsListViewContent.tsx +0 -383
- package/apps/agents-server/src/components/Homepage/AgentsMazeOffice.tsx +0 -1011
- package/apps/agents-server/src/components/Homepage/AgentsOffice.tsx +0 -453
- package/apps/agents-server/src/components/Homepage/AgentsOfficeToolbar.tsx +0 -132
- package/apps/agents-server/src/components/Homepage/AgentsPixelOffice.tsx +0 -553
- package/apps/agents-server/src/components/Homepage/FolderGroupNode.tsx +0 -20
- package/apps/agents-server/src/components/Homepage/GraphSummaryPanel.tsx +0 -99
- package/apps/agents-server/src/components/Homepage/OfficeScene.tsx +0 -109
- package/apps/agents-server/src/components/Homepage/OfficeSceneGeometry.tsx +0 -344
- package/apps/agents-server/src/components/Homepage/OfficeSceneRenderAgent.tsx +0 -276
- package/apps/agents-server/src/components/Homepage/OfficeSceneRenderCorridor.tsx +0 -79
- package/apps/agents-server/src/components/Homepage/OfficeSceneRenderDesk.tsx +0 -119
- package/apps/agents-server/src/components/Homepage/OfficeSceneRenderRoom.tsx +0 -576
- package/apps/agents-server/src/components/Homepage/OfficeSceneSurface.tsx +0 -60
- package/apps/agents-server/src/components/Homepage/OfficeTooltip.tsx +0 -124
- package/apps/agents-server/src/components/Homepage/ServerGroupNode.tsx +0 -23
- package/apps/agents-server/src/components/Homepage/buildAgentNodeId.ts +0 -28
- package/apps/agents-server/src/components/Homepage/buildAsciiGraph.ts +0 -45
- package/apps/agents-server/src/components/Homepage/buildCapabilityLinks.ts +0 -45
- package/apps/agents-server/src/components/Homepage/buildFolderOrderLinks.ts +0 -37
- package/apps/agents-server/src/components/Homepage/buildFreeGraphBoxLayout.ts +0 -446
- package/apps/agents-server/src/components/Homepage/buildGraphData.ts +0 -52
- package/apps/agents-server/src/components/Homepage/buildGraphDataTypes.ts +0 -161
- package/apps/agents-server/src/components/Homepage/buildGraphEdges.ts +0 -55
- package/apps/agents-server/src/components/Homepage/buildGraphLayoutNodes.ts +0 -785
- package/apps/agents-server/src/components/Homepage/buildGraphNodes.ts +0 -25
- package/apps/agents-server/src/components/Homepage/buildGraphSummaryInfo.ts +0 -28
- package/apps/agents-server/src/components/Homepage/buildMazeOfficeLayout.ts +0 -728
- package/apps/agents-server/src/components/Homepage/buildOfficeLayout.ts +0 -61
- package/apps/agents-server/src/components/Homepage/buildOfficeLayoutGroups.ts +0 -94
- package/apps/agents-server/src/components/Homepage/buildOfficeLayoutRooms.ts +0 -287
- package/apps/agents-server/src/components/Homepage/buildOfficeLayoutShared.ts +0 -209
- package/apps/agents-server/src/components/Homepage/buildOfficeLayoutTypes.ts +0 -152
- package/apps/agents-server/src/components/Homepage/buildOfficeLayoutVisuals.ts +0 -233
- package/apps/agents-server/src/components/Homepage/buildServerGroups.ts +0 -148
- package/apps/agents-server/src/components/Homepage/collectRelatedNodeIds.ts +0 -22
- package/apps/agents-server/src/components/Homepage/filterGraphData.ts +0 -127
- package/apps/agents-server/src/components/Homepage/homeViewMode.ts +0 -108
- package/apps/agents-server/src/components/Homepage/mazeOfficeAgentSupport.ts +0 -57
- package/apps/agents-server/src/components/Homepage/normalizeTargetAgentUrl.ts +0 -41
- package/apps/agents-server/src/components/Homepage/parseConnectionTypes.ts +0 -24
- package/apps/agents-server/src/components/Homepage/useAgentsGraphCanvasState.ts +0 -270
- package/apps/agents-server/src/components/Homepage/useAgentsGraphDownloadState.ts +0 -214
- package/apps/agents-server/src/components/Homepage/useAgentsGraphQueryState.ts +0 -214
- package/apps/agents-server/src/components/Homepage/useAgentsGraphState.ts +0 -137
- package/apps/agents-server/src/components/Skeleton/GraphLoadingSkeleton.tsx +0 -50
- package/apps/agents-server/src/utils/codeRunnerConfiguration.ts +0 -67
- package/apps/agents-server/src/utils/userChat/createUserChatRunnerProgressCard.ts +0 -57
- package/esm/scripts/run-codex-prompts/common/formatUsagePrice.d.ts +0 -10
- package/esm/scripts/run-codex-prompts/prompts/hasSufficientPriority.d.ts +0 -5
- package/esm/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +0 -25
- package/esm/src/book-components/_common/react-utils/escapeHtml.d.ts +0 -6
- package/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.ts +0 -54
- package/src/book-components/_common/react-utils/escapeHtml.tsx +0 -8
- package/umd/scripts/run-codex-prompts/common/formatUsagePrice.d.ts +0 -10
- package/umd/scripts/run-codex-prompts/prompts/hasSufficientPriority.d.ts +0 -5
- package/umd/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +0 -25
- package/umd/src/book-components/_common/react-utils/escapeHtml.d.ts +0 -6
- /package/apps/agents-server/src/app/{admin → superadmin}/cli-access/CliAccessClient.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/cli-access/page.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/database/DatabaseAdminClient.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/database/DatabaseAdminStudioSurface.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/database/page.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/logs/LogsClient.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/logs/page.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/servers/CreateServerDialog.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/servers/DeleteCurrentServerSection.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/servers/page.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/buildDeploymentTimeBehindLabel.ts +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/formatHumanReadableTimestamp.ts +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/getUpdateJobFailureMessage.ts +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/getUpdateJobSuccessMessage.ts +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/page.tsx +0 -0
- /package/esm/src/{executables/browsers/locateInternetExplorer.test.d.ts → book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.test.d.ts} +0 -0
- /package/{umd/src/executables/browsers/locateInternetExplorer.test.d.ts → esm/src/book-3.0/AgentMessageRunReport.test.d.ts} +0 -0
|
@@ -1,1048 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Next production build marker required before a cached build is reused.
|
|
25
|
-
*
|
|
26
|
-
* @private internal constant of `ptbk agents-server`
|
|
27
|
-
*/
|
|
28
|
-
const AGENTS_SERVER_NEXT_BUILD_ID_FILENAME = 'BUILD_ID';
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Next output directory used by the local Agents Server runtime unless Next overrides it.
|
|
32
|
-
*
|
|
33
|
-
* @private internal constant of `ptbk agents-server`
|
|
34
|
-
*/
|
|
35
|
-
const DEFAULT_AGENTS_SERVER_NEXT_DIST_DIRECTORY_NAME = '.next';
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Node.js heap size limit (in MiB) injected into `NODE_OPTIONS` for the Next.js production build.
|
|
39
|
-
*
|
|
40
|
-
* Next.js webpack peaks at ~1.9 GiB on a fresh install; the Node.js default cap is ~1.7 GiB,
|
|
41
|
-
* which causes an OOM crash on first-run VPS installations where swap is the primary resource.
|
|
42
|
-
* Raising the limit lets the build complete on the first attempt.
|
|
43
|
-
*
|
|
44
|
-
* @private internal constant of `ptbk agents-server`
|
|
45
|
-
*/
|
|
46
|
-
const AGENTS_SERVER_BUILD_MAX_OLD_SPACE_MIB = 4096;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Conservative Next.js build worker count used by CLI-owned Agents Server production builds.
|
|
50
|
-
*
|
|
51
|
-
* Standalone VPS self-updates build the replacement server while the current pm2 process is
|
|
52
|
-
* still serving traffic. Keeping Next's static workers serial avoids CPU-count-based memory
|
|
53
|
-
* spikes that can make the OS kill the build child with no normal exit code.
|
|
54
|
-
*
|
|
55
|
-
* @private internal constant of `ptbk agents-server`
|
|
56
|
-
*/
|
|
57
|
-
const AGENTS_SERVER_BUILD_WORKER_COUNT = 1;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Maximum attempts for a Next.js build that was killed by the operating system.
|
|
61
|
-
*
|
|
62
|
-
* @private internal constant of `ptbk agents-server`
|
|
63
|
-
*/
|
|
64
|
-
const AGENTS_SERVER_BUILD_MAX_ATTEMPTS = 2;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Signals that indicate the Next.js build may have been terminated by resource pressure.
|
|
68
|
-
*
|
|
69
|
-
* @private internal constant of `ptbk agents-server`
|
|
70
|
-
*/
|
|
71
|
-
const RETRYABLE_NEXT_BUILD_SIGNALS = new Set<NodeJS.Signals | null>(['SIGKILL', null]);
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Environment variable passed to the bundled Next app so webpack can resolve dependencies
|
|
75
|
-
* installed beside `ptbk` even when the app sources are materialized into a project cache.
|
|
76
|
-
*
|
|
77
|
-
* @private internal constant of `ptbk agents-server`
|
|
78
|
-
*/
|
|
79
|
-
export const PTBK_AGENTS_SERVER_NODE_MODULES_PATH_ENV = 'PTBK_AGENTS_SERVER_NODE_MODULES_PATH';
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Environment variable consumed by `apps/agents-server/next.config.ts` to throttle build workers.
|
|
83
|
-
*
|
|
84
|
-
* @private internal constant of `ptbk agents-server`
|
|
85
|
-
*/
|
|
86
|
-
export const PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT_ENV = 'PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT';
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Environment variable used only by the CLI-owned production build.
|
|
90
|
-
*
|
|
91
|
-
* @private internal constant of `ptbk agents-server`
|
|
92
|
-
*/
|
|
93
|
-
export const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = 'PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION';
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Runtime copy metadata filename stored in the project-local materialized app root.
|
|
97
|
-
*
|
|
98
|
-
* @private internal constant of `ptbk agents-server`
|
|
99
|
-
*/
|
|
100
|
-
const AGENTS_SERVER_MATERIALIZED_RUNTIME_CACHE_FILENAME = '.ptbk-agents-server-runtime-cache.json';
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Directory segment used for Node package installs.
|
|
104
|
-
*
|
|
105
|
-
* @private internal constant of `ptbk agents-server`
|
|
106
|
-
*/
|
|
107
|
-
const NODE_MODULES_DIRECTORY_NAME = 'node_modules';
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Runtime paths copied into the CLI package and used by the Agents Server production build.
|
|
111
|
-
*
|
|
112
|
-
* @private internal constant of `ptbk agents-server`
|
|
113
|
-
*/
|
|
114
|
-
const AGENTS_SERVER_BUILD_INPUT_RELATIVE_PATHS = [
|
|
115
|
-
'apps/agents-server',
|
|
116
|
-
'apps/_common',
|
|
117
|
-
'src',
|
|
118
|
-
'books',
|
|
119
|
-
'package.json',
|
|
120
|
-
'package-lock.json',
|
|
121
|
-
'security.config.ts',
|
|
122
|
-
'servers.ts',
|
|
123
|
-
'tsconfig.json',
|
|
124
|
-
] as const;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Directory names excluded while fingerprinting production build inputs.
|
|
128
|
-
*
|
|
129
|
-
* @private internal constant of `ptbk agents-server`
|
|
130
|
-
*/
|
|
131
|
-
const AGENTS_SERVER_BUILD_INPUT_EXCLUDED_DIRECTORY_NAMES = new Set([
|
|
132
|
-
'.git',
|
|
133
|
-
'.next',
|
|
134
|
-
'.next-e2e',
|
|
135
|
-
'.promptbook',
|
|
136
|
-
'coverage',
|
|
137
|
-
'node_modules',
|
|
138
|
-
'playwright-report',
|
|
139
|
-
'test-results',
|
|
140
|
-
]);
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Runtime source files excluded from the packaged Agents Server copy.
|
|
144
|
-
*
|
|
145
|
-
* @private internal constant of `ptbk agents-server`
|
|
146
|
-
*/
|
|
147
|
-
const AGENTS_SERVER_BUILD_INPUT_EXCLUDED_SOURCE_PATHS = new Set([
|
|
148
|
-
'src/_packages/browser.index.ts',
|
|
149
|
-
'src/_packages/browser.readme.md',
|
|
150
|
-
'src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.ts',
|
|
151
|
-
'src/llm-providers/_common/utils/assertUniqueModels.ts',
|
|
152
|
-
]);
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Runtime source folders excluded from the packaged Agents Server copy.
|
|
156
|
-
*
|
|
157
|
-
* @private internal constant of `ptbk agents-server`
|
|
158
|
-
*/
|
|
159
|
-
const AGENTS_SERVER_BUILD_INPUT_EXCLUDED_SOURCE_PATH_PREFIXES = [
|
|
160
|
-
'src/dialogs/simple-prompt',
|
|
161
|
-
'src/storage/local-storage',
|
|
162
|
-
] as const;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Test files copied out of packaged runtime input paths because Next does not build them.
|
|
166
|
-
*
|
|
167
|
-
* @private internal constant of `ptbk agents-server`
|
|
168
|
-
*/
|
|
169
|
-
const AGENTS_SERVER_BUILD_INPUT_TEST_FILE_PATTERN = /\.(?:spec|test)(?:\.|$)/iu;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Type-only compile check files copied out of packaged runtime input paths.
|
|
173
|
-
*
|
|
174
|
-
* @private internal constant of `ptbk agents-server`
|
|
175
|
-
*/
|
|
176
|
-
const AGENTS_SERVER_BUILD_INPUT_TEST_TYPE_FILE_PATTERN = /\.test-type\.[jt]sx?$/iu;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Metadata persisted after one successful Agents Server production build.
|
|
180
|
-
*
|
|
181
|
-
* @private internal type of `ptbk agents-server`
|
|
182
|
-
*/
|
|
183
|
-
type AgentsServerBuildCache = {
|
|
184
|
-
readonly version: typeof AGENTS_SERVER_BUILD_CACHE_VERSION;
|
|
185
|
-
readonly sourceFingerprint: string;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Metadata persisted after copying the npm-packaged Agents Server runtime into the launch project.
|
|
190
|
-
*
|
|
191
|
-
* @private internal type of `ptbk agents-server`
|
|
192
|
-
*/
|
|
193
|
-
type AgentsServerMaterializedRuntimeCache = {
|
|
194
|
-
readonly version: typeof AGENTS_SERVER_BUILD_CACHE_VERSION;
|
|
195
|
-
readonly sourceFingerprint: string;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Inputs controlling one cached Agents Server production build.
|
|
200
|
-
*
|
|
201
|
-
* @private internal type of `ptbk agents-server`
|
|
202
|
-
*/
|
|
203
|
-
type EnsureAgentsServerBuildOptions = {
|
|
204
|
-
readonly appPath?: string;
|
|
205
|
-
readonly environment?: NodeJS.ProcessEnv;
|
|
206
|
-
readonly isBuildForced?: boolean;
|
|
207
|
-
readonly onBuildEvent?: (event: string) => void;
|
|
208
|
-
readonly onBuildOutput?: (chunk: string) => void;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Paths needed after the Agents Server production build is ready.
|
|
213
|
-
*
|
|
214
|
-
* @private internal type of `ptbk agents-server`
|
|
215
|
-
*/
|
|
216
|
-
export type AgentsServerBuildArtifacts = {
|
|
217
|
-
readonly appPath: string;
|
|
218
|
-
readonly nodeModulesPath: string;
|
|
219
|
-
readonly nextCliPath: string;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Runtime paths resolved for Agents Server commands before choosing build or dev execution.
|
|
224
|
-
*
|
|
225
|
-
* @private internal type of `ptbk agents-server`
|
|
226
|
-
*/
|
|
227
|
-
export type PreparedAgentsServerRuntime = AgentsServerBuildArtifacts & {
|
|
228
|
-
readonly isAppPathMaterialized: boolean;
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Input paths required to validate or update the cached Agents Server build.
|
|
233
|
-
*
|
|
234
|
-
* @private internal type of `ptbk agents-server`
|
|
235
|
-
*/
|
|
236
|
-
type AgentsServerBuildCacheOptions = {
|
|
237
|
-
readonly appPath: string;
|
|
238
|
-
readonly environment?: NodeJS.ProcessEnv;
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Exit status reported by one spawned Next.js build child process.
|
|
243
|
-
*
|
|
244
|
-
* @private internal type of `ptbk agents-server`
|
|
245
|
-
*/
|
|
246
|
-
type NextBuildExitStatus = {
|
|
247
|
-
readonly code: number | null;
|
|
248
|
-
readonly signal: NodeJS.Signals | null;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Ensures that the local Agents Server production build exists and matches its source fingerprint.
|
|
253
|
-
*
|
|
254
|
-
* @private internal utility of `ptbk agents-server`
|
|
255
|
-
*/
|
|
256
|
-
export async function ensureAgentsServerBuild(
|
|
257
|
-
options: EnsureAgentsServerBuildOptions = {},
|
|
258
|
-
): Promise<PreparedAgentsServerRuntime> {
|
|
259
|
-
const environment = options.environment ?? process.env;
|
|
260
|
-
const preparedRuntime = await prepareAgentsServerRuntime({
|
|
261
|
-
appPath: options.appPath,
|
|
262
|
-
});
|
|
263
|
-
const buildEnvironment = createAgentsServerRuntimeEnvironment(environment, preparedRuntime.nodeModulesPath, {
|
|
264
|
-
isNextValidationIgnored: preparedRuntime.isAppPathMaterialized,
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
if (
|
|
268
|
-
!options.isBuildForced &&
|
|
269
|
-
(await isAgentsServerBuildCacheCurrent({
|
|
270
|
-
appPath: preparedRuntime.appPath,
|
|
271
|
-
environment: buildEnvironment,
|
|
272
|
-
}))
|
|
273
|
-
) {
|
|
274
|
-
options.onBuildEvent?.('Using the cached Agents Server Next app build.');
|
|
275
|
-
return preparedRuntime;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
options.onBuildEvent?.('Building the Agents Server Next app.');
|
|
279
|
-
await runNextBuild({
|
|
280
|
-
appPath: preparedRuntime.appPath,
|
|
281
|
-
environment: buildEnvironment,
|
|
282
|
-
nextCliPath: preparedRuntime.nextCliPath,
|
|
283
|
-
onBuildOutput: options.onBuildOutput,
|
|
284
|
-
});
|
|
285
|
-
await writeAgentsServerBuildCache({
|
|
286
|
-
appPath: preparedRuntime.appPath,
|
|
287
|
-
environment: buildEnvironment,
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
return preparedRuntime;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Resolves the runtime app and dependency paths shared by Agents Server start and dev commands.
|
|
295
|
-
*
|
|
296
|
-
* @private internal utility of `ptbk agents-server`
|
|
297
|
-
*/
|
|
298
|
-
export async function prepareAgentsServerRuntime(
|
|
299
|
-
options: {
|
|
300
|
-
readonly appPath?: string;
|
|
301
|
-
} = {},
|
|
302
|
-
): Promise<PreparedAgentsServerRuntime> {
|
|
303
|
-
const nextCliPath = resolveNextCliPath();
|
|
304
|
-
const nodeModulesPath = resolveNodeModulesPath(nextCliPath);
|
|
305
|
-
const appPath = await resolveAgentsServerBuildAppPath({
|
|
306
|
-
sourceAppPath: options.appPath ?? (await resolveAgentsServerAppPath()),
|
|
307
|
-
nodeModulesPath,
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
return {
|
|
311
|
-
appPath,
|
|
312
|
-
nextCliPath,
|
|
313
|
-
nodeModulesPath,
|
|
314
|
-
isAppPathMaterialized: isAgentsServerAppPathMaterialized(appPath),
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Returns true when the production build marker and source fingerprint still match.
|
|
320
|
-
*
|
|
321
|
-
* @private internal utility of `ptbk agents-server`
|
|
322
|
-
*/
|
|
323
|
-
export async function isAgentsServerBuildCacheCurrent(options: AgentsServerBuildCacheOptions): Promise<boolean> {
|
|
324
|
-
const buildCache = await readAgentsServerBuildCache(options);
|
|
325
|
-
|
|
326
|
-
if (!buildCache) {
|
|
327
|
-
return false;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
const buildOutputPath = resolveAgentsServerBuildOutputPath(options);
|
|
331
|
-
if (!(await isFile(join(buildOutputPath, AGENTS_SERVER_NEXT_BUILD_ID_FILENAME)))) {
|
|
332
|
-
return false;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return buildCache.sourceFingerprint === (await createAgentsServerBuildSourceFingerprint(options.appPath));
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* Persists the source fingerprint for the just-created production build.
|
|
340
|
-
*
|
|
341
|
-
* @private internal utility of `ptbk agents-server`
|
|
342
|
-
*/
|
|
343
|
-
export async function writeAgentsServerBuildCache(options: AgentsServerBuildCacheOptions): Promise<void> {
|
|
344
|
-
const buildOutputPath = resolveAgentsServerBuildOutputPath(options);
|
|
345
|
-
const buildCache: AgentsServerBuildCache = {
|
|
346
|
-
version: AGENTS_SERVER_BUILD_CACHE_VERSION,
|
|
347
|
-
sourceFingerprint: await createAgentsServerBuildSourceFingerprint(options.appPath),
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
await mkdir(buildOutputPath, { recursive: true });
|
|
351
|
-
await writeFile(
|
|
352
|
-
join(buildOutputPath, AGENTS_SERVER_BUILD_CACHE_FILENAME),
|
|
353
|
-
`${JSON.stringify(buildCache, null, 4)}\n`,
|
|
354
|
-
'utf-8',
|
|
355
|
-
);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Finds the Agents Server app in a source checkout or generated CLI package.
|
|
360
|
-
*
|
|
361
|
-
* @private internal utility of `ptbk agents-server`
|
|
362
|
-
*/
|
|
363
|
-
export async function resolveAgentsServerAppPath(): Promise<string> {
|
|
364
|
-
const candidates = [
|
|
365
|
-
join(process.cwd(), 'apps', 'agents-server'),
|
|
366
|
-
join(__dirname, '..', '..', '..', '..', 'apps', 'agents-server'),
|
|
367
|
-
join(__dirname, '..', '..', 'apps', 'agents-server'),
|
|
368
|
-
join(__dirname, '..', 'apps', 'agents-server'),
|
|
369
|
-
];
|
|
370
|
-
|
|
371
|
-
for (const candidate of candidates) {
|
|
372
|
-
if (await isAgentsServerAppPath(candidate)) {
|
|
373
|
-
return candidate;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
throw new NotAllowed(
|
|
378
|
-
spaceTrim(`
|
|
379
|
-
Cannot find the bundled Agents Server app.
|
|
380
|
-
|
|
381
|
-
Checked:
|
|
382
|
-
${candidates.map((candidate) => `- \`${candidate}\``).join('\n')}
|
|
383
|
-
`),
|
|
384
|
-
);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* Adds dependency-resolution environment required by the materialized Agents Server runtime.
|
|
389
|
-
*
|
|
390
|
-
* @private internal utility of `ptbk agents-server`
|
|
391
|
-
*/
|
|
392
|
-
export function createAgentsServerRuntimeEnvironment(
|
|
393
|
-
environment: NodeJS.ProcessEnv,
|
|
394
|
-
nodeModulesPath: string,
|
|
395
|
-
options: {
|
|
396
|
-
readonly isNextValidationIgnored?: boolean;
|
|
397
|
-
} = {},
|
|
398
|
-
): NodeJS.ProcessEnv {
|
|
399
|
-
return {
|
|
400
|
-
...environment,
|
|
401
|
-
NODE_PATH: mergeNodePath(nodeModulesPath, environment.NODE_PATH),
|
|
402
|
-
[PTBK_AGENTS_SERVER_NODE_MODULES_PATH_ENV]: nodeModulesPath,
|
|
403
|
-
[PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT_ENV]:
|
|
404
|
-
environment[PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT_ENV] || String(AGENTS_SERVER_BUILD_WORKER_COUNT),
|
|
405
|
-
...(options.isNextValidationIgnored
|
|
406
|
-
? {
|
|
407
|
-
[PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV]: 'true',
|
|
408
|
-
}
|
|
409
|
-
: {}),
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* Uses the source checkout app directly, but copies npm-packaged app sources out of `node_modules`.
|
|
415
|
-
*
|
|
416
|
-
* @private internal utility of `ptbk agents-server`
|
|
417
|
-
*/
|
|
418
|
-
export async function resolveAgentsServerBuildAppPath(options: {
|
|
419
|
-
readonly nodeModulesPath: string;
|
|
420
|
-
readonly sourceAppPath: string;
|
|
421
|
-
}): Promise<string> {
|
|
422
|
-
if (!isPathInsideNodeModules(options.sourceAppPath)) {
|
|
423
|
-
return options.sourceAppPath;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
const sourceRuntimeRootPath = resolve(options.sourceAppPath, '..', '..');
|
|
427
|
-
const materializedRuntimeRootPath = resolvePromptbookTemporaryPath(process.cwd(), 'agents-server', 'runtime');
|
|
428
|
-
|
|
429
|
-
await synchronizeMaterializedAgentsServerRuntime({
|
|
430
|
-
materializedRuntimeRootPath,
|
|
431
|
-
nodeModulesPath: options.nodeModulesPath,
|
|
432
|
-
sourceAppPath: options.sourceAppPath,
|
|
433
|
-
sourceRuntimeRootPath,
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
return join(materializedRuntimeRootPath, 'apps', 'agents-server');
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Copies the bundled runtime into the launch project when the original app lives under `node_modules`.
|
|
441
|
-
*/
|
|
442
|
-
async function synchronizeMaterializedAgentsServerRuntime(options: {
|
|
443
|
-
readonly materializedRuntimeRootPath: string;
|
|
444
|
-
readonly nodeModulesPath: string;
|
|
445
|
-
readonly sourceAppPath: string;
|
|
446
|
-
readonly sourceRuntimeRootPath: string;
|
|
447
|
-
}): Promise<void> {
|
|
448
|
-
const sourceFingerprint = await createAgentsServerBuildSourceFingerprint(options.sourceAppPath);
|
|
449
|
-
const runtimeCache = await readAgentsServerMaterializedRuntimeCache(options.materializedRuntimeRootPath);
|
|
450
|
-
const isRuntimeCurrent =
|
|
451
|
-
runtimeCache?.version === AGENTS_SERVER_BUILD_CACHE_VERSION &&
|
|
452
|
-
runtimeCache.sourceFingerprint === sourceFingerprint &&
|
|
453
|
-
(await isAgentsServerAppPath(join(options.materializedRuntimeRootPath, 'apps', 'agents-server')));
|
|
454
|
-
|
|
455
|
-
if (!isRuntimeCurrent) {
|
|
456
|
-
await rm(options.materializedRuntimeRootPath, { recursive: true, force: true });
|
|
457
|
-
await mkdir(options.materializedRuntimeRootPath, { recursive: true });
|
|
458
|
-
|
|
459
|
-
for (const relativeInputPath of AGENTS_SERVER_BUILD_INPUT_RELATIVE_PATHS) {
|
|
460
|
-
await copyAgentsServerRuntimePath({
|
|
461
|
-
destinationPath: join(options.materializedRuntimeRootPath, relativeInputPath),
|
|
462
|
-
sourcePath: join(options.sourceRuntimeRootPath, relativeInputPath),
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
await assertMaterializedAgentsServerAppExists(options.materializedRuntimeRootPath);
|
|
467
|
-
await writeAgentsServerMaterializedRuntimeCache(options.materializedRuntimeRootPath, sourceFingerprint);
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
await ensureMaterializedRuntimeNodeModulesLink({
|
|
471
|
-
materializedRuntimeRootPath: options.materializedRuntimeRootPath,
|
|
472
|
-
nodeModulesPath: options.nodeModulesPath,
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* Verifies that the materialized runtime contains a usable Next app before caching it.
|
|
478
|
-
*/
|
|
479
|
-
async function assertMaterializedAgentsServerAppExists(materializedRuntimeRootPath: string): Promise<void> {
|
|
480
|
-
const materializedAppPath = join(materializedRuntimeRootPath, 'apps', 'agents-server');
|
|
481
|
-
|
|
482
|
-
if (await isAgentsServerAppPath(materializedAppPath)) {
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
throw new NotAllowed(
|
|
487
|
-
spaceTrim(`
|
|
488
|
-
Cannot prepare the bundled Agents Server runtime.
|
|
489
|
-
|
|
490
|
-
The materialized app path is missing required files:
|
|
491
|
-
\`${materializedAppPath}\`
|
|
492
|
-
`),
|
|
493
|
-
);
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Copies one source path into the materialized runtime, skipping generated or private files.
|
|
498
|
-
*/
|
|
499
|
-
async function copyAgentsServerRuntimePath(options: {
|
|
500
|
-
readonly destinationPath: string;
|
|
501
|
-
readonly sourcePath: string;
|
|
502
|
-
}): Promise<void> {
|
|
503
|
-
let sourceStats;
|
|
504
|
-
|
|
505
|
-
try {
|
|
506
|
-
sourceStats = await stat(options.sourcePath);
|
|
507
|
-
} catch {
|
|
508
|
-
return;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
await mkdir(dirname(options.destinationPath), { recursive: true });
|
|
512
|
-
|
|
513
|
-
if (sourceStats.isDirectory()) {
|
|
514
|
-
await cp(options.sourcePath, options.destinationPath, {
|
|
515
|
-
recursive: true,
|
|
516
|
-
filter: (sourcePath) => shouldCopyAgentsServerRuntimePath(sourcePath, options.sourcePath),
|
|
517
|
-
});
|
|
518
|
-
return;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
if (sourceStats.isFile() && shouldCopyAgentsServerRuntimePath(options.sourcePath, dirname(options.sourcePath))) {
|
|
522
|
-
await cp(options.sourcePath, options.destinationPath);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Excludes build artifacts, dependency folders, private env files, and test sources.
|
|
528
|
-
*/
|
|
529
|
-
function shouldCopyAgentsServerRuntimePath(sourcePath: string, sourceRootPath: string): boolean {
|
|
530
|
-
const sourceRelativePath = relative(sourceRootPath, sourcePath).replace(/\\/gu, '/');
|
|
531
|
-
const sourceRuntimeRelativePath = normalizeRuntimeSourceRelativePath(sourcePath, sourceRootPath);
|
|
532
|
-
const sourcePathSegments = sourceRelativePath.split('/').filter(Boolean);
|
|
533
|
-
const sourceBasename = basename(sourcePath);
|
|
534
|
-
|
|
535
|
-
if (
|
|
536
|
-
sourcePathSegments.some((sourcePathSegment) =>
|
|
537
|
-
AGENTS_SERVER_BUILD_INPUT_EXCLUDED_DIRECTORY_NAMES.has(sourcePathSegment),
|
|
538
|
-
)
|
|
539
|
-
) {
|
|
540
|
-
return false;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
if (sourcePathSegments.includes('playground')) {
|
|
544
|
-
return false;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
if (isExcludedAgentsServerRuntimeSourcePath(sourceRuntimeRelativePath)) {
|
|
548
|
-
return false;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
if (sourceBasename.startsWith('.env')) {
|
|
552
|
-
return false;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
return (
|
|
556
|
-
!AGENTS_SERVER_BUILD_INPUT_TEST_FILE_PATTERN.test(sourceBasename) &&
|
|
557
|
-
!AGENTS_SERVER_BUILD_INPUT_TEST_TYPE_FILE_PATTERN.test(sourceBasename)
|
|
558
|
-
);
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* Normalizes a copied runtime path to the shape used inside the packaged runtime root.
|
|
563
|
-
*/
|
|
564
|
-
function normalizeRuntimeSourceRelativePath(sourcePath: string, sourceRootPath: string): string {
|
|
565
|
-
const sourceRelativePath = relative(sourceRootPath, sourcePath).replace(/\\/gu, '/');
|
|
566
|
-
const sourceRootBasename = basename(sourceRootPath);
|
|
567
|
-
|
|
568
|
-
if (!sourceRelativePath) {
|
|
569
|
-
return sourceRootBasename;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
return `${sourceRootBasename}/${sourceRelativePath}`;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Checks whether one normalized runtime path is equal to or nested below another path.
|
|
577
|
-
*/
|
|
578
|
-
function isRuntimePathWithin(sourceRuntimeRelativePath: string, excludedSourcePathPrefix: string): boolean {
|
|
579
|
-
return (
|
|
580
|
-
sourceRuntimeRelativePath === excludedSourcePathPrefix ||
|
|
581
|
-
sourceRuntimeRelativePath.startsWith(`${excludedSourcePathPrefix}/`)
|
|
582
|
-
);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Returns true for runtime source files and folders that are not needed by the Agents Server build.
|
|
587
|
-
*/
|
|
588
|
-
function isExcludedAgentsServerRuntimeSourcePath(sourceRuntimeRelativePath: string): boolean {
|
|
589
|
-
return (
|
|
590
|
-
AGENTS_SERVER_BUILD_INPUT_EXCLUDED_SOURCE_PATHS.has(sourceRuntimeRelativePath) ||
|
|
591
|
-
AGENTS_SERVER_BUILD_INPUT_EXCLUDED_SOURCE_PATH_PREFIXES.some((excludedSourcePathPrefix) =>
|
|
592
|
-
isRuntimePathWithin(sourceRuntimeRelativePath, excludedSourcePathPrefix),
|
|
593
|
-
)
|
|
594
|
-
);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Links the materialized runtime back to the package dependency tree used by the installed CLI.
|
|
599
|
-
*/
|
|
600
|
-
async function ensureMaterializedRuntimeNodeModulesLink(options: {
|
|
601
|
-
readonly materializedRuntimeRootPath: string;
|
|
602
|
-
readonly nodeModulesPath: string;
|
|
603
|
-
}): Promise<void> {
|
|
604
|
-
const nodeModulesLinkPath = join(options.materializedRuntimeRootPath, NODE_MODULES_DIRECTORY_NAME);
|
|
605
|
-
|
|
606
|
-
try {
|
|
607
|
-
const existingLinkStats = await lstat(nodeModulesLinkPath);
|
|
608
|
-
await rm(nodeModulesLinkPath, {
|
|
609
|
-
force: true,
|
|
610
|
-
recursive: existingLinkStats.isDirectory() && !existingLinkStats.isSymbolicLink(),
|
|
611
|
-
});
|
|
612
|
-
} catch {
|
|
613
|
-
// The link does not exist yet.
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
await symlink(options.nodeModulesPath, nodeModulesLinkPath, process.platform === 'win32' ? 'junction' : 'dir');
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
/**
|
|
620
|
-
* Reads and validates materialized runtime metadata.
|
|
621
|
-
*/
|
|
622
|
-
async function readAgentsServerMaterializedRuntimeCache(
|
|
623
|
-
materializedRuntimeRootPath: string,
|
|
624
|
-
): Promise<AgentsServerMaterializedRuntimeCache | undefined> {
|
|
625
|
-
try {
|
|
626
|
-
const serializedRuntimeCache = await readFile(
|
|
627
|
-
join(materializedRuntimeRootPath, AGENTS_SERVER_MATERIALIZED_RUNTIME_CACHE_FILENAME),
|
|
628
|
-
'utf-8',
|
|
629
|
-
);
|
|
630
|
-
const runtimeCache = JSON.parse(serializedRuntimeCache) as Partial<AgentsServerMaterializedRuntimeCache>;
|
|
631
|
-
|
|
632
|
-
if (
|
|
633
|
-
runtimeCache.version !== AGENTS_SERVER_BUILD_CACHE_VERSION ||
|
|
634
|
-
typeof runtimeCache.sourceFingerprint !== 'string'
|
|
635
|
-
) {
|
|
636
|
-
return undefined;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
return runtimeCache as AgentsServerMaterializedRuntimeCache;
|
|
640
|
-
} catch {
|
|
641
|
-
return undefined;
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* Persists the source fingerprint used for the materialized runtime copy.
|
|
647
|
-
*/
|
|
648
|
-
async function writeAgentsServerMaterializedRuntimeCache(
|
|
649
|
-
materializedRuntimeRootPath: string,
|
|
650
|
-
sourceFingerprint: string,
|
|
651
|
-
): Promise<void> {
|
|
652
|
-
const runtimeCache: AgentsServerMaterializedRuntimeCache = {
|
|
653
|
-
version: AGENTS_SERVER_BUILD_CACHE_VERSION,
|
|
654
|
-
sourceFingerprint,
|
|
655
|
-
};
|
|
656
|
-
|
|
657
|
-
await writeFile(
|
|
658
|
-
join(materializedRuntimeRootPath, AGENTS_SERVER_MATERIALIZED_RUNTIME_CACHE_FILENAME),
|
|
659
|
-
`${JSON.stringify(runtimeCache, null, 4)}\n`,
|
|
660
|
-
'utf-8',
|
|
661
|
-
);
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Runs the finite Next production build used by local Agents Server commands.
|
|
666
|
-
*/
|
|
667
|
-
async function runNextBuild(options: {
|
|
668
|
-
readonly appPath: string;
|
|
669
|
-
readonly environment: NodeJS.ProcessEnv;
|
|
670
|
-
readonly nextCliPath: string;
|
|
671
|
-
readonly onBuildOutput?: (chunk: string) => void;
|
|
672
|
-
}): Promise<void> {
|
|
673
|
-
for (let attempt = 1; attempt <= AGENTS_SERVER_BUILD_MAX_ATTEMPTS; attempt++) {
|
|
674
|
-
const exitStatus = await runNextBuildAttempt(options);
|
|
675
|
-
|
|
676
|
-
if (exitStatus.code === 0) {
|
|
677
|
-
return;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
if (attempt < AGENTS_SERVER_BUILD_MAX_ATTEMPTS && isNextBuildTerminationRetryable(exitStatus)) {
|
|
681
|
-
forwardBuildOutput(createNextBuildRetryMessage(exitStatus, attempt + 1), options.onBuildOutput);
|
|
682
|
-
continue;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
throw createNextBuildExitError(exitStatus, attempt);
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* Runs one Next.js production build attempt and returns its exit status.
|
|
691
|
-
*/
|
|
692
|
-
async function runNextBuildAttempt(options: {
|
|
693
|
-
readonly appPath: string;
|
|
694
|
-
readonly environment: NodeJS.ProcessEnv;
|
|
695
|
-
readonly nextCliPath: string;
|
|
696
|
-
readonly onBuildOutput?: (chunk: string) => void;
|
|
697
|
-
}): Promise<NextBuildExitStatus> {
|
|
698
|
-
return await new Promise<NextBuildExitStatus>((resolveBuild, rejectBuild) => {
|
|
699
|
-
const buildProcess = spawn(process.execPath, [options.nextCliPath, 'build'], {
|
|
700
|
-
cwd: options.appPath,
|
|
701
|
-
env: createNextBuildProcessEnvironment(options.environment),
|
|
702
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
703
|
-
});
|
|
704
|
-
|
|
705
|
-
buildProcess.stdout?.on('data', (chunk) => {
|
|
706
|
-
forwardBuildOutput(chunk.toString(), options.onBuildOutput);
|
|
707
|
-
});
|
|
708
|
-
buildProcess.stderr?.on('data', (chunk) => {
|
|
709
|
-
forwardBuildOutput(chunk.toString(), options.onBuildOutput);
|
|
710
|
-
});
|
|
711
|
-
|
|
712
|
-
buildProcess.once('error', (error) => {
|
|
713
|
-
rejectBuild(createNextBuildSpawnError(error));
|
|
714
|
-
});
|
|
715
|
-
buildProcess.once('close', (code, signal) => {
|
|
716
|
-
resolveBuild({ code, signal });
|
|
717
|
-
});
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* Creates the environment passed to the spawned Next.js build process.
|
|
723
|
-
*/
|
|
724
|
-
function createNextBuildProcessEnvironment(environment: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
|
|
725
|
-
return {
|
|
726
|
-
...environment,
|
|
727
|
-
NODE_OPTIONS: mergeNodeOptionsWithHeapSize(environment.NODE_OPTIONS, AGENTS_SERVER_BUILD_MAX_OLD_SPACE_MIB),
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
/**
|
|
732
|
-
* Returns true when one failed build attempt is worth retrying.
|
|
733
|
-
*/
|
|
734
|
-
function isNextBuildTerminationRetryable(exitStatus: NextBuildExitStatus): boolean {
|
|
735
|
-
return exitStatus.code === null && RETRYABLE_NEXT_BUILD_SIGNALS.has(exitStatus.signal);
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* Creates one visible retry message for a killed Next.js build attempt.
|
|
740
|
-
*/
|
|
741
|
-
function createNextBuildRetryMessage(exitStatus: NextBuildExitStatus, nextAttempt: number): string {
|
|
742
|
-
return `\nAgents Server Next build was terminated by ${describeNextBuildExitStatus(
|
|
743
|
-
exitStatus,
|
|
744
|
-
)}. Retrying attempt ${nextAttempt}/${AGENTS_SERVER_BUILD_MAX_ATTEMPTS}.\n`;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* Creates a branded error for a failed Next.js build child process.
|
|
749
|
-
*/
|
|
750
|
-
function createNextBuildExitError(exitStatus: NextBuildExitStatus, attemptCount: number): NotAllowed {
|
|
751
|
-
const lowMemoryHint = isNextBuildTerminationRetryable(exitStatus)
|
|
752
|
-
? '\n\nThe build process was terminated by the operating system. On standalone VPS self-updates this usually means the host ran out of memory while Next.js was compiling or prerendering the app.'
|
|
753
|
-
: '';
|
|
754
|
-
|
|
755
|
-
return new NotAllowed(
|
|
756
|
-
spaceTrim(`
|
|
757
|
-
Agents Server Next production build failed.
|
|
758
|
-
|
|
759
|
-
- Exit code: \`${String(exitStatus.code)}\`
|
|
760
|
-
- Signal: \`${String(exitStatus.signal)}\`
|
|
761
|
-
- Attempts: \`${String(attemptCount)}\`
|
|
762
|
-
${lowMemoryHint}
|
|
763
|
-
`),
|
|
764
|
-
);
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* Creates a branded error for failures to start the Next.js build child process.
|
|
769
|
-
*/
|
|
770
|
-
function createNextBuildSpawnError(error: Error): NotAllowed {
|
|
771
|
-
return new NotAllowed(
|
|
772
|
-
spaceTrim(`
|
|
773
|
-
Cannot start the Agents Server Next production build.
|
|
774
|
-
|
|
775
|
-
${error.message}
|
|
776
|
-
`),
|
|
777
|
-
);
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Formats one Next.js build exit status for foreground logs.
|
|
782
|
-
*/
|
|
783
|
-
function describeNextBuildExitStatus(exitStatus: NextBuildExitStatus): string {
|
|
784
|
-
if (exitStatus.signal) {
|
|
785
|
-
return `signal \`${exitStatus.signal}\``;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
return `exit code \`${String(exitStatus.code)}\``;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
/**
|
|
792
|
-
* Prepends `--max-old-space-size=<mib>` to `NODE_OPTIONS` unless the caller already set one.
|
|
793
|
-
*/
|
|
794
|
-
function mergeNodeOptionsWithHeapSize(existingNodeOptions: string | undefined, maxOldSpaceMib: number): string {
|
|
795
|
-
if (existingNodeOptions !== undefined && /--max-old-space-size[= ]/u.test(existingNodeOptions)) {
|
|
796
|
-
return existingNodeOptions;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
const heapFlag = `--max-old-space-size=${maxOldSpaceMib}`;
|
|
800
|
-
|
|
801
|
-
return existingNodeOptions ? `${heapFlag} ${existingNodeOptions}` : heapFlag;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* Sends one Next build output chunk through the caller handler or to the foreground terminal.
|
|
806
|
-
*/
|
|
807
|
-
function forwardBuildOutput(chunk: string, onBuildOutput: ((chunk: string) => void) | undefined): void {
|
|
808
|
-
if (onBuildOutput) {
|
|
809
|
-
onBuildOutput(chunk);
|
|
810
|
-
return;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
process.stdout.write(chunk);
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
/**
|
|
817
|
-
* Reads and validates cached build metadata.
|
|
818
|
-
*/
|
|
819
|
-
async function readAgentsServerBuildCache(
|
|
820
|
-
options: AgentsServerBuildCacheOptions,
|
|
821
|
-
): Promise<AgentsServerBuildCache | undefined> {
|
|
822
|
-
try {
|
|
823
|
-
const serializedBuildCache = await readFile(
|
|
824
|
-
join(resolveAgentsServerBuildOutputPath(options), AGENTS_SERVER_BUILD_CACHE_FILENAME),
|
|
825
|
-
'utf-8',
|
|
826
|
-
);
|
|
827
|
-
const buildCache = JSON.parse(serializedBuildCache) as Partial<AgentsServerBuildCache>;
|
|
828
|
-
|
|
829
|
-
if (
|
|
830
|
-
buildCache.version !== AGENTS_SERVER_BUILD_CACHE_VERSION ||
|
|
831
|
-
typeof buildCache.sourceFingerprint !== 'string'
|
|
832
|
-
) {
|
|
833
|
-
return undefined;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
return buildCache as AgentsServerBuildCache;
|
|
837
|
-
} catch {
|
|
838
|
-
return undefined;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* Fingerprints all runtime source paths that can affect the local Agents Server build.
|
|
844
|
-
*/
|
|
845
|
-
async function createAgentsServerBuildSourceFingerprint(appPath: string): Promise<string> {
|
|
846
|
-
const runtimeRootPath = resolve(appPath, '..', '..');
|
|
847
|
-
const fingerprint = createHash('sha256');
|
|
848
|
-
|
|
849
|
-
for (const relativeInputPath of AGENTS_SERVER_BUILD_INPUT_RELATIVE_PATHS) {
|
|
850
|
-
await addAgentsServerBuildInputToFingerprint(fingerprint, {
|
|
851
|
-
inputPath: join(runtimeRootPath, relativeInputPath),
|
|
852
|
-
runtimeRootPath,
|
|
853
|
-
});
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
return fingerprint.digest('hex');
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
/**
|
|
860
|
-
* Adds one runtime source file or directory subtree to the production build fingerprint.
|
|
861
|
-
*/
|
|
862
|
-
async function addAgentsServerBuildInputToFingerprint(
|
|
863
|
-
fingerprint: Hash,
|
|
864
|
-
options: {
|
|
865
|
-
readonly inputPath: string;
|
|
866
|
-
readonly runtimeRootPath: string;
|
|
867
|
-
},
|
|
868
|
-
): Promise<void> {
|
|
869
|
-
if (isExcludedAgentsServerBuildInputPath(options.inputPath, options.runtimeRootPath)) {
|
|
870
|
-
return;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
let inputStats;
|
|
874
|
-
|
|
875
|
-
try {
|
|
876
|
-
inputStats = await stat(options.inputPath);
|
|
877
|
-
} catch {
|
|
878
|
-
fingerprint.update(`missing:${normalizeBuildInputPath(options.runtimeRootPath, options.inputPath)}\n`);
|
|
879
|
-
return;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
if (inputStats.isFile()) {
|
|
883
|
-
fingerprint.update(`file:${normalizeBuildInputPath(options.runtimeRootPath, options.inputPath)}\n`);
|
|
884
|
-
fingerprint.update(await readFile(options.inputPath));
|
|
885
|
-
fingerprint.update('\n');
|
|
886
|
-
return;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
if (!inputStats.isDirectory()) {
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
fingerprint.update(`directory:${normalizeBuildInputPath(options.runtimeRootPath, options.inputPath)}\n`);
|
|
894
|
-
const inputDirents = await readdir(options.inputPath, { withFileTypes: true });
|
|
895
|
-
const sortedInputDirents = [...inputDirents].sort((left, right) => left.name.localeCompare(right.name));
|
|
896
|
-
|
|
897
|
-
for (const inputDirent of sortedInputDirents) {
|
|
898
|
-
if (inputDirent.isDirectory() && AGENTS_SERVER_BUILD_INPUT_EXCLUDED_DIRECTORY_NAMES.has(inputDirent.name)) {
|
|
899
|
-
continue;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
await addAgentsServerBuildInputToFingerprint(fingerprint, {
|
|
903
|
-
inputPath: join(options.inputPath, inputDirent.name),
|
|
904
|
-
runtimeRootPath: options.runtimeRootPath,
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* Returns true for non-build files and folders inside shared runtime source paths.
|
|
911
|
-
*/
|
|
912
|
-
function isExcludedAgentsServerBuildInputPath(inputPath: string, runtimeRootPath: string): boolean {
|
|
913
|
-
const inputRelativePath = normalizeBuildInputPath(runtimeRootPath, inputPath);
|
|
914
|
-
const inputPathSegments = inputRelativePath.split('/').filter(Boolean);
|
|
915
|
-
const inputBasename = basename(inputPath);
|
|
916
|
-
|
|
917
|
-
if (
|
|
918
|
-
inputPathSegments.some((inputPathSegment) =>
|
|
919
|
-
AGENTS_SERVER_BUILD_INPUT_EXCLUDED_DIRECTORY_NAMES.has(inputPathSegment),
|
|
920
|
-
)
|
|
921
|
-
) {
|
|
922
|
-
return true;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
if (inputPathSegments.includes('playground')) {
|
|
926
|
-
return true;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
if (isExcludedAgentsServerRuntimeSourcePath(inputRelativePath)) {
|
|
930
|
-
return true;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
return (
|
|
934
|
-
AGENTS_SERVER_BUILD_INPUT_TEST_FILE_PATTERN.test(inputBasename) ||
|
|
935
|
-
AGENTS_SERVER_BUILD_INPUT_TEST_TYPE_FILE_PATTERN.test(inputBasename)
|
|
936
|
-
);
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* Normalizes one absolute runtime path so cache fingerprints are stable across platforms.
|
|
941
|
-
*/
|
|
942
|
-
function normalizeBuildInputPath(runtimeRootPath: string, inputPath: string): string {
|
|
943
|
-
return relative(runtimeRootPath, inputPath).replace(/\\/gu, '/');
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
/**
|
|
947
|
-
* Resolves the Next output directory used by a particular build environment.
|
|
948
|
-
*/
|
|
949
|
-
function resolveAgentsServerBuildOutputPath(options: AgentsServerBuildCacheOptions): string {
|
|
950
|
-
return resolve(
|
|
951
|
-
options.appPath,
|
|
952
|
-
options.environment?.NEXT_DIST_DIR || DEFAULT_AGENTS_SERVER_NEXT_DIST_DIRECTORY_NAME,
|
|
953
|
-
);
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
/**
|
|
957
|
-
* Returns true when the app path points at the project-local materialized runtime.
|
|
958
|
-
*/
|
|
959
|
-
function isAgentsServerAppPathMaterialized(appPath: string): boolean {
|
|
960
|
-
const normalizedAppPath = appPath.replace(/\\/gu, '/');
|
|
961
|
-
const normalizedMaterializedRuntimePath = resolvePromptbookTemporaryPath(
|
|
962
|
-
process.cwd(),
|
|
963
|
-
'agents-server',
|
|
964
|
-
'runtime',
|
|
965
|
-
).replace(/\\/gu, '/');
|
|
966
|
-
|
|
967
|
-
return normalizedAppPath.includes(normalizedMaterializedRuntimePath);
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
/**
|
|
971
|
-
* Returns true when one path is nested below a `node_modules` segment.
|
|
972
|
-
*/
|
|
973
|
-
function isPathInsideNodeModules(path: string): boolean {
|
|
974
|
-
return path.split(/[\\/]+/u).includes(NODE_MODULES_DIRECTORY_NAME);
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
/**
|
|
978
|
-
* Resolves the dependency root that contains the installed Next CLI.
|
|
979
|
-
*/
|
|
980
|
-
function resolveNodeModulesPath(nextCliPath: string): string {
|
|
981
|
-
const normalizedNextCliPath = nextCliPath.replace(/\\/gu, '/');
|
|
982
|
-
const marker = `/${NODE_MODULES_DIRECTORY_NAME}/next/`;
|
|
983
|
-
const markerIndex = normalizedNextCliPath.lastIndexOf(marker);
|
|
984
|
-
|
|
985
|
-
if (markerIndex === -1) {
|
|
986
|
-
return resolve(nextCliPath, '..', '..', '..');
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
return normalizedNextCliPath.slice(0, markerIndex + marker.length - '/next/'.length);
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
/**
|
|
993
|
-
* Prepends one dependency root to `NODE_PATH` while preserving any existing value.
|
|
994
|
-
*/
|
|
995
|
-
function mergeNodePath(nodeModulesPath: string, nodePath: string | undefined): string {
|
|
996
|
-
if (!nodePath) {
|
|
997
|
-
return nodeModulesPath;
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
return `${nodeModulesPath}${delimiter}${nodePath}`;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
/**
|
|
1004
|
-
* Returns true when one path exists as a regular file.
|
|
1005
|
-
*/
|
|
1006
|
-
async function isFile(path: string): Promise<boolean> {
|
|
1007
|
-
try {
|
|
1008
|
-
return (await stat(path)).isFile();
|
|
1009
|
-
} catch {
|
|
1010
|
-
return false;
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* Returns true when one folder contains the Next Agents Server app marker files.
|
|
1016
|
-
*/
|
|
1017
|
-
async function isAgentsServerAppPath(candidate: string): Promise<boolean> {
|
|
1018
|
-
try {
|
|
1019
|
-
const [packageStats, nextConfigStats] = await Promise.all([
|
|
1020
|
-
stat(join(candidate, 'package.json')),
|
|
1021
|
-
stat(join(candidate, 'next.config.ts')),
|
|
1022
|
-
]);
|
|
1023
|
-
|
|
1024
|
-
return packageStats.isFile() && nextConfigStats.isFile();
|
|
1025
|
-
} catch {
|
|
1026
|
-
return false;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* Resolves the Next CLI module installed alongside the Promptbook CLI.
|
|
1032
|
-
*/
|
|
1033
|
-
function resolveNextCliPath(): string {
|
|
1034
|
-
try {
|
|
1035
|
-
return require.resolve('next/dist/bin/next');
|
|
1036
|
-
} catch {
|
|
1037
|
-
throw new NotAllowed(
|
|
1038
|
-
spaceTrim(`
|
|
1039
|
-
Cannot start Agents Server because the \`next\` package is unavailable.
|
|
1040
|
-
|
|
1041
|
-
Reinstall \`ptbk\` so the CLI package contains the Agents Server runtime dependencies.
|
|
1042
|
-
`),
|
|
1043
|
-
);
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1
|
+
// Note: This file is a thin facade over the focused modules under `./buildAgentsServer/`.
|
|
2
|
+
// It keeps the local Agents Server build API stable while runtime preparation,
|
|
3
|
+
// materialization, fingerprinting, cache handling, and Next build execution are
|
|
4
|
+
// split into small single-responsibility modules.
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
createAgentsServerRuntimeEnvironment,
|
|
8
|
+
PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT_ENV,
|
|
9
|
+
PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV,
|
|
10
|
+
PTBK_AGENTS_SERVER_NODE_MODULES_PATH_ENV,
|
|
11
|
+
} from './buildAgentsServer/createAgentsServerRuntimeEnvironment';
|
|
12
|
+
export { ensureAgentsServerBuild } from './buildAgentsServer/ensureAgentsServerBuild';
|
|
13
|
+
export { isAgentsServerBuildCacheCurrent } from './buildAgentsServer/isAgentsServerBuildCacheCurrent';
|
|
14
|
+
export { prepareAgentsServerRuntime } from './buildAgentsServer/prepareAgentsServerRuntime';
|
|
15
|
+
export { resolveAgentsServerAppPath } from './buildAgentsServer/resolveAgentsServerAppPath';
|
|
16
|
+
export { resolveAgentsServerBuildAppPath } from './buildAgentsServer/resolveAgentsServerBuildAppPath';
|
|
17
|
+
export { writeAgentsServerBuildCache } from './buildAgentsServer/writeAgentsServerBuildCache';
|
|
18
|
+
|
|
19
|
+
export type {
|
|
20
|
+
AgentsServerBuildArtifacts,
|
|
21
|
+
PreparedAgentsServerRuntime,
|
|
22
|
+
} from './buildAgentsServer/PreparedAgentsServerRuntime';
|
|
1046
23
|
|
|
1047
24
|
// Note: [🟡] Code for CLI runtime [buildAgentsServer](src/cli/cli-commands/agents-server/buildAgentsServer.ts) should never be published outside of `@promptbook/cli`
|
|
1048
25
|
// Note: [💞] Ignore a discrepancy between file name and entity name
|