@promptbook/cli 0.113.0-9 → 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 +2 -0
- 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 +36 -11
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerScopeTabs.tsx +74 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +70 -242
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskTargetLink.tsx +57 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskTerminalDialog.tsx +3 -1
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTasksCard.tsx +118 -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/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 +18 -1
- 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 +42 -4
- 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 +25 -16
- 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/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/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 +165 -1
- 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/{admin → superadmin}/resource-monitor/page.tsx +55 -67
- 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/AutomaticSelfUpdateConfigurationCard.tsx +9 -12
- package/apps/agents-server/src/app/{admin → superadmin}/update/UpdateJobCard.tsx +16 -2
- package/apps/agents-server/src/app/superadmin/update/updatePageCardClassName.ts +6 -0
- 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/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 +41 -9
- 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 +36 -1
- package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +9 -0
- 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 +296 -50
- 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 +9 -51
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +52 -1
- 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/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 +2 -2
- 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/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 +58 -0
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +50 -1
- package/apps/agents-server/src/languages/translations/czech.yaml +53 -4
- package/apps/agents-server/src/languages/translations/english.yaml +52 -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/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/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 +176 -12
- 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 +42 -1
- 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/adminChatTaskSqlQuery.ts +89 -6
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/compareAdminChatTasks.ts +175 -7
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/getAdminChatTasksViaSupabaseQuery.ts +1 -1
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/loadAdminChatTaskFallbackData.ts +2 -1
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +2 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +5 -1
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/mapVpsSelfUpdateJobToAdminChatTask.ts +9 -3
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/parseAdminChatTaskQuery.ts +34 -1
- package/apps/agents-server/src/utils/getAdminChatTasksResponse.ts +17 -244
- 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 +42 -0
- 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 +57 -29
- 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/readAgentProjectRuntimesResourceUsage.ts +28 -0
- package/apps/agents-server/src/utils/resourceMonitor/readAgentProjectsResourceUsage.ts +49 -0
- package/apps/agents-server/src/utils/resourceMonitor/readServerResourceMonitorSnapshot.ts +7 -1
- package/apps/agents-server/src/utils/resourceMonitor/resourceMonitorTypes.ts +86 -1
- 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/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 +250 -37
- 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/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/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 +83 -61
- package/apps/agents-server/src/utils/vpsSelfUpdate/readAgentsServerFooterVersion.ts +335 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/readPersistedVpsSelfUpdateJob.ts +8 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/startVpsSelfUpdate.ts +1 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateAutomaticConfiguration.ts +1 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateInstalledVersions.ts +1 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateJobHistory.ts +107 -4
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateStateFiles.ts +24 -0
- 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/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/index.es.js +4568 -2053
- 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/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/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 +2 -1
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +3 -16
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +1 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +18 -1
- 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 +12 -0
- 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/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/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/ChatMessageItem.d.ts +4 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +13 -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/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/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/startAgentsServer/AgentsServerChildEnvironment.d.ts +1 -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/PreparedAgentsServerLaunch.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +1 -1
- 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/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/commitments/META/META.d.ts +2 -0
- 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/execution/utils/formatUsagePrice.d.ts +12 -0
- package/esm/src/execution/utils/formatUsagePrice.test.d.ts +1 -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/terminalAgentAvatarVisual.d.ts +104 -0
- package/esm/src/utils/agents/terminalAgentAvatarVisual.test.d.ts +1 -0
- 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 +12 -0
- package/src/avatars/Avatar.tsx +13 -2
- package/src/avatars/renderAvatarVisual.ts +13 -2
- package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +6 -1
- package/src/avatars/visuals/octopus2AvatarVisual.ts +5 -1
- package/src/avatars/visuals/octopus3AvatarVisual.ts +8 -1
- package/src/avatars/visuals/octopus3d2AvatarVisual.ts +10 -1
- package/src/avatars/visuals/octopus3d3AvatarVisual.ts +10 -1
- package/src/avatars/visuals/octopus3d4AvatarVisual.ts +10 -1
- 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 +13 -0
- 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 +356 -270
- 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/CliAgent.ts +7 -1
- package/src/book-3.0/agentFolderPaths.ts +10 -0
- package/src/book-3.0/codexLoginMethod.ts +52 -0
- package/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.tsx +4 -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/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.ts +1 -6
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.ts +11 -1
- package/src/book-components/Chat/Chat/Chat.module.css +201 -27
- package/src/book-components/Chat/Chat/Chat.tsx +4 -0
- package/src/book-components/Chat/Chat/ChatCitationModal.tsx +108 -67
- package/src/book-components/Chat/Chat/ChatFeedbackStar.tsx +103 -0
- package/src/book-components/Chat/Chat/ChatInputArea.tsx +2 -1
- package/src/book-components/Chat/Chat/ChatMessageItem.tsx +24 -25
- package/src/book-components/Chat/Chat/ChatMessageList.tsx +10 -2
- package/src/book-components/Chat/Chat/ChatMessageRichContent.tsx +8 -1
- package/src/book-components/Chat/Chat/ChatProps.tsx +15 -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/renderTimeoutToolCallDetails.tsx +5 -1
- package/src/book-components/Chat/Chat/resolveChatRatingMessageKey.ts +11 -0
- package/src/book-components/Chat/Chat/useChatInputAreaComposer.ts +7 -7
- package/src/book-components/Chat/Chat/useChatInputAreaDictation.ts +7 -7
- package/src/book-components/Chat/Chat/useChatToolCallModalState.ts +4 -1
- 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 +1 -9
- package/src/book-components/Chat/hooks/useResolvedCitationLabel.ts +117 -10
- package/src/book-components/Chat/utils/citationHelpers.ts +11 -165
- package/src/book-components/Chat/utils/getToolCallChipletInfo.ts +5 -1
- package/src/book-components/Chat/utils/messagesToHtml.ts +1 -1
- 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/about.ts +1 -1
- package/src/cli/cli-commands/agent/agentCliOptions.ts +5 -2
- package/src/cli/cli-commands/agent-folder/agentProjectPaths.ts +14 -6
- package/src/cli/cli-commands/agent-folder/init.ts +6 -2
- package/src/cli/cli-commands/agent-folder/initializeAgentProjectConfiguration.ts +13 -2
- package/src/cli/cli-commands/agent-folder/printAgentInitializationSummary.ts +11 -2
- package/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.ts +6 -2
- package/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.ts +3 -4
- package/src/cli/cli-commands/agents-server/run.ts +4 -3
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.ts +11 -3
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.ts +1 -1
- package/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.ts +1 -1
- package/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.ts +5 -1
- package/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.ts +2 -1
- package/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.ts +4 -6
- package/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.ts +2 -1
- package/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.ts +2 -1
- package/src/cli/cli-commands/agents-server/startAgentsServer.ts +58 -17
- package/src/cli/cli-commands/agents-server.ts +6 -2
- package/src/cli/cli-commands/coder/add.ts +330 -0
- package/src/cli/cli-commands/coder/agentCodingFile.ts +15 -3
- package/src/cli/cli-commands/coder/boilerplateTemplates.ts +40 -0
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +13 -12
- 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 +6 -1
- package/src/cli/cli-commands/coder/run.ts +42 -17
- package/src/cli/cli-commands/coder/server.ts +29 -17
- 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 +8 -3
- 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/commitments/MEMORY/createMemoryToolFunctions.ts +10 -1
- package/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.ts +10 -1
- package/src/commitments/MEMORY/parseMemoryToolArgs.ts +6 -1
- package/src/commitments/META/META.ts +4 -0
- 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/USE_CALENDAR/createUseCalendarToolFunctions.ts +4 -1
- package/src/commitments/USE_PROJECT/createUseProjectToolFunctions.ts +10 -2
- package/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.ts +11 -1
- package/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.ts +6 -1
- package/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.ts +6 -1
- package/src/commitments/WALLET/createWalletToolFunctions.ts +11 -2
- package/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.ts +6 -1
- package/src/commitments/WALLET/parseWalletToolArgs.ts +10 -1
- package/src/commitments/index.ts +2 -0
- package/src/executables/locateApp.ts +1 -1
- package/src/execution/LlmExecutionTools.ts +6 -1
- package/src/execution/createPipelineExecutor/getReservedParametersForTask.ts +5 -1
- package/src/execution/utils/formatUsagePrice.ts +31 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.ts +1 -4
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.ts +1 -4
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.ts +1 -4
- package/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.ts +6 -1
- package/src/llm-providers/openai/OpenAiCompatibleExecutionTools.ts +6 -1
- package/src/llm-providers/openai/utils/OpenAiCompatibleUnsupportedParameterRetrier.ts +5 -1
- package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +6 -1
- package/src/other/templates/getTemplatesPipelineCollection.ts +1088 -745
- package/src/scrapers/_common/utils/makeKnowledgeSourceHandler.ts +6 -1
- package/src/speech-recognition/OpenAiSpeechRecognition.ts +6 -1
- package/src/transpilers/_common/prepareSdkTranspilerContext.ts +4 -1
- package/src/types/Prompt.ts +7 -1
- package/src/types/string_host.ts +9 -1
- package/src/types/string_pipeline_url.ts +4 -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/terminalAgentAvatarVisual.ts +309 -0
- package/src/utils/html/escapeHtml.ts +24 -0
- package/src/utils/markdown/parseMarkdownSection.ts +5 -1
- package/src/utils/markdown/shiftMarkdownHeadingLevels.ts +63 -0
- package/src/utils/random/$randomFullnameWithColor.ts +6 -1
- package/src/version.ts +2 -2
- package/src/versions.txt +7 -0
- package/umd/apps/agents-server/src/constants/serverLimits.d.ts +1 -1
- 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/index.umd.js +4572 -2057
- 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/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/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 +2 -1
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +3 -16
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +1 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +18 -1
- 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 +12 -0
- 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/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/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/ChatMessageItem.d.ts +4 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +13 -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/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/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/startAgentsServer/AgentsServerChildEnvironment.d.ts +1 -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/PreparedAgentsServerLaunch.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +1 -1
- 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/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/commitments/META/META.d.ts +2 -0
- 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/execution/utils/formatUsagePrice.d.ts +12 -0
- package/umd/src/execution/utils/formatUsagePrice.test.d.ts +1 -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/terminalAgentAvatarVisual.d.ts +104 -0
- package/umd/src/utils/agents/terminalAgentAvatarVisual.test.d.ts +1 -0
- 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/admin/update/updatePageCardClassName.ts +0 -6
- 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/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/AdvancedOriginRepositoryPanel.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/CurrentDeploymentCard.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/CustomCommitPicker.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/InstalledVersionsCard.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/PendingCommitsCard.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/TargetEnvironmentCard.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/UpdateClient.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/UpdateDatabaseMigrationsPanel.tsx +0 -0
- /package/apps/agents-server/src/app/{admin → superadmin}/update/UpdateOverview.ts +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/apps/agents-server/src/app/{admin → superadmin}/update/useUpdateClientState.ts +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,1011 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { useRouter } from 'next/navigation';
|
|
4
|
-
import {
|
|
5
|
-
useEffect,
|
|
6
|
-
useMemo,
|
|
7
|
-
useRef,
|
|
8
|
-
useState,
|
|
9
|
-
type PointerEvent as ReactPointerEvent,
|
|
10
|
-
type WheelEvent as ReactWheelEvent,
|
|
11
|
-
} from 'react';
|
|
12
|
-
import type { AgentOrganizationAgent, AgentOrganizationFolder } from '../../utils/agentOrganization/types';
|
|
13
|
-
import { AgentAvatar } from '../AgentAvatar/AgentAvatar';
|
|
14
|
-
import { useAgentNaming } from '../AgentNaming/AgentNamingContext';
|
|
15
|
-
import { AgentsOfficeToolbar } from './AgentsOfficeToolbar';
|
|
16
|
-
import {
|
|
17
|
-
buildMazeOfficeLayout,
|
|
18
|
-
type MazeCommunicationLink,
|
|
19
|
-
type MazeCorridor,
|
|
20
|
-
type MazeOfficeLayout,
|
|
21
|
-
type MazeRoom,
|
|
22
|
-
} from './buildMazeOfficeLayout';
|
|
23
|
-
import type { OfficeAgentVisual, OfficePoint } from './buildOfficeLayout';
|
|
24
|
-
import { OfficeSceneGeometry, type OfficeSceneMetrics } from './OfficeSceneGeometry';
|
|
25
|
-
import { OfficeTooltip } from './OfficeTooltip';
|
|
26
|
-
import type { AgentWithVisibility } from './useFederatedAgents';
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Width reserved for the hover tooltip.
|
|
30
|
-
*/
|
|
31
|
-
const TOOLTIP_WIDTH = 240;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Height reserved for the maze canvas.
|
|
35
|
-
*/
|
|
36
|
-
const MAZE_CANVAS_HEIGHT = 760;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Additional padding added around the projected maze scene.
|
|
40
|
-
*/
|
|
41
|
-
const MAZE_SCENE_PADDING = 220;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Interval used for lightweight scene animation updates.
|
|
45
|
-
*/
|
|
46
|
-
const MAZE_ANIMATION_INTERVAL_MS = 140;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Base avatar size used before camera scaling is applied.
|
|
50
|
-
*/
|
|
51
|
-
const MAZE_AVATAR_BASE_SIZE = 58;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Rendered height of maze rooms.
|
|
55
|
-
*/
|
|
56
|
-
const MAZE_ROOM_HEIGHT = 30;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Rendered height of maze corridors.
|
|
60
|
-
*/
|
|
61
|
-
const MAZE_CORRIDOR_HEIGHT = 16;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Props for the maze homepage visualization.
|
|
65
|
-
*/
|
|
66
|
-
type AgentsMazeOfficeProps = {
|
|
67
|
-
agents: ReadonlyArray<AgentOrganizationAgent>;
|
|
68
|
-
federatedAgents: ReadonlyArray<AgentWithVisibility>;
|
|
69
|
-
publicUrl: string;
|
|
70
|
-
folders: ReadonlyArray<AgentOrganizationFolder>;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Camera state used for pan and zoom transforms.
|
|
75
|
-
*/
|
|
76
|
-
type MazeCamera = {
|
|
77
|
-
x: number;
|
|
78
|
-
y: number;
|
|
79
|
-
zoom: number;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Hover tooltip state for one maze agent.
|
|
84
|
-
*/
|
|
85
|
-
type MazeTooltipState = {
|
|
86
|
-
agentId: string;
|
|
87
|
-
x: number;
|
|
88
|
-
y: number;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Drag interaction state for manual panning.
|
|
93
|
-
*/
|
|
94
|
-
type MazeDragState = {
|
|
95
|
-
pointerX: number;
|
|
96
|
-
pointerY: number;
|
|
97
|
-
cameraX: number;
|
|
98
|
-
cameraY: number;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Observed size of the maze container.
|
|
103
|
-
*/
|
|
104
|
-
type MazeContainerSize = {
|
|
105
|
-
width: number;
|
|
106
|
-
height: number;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Small theme palette used by the maze SVG scene.
|
|
111
|
-
*/
|
|
112
|
-
type MazeThemePalette = {
|
|
113
|
-
surfaceTop: string;
|
|
114
|
-
surfaceBottom: string;
|
|
115
|
-
gridStroke: string;
|
|
116
|
-
gridDot: string;
|
|
117
|
-
corridorTop: string;
|
|
118
|
-
corridorFront: string;
|
|
119
|
-
corridorRight: string;
|
|
120
|
-
corridorStroke: string;
|
|
121
|
-
roomStroke: string;
|
|
122
|
-
roomShadow: string;
|
|
123
|
-
workstationTop: string;
|
|
124
|
-
workstationFront: string;
|
|
125
|
-
workstationRight: string;
|
|
126
|
-
workstationScreen: string;
|
|
127
|
-
meetingTableTop: string;
|
|
128
|
-
meetingTableFront: string;
|
|
129
|
-
meetingTableRight: string;
|
|
130
|
-
labelText: string;
|
|
131
|
-
subtitleText: string;
|
|
132
|
-
labelPanel: string;
|
|
133
|
-
shadowFill: string;
|
|
134
|
-
spotlightFill: string;
|
|
135
|
-
beamMeeting: string;
|
|
136
|
-
beamWorking: string;
|
|
137
|
-
beamHandoff: string;
|
|
138
|
-
busyBadge: string;
|
|
139
|
-
haloIdle: string;
|
|
140
|
-
haloWorking: string;
|
|
141
|
-
haloMeeting: string;
|
|
142
|
-
haloMoving: string;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Screen-space model used by the DOM avatar overlay.
|
|
147
|
-
*/
|
|
148
|
-
type MazeProjectedAgent = {
|
|
149
|
-
agent: OfficeAgentVisual;
|
|
150
|
-
shadowPoint: OfficePoint;
|
|
151
|
-
screenX: number;
|
|
152
|
-
screenY: number;
|
|
153
|
-
size: number;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Renders the isometric maze office homepage view.
|
|
158
|
-
*/
|
|
159
|
-
export function AgentsMazeOffice(props: AgentsMazeOfficeProps) {
|
|
160
|
-
const { agents, federatedAgents, publicUrl, folders } = props;
|
|
161
|
-
const router = useRouter();
|
|
162
|
-
const { formatText } = useAgentNaming();
|
|
163
|
-
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
164
|
-
const [containerSize, setContainerSize] = useState<MazeContainerSize>({
|
|
165
|
-
width: 1200,
|
|
166
|
-
height: MAZE_CANVAS_HEIGHT,
|
|
167
|
-
});
|
|
168
|
-
const [camera, setCamera] = useState<MazeCamera>({ x: 0, y: 0, zoom: 1 });
|
|
169
|
-
const [dragState, setDragState] = useState<MazeDragState | null>(null);
|
|
170
|
-
const [tooltipState, setTooltipState] = useState<MazeTooltipState | null>(null);
|
|
171
|
-
const [focusedRoomId, setFocusedRoomId] = useState<string | null>(null);
|
|
172
|
-
const [focusedBusyRoomIndex, setFocusedBusyRoomIndex] = useState(0);
|
|
173
|
-
const [animationClockMs, setAnimationClockMs] = useState(() => Date.now());
|
|
174
|
-
const [isDarkTheme, setIsDarkTheme] = useState(false);
|
|
175
|
-
|
|
176
|
-
const layout = useMemo<MazeOfficeLayout>(
|
|
177
|
-
() =>
|
|
178
|
-
buildMazeOfficeLayout({
|
|
179
|
-
agents,
|
|
180
|
-
federatedAgents,
|
|
181
|
-
publicUrl,
|
|
182
|
-
folders,
|
|
183
|
-
}),
|
|
184
|
-
[agents, federatedAgents, publicUrl, folders],
|
|
185
|
-
);
|
|
186
|
-
const sceneMetrics = useMemo(() => createSceneMetrics(layout), [layout]);
|
|
187
|
-
const defaultCamera = useMemo(() => fitCameraToScene(sceneMetrics, containerSize), [sceneMetrics, containerSize]);
|
|
188
|
-
const theme = useMemo(() => createMazeThemePalette(isDarkTheme), [isDarkTheme]);
|
|
189
|
-
const roomById = useMemo(() => new Map(layout.rooms.map((room) => [room.id, room])), [layout.rooms]);
|
|
190
|
-
const agentsByRoomId = useMemo(() => {
|
|
191
|
-
return layout.agents.reduce<Map<string, Array<OfficeAgentVisual>>>((map, agent) => {
|
|
192
|
-
const roomAgents = map.get(agent.roomId) || [];
|
|
193
|
-
roomAgents.push(agent);
|
|
194
|
-
map.set(agent.roomId, roomAgents);
|
|
195
|
-
return map;
|
|
196
|
-
}, new Map());
|
|
197
|
-
}, [layout.agents]);
|
|
198
|
-
const busyRoomIds = useMemo(() => {
|
|
199
|
-
return [...layout.rooms]
|
|
200
|
-
.map((room) => {
|
|
201
|
-
const score = (agentsByRoomId.get(room.id) || []).reduce((total, agent) => {
|
|
202
|
-
if (agent.state === 'meeting') {
|
|
203
|
-
return total + 3;
|
|
204
|
-
}
|
|
205
|
-
if (agent.state === 'working') {
|
|
206
|
-
return total + 2;
|
|
207
|
-
}
|
|
208
|
-
if (agent.state === 'moving') {
|
|
209
|
-
return total + 1;
|
|
210
|
-
}
|
|
211
|
-
return total;
|
|
212
|
-
}, 0);
|
|
213
|
-
|
|
214
|
-
return { roomId: room.id, score };
|
|
215
|
-
})
|
|
216
|
-
.sort((left, right) => right.score - left.score || left.roomId.localeCompare(right.roomId))
|
|
217
|
-
.filter(({ score }) => score > 0)
|
|
218
|
-
.map(({ roomId }) => roomId);
|
|
219
|
-
}, [agentsByRoomId, layout.rooms]);
|
|
220
|
-
const projectedAgents = useMemo(
|
|
221
|
-
() => createProjectedAgents(layout.agents, animationClockMs, sceneMetrics, camera),
|
|
222
|
-
[layout.agents, animationClockMs, sceneMetrics, camera],
|
|
223
|
-
);
|
|
224
|
-
const hoveredAgent = useMemo(
|
|
225
|
-
() => (tooltipState ? layout.agents.find((agent) => agent.id === tooltipState.agentId) || null : null),
|
|
226
|
-
[tooltipState, layout.agents],
|
|
227
|
-
);
|
|
228
|
-
|
|
229
|
-
useEffect(() => {
|
|
230
|
-
setCamera(defaultCamera);
|
|
231
|
-
}, [defaultCamera]);
|
|
232
|
-
|
|
233
|
-
useEffect(() => {
|
|
234
|
-
const intervalId = window.setInterval(() => {
|
|
235
|
-
setAnimationClockMs(Date.now());
|
|
236
|
-
}, MAZE_ANIMATION_INTERVAL_MS);
|
|
237
|
-
|
|
238
|
-
return () => {
|
|
239
|
-
window.clearInterval(intervalId);
|
|
240
|
-
};
|
|
241
|
-
}, []);
|
|
242
|
-
|
|
243
|
-
useEffect(() => {
|
|
244
|
-
const container = containerRef.current;
|
|
245
|
-
if (!container) {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
250
|
-
const nextEntry = entries[0];
|
|
251
|
-
if (!nextEntry) {
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
setContainerSize({
|
|
256
|
-
width: nextEntry.contentRect.width,
|
|
257
|
-
height: nextEntry.contentRect.height,
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
resizeObserver.observe(container);
|
|
262
|
-
|
|
263
|
-
return () => {
|
|
264
|
-
resizeObserver.disconnect();
|
|
265
|
-
};
|
|
266
|
-
}, []);
|
|
267
|
-
|
|
268
|
-
useEffect(() => {
|
|
269
|
-
const rootElement = document.documentElement;
|
|
270
|
-
|
|
271
|
-
const updateTheme = (): void => {
|
|
272
|
-
setIsDarkTheme(
|
|
273
|
-
rootElement.classList.contains('dark') || rootElement.getAttribute('data-theme-resolved') === 'dark',
|
|
274
|
-
);
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
updateTheme();
|
|
278
|
-
|
|
279
|
-
const observer = new MutationObserver(updateTheme);
|
|
280
|
-
observer.observe(rootElement, {
|
|
281
|
-
attributes: true,
|
|
282
|
-
attributeFilter: ['class', 'data-theme-resolved'],
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
return () => {
|
|
286
|
-
observer.disconnect();
|
|
287
|
-
};
|
|
288
|
-
}, []);
|
|
289
|
-
|
|
290
|
-
const openHref = (href: string): void => {
|
|
291
|
-
if (/^https?:\/\//.test(href)) {
|
|
292
|
-
window.open(href, '_blank', 'noopener,noreferrer');
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
router.push(href);
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
const focusRoom = (roomId: string): void => {
|
|
300
|
-
const room = roomById.get(roomId);
|
|
301
|
-
if (!room) {
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
const targetZoom = Math.max(defaultCamera.zoom, Math.min(defaultCamera.zoom * 1.28, 1.72));
|
|
306
|
-
const roomCenter = projectRoomCenter(room, sceneMetrics);
|
|
307
|
-
|
|
308
|
-
setFocusedRoomId(roomId);
|
|
309
|
-
setCamera({
|
|
310
|
-
zoom: targetZoom,
|
|
311
|
-
x: containerSize.width / 2 - roomCenter.x * targetZoom,
|
|
312
|
-
y: containerSize.height / 2 - roomCenter.y * targetZoom,
|
|
313
|
-
});
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
const focusBusyRoom = (): void => {
|
|
317
|
-
if (busyRoomIds.length === 0) {
|
|
318
|
-
const firstRoom = layout.rooms[0];
|
|
319
|
-
if (firstRoom) {
|
|
320
|
-
focusRoom(firstRoom.id);
|
|
321
|
-
}
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
const nextRoomId = busyRoomIds[focusedBusyRoomIndex % busyRoomIds.length];
|
|
326
|
-
setFocusedBusyRoomIndex((previousIndex) => previousIndex + 1);
|
|
327
|
-
focusRoom(nextRoomId);
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
const nudgeZoom = (zoomDelta: number): void => {
|
|
331
|
-
setCamera((currentCamera) => {
|
|
332
|
-
const nextZoom = clamp(currentCamera.zoom * zoomDelta, defaultCamera.zoom * 0.85, 2.2);
|
|
333
|
-
const centerX = containerSize.width / 2;
|
|
334
|
-
const centerY = containerSize.height / 2;
|
|
335
|
-
const sceneCenterX = (centerX - currentCamera.x) / currentCamera.zoom;
|
|
336
|
-
const sceneCenterY = (centerY - currentCamera.y) / currentCamera.zoom;
|
|
337
|
-
|
|
338
|
-
return {
|
|
339
|
-
zoom: nextZoom,
|
|
340
|
-
x: centerX - sceneCenterX * nextZoom,
|
|
341
|
-
y: centerY - sceneCenterY * nextZoom,
|
|
342
|
-
};
|
|
343
|
-
});
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
const resetCamera = (): void => {
|
|
347
|
-
setFocusedRoomId(null);
|
|
348
|
-
setCamera(defaultCamera);
|
|
349
|
-
};
|
|
350
|
-
|
|
351
|
-
const updateTooltip = (event: { clientX: number; clientY: number }, agentId: string): void => {
|
|
352
|
-
const containerRect = containerRef.current?.getBoundingClientRect();
|
|
353
|
-
if (!containerRect) {
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
setTooltipState({
|
|
358
|
-
agentId,
|
|
359
|
-
x: event.clientX - containerRect.left,
|
|
360
|
-
y: event.clientY - containerRect.top,
|
|
361
|
-
});
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
const handlePointerDown = (event: ReactPointerEvent<SVGSVGElement>): void => {
|
|
365
|
-
setDragState({
|
|
366
|
-
pointerX: event.clientX,
|
|
367
|
-
pointerY: event.clientY,
|
|
368
|
-
cameraX: camera.x,
|
|
369
|
-
cameraY: camera.y,
|
|
370
|
-
});
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
const handlePointerMove = (event: ReactPointerEvent<SVGSVGElement>): void => {
|
|
374
|
-
if (!dragState) {
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
setCamera((currentCamera) => ({
|
|
379
|
-
...currentCamera,
|
|
380
|
-
x: dragState.cameraX + (event.clientX - dragState.pointerX),
|
|
381
|
-
y: dragState.cameraY + (event.clientY - dragState.pointerY),
|
|
382
|
-
}));
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
const handleWheel = (event: ReactWheelEvent<HTMLDivElement>): void => {
|
|
386
|
-
event.preventDefault();
|
|
387
|
-
nudgeZoom(event.deltaY > 0 ? 0.92 : 1.08);
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
if (layout.agents.length === 0) {
|
|
391
|
-
return (
|
|
392
|
-
<div className="flex justify-center py-12 text-gray-500">
|
|
393
|
-
{formatText('No agents with built-in avatars to show in maze.')}
|
|
394
|
-
</div>
|
|
395
|
-
);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
return (
|
|
399
|
-
<div className="space-y-4">
|
|
400
|
-
<AgentsOfficeToolbar
|
|
401
|
-
rooms={layout.rooms}
|
|
402
|
-
stateCounts={layout.stateCounts}
|
|
403
|
-
focusedRoomId={focusedRoomId}
|
|
404
|
-
onZoomIn={() => nudgeZoom(1.1)}
|
|
405
|
-
onZoomOut={() => nudgeZoom(0.9)}
|
|
406
|
-
onResetCamera={resetCamera}
|
|
407
|
-
onAutoArrange={resetCamera}
|
|
408
|
-
onFocusMeetingRoom={focusBusyRoom}
|
|
409
|
-
onFocusRoom={focusRoom}
|
|
410
|
-
/>
|
|
411
|
-
|
|
412
|
-
<div
|
|
413
|
-
ref={containerRef}
|
|
414
|
-
className="relative overflow-hidden rounded-[32px] border border-slate-200 bg-gradient-to-br from-slate-50 via-cyan-50/70 to-white shadow-[inset_0_1px_0_rgba(255,255,255,0.7)] dark:border-slate-700 dark:from-slate-950 dark:via-sky-950/40 dark:to-slate-950"
|
|
415
|
-
style={{ height: MAZE_CANVAS_HEIGHT }}
|
|
416
|
-
onWheel={handleWheel}
|
|
417
|
-
>
|
|
418
|
-
<div className="pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_left,_rgba(34,211,238,0.14),_transparent_36%),radial-gradient(circle_at_top_right,_rgba(56,189,248,0.1),_transparent_28%),radial-gradient(circle_at_bottom,_rgba(14,165,233,0.08),_transparent_38%)] dark:bg-[radial-gradient(circle_at_top_left,_rgba(34,211,238,0.12),_transparent_30%),radial-gradient(circle_at_top_right,_rgba(96,165,250,0.1),_transparent_30%),radial-gradient(circle_at_bottom,_rgba(14,165,233,0.08),_transparent_36%)]" />
|
|
419
|
-
|
|
420
|
-
<svg
|
|
421
|
-
className={`absolute inset-0 h-full w-full ${dragState ? 'cursor-grabbing' : 'cursor-grab'}`}
|
|
422
|
-
viewBox={`0 0 ${containerSize.width} ${containerSize.height}`}
|
|
423
|
-
onPointerDown={handlePointerDown}
|
|
424
|
-
onPointerMove={handlePointerMove}
|
|
425
|
-
onPointerUp={() => setDragState(null)}
|
|
426
|
-
onPointerLeave={() => setDragState(null)}
|
|
427
|
-
>
|
|
428
|
-
<MazeSurface width={containerSize.width} height={containerSize.height} theme={theme} />
|
|
429
|
-
<g transform={`translate(${camera.x} ${camera.y}) scale(${camera.zoom})`}>
|
|
430
|
-
{layout.corridors.map((corridor) => (
|
|
431
|
-
<MazeCorridorBlock key={corridor.id} corridor={corridor} metrics={sceneMetrics} theme={theme} />
|
|
432
|
-
))}
|
|
433
|
-
{layout.links.map((link) => (
|
|
434
|
-
<MazeCommunicationBeam key={link.id} link={link} metrics={sceneMetrics} theme={theme} />
|
|
435
|
-
))}
|
|
436
|
-
{layout.rooms.map((room) => (
|
|
437
|
-
<MazeRoomBlock
|
|
438
|
-
key={room.id}
|
|
439
|
-
room={room}
|
|
440
|
-
metrics={sceneMetrics}
|
|
441
|
-
theme={theme}
|
|
442
|
-
roomAgents={agentsByRoomId.get(room.id) || []}
|
|
443
|
-
isFocused={focusedRoomId === null || focusedRoomId === room.id}
|
|
444
|
-
/>
|
|
445
|
-
))}
|
|
446
|
-
{projectedAgents.map((projectedAgent) => (
|
|
447
|
-
<MazeAgentShadow key={`shadow-${projectedAgent.agent.id}`} projectedAgent={projectedAgent} theme={theme} />
|
|
448
|
-
))}
|
|
449
|
-
</g>
|
|
450
|
-
</svg>
|
|
451
|
-
|
|
452
|
-
<div className="pointer-events-none absolute inset-0">
|
|
453
|
-
{projectedAgents.map((projectedAgent) => (
|
|
454
|
-
<button
|
|
455
|
-
key={projectedAgent.agent.id}
|
|
456
|
-
type="button"
|
|
457
|
-
onClick={() => openHref(projectedAgent.agent.defaultHref)}
|
|
458
|
-
onMouseEnter={(event) => updateTooltip(event, projectedAgent.agent.id)}
|
|
459
|
-
onMouseMove={(event) => updateTooltip(event, projectedAgent.agent.id)}
|
|
460
|
-
onMouseLeave={() => setTooltipState(null)}
|
|
461
|
-
className="agents-maze-avatar pointer-events-auto absolute bg-transparent p-0"
|
|
462
|
-
style={{
|
|
463
|
-
left: projectedAgent.screenX,
|
|
464
|
-
top: projectedAgent.screenY,
|
|
465
|
-
width: projectedAgent.size,
|
|
466
|
-
height: projectedAgent.size,
|
|
467
|
-
transform: `translate(${-projectedAgent.size / 2}px, ${-projectedAgent.size * 0.78}px)`,
|
|
468
|
-
animationDuration: `${2600 + (projectedAgent.agent.seed % 1100)}ms`,
|
|
469
|
-
animationDelay: `-${projectedAgent.agent.seed % 900}ms`,
|
|
470
|
-
filter: 'drop-shadow(0 14px 24px rgba(15,23,42,0.24))',
|
|
471
|
-
}}
|
|
472
|
-
aria-label={`Open ${
|
|
473
|
-
projectedAgent.agent.agent.meta.fullname || projectedAgent.agent.agent.agentName
|
|
474
|
-
}`}
|
|
475
|
-
>
|
|
476
|
-
<span
|
|
477
|
-
className="agents-maze-pulse pointer-events-none absolute inset-0 rounded-full"
|
|
478
|
-
style={{
|
|
479
|
-
background: resolveAgentHalo(projectedAgent.agent.state, theme),
|
|
480
|
-
opacity: 0.34,
|
|
481
|
-
transform: 'scale(0.72)',
|
|
482
|
-
animationDuration: `${1800 + (projectedAgent.agent.seed % 900)}ms`,
|
|
483
|
-
}}
|
|
484
|
-
/>
|
|
485
|
-
<span className="relative block h-full w-full">
|
|
486
|
-
<AgentAvatar
|
|
487
|
-
agent={projectedAgent.agent.agent}
|
|
488
|
-
baseUrl={projectedAgent.agent.agent.serverUrl || publicUrl}
|
|
489
|
-
size={Math.round(projectedAgent.size)}
|
|
490
|
-
surface="transparent"
|
|
491
|
-
alt={projectedAgent.agent.agent.meta.fullname || projectedAgent.agent.agent.agentName}
|
|
492
|
-
className="h-full w-full"
|
|
493
|
-
/>
|
|
494
|
-
</span>
|
|
495
|
-
</button>
|
|
496
|
-
))}
|
|
497
|
-
</div>
|
|
498
|
-
|
|
499
|
-
{hoveredAgent && tooltipState && (
|
|
500
|
-
<OfficeTooltip
|
|
501
|
-
agent={hoveredAgent}
|
|
502
|
-
publicUrl={publicUrl}
|
|
503
|
-
x={clamp(tooltipState.x + 18, 18, containerSize.width - TOOLTIP_WIDTH - 18)}
|
|
504
|
-
y={clamp(tooltipState.y - 16, 18, containerSize.height - 210)}
|
|
505
|
-
onOpenProfile={() => openHref(hoveredAgent.profileHref)}
|
|
506
|
-
onOpenChat={() => openHref(hoveredAgent.chatHref)}
|
|
507
|
-
onOpenBook={() => openHref(hoveredAgent.bookHref)}
|
|
508
|
-
/>
|
|
509
|
-
)}
|
|
510
|
-
</div>
|
|
511
|
-
</div>
|
|
512
|
-
);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* Static SVG background shared by the maze scene.
|
|
517
|
-
*/
|
|
518
|
-
function MazeSurface(props: { width: number; height: number; theme: MazeThemePalette }) {
|
|
519
|
-
const { width, height, theme } = props;
|
|
520
|
-
|
|
521
|
-
return (
|
|
522
|
-
<>
|
|
523
|
-
<defs>
|
|
524
|
-
<linearGradient id="maze-surface-gradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
525
|
-
<stop offset="0%" stopColor={theme.surfaceTop} />
|
|
526
|
-
<stop offset="100%" stopColor={theme.surfaceBottom} />
|
|
527
|
-
</linearGradient>
|
|
528
|
-
<pattern id="maze-grid-pattern" width="24" height="24" patternUnits="userSpaceOnUse">
|
|
529
|
-
<path d="M 24 0 L 0 0 0 24" fill="none" stroke={theme.gridStroke} strokeWidth="1" />
|
|
530
|
-
<circle cx="1" cy="1" r="0.8" fill={theme.gridDot} />
|
|
531
|
-
</pattern>
|
|
532
|
-
</defs>
|
|
533
|
-
|
|
534
|
-
<rect width={width} height={height} fill="url(#maze-surface-gradient)" />
|
|
535
|
-
<rect width={width} height={height} fill="url(#maze-grid-pattern)" opacity={0.45} />
|
|
536
|
-
<ellipse cx={width * 0.5} cy={height * 0.08} rx={width * 0.45} ry={height * 0.26} fill={theme.spotlightFill} />
|
|
537
|
-
</>
|
|
538
|
-
);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Renders one corridor floor block.
|
|
543
|
-
*/
|
|
544
|
-
function MazeCorridorBlock(props: {
|
|
545
|
-
corridor: MazeCorridor;
|
|
546
|
-
metrics: OfficeSceneMetrics;
|
|
547
|
-
theme: MazeThemePalette;
|
|
548
|
-
}) {
|
|
549
|
-
const { corridor, metrics, theme } = props;
|
|
550
|
-
|
|
551
|
-
return (
|
|
552
|
-
<>
|
|
553
|
-
{OfficeSceneGeometry.renderIsometricBlock(
|
|
554
|
-
corridor.id,
|
|
555
|
-
{
|
|
556
|
-
x: corridor.x,
|
|
557
|
-
y: corridor.y,
|
|
558
|
-
width: corridor.width,
|
|
559
|
-
depth: corridor.depth,
|
|
560
|
-
elevation: MAZE_CORRIDOR_HEIGHT,
|
|
561
|
-
},
|
|
562
|
-
metrics,
|
|
563
|
-
{
|
|
564
|
-
topFill: theme.corridorTop,
|
|
565
|
-
frontFill: theme.corridorFront,
|
|
566
|
-
rightFill: theme.corridorRight,
|
|
567
|
-
topStroke: theme.corridorStroke,
|
|
568
|
-
faceStroke: theme.corridorStroke,
|
|
569
|
-
topStrokeWidth: 1.1,
|
|
570
|
-
faceStrokeWidth: 0.9,
|
|
571
|
-
},
|
|
572
|
-
)}
|
|
573
|
-
</>
|
|
574
|
-
);
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* Renders one room block with desk props and labels.
|
|
579
|
-
*/
|
|
580
|
-
function MazeRoomBlock(props: {
|
|
581
|
-
room: MazeRoom;
|
|
582
|
-
metrics: OfficeSceneMetrics;
|
|
583
|
-
theme: MazeThemePalette;
|
|
584
|
-
roomAgents: ReadonlyArray<OfficeAgentVisual>;
|
|
585
|
-
isFocused: boolean;
|
|
586
|
-
}) {
|
|
587
|
-
const { room, metrics, theme, roomAgents, isFocused } = props;
|
|
588
|
-
const roomTopFill = mixHexColors(room.color, theme.surfaceTop, 0.68);
|
|
589
|
-
const roomFrontFill = mixHexColors(room.color, theme.surfaceBottom, 0.42);
|
|
590
|
-
const roomRightFill = mixHexColors(room.color, theme.corridorFront, 0.38);
|
|
591
|
-
const roomCenter = projectRoomCenter(room, metrics);
|
|
592
|
-
const busyCount = roomAgents.filter((agent) => agent.state === 'meeting' || agent.state === 'working').length;
|
|
593
|
-
|
|
594
|
-
return (
|
|
595
|
-
<g opacity={isFocused ? 1 : 0.42}>
|
|
596
|
-
{OfficeSceneGeometry.renderIsometricBlock(
|
|
597
|
-
room.id,
|
|
598
|
-
{
|
|
599
|
-
x: room.x,
|
|
600
|
-
y: room.y,
|
|
601
|
-
width: room.width,
|
|
602
|
-
depth: room.depth,
|
|
603
|
-
elevation: MAZE_ROOM_HEIGHT,
|
|
604
|
-
},
|
|
605
|
-
metrics,
|
|
606
|
-
{
|
|
607
|
-
topFill: roomTopFill,
|
|
608
|
-
frontFill: roomFrontFill,
|
|
609
|
-
rightFill: roomRightFill,
|
|
610
|
-
topStroke: theme.roomStroke,
|
|
611
|
-
faceStroke: theme.roomStroke,
|
|
612
|
-
topStrokeWidth: 1.4,
|
|
613
|
-
faceStrokeWidth: 1,
|
|
614
|
-
},
|
|
615
|
-
)}
|
|
616
|
-
|
|
617
|
-
{room.deskSlots.slice(0, 4).map((deskSlot, index) => (
|
|
618
|
-
<MazeWorkstation
|
|
619
|
-
key={`${room.id}:workstation:${index}`}
|
|
620
|
-
point={deskSlot}
|
|
621
|
-
accentColor={room.color}
|
|
622
|
-
metrics={metrics}
|
|
623
|
-
theme={theme}
|
|
624
|
-
/>
|
|
625
|
-
))}
|
|
626
|
-
|
|
627
|
-
{roomAgents.some((agent) => agent.state === 'meeting') && (
|
|
628
|
-
<MazeMeetingTable room={room} metrics={metrics} theme={theme} />
|
|
629
|
-
)}
|
|
630
|
-
|
|
631
|
-
<ellipse cx={roomCenter.x} cy={roomCenter.y - 4} rx={58} ry={22} fill={theme.roomShadow} opacity={0.18} />
|
|
632
|
-
<rect
|
|
633
|
-
x={roomCenter.x - 58}
|
|
634
|
-
y={roomCenter.y - 42}
|
|
635
|
-
width={116}
|
|
636
|
-
height={18}
|
|
637
|
-
rx={9}
|
|
638
|
-
fill={theme.labelPanel}
|
|
639
|
-
opacity={0.92}
|
|
640
|
-
/>
|
|
641
|
-
<text x={roomCenter.x} y={roomCenter.y - 29} textAnchor="middle" fontSize={10} fontWeight={800} fill={theme.labelText}>
|
|
642
|
-
{room.label}
|
|
643
|
-
</text>
|
|
644
|
-
<text
|
|
645
|
-
x={roomCenter.x}
|
|
646
|
-
y={roomCenter.y - 12}
|
|
647
|
-
textAnchor="middle"
|
|
648
|
-
fontSize={7.4}
|
|
649
|
-
fontWeight={600}
|
|
650
|
-
fill={theme.subtitleText}
|
|
651
|
-
>
|
|
652
|
-
{room.subtitle}
|
|
653
|
-
</text>
|
|
654
|
-
|
|
655
|
-
{busyCount > 0 && (
|
|
656
|
-
<g transform={`translate(${roomCenter.x + 56} ${roomCenter.y - 40})`}>
|
|
657
|
-
<rect width={24} height={14} rx={7} fill={theme.busyBadge} />
|
|
658
|
-
<text x={12} y={10.2} textAnchor="middle" fontSize={8} fontWeight={800} fill="white">
|
|
659
|
-
{busyCount}
|
|
660
|
-
</text>
|
|
661
|
-
</g>
|
|
662
|
-
)}
|
|
663
|
-
</g>
|
|
664
|
-
);
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
/**
|
|
668
|
-
* Renders one workstation block on a room floor.
|
|
669
|
-
*/
|
|
670
|
-
function MazeWorkstation(props: {
|
|
671
|
-
point: OfficePoint;
|
|
672
|
-
accentColor: string;
|
|
673
|
-
metrics: OfficeSceneMetrics;
|
|
674
|
-
theme: MazeThemePalette;
|
|
675
|
-
}) {
|
|
676
|
-
const { point, accentColor, metrics, theme } = props;
|
|
677
|
-
const topPoint = OfficeSceneGeometry.projectPoint(point, 20, metrics);
|
|
678
|
-
|
|
679
|
-
return (
|
|
680
|
-
<g>
|
|
681
|
-
{OfficeSceneGeometry.renderIsometricBlock(
|
|
682
|
-
`${point.x}:${point.y}`,
|
|
683
|
-
{
|
|
684
|
-
x: point.x - 18,
|
|
685
|
-
y: point.y - 10,
|
|
686
|
-
width: 30,
|
|
687
|
-
depth: 18,
|
|
688
|
-
elevation: 10,
|
|
689
|
-
},
|
|
690
|
-
metrics,
|
|
691
|
-
{
|
|
692
|
-
topFill: mixHexColors(accentColor, theme.workstationTop, 0.3),
|
|
693
|
-
frontFill: theme.workstationFront,
|
|
694
|
-
rightFill: theme.workstationRight,
|
|
695
|
-
topStroke: theme.roomStroke,
|
|
696
|
-
faceStroke: theme.roomStroke,
|
|
697
|
-
topStrokeWidth: 0.9,
|
|
698
|
-
faceStrokeWidth: 0.8,
|
|
699
|
-
},
|
|
700
|
-
)}
|
|
701
|
-
<rect x={topPoint.x - 5} y={topPoint.y - 12} width={10} height={7} rx={2} fill={theme.workstationScreen} opacity={0.9}>
|
|
702
|
-
<animate attributeName="opacity" values="0.5;0.95;0.6" dur="2.8s" repeatCount="indefinite" />
|
|
703
|
-
</rect>
|
|
704
|
-
</g>
|
|
705
|
-
);
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Renders the central meeting table for collaborative rooms.
|
|
710
|
-
*/
|
|
711
|
-
function MazeMeetingTable(props: { room: MazeRoom; metrics: OfficeSceneMetrics; theme: MazeThemePalette }) {
|
|
712
|
-
const { room, metrics, theme } = props;
|
|
713
|
-
const centerX = room.x + room.width / 2;
|
|
714
|
-
const centerY = room.y + room.depth / 2;
|
|
715
|
-
|
|
716
|
-
return (
|
|
717
|
-
<>
|
|
718
|
-
{OfficeSceneGeometry.renderIsometricBlock(
|
|
719
|
-
`${room.id}:meeting-table`,
|
|
720
|
-
{
|
|
721
|
-
x: centerX - 34,
|
|
722
|
-
y: centerY - 22,
|
|
723
|
-
width: 68,
|
|
724
|
-
depth: 44,
|
|
725
|
-
elevation: 12,
|
|
726
|
-
},
|
|
727
|
-
metrics,
|
|
728
|
-
{
|
|
729
|
-
topFill: theme.meetingTableTop,
|
|
730
|
-
frontFill: theme.meetingTableFront,
|
|
731
|
-
rightFill: theme.meetingTableRight,
|
|
732
|
-
topStroke: theme.roomStroke,
|
|
733
|
-
faceStroke: theme.roomStroke,
|
|
734
|
-
topStrokeWidth: 0.9,
|
|
735
|
-
faceStrokeWidth: 0.8,
|
|
736
|
-
},
|
|
737
|
-
)}
|
|
738
|
-
</>
|
|
739
|
-
);
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
/**
|
|
743
|
-
* Renders one animated communication beam between two agents.
|
|
744
|
-
*/
|
|
745
|
-
function MazeCommunicationBeam(props: {
|
|
746
|
-
link: MazeCommunicationLink;
|
|
747
|
-
metrics: OfficeSceneMetrics;
|
|
748
|
-
theme: MazeThemePalette;
|
|
749
|
-
}) {
|
|
750
|
-
const { link, metrics, theme } = props;
|
|
751
|
-
const fromPoint = OfficeSceneGeometry.projectPoint(link.from, OfficeSceneGeometry.OFFICE_OBJECT_HEIGHT + 8, metrics);
|
|
752
|
-
const toPoint = OfficeSceneGeometry.projectPoint(link.to, OfficeSceneGeometry.OFFICE_OBJECT_HEIGHT + 8, metrics);
|
|
753
|
-
const midX = (fromPoint.x + toPoint.x) / 2;
|
|
754
|
-
const midY = Math.min(fromPoint.y, toPoint.y) - 18;
|
|
755
|
-
const stroke =
|
|
756
|
-
link.tone === 'meeting' ? theme.beamMeeting : link.tone === 'handoff' ? theme.beamHandoff : theme.beamWorking;
|
|
757
|
-
|
|
758
|
-
return (
|
|
759
|
-
<path
|
|
760
|
-
d={`M ${fromPoint.x} ${fromPoint.y} Q ${midX} ${midY} ${toPoint.x} ${toPoint.y}`}
|
|
761
|
-
fill="none"
|
|
762
|
-
stroke={stroke}
|
|
763
|
-
strokeWidth={2}
|
|
764
|
-
strokeLinecap="round"
|
|
765
|
-
strokeDasharray="6 8"
|
|
766
|
-
opacity={0.9}
|
|
767
|
-
>
|
|
768
|
-
<animate attributeName="stroke-dashoffset" values="0;-42" dur="1.6s" repeatCount="indefinite" />
|
|
769
|
-
<animate attributeName="opacity" values="0.42;0.92;0.42" dur="2.4s" repeatCount="indefinite" />
|
|
770
|
-
</path>
|
|
771
|
-
);
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
* Renders the shadow and activity halo under one avatar.
|
|
776
|
-
*/
|
|
777
|
-
function MazeAgentShadow(props: { projectedAgent: MazeProjectedAgent; theme: MazeThemePalette }) {
|
|
778
|
-
const { projectedAgent, theme } = props;
|
|
779
|
-
const haloFill = resolveAgentHalo(projectedAgent.agent.state, theme);
|
|
780
|
-
|
|
781
|
-
return (
|
|
782
|
-
<g>
|
|
783
|
-
<ellipse cx={projectedAgent.shadowPoint.x} cy={projectedAgent.shadowPoint.y + 8} rx={15} ry={7} fill={theme.shadowFill} opacity={0.34} />
|
|
784
|
-
<circle cx={projectedAgent.shadowPoint.x} cy={projectedAgent.shadowPoint.y - 4} r={16} fill={haloFill} opacity={0.18}>
|
|
785
|
-
<animate attributeName="r" values="13;18;13" dur="2.2s" repeatCount="indefinite" />
|
|
786
|
-
</circle>
|
|
787
|
-
</g>
|
|
788
|
-
);
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
/**
|
|
792
|
-
* Creates projected scene metrics for the maze component.
|
|
793
|
-
*/
|
|
794
|
-
function createSceneMetrics(layout: MazeOfficeLayout): OfficeSceneMetrics {
|
|
795
|
-
return {
|
|
796
|
-
sceneWidth: layout.worldWidth + layout.worldHeight + MAZE_SCENE_PADDING * 2,
|
|
797
|
-
sceneHeight: (layout.worldWidth + layout.worldHeight) * OfficeSceneGeometry.ISO_Y_SCALE + MAZE_SCENE_PADDING * 2,
|
|
798
|
-
originX: layout.worldHeight + MAZE_SCENE_PADDING * 0.92,
|
|
799
|
-
originY: MAZE_SCENE_PADDING,
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* Computes the default fitted camera for the maze scene.
|
|
805
|
-
*/
|
|
806
|
-
function fitCameraToScene(metrics: OfficeSceneMetrics, containerSize: MazeContainerSize): MazeCamera {
|
|
807
|
-
const zoom = Math.min(containerSize.width / metrics.sceneWidth, containerSize.height / metrics.sceneHeight) * 0.95;
|
|
808
|
-
|
|
809
|
-
return {
|
|
810
|
-
zoom,
|
|
811
|
-
x: (containerSize.width - metrics.sceneWidth * zoom) / 2,
|
|
812
|
-
y: (containerSize.height - metrics.sceneHeight * zoom) / 2,
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
/**
|
|
817
|
-
* Projects the center of one maze room into screen coordinates.
|
|
818
|
-
*/
|
|
819
|
-
function projectRoomCenter(room: MazeRoom, metrics: OfficeSceneMetrics): OfficePoint {
|
|
820
|
-
return OfficeSceneGeometry.projectPoint(
|
|
821
|
-
{
|
|
822
|
-
x: room.x + room.width / 2,
|
|
823
|
-
y: room.y + room.depth / 2,
|
|
824
|
-
},
|
|
825
|
-
MAZE_ROOM_HEIGHT,
|
|
826
|
-
metrics,
|
|
827
|
-
);
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* Creates screen-space models for each animated agent.
|
|
832
|
-
*/
|
|
833
|
-
function createProjectedAgents(
|
|
834
|
-
agents: ReadonlyArray<OfficeAgentVisual>,
|
|
835
|
-
animationClockMs: number,
|
|
836
|
-
metrics: OfficeSceneMetrics,
|
|
837
|
-
camera: MazeCamera,
|
|
838
|
-
): Array<MazeProjectedAgent> {
|
|
839
|
-
return agents.map((agent) => {
|
|
840
|
-
const worldPoint = resolveAnimatedAgentPoint(agent, animationClockMs);
|
|
841
|
-
const scenePoint = OfficeSceneGeometry.projectPoint(worldPoint, OfficeSceneGeometry.OFFICE_OBJECT_HEIGHT + 12, metrics);
|
|
842
|
-
const shadowPoint = OfficeSceneGeometry.projectPoint(worldPoint, 0, metrics);
|
|
843
|
-
const size = clamp(MAZE_AVATAR_BASE_SIZE * Math.max(0.82, Math.min(1.28, camera.zoom + 0.08)), 38, 78);
|
|
844
|
-
|
|
845
|
-
return {
|
|
846
|
-
agent,
|
|
847
|
-
shadowPoint,
|
|
848
|
-
screenX: camera.x + scenePoint.x * camera.zoom,
|
|
849
|
-
screenY: camera.y + scenePoint.y * camera.zoom,
|
|
850
|
-
size,
|
|
851
|
-
};
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* Resolves the current world position of one moving or static agent.
|
|
857
|
-
*/
|
|
858
|
-
function resolveAnimatedAgentPoint(agent: OfficeAgentVisual, animationClockMs: number): OfficePoint {
|
|
859
|
-
if (agent.state !== 'moving' || !agent.path) {
|
|
860
|
-
return agent.position;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
const pathDelayMs = Math.max(0, agent.path.delayMs);
|
|
864
|
-
const pathDurationMs = Math.max(1, agent.path.durationMs);
|
|
865
|
-
const loopDurationMs = pathDelayMs + pathDurationMs;
|
|
866
|
-
const phaseMs = (animationClockMs + (agent.seed % loopDurationMs)) % loopDurationMs;
|
|
867
|
-
|
|
868
|
-
if (phaseMs <= pathDelayMs) {
|
|
869
|
-
return agent.path.from;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
const walkProgress = Math.min(1, (phaseMs - pathDelayMs) / pathDurationMs);
|
|
873
|
-
|
|
874
|
-
return {
|
|
875
|
-
x: agent.path.from.x + (agent.path.to.x - agent.path.from.x) * walkProgress,
|
|
876
|
-
y: agent.path.from.y + (agent.path.to.y - agent.path.from.y) * walkProgress,
|
|
877
|
-
};
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* Resolves a compact scene palette for the current theme mode.
|
|
882
|
-
*/
|
|
883
|
-
function createMazeThemePalette(isDarkTheme: boolean): MazeThemePalette {
|
|
884
|
-
if (isDarkTheme) {
|
|
885
|
-
return {
|
|
886
|
-
surfaceTop: '#031426',
|
|
887
|
-
surfaceBottom: '#081120',
|
|
888
|
-
gridStroke: 'rgba(125,211,252,0.1)',
|
|
889
|
-
gridDot: 'rgba(255,255,255,0.16)',
|
|
890
|
-
corridorTop: '#13314b',
|
|
891
|
-
corridorFront: '#0b2134',
|
|
892
|
-
corridorRight: '#08192a',
|
|
893
|
-
corridorStroke: 'rgba(125,211,252,0.18)',
|
|
894
|
-
roomStroke: 'rgba(148,163,184,0.24)',
|
|
895
|
-
roomShadow: 'rgba(2,6,23,0.42)',
|
|
896
|
-
workstationTop: '#29445c',
|
|
897
|
-
workstationFront: '#142438',
|
|
898
|
-
workstationRight: '#102034',
|
|
899
|
-
workstationScreen: '#67e8f9',
|
|
900
|
-
meetingTableTop: '#1d4ed8',
|
|
901
|
-
meetingTableFront: '#1e3a8a',
|
|
902
|
-
meetingTableRight: '#172554',
|
|
903
|
-
labelText: '#f8fafc',
|
|
904
|
-
subtitleText: '#cbd5e1',
|
|
905
|
-
labelPanel: 'rgba(8,15,28,0.82)',
|
|
906
|
-
shadowFill: 'rgba(2,6,23,0.4)',
|
|
907
|
-
spotlightFill: 'rgba(34,211,238,0.08)',
|
|
908
|
-
beamMeeting: 'rgba(74,222,128,0.95)',
|
|
909
|
-
beamWorking: 'rgba(125,211,252,0.95)',
|
|
910
|
-
beamHandoff: 'rgba(248,113,113,0.95)',
|
|
911
|
-
busyBadge: 'rgba(8,145,178,0.92)',
|
|
912
|
-
haloIdle: 'rgba(148,163,184,0.46)',
|
|
913
|
-
haloWorking: 'rgba(56,189,248,0.58)',
|
|
914
|
-
haloMeeting: 'rgba(74,222,128,0.58)',
|
|
915
|
-
haloMoving: 'rgba(125,211,252,0.6)',
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
return {
|
|
920
|
-
surfaceTop: '#f8fcff',
|
|
921
|
-
surfaceBottom: '#dbeafe',
|
|
922
|
-
gridStroke: 'rgba(71,85,105,0.12)',
|
|
923
|
-
gridDot: 'rgba(255,255,255,0.7)',
|
|
924
|
-
corridorTop: '#d9eefb',
|
|
925
|
-
corridorFront: '#bfdbea',
|
|
926
|
-
corridorRight: '#aecede',
|
|
927
|
-
corridorStroke: 'rgba(14,116,144,0.16)',
|
|
928
|
-
roomStroke: 'rgba(15,23,42,0.16)',
|
|
929
|
-
roomShadow: 'rgba(15,23,42,0.16)',
|
|
930
|
-
workstationTop: '#f8fafc',
|
|
931
|
-
workstationFront: '#dbe5f0',
|
|
932
|
-
workstationRight: '#cad8e6',
|
|
933
|
-
workstationScreen: '#06b6d4',
|
|
934
|
-
meetingTableTop: '#dbeafe',
|
|
935
|
-
meetingTableFront: '#93c5fd',
|
|
936
|
-
meetingTableRight: '#60a5fa',
|
|
937
|
-
labelText: '#0f172a',
|
|
938
|
-
subtitleText: '#334155',
|
|
939
|
-
labelPanel: 'rgba(255,255,255,0.82)',
|
|
940
|
-
shadowFill: 'rgba(15,23,42,0.18)',
|
|
941
|
-
spotlightFill: 'rgba(14,165,233,0.08)',
|
|
942
|
-
beamMeeting: 'rgba(16,185,129,0.9)',
|
|
943
|
-
beamWorking: 'rgba(14,165,233,0.9)',
|
|
944
|
-
beamHandoff: 'rgba(239,68,68,0.9)',
|
|
945
|
-
busyBadge: 'rgba(8,145,178,0.92)',
|
|
946
|
-
haloIdle: 'rgba(100,116,139,0.28)',
|
|
947
|
-
haloWorking: 'rgba(14,165,233,0.36)',
|
|
948
|
-
haloMeeting: 'rgba(16,185,129,0.36)',
|
|
949
|
-
haloMoving: 'rgba(59,130,246,0.34)',
|
|
950
|
-
};
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
/**
|
|
954
|
-
* Resolves the halo fill used by one agent state.
|
|
955
|
-
*/
|
|
956
|
-
function resolveAgentHalo(state: OfficeAgentVisual['state'], theme: MazeThemePalette): string {
|
|
957
|
-
if (state === 'working') {
|
|
958
|
-
return theme.haloWorking;
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
if (state === 'meeting') {
|
|
962
|
-
return theme.haloMeeting;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
if (state === 'moving') {
|
|
966
|
-
return theme.haloMoving;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
return theme.haloIdle;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* Blends two hex-like colors together.
|
|
974
|
-
*/
|
|
975
|
-
function mixHexColors(primary: string, secondary: string, primaryRatio: number): string {
|
|
976
|
-
const normalizedPrimary = normalizeHexColor(primary);
|
|
977
|
-
const normalizedSecondary = normalizeHexColor(secondary);
|
|
978
|
-
const ratio = clamp(primaryRatio, 0, 1);
|
|
979
|
-
const red = Math.round(normalizedPrimary.red * ratio + normalizedSecondary.red * (1 - ratio));
|
|
980
|
-
const green = Math.round(normalizedPrimary.green * ratio + normalizedSecondary.green * (1 - ratio));
|
|
981
|
-
const blue = Math.round(normalizedPrimary.blue * ratio + normalizedSecondary.blue * (1 - ratio));
|
|
982
|
-
|
|
983
|
-
return `#${[red, green, blue].map((value) => value.toString(16).padStart(2, '0')).join('')}`;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* Normalizes a hex-like color into numeric RGB channels.
|
|
988
|
-
*/
|
|
989
|
-
function normalizeHexColor(value: string): { red: number; green: number; blue: number } {
|
|
990
|
-
const normalized = value.replace('#', '').trim();
|
|
991
|
-
const longHex =
|
|
992
|
-
normalized.length === 3
|
|
993
|
-
? normalized
|
|
994
|
-
.split('')
|
|
995
|
-
.map((character) => `${character}${character}`)
|
|
996
|
-
.join('')
|
|
997
|
-
: normalized.padEnd(6, '0').slice(0, 6);
|
|
998
|
-
|
|
999
|
-
return {
|
|
1000
|
-
red: Number.parseInt(longHex.slice(0, 2), 16),
|
|
1001
|
-
green: Number.parseInt(longHex.slice(2, 4), 16),
|
|
1002
|
-
blue: Number.parseInt(longHex.slice(4, 6), 16),
|
|
1003
|
-
};
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
* Clamps a numeric value between two bounds.
|
|
1008
|
-
*/
|
|
1009
|
-
function clamp(value: number, minValue: number, maxValue: number): number {
|
|
1010
|
-
return Math.min(maxValue, Math.max(minValue, value));
|
|
1011
|
-
}
|