@promptbook/cli 0.113.0-1 → 0.113.0-11
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 +1 -17
- package/agents/default/developer.book +3 -0
- package/apps/agents-server/next.config.ts +6 -3
- package/apps/agents-server/src/app/admin/{code-runners/CodeRunnersClient.tsx → harness-auth/HarnessAuthClient.tsx} +98 -65
- package/apps/agents-server/src/app/admin/{code-runners → harness-auth}/page.tsx +4 -4
- package/apps/agents-server/src/app/admin/resource-monitor/page.tsx +456 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +17 -5
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskLogActions.tsx +150 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +62 -18
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskTerminalDialog.tsx +125 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTasksCard.tsx +8 -6
- package/apps/agents-server/src/app/admin/task-manager/page.tsx +3 -2
- package/apps/agents-server/src/app/admin/update/AdvancedOriginRepositoryPanel.tsx +81 -0
- package/apps/agents-server/src/app/admin/update/AutomaticSelfUpdateConfigurationCard.tsx +90 -0
- package/apps/agents-server/src/app/admin/update/CurrentDeploymentCard.tsx +162 -0
- package/apps/agents-server/src/app/admin/update/CustomCommitPicker.tsx +10 -10
- package/apps/agents-server/src/app/admin/update/InstalledVersionsCard.tsx +112 -0
- package/apps/agents-server/src/app/admin/update/PendingCommitsCard.tsx +87 -0
- package/apps/agents-server/src/app/admin/update/TargetEnvironmentCard.tsx +331 -0
- package/apps/agents-server/src/app/admin/update/UpdateClient.tsx +35 -878
- package/apps/agents-server/src/app/admin/update/UpdateDatabaseMigrationsPanel.tsx +305 -0
- package/apps/agents-server/src/app/admin/update/UpdateJobCard.tsx +350 -0
- package/apps/agents-server/src/app/admin/update/UpdateOverview.ts +142 -0
- package/apps/agents-server/src/app/admin/update/buildDeploymentTimeBehindLabel.ts +29 -0
- package/apps/agents-server/src/app/admin/update/formatHumanReadableTimestamp.ts +18 -0
- package/apps/agents-server/src/app/admin/update/getUpdateJobFailureMessage.ts +13 -0
- package/apps/agents-server/src/app/admin/update/getUpdateJobSuccessMessage.ts +13 -0
- package/apps/agents-server/src/app/admin/update/updatePageCardClassName.ts +6 -0
- package/apps/agents-server/src/app/admin/update/useUpdateClientState.ts +675 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +17 -3
- package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +13 -1
- package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +6 -2
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/AgentCodePageClient.tsx +14 -559
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/AgentCodePageHeader.tsx +84 -0
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/AgentCodePageSection.tsx +52 -0
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/GeneratedCodePreview.tsx +138 -0
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/GeneratedHarnessSection.tsx +98 -0
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/SourceBookSection.tsx +66 -0
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/TranspiledCodeErrorBanner.tsx +30 -0
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/TranspiledCodeExportWarningBanner.tsx +62 -0
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/Transpiler.ts +9 -0
- package/apps/agents-server/src/app/agents/[agentName]/export-as-transpiled-code/useAgentCodeExportState.ts +478 -0
- package/apps/agents-server/src/app/api/admin/chat-tasks/[taskId]/terminal/route.ts +52 -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 +13 -13
- package/apps/agents-server/src/app/api/admin/update/route.ts +55 -8
- package/apps/agents-server/src/app/api/admin/update/versions/route.ts +34 -0
- package/apps/agents-server/src/app/api/auth/shibboleth/acs/route.ts +4 -2
- package/apps/agents-server/src/app/api/auth/shibboleth/login/route.ts +3 -1
- package/apps/agents-server/src/app/api/auth/shibboleth/metadata/route.ts +5 -2
- package/apps/agents-server/src/app/api/auth/shibboleth/status/route.ts +5 -2
- package/apps/agents-server/src/app/api/page-preview/check/route.ts +20 -5
- package/apps/agents-server/src/app/api/page-preview/input/route.ts +161 -0
- package/apps/agents-server/src/app/api/page-preview/screenshot/route.ts +21 -13
- package/apps/agents-server/src/app/api/page-preview/stream/route.ts +81 -0
- package/apps/agents-server/src/app/layout.tsx +55 -25
- package/apps/agents-server/src/app/system/utilities/mocked-chats/cloneMockedChatPreset.ts +17 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/confirmDeleteMockedChat.ts +16 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/createDraftWithUpdatedMessage.ts +81 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/createDraftWithUpdatedParticipant.ts +146 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/createDraftWithUpdatedSettings.ts +19 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/createDuplicatedDraft.ts +66 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/findMockedChatById.ts +51 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/persistMockedChats.ts +51 -0
- package/apps/agents-server/src/app/system/utilities/mocked-chats/useMockedChatsEditorState.ts +16 -426
- package/apps/agents-server/src/components/AdminTerminal/AdminTerminalCard.tsx +32 -24
- package/apps/agents-server/src/components/AgentAvatar/AgentAvatar.tsx +1 -1
- package/apps/agents-server/src/components/AgentAvatar/DefaultAgentAvatarVisualProvider.tsx +1 -1
- package/apps/agents-server/src/components/CronJobConfiguration/CronJobConfiguration.tsx +834 -0
- package/apps/agents-server/src/components/Footer/Footer.tsx +38 -15
- package/apps/agents-server/src/components/Header/Header.tsx +16 -3
- package/apps/agents-server/src/components/Header/HeaderDesktopTopMenuNavigation.tsx +22 -2
- package/apps/agents-server/src/components/Header/HeaderHomepageLink.tsx +1 -1
- package/apps/agents-server/src/components/Header/HeaderMobileDrawer.tsx +22 -2
- package/apps/agents-server/src/components/Header/HeaderTypes.ts +12 -1
- package/apps/agents-server/src/components/Header/buildAgentMenuStructure.tsx +6 -4
- package/apps/agents-server/src/components/Header/buildDocumentationDropdownItems.tsx +198 -3
- package/apps/agents-server/src/components/Header/buildHeaderMenuItems.ts +6 -0
- package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +185 -18
- package/apps/agents-server/src/components/Homepage/buildFreeGraphBoxLayout.ts +446 -0
- package/apps/agents-server/src/components/Homepage/buildGraphLayoutNodes.ts +415 -157
- package/apps/agents-server/src/components/Homepage/useAgentsGraphCanvasState.ts +2 -1
- package/apps/agents-server/src/components/Homepage/useAgentsListState.ts +1 -1
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +25 -6
- package/apps/agents-server/src/constants/defaultAgentAvatarVisual.ts +4 -3
- package/apps/agents-server/src/constants/harnessAuthRoutes.ts +20 -0
- package/apps/agents-server/src/database/metadataDefaults.ts +1 -1
- package/apps/agents-server/src/database/migrate.ts +25 -1
- package/apps/agents-server/src/database/migratePrefix.ts +24 -0
- package/apps/agents-server/src/database/runDatabaseMigrations.ts +9 -1
- package/apps/agents-server/src/database/sqlite/$provideLocalSqliteSupabase.ts +3 -1541
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/LocalSqliteQueryBuilder.ts +623 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/LocalSqliteSupabaseClient.ts +64 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.ts +93 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteFilters.ts +202 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteMutationPayload.ts +131 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteRowOperations.ts +102 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.ts +59 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.ts +329 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTypes.ts +84 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteValueCodec.ts +63 -0
- package/apps/agents-server/src/database/sqlite/localSqliteSupabase/normalizeSqliteError.ts +22 -0
- package/apps/agents-server/src/instrumentation-node.ts +15 -0
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +2 -1
- package/apps/agents-server/src/languages/translations/czech.yaml +3 -2
- package/apps/agents-server/src/languages/translations/english.yaml +2 -1
- package/apps/agents-server/src/search/createDefaultServerSearchProviders/loadLocalOrganizationSearchDataset.ts +12 -1
- package/apps/agents-server/src/tools/send_email.ts +1 -2
- package/apps/agents-server/src/{components/Homepage → utils/agentOrganization}/hiddenFolders.ts +49 -29
- package/apps/agents-server/src/utils/agentOrganization/loadAgentOrganizationState.ts +13 -1
- package/apps/agents-server/src/utils/backup/createServerBackupZipStream.ts +7 -1382
- package/apps/agents-server/src/utils/backup/serverBackup/appendAgentBackupEntriesToZip.ts +27 -0
- package/apps/agents-server/src/utils/backup/serverBackup/appendConversationBackupEntriesToZip.ts +140 -0
- package/apps/agents-server/src/utils/backup/serverBackup/appendFileBackupEntriesToZip.ts +147 -0
- package/apps/agents-server/src/utils/backup/serverBackup/appendMessageBackupEntriesToZip.ts +65 -0
- package/apps/agents-server/src/utils/backup/serverBackup/appendMetadataBackupEntriesToZip.ts +39 -0
- package/apps/agents-server/src/utils/backup/serverBackup/appendSectionEntriesToZip.ts +92 -0
- package/apps/agents-server/src/utils/backup/serverBackup/appendUserBackupEntriesToZip.ts +80 -0
- package/apps/agents-server/src/utils/backup/serverBackup/createRedactedWalletBackupRecord.ts +34 -0
- package/apps/agents-server/src/utils/backup/serverBackup/createServerBackupManifest.ts +82 -0
- package/apps/agents-server/src/utils/backup/serverBackup/downloadBackupBinaryContent.ts +39 -0
- package/apps/agents-server/src/utils/backup/serverBackup/resolveFeedbackThreadMessages.ts +53 -0
- package/apps/agents-server/src/utils/backup/serverBackup/serverBackupAttachments.ts +151 -0
- package/apps/agents-server/src/utils/backup/serverBackup/serverBackupContext.ts +167 -0
- package/apps/agents-server/src/utils/backup/serverBackup/serverBackupFilenames.ts +161 -0
- package/apps/agents-server/src/utils/backup/serverBackup/serverBackupPreviews.ts +97 -0
- package/apps/agents-server/src/utils/backup/serverBackup/serverBackupRowUtilities.ts +158 -0
- package/apps/agents-server/src/utils/backup/serverBackup/serverBackupTypes.ts +59 -0
- package/apps/agents-server/src/utils/chat/createAttachmentAwareCitationLabelResolver.ts +147 -0
- package/apps/agents-server/src/utils/chatTasksAdmin.ts +3 -2
- package/apps/agents-server/src/utils/createLocalAgentSourceImporter.ts +159 -0
- package/apps/agents-server/src/utils/createMissingImportedAgentFallback.ts +60 -0
- package/apps/agents-server/src/utils/createPagePreviewBrowserStream.ts +179 -0
- package/apps/agents-server/src/utils/customDomainRouting.ts +157 -12
- package/apps/agents-server/src/utils/externalChatRunner/processExternalUserChatJob.ts +12 -6
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/GetAdminChatTasksData.ts +12 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +264 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlValues.ts +35 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskTimeUtilities.ts +30 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/compareAdminChatTasks.ts +135 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/createAdminChatTaskCounters.ts +29 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/filterAdminChatTasks.ts +78 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/getAdminChatTasksViaClientSql.ts +62 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/getAdminChatTasksViaSupabaseQuery.ts +29 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/loadAdminChatTaskFallbackData.ts +193 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +99 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +94 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks.ts +4 -947
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/mapVpsSelfUpdateJobToAdminChatTask.ts +18 -5
- package/apps/agents-server/src/utils/getAdminChatTasksResponse.ts +103 -41
- package/apps/agents-server/src/utils/{codeRunnerAuthentication.ts → harnessAuthentication.ts} +72 -56
- package/apps/agents-server/src/utils/{codeRunnerConfiguration.ts → harnessConfiguration.ts} +18 -12
- package/apps/agents-server/src/utils/importAgentWithFallback.ts +1 -58
- package/apps/agents-server/src/utils/localAgentRouteReferences.ts +167 -0
- package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +21 -6
- package/apps/agents-server/src/utils/managementApi/managementApiAgents.ts +17 -3
- package/apps/agents-server/src/utils/messages/sendMessage.ts +5 -3
- package/apps/agents-server/src/utils/pagePreviewBrowserSessions.ts +246 -0
- package/apps/agents-server/src/utils/resolveAgentStateFromSource.ts +7 -1
- package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +54 -5
- package/apps/agents-server/src/utils/resolveServerAgentContext.ts +12 -1
- package/apps/agents-server/src/utils/resolveStoredAgentState.ts +2 -1
- package/apps/agents-server/src/utils/resourceMonitor/formatResourceMonitorValue.ts +50 -0
- package/apps/agents-server/src/utils/resourceMonitor/readCpuResourceUsage.ts +75 -0
- package/apps/agents-server/src/utils/resourceMonitor/readDiskResourceUsage.ts +42 -0
- package/apps/agents-server/src/utils/resourceMonitor/readMemoryResourceUsage.ts +28 -0
- package/apps/agents-server/src/utils/resourceMonitor/readNetworkResourceUsage.ts +271 -0
- package/apps/agents-server/src/utils/resourceMonitor/readServerResourceMonitorSnapshot.ts +47 -0
- package/apps/agents-server/src/utils/resourceMonitor/resolveServerResourceWarningStatus.ts +72 -0
- package/apps/agents-server/src/utils/resourceMonitor/resourceMonitorConstants.ts +29 -0
- package/apps/agents-server/src/utils/resourceMonitor/resourceMonitorTypes.ts +155 -0
- package/apps/agents-server/src/utils/resourceMonitor/waitForResourceMonitorSample.ts +11 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/createShibbolethSamlClient.ts +35 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/createShibbolethServiceProviderMetadataXml.ts +25 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/extractShibbolethProfileAttributes.ts +173 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/fetchIdentityProviderMetadataXml.ts +21 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/findOrCreateShibbolethUser.ts +323 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/getShibbolethAuthenticationAttemptTableName.ts +13 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/getShibbolethRequestDetails.ts +19 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/getShibbolethUserIdentityTableName.ts +13 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/parseIdentityProviderMetadataXml.ts +110 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/recordShibbolethAuthenticationAttempt.ts +57 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/resolveShibbolethAuthenticationConfiguration.ts +78 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/resolveShibbolethPublicRequestUrl.ts +101 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/resolveShibbolethServiceProviderUrls.ts +63 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/sanitizeShibbolethRelayState.ts +17 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/shibbolethAuthenticationConstants.ts +62 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication/shibbolethAuthenticationTypes.ts +105 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication.ts +25 -957
- package/apps/agents-server/src/utils/speech-to-text/SpeechToTextFailoverRecognition/SpeechToTextFailoverRecognitionProviderRuntime.ts +0 -1
- package/apps/agents-server/src/utils/speech-to-text/SpeechToTextFailoverRecognition.ts +34 -2
- package/apps/agents-server/src/utils/taskTerminal/resolveAdminTaskTerminalSession.ts +535 -0
- package/apps/agents-server/src/utils/taskTerminal/runWithTaskTerminalCapture.ts +134 -0
- package/apps/agents-server/src/utils/taskTerminal/taskTerminalLog.ts +360 -0
- package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +16 -0
- package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +39 -9
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/updateUserChatTimeoutTerminalState.ts +3 -0
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +4 -1
- package/apps/agents-server/src/utils/vpsConfiguration.ts +7 -3
- package/apps/agents-server/src/utils/vpsSelfUpdate/deleteVpsSelfUpdateInstalledVersion.ts +81 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/listVpsSelfUpdateCandidateCommits.ts +217 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/readAgentsServerFooterVersion.ts +335 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/readPersistedVpsSelfUpdateJob.ts +310 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/readVpsSelfUpdateOverview.ts +178 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/resolveVpsSelfUpdateJobForOverview.ts +42 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/startVpsSelfUpdate.ts +201 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateAutomaticConfiguration.ts +152 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateConfiguration.ts +81 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateCron.ts +357 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateEnvironment.ts +120 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateInstalledVersions.ts +162 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateJobConstants.ts +15 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateJobHistory.ts +490 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateJobIdentity.ts +26 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateOriginRepository.ts +90 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateRepository.ts +286 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateScheduler.ts +191 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateStateFiles.ts +197 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateTypes.ts +452 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate.ts +66 -1547
- package/apps/agents-server/tests/e2e/support/ChatHistoryNavigationSupport.ts +5 -0
- package/esm/apps/agents-server/src/database/migratePrefix.d.ts +19 -0
- package/esm/apps/agents-server/src/database/runDatabaseMigrations.d.ts +4 -0
- package/esm/book/scripts/import-markdown/increaseHeadings.d.ts +8 -0
- package/esm/index.es.js +30174 -28539
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +7 -0
- package/esm/scripts/find-refactor-candidates/selectMostImportantRefactorCandidates.d.ts +12 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentAutoPuller.d.ts +27 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentGithubSynchronizer.d.ts +26 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentRunUiPresenter.d.ts +66 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/RunMultipleAgentMessageTaskScheduler.d.ts +67 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/formatProjectPath.d.ts +6 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/loadLocalAgentRunnerProjectSummaries.d.ts +11 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages/wait.d.ts +6 -0
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/buildCoderRunProgressSnapshot.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/cliProgressDisplay.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +20 -0
- package/esm/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +1 -0
- package/esm/scripts/run-codex-prompts/common/waitUntilWorldTimeDeadline.d.ts +17 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeSessionResurrection.d.ts +37 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +47 -0
- package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +8 -1
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +41 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +10 -0
- package/esm/scripts/run-codex-prompts/ui/coderRunUiRefresh.d.ts +2 -2
- package/esm/src/_packages/types.index.d.ts +2 -2
- package/esm/src/avatars/renderAvatarVisualAsciiArt.d.ts +98 -0
- package/esm/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +1 -1
- package/esm/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +1 -1
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.d.ts +120 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.d.ts +6 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.d.ts +26 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.d.ts +23 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.d.ts +21 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.d.ts +12 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.d.ts +27 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.d.ts +12 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +5 -58
- package/esm/src/book-components/Chat/Chat/ChatImageAttachmentModal.d.ts +25 -0
- package/esm/src/book-components/Chat/Chat/ChatInputArea.d.ts +3 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageAttachments.d.ts +27 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +8 -0
- package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/CitationIframePreview.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/insertDictationChunk.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/insertDictationChunk.test.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/learnDictationDictionary.test.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/refineFinalDictationChunk.test.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaComposer.d.ts +12 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaComposer.draftMessage.test.d.ts +2 -0
- package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +1 -1
- package/esm/src/book-components/Chat/utils/parseMessageButtons.d.ts +16 -2
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.d.ts +10 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.d.ts +10 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.d.ts +18 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +28 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.d.ts +19 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.d.ts +11 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.d.ts +8 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.d.ts +12 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.d.ts +11 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +8 -109
- package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts +16 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.d.ts +30 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts +19 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts +37 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts +13 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts +24 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +13 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts +18 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +20 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +15 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.d.ts +8 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts +16 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +3 -30
- package/esm/src/cli/cli-commands/common/createPositiveIntegerOptionParser.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
- package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +1 -1
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
- package/esm/src/commitments/META/META.d.ts +2 -2
- package/esm/src/commitments/META_AVATAR/META_AVATAR.d.ts +9 -4
- package/esm/src/commitments/index.d.ts +1 -1
- package/esm/src/conversion/validation/validatePipeline/createPipelineValidationContext.d.ts +16 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineMetadata.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineParameters.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineTasks.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.d.ts +46 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.d.ts +11 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.d.ts +14 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.d.ts +9 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.d.ts +8 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/esm/src/utils/agent-message-runtime/agentMessageRuntimePaths.d.ts +24 -0
- package/esm/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -2
- package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +94 -0
- package/esm/src/utils/agents/terminalAgentAvatarVisual.test.d.ts +1 -0
- package/esm/src/utils/ascii-art/$detectTerminalAnsiColorDepth.d.ts +15 -0
- package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +80 -0
- package/esm/src/utils/color/Color.d.ts +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/_packages/types.index.ts +2 -2
- package/src/avatars/Avatar.tsx +2 -13
- package/src/avatars/avatarAnimationScheduler.ts +2 -1
- package/src/avatars/renderAvatarVisual.ts +2 -13
- package/src/avatars/renderAvatarVisualAsciiArt.ts +257 -0
- package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +1 -6
- package/src/avatars/visuals/avatarVisualRegistry.ts +1 -1
- package/src/avatars/visuals/minecraft2AvatarVisual.ts +1 -2
- package/src/avatars/visuals/octopus2AvatarVisual.ts +1 -5
- package/src/avatars/visuals/octopus3AvatarVisual.ts +1 -8
- package/src/avatars/visuals/octopus3d2AvatarVisual.ts +4 -13
- package/src/avatars/visuals/octopus3d3AvatarVisual.ts +10 -15
- package/src/avatars/visuals/octopus3d4AvatarVisual.ts +18 -31
- package/src/avatars/visuals/octopus3dAvatarVisual.ts +3 -3
- package/src/avatars/visuals/octopus3dAvatarVisualShared.ts +2 -7
- package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +2 -1
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +3 -5
- package/src/book-3.0/CliAgent.ts +1 -7
- package/src/book-3.0/LiteAgent.ts +5 -5
- package/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.tsx +1 -4
- package/src/book-components/BookEditor/BookEditor.tsx +2 -2
- package/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.tsx +3 -2
- package/src/book-components/BookEditor/BookEditorActionbar.tsx +1 -1
- package/src/book-components/BookEditor/BookEditorMonaco.tsx +2 -2
- package/src/book-components/BookEditor/BookEditorMonacoUploadPanel.tsx +1 -1
- package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +1 -1
- package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +1 -1
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.ts +147 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.ts +10 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.ts +209 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.ts +164 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.ts +121 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.ts +81 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.ts +360 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.ts +47 -0
- package/src/book-components/BookEditor/useBookEditorMonacoUploads.ts +10 -1067
- package/src/book-components/Chat/Chat/Chat.module.css +199 -12
- package/src/book-components/Chat/Chat/Chat.tsx +16 -1
- package/src/book-components/Chat/Chat/ChatCitationModal.tsx +2 -2
- package/src/book-components/Chat/Chat/ChatImageAttachmentModal.tsx +108 -0
- package/src/book-components/Chat/Chat/ChatInputArea.tsx +43 -27
- package/src/book-components/Chat/Chat/ChatMessageAttachments.tsx +212 -0
- package/src/book-components/Chat/Chat/ChatMessageItem.tsx +32 -18
- package/src/book-components/Chat/Chat/ChatMessageList.tsx +3 -0
- package/src/book-components/Chat/Chat/ChatProps.tsx +9 -0
- package/src/book-components/Chat/Chat/CitationIframePreview.tsx +108 -156
- package/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.ts +1 -8
- package/src/book-components/Chat/Chat/insertDictationChunk.ts +3 -3
- package/src/book-components/Chat/Chat/learnDictationDictionary.ts +1 -1
- package/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.tsx +1 -5
- package/src/book-components/Chat/Chat/useChatInputAreaComposer.ts +59 -7
- package/src/book-components/Chat/Chat/useChatInputAreaDictation.ts +140 -33
- package/src/book-components/Chat/Chat/useChatToolCallModalState.ts +1 -4
- package/src/book-components/Chat/hooks/useChatRatings.ts +1 -1
- package/src/book-components/Chat/save/html/htmlSaveFormatDefinition.ts +2 -3
- package/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.ts +2 -2
- package/src/book-components/Chat/save/pdf/buildChatPdf.ts +1 -1
- package/src/book-components/Chat/utils/getToolCallChipletInfo.ts +1 -5
- package/src/book-components/Chat/utils/isVisibleChatToolCall.ts +2 -1
- package/src/book-components/Chat/utils/parseMessageButtons.ts +27 -2
- package/src/cli/cli-commands/about.ts +1 -1
- package/src/cli/cli-commands/agent/agentCliOptions.ts +2 -5
- package/src/cli/cli-commands/agent-folder/agentProjectPaths.ts +6 -12
- package/src/cli/cli-commands/agent-folder/init.ts +3 -8
- package/src/cli/cli-commands/agent-folder/initializeAgentProjectConfiguration.ts +2 -11
- package/src/cli/cli-commands/agent-folder/printAgentInitializationSummary.ts +2 -9
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.ts +6 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.ts +6 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.ts +6 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.ts +11 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.ts +9 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.ts +6 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.ts +19 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.ts +71 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.ts +69 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.ts +59 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.ts +23 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.ts +20 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.ts +17 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.ts +27 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.ts +21 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.ts +22 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.ts +30 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.ts +41 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.ts +14 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.ts +10 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.ts +10 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.ts +31 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.ts +35 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.ts +33 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.ts +30 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.ts +19 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.ts +21 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.ts +19 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.ts +184 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.ts +48 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.ts +179 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.ts +28 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer.ts +22 -1043
- package/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.ts +2 -1
- package/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.ts +2 -1
- package/src/cli/cli-commands/agents-server/run.ts +2 -5
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.ts +67 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.ts +43 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.ts +44 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.ts +59 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.ts +9 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.ts +14 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.ts +26 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.ts +15 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +29 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.ts +32 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.ts +18 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.ts +81 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.ts +52 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.ts +17 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.ts +97 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.ts +132 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.ts +14 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.ts +132 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer.ts +24 -797
- package/src/cli/cli-commands/agents-server.ts +2 -6
- package/src/cli/cli-commands/coder/agentCodingFile.ts +1 -7
- package/src/cli/cli-commands/coder/boilerplateTemplates.ts +14 -21
- package/src/cli/cli-commands/coder/find-refactor-candidates.ts +9 -2
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +2 -6
- package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +2 -10
- package/src/cli/cli-commands/coder/run.ts +3 -27
- package/src/cli/cli-commands/coder/server.ts +4 -2
- package/src/cli/cli-commands/common/createPositiveIntegerOptionParser.ts +31 -0
- package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +3 -8
- package/src/cli/cli-commands/make.ts +1 -1
- package/src/cli/cli-commands/run/runCommandAction.ts +1 -1
- package/src/cli/promptbookCli.ts +28 -3
- package/src/collection/agent-collection/CreateAgentInput.ts +2 -5
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.ts +1 -1
- package/src/commitments/MEMORY/createMemoryToolFunctions.ts +1 -10
- package/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.ts +1 -10
- package/src/commitments/MEMORY/parseMemoryToolArgs.ts +1 -6
- package/src/commitments/META/META.ts +4 -4
- package/src/commitments/META_AVATAR/META_AVATAR.ts +16 -10
- package/src/commitments/TEAM/TEAM.ts +5 -5
- package/src/commitments/USE_CALENDAR/createUseCalendarToolFunctions.ts +1 -4
- package/src/commitments/USE_PROJECT/createUseProjectToolFunctions.ts +2 -10
- package/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.ts +1 -11
- package/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.ts +1 -6
- package/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.ts +1 -6
- package/src/commitments/WALLET/createWalletToolFunctions.ts +2 -11
- package/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.ts +1 -6
- package/src/commitments/WALLET/parseWalletToolArgs.ts +1 -10
- package/src/commitments/index.ts +1 -0
- package/src/conversion/parsePipeline/applyPipelineHead.ts +1 -1
- package/src/conversion/parsePipeline/createUniqueSectionNameResolver.ts +1 -1
- package/src/conversion/parsePipeline/processPipelineSection.ts +1 -1
- package/src/conversion/validation/validatePipeline/createPipelineValidationContext.ts +43 -0
- package/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.ts +72 -0
- package/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.ts +220 -0
- package/src/conversion/validation/validatePipeline/validatePipelineMetadata.ts +66 -0
- package/src/conversion/validation/validatePipeline/validatePipelineParameters.ts +136 -0
- package/src/conversion/validation/validatePipeline/validatePipelineTasks.ts +243 -0
- package/src/conversion/validation/validatePipeline.ts +7 -750
- package/src/execution/LlmExecutionTools.ts +1 -6
- package/src/execution/createPipelineExecutor/getReservedParametersForTask.ts +1 -5
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.ts +51 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.ts +30 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.ts +62 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.ts +10 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.ts +75 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.ts +101 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.ts +24 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.ts +17 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.ts +15 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.ts +19 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.ts +44 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.ts +21 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.ts +97 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.ts +17 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.ts +30 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.ts +32 -0
- package/src/llm-providers/_common/register/$registeredLlmToolsMessage.ts +5 -568
- package/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.ts +1 -6
- package/src/llm-providers/openai/OpenAiAgentKitExecutionTools.ts +2 -2
- package/src/llm-providers/openai/OpenAiAssistantExecutionTools.ts +1 -1
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.ts +2 -2
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.ts +1 -1
- package/src/llm-providers/openai/OpenAiCompatibleExecutionTools.ts +2 -7
- package/src/llm-providers/openai/utils/OpenAiCompatibleChatPromptBuilder.ts +1 -1
- package/src/llm-providers/openai/utils/OpenAiCompatibleChatToolCaller.ts +2 -2
- package/src/llm-providers/openai/utils/OpenAiCompatibleUnsupportedParameterRetrier.ts +1 -5
- package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +1 -6
- package/src/other/templates/getTemplatesPipelineCollection.ts +840 -755
- package/src/remote-server/startRemoteServer/registerExecutionRoutes.ts +1 -1
- package/src/remote-server/startRemoteServer/registerServerIndexRoute.ts +1 -1
- package/src/scrapers/_common/utils/makeKnowledgeSourceHandler.ts +1 -6
- package/src/speech-recognition/OpenAiSpeechRecognition.ts +1 -6
- package/src/transpilers/_common/prepareSdkTranspilerContext.ts +1 -4
- package/src/types/Prompt.ts +1 -7
- package/src/types/string_host.ts +1 -9
- package/src/types/string_pipeline_url.ts +1 -4
- package/src/utils/agent-message-runtime/agentMessageRuntimePaths.ts +66 -0
- package/src/utils/agents/resolveAgentAvatarImageUrl.ts +2 -2
- package/src/utils/agents/terminalAgentAvatarVisual.ts +261 -0
- package/src/utils/ascii-art/$detectTerminalAnsiColorDepth.ts +45 -0
- package/src/utils/ascii-art/convertImageDataToAsciiArt.ts +396 -0
- package/src/utils/color/Color.ts +2 -2
- package/src/utils/markdown/parseMarkdownSection.ts +1 -5
- package/src/utils/random/$randomFullnameWithColor.ts +1 -6
- package/src/version.ts +2 -2
- package/src/versions.txt +7 -0
- package/umd/apps/agents-server/src/database/migratePrefix.d.ts +19 -0
- package/umd/apps/agents-server/src/database/runDatabaseMigrations.d.ts +4 -0
- package/umd/book/scripts/import-markdown/increaseHeadings.d.ts +8 -0
- package/umd/index.umd.js +30176 -28541
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +7 -0
- package/umd/scripts/find-refactor-candidates/selectMostImportantRefactorCandidates.d.ts +12 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentAutoPuller.d.ts +27 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentGithubSynchronizer.d.ts +26 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/MultipleAgentRunUiPresenter.d.ts +66 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/RunMultipleAgentMessageTaskScheduler.d.ts +67 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/formatProjectPath.d.ts +6 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/loadLocalAgentRunnerProjectSummaries.d.ts +11 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages/wait.d.ts +6 -0
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/buildCoderRunProgressSnapshot.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/cliProgressDisplay.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +20 -0
- package/umd/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +1 -0
- package/umd/scripts/run-codex-prompts/common/waitUntilWorldTimeDeadline.d.ts +17 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeSessionResurrection.d.ts +37 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +47 -0
- package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +8 -1
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +41 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +10 -0
- package/umd/scripts/run-codex-prompts/ui/coderRunUiRefresh.d.ts +2 -2
- package/umd/src/_packages/types.index.d.ts +2 -2
- package/umd/src/avatars/renderAvatarVisualAsciiArt.d.ts +98 -0
- package/umd/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +1 -1
- package/umd/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +1 -1
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.d.ts +120 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.d.ts +6 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.d.ts +26 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.d.ts +23 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.d.ts +21 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.d.ts +12 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.d.ts +27 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.d.ts +12 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +5 -58
- package/umd/src/book-components/Chat/Chat/ChatImageAttachmentModal.d.ts +25 -0
- package/umd/src/book-components/Chat/Chat/ChatInputArea.d.ts +3 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageAttachments.d.ts +27 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +8 -0
- package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/CitationIframePreview.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/insertDictationChunk.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/insertDictationChunk.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/learnDictationDictionary.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/refineFinalDictationChunk.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaComposer.d.ts +12 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaComposer.draftMessage.test.d.ts +2 -0
- package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +1 -1
- package/umd/src/book-components/Chat/utils/parseMessageButtons.d.ts +16 -2
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.d.ts +10 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.d.ts +10 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.d.ts +18 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +28 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.d.ts +19 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.d.ts +11 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.d.ts +8 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.d.ts +12 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.d.ts +11 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +8 -109
- package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts +16 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.d.ts +30 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts +19 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts +37 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts +13 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts +24 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +13 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts +18 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +20 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +15 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.d.ts +8 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts +16 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +3 -30
- package/umd/src/cli/cli-commands/common/createPositiveIntegerOptionParser.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
- package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +1 -1
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
- package/umd/src/commitments/META/META.d.ts +2 -2
- package/umd/src/commitments/META_AVATAR/META_AVATAR.d.ts +9 -4
- package/umd/src/commitments/index.d.ts +1 -1
- package/umd/src/conversion/validation/validatePipeline/createPipelineValidationContext.d.ts +16 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineMetadata.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineParameters.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineTasks.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.d.ts +46 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.d.ts +11 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.d.ts +14 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.d.ts +9 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.d.ts +8 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/umd/src/utils/agent-message-runtime/agentMessageRuntimePaths.d.ts +24 -0
- package/umd/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -2
- package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +94 -0
- package/umd/src/utils/agents/terminalAgentAvatarVisual.test.d.ts +1 -0
- package/umd/src/utils/ascii-art/$detectTerminalAnsiColorDepth.d.ts +15 -0
- package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +80 -0
- package/umd/src/utils/color/Color.d.ts +1 -1
- package/umd/src/version.d.ts +1 -1
- package/apps/agents-server/src/app/api/page-preview/interact/route.ts +0 -179
- package/apps/agents-server/src/app/api/page-preview/live/route.ts +0 -67
- package/apps/agents-server/src/utils/pagePreview/livePagePreviewSessions.ts +0 -365
- package/apps/agents-server/src/utils/pagePreview/resolvePagePreviewRequestUrl.ts +0 -74
- package/apps/agents-server/src/utils/userChat/createUserChatRunnerProgressCard.ts +0 -57
- package/esm/scripts/run-codex-prompts/common/resolveAgentSystemMessage.d.ts +0 -6
- package/esm/src/book-components/Chat/utils/livePagePreviewConstants.d.ts +0 -12
- package/src/book-components/Chat/utils/livePagePreviewConstants.ts +0 -17
- package/umd/scripts/run-codex-prompts/common/resolveAgentSystemMessage.d.ts +0 -6
- package/umd/src/book-components/Chat/utils/livePagePreviewConstants.d.ts +0 -12
package/apps/agents-server/src/utils/getAdminChatTasksResponse/mapVpsSelfUpdateJobToAdminChatTask.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { AdminChatTaskRecord } from '../chatTasksAdmin';
|
|
2
2
|
import type { UserChatJobStatus } from '../userChat/UserChatJobRecord';
|
|
3
3
|
import type { VpsSelfUpdateJobSnapshot } from '../vpsSelfUpdate';
|
|
4
|
+
import { resolveVpsSelfUpdateJobIdentity } from '../vpsSelfUpdate/vpsSelfUpdateJobIdentity';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
* Stable synthetic task id used for
|
|
7
|
+
* Stable synthetic task id prefix used for standalone VPS self-update task rows.
|
|
7
8
|
*
|
|
8
9
|
* @private internal admin utility of Agents Server
|
|
9
10
|
*/
|
|
@@ -34,9 +35,11 @@ export function mapVpsSelfUpdateJobToAdminChatTask(job: VpsSelfUpdateJobSnapshot
|
|
|
34
35
|
const updatedAt = finishedAt || startedAt || new Date().toISOString();
|
|
35
36
|
const errorSummary = job.errorMessage || null;
|
|
36
37
|
const currentStepDetails = job.currentStep || null;
|
|
38
|
+
const triggerLabel = formatVpsSelfUpdateTrigger(job.trigger);
|
|
39
|
+
const taskId = `${VPS_SELF_UPDATE_ADMIN_CHAT_TASK_ID}:${resolveVpsSelfUpdateJobIdentity(job)}`;
|
|
37
40
|
|
|
38
41
|
return {
|
|
39
|
-
id:
|
|
42
|
+
id: taskId,
|
|
40
43
|
kind: 'VPS_SELF_UPDATE',
|
|
41
44
|
status,
|
|
42
45
|
createdAt: startedAt || updatedAt,
|
|
@@ -56,14 +59,24 @@ export function mapVpsSelfUpdateJobToAdminChatTask(job: VpsSelfUpdateJobSnapshot
|
|
|
56
59
|
lastErrorDetails: currentStepDetails,
|
|
57
60
|
userId: 0,
|
|
58
61
|
username: null,
|
|
59
|
-
agentPermanentId:
|
|
60
|
-
agentName: job.targetEnvironment.label
|
|
62
|
+
agentPermanentId: taskId,
|
|
63
|
+
agentName: `${triggerLabel} self-update: ${job.targetEnvironment.label}`,
|
|
61
64
|
chatId: job.targetBranch || job.targetEnvironment.branch || VPS_SELF_UPDATE_ADMIN_CHAT_TASK_ID,
|
|
62
65
|
workerId: job.pid !== null ? String(job.pid) : null,
|
|
63
|
-
queueName: VPS_SELF_UPDATE_ADMIN_CHAT_TASK_QUEUE_NAME
|
|
66
|
+
queueName: `${VPS_SELF_UPDATE_ADMIN_CHAT_TASK_QUEUE_NAME}:${job.trigger}`,
|
|
64
67
|
};
|
|
65
68
|
}
|
|
66
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Formats one self-update trigger for task-manager display.
|
|
72
|
+
*
|
|
73
|
+
* @param trigger - Persisted self-update trigger.
|
|
74
|
+
* @returns Capitalized trigger label.
|
|
75
|
+
*/
|
|
76
|
+
function formatVpsSelfUpdateTrigger(trigger: VpsSelfUpdateJobSnapshot['trigger']): string {
|
|
77
|
+
return trigger === 'automatic' ? 'Automatic' : 'Manual';
|
|
78
|
+
}
|
|
79
|
+
|
|
67
80
|
/**
|
|
68
81
|
* Maps the shell-owned self-update status to the durable chat-task status enum used by the admin task manager.
|
|
69
82
|
*
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ensureUserChatTimeoutWorkerBootstrapped } from '@/src/utils/userChatTimeout/ensureUserChatTimeoutWorkerBootstrapped';
|
|
2
2
|
import type { AdminChatTaskCounters, AdminChatTaskListResponse, AdminChatTaskRecord } from './chatTasksAdmin';
|
|
3
3
|
import { getAdminChatTasks } from './getAdminChatTasksResponse/getAdminChatTasks';
|
|
4
|
+
import { compareAdminChatTasks } from './getAdminChatTasksResponse/getAdminChatTasks/compareAdminChatTasks';
|
|
4
5
|
import { mapVpsSelfUpdateJobToAdminChatTask } from './getAdminChatTasksResponse/mapVpsSelfUpdateJobToAdminChatTask';
|
|
5
6
|
import { parseAdminChatTaskQuery, type ParsedAdminChatTaskQuery } from './getAdminChatTasksResponse/parseAdminChatTaskQuery';
|
|
6
7
|
import { throttledAdminRecovery } from './getAdminChatTasksResponse/throttledAdminRecovery';
|
|
7
|
-
import {
|
|
8
|
+
import { listPagePreviewBrowserAdminTasks } from './pagePreviewBrowserSessions';
|
|
9
|
+
import { readVpsSelfUpdateJobTaskSnapshots } from './vpsSelfUpdate';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Milliseconds in one hour.
|
|
@@ -61,9 +63,12 @@ export async function getAdminChatTasksResponse(
|
|
|
61
63
|
// [🧠] Recovery operations are throttled to avoid hammering the DB on every admin poll
|
|
62
64
|
await throttledAdminRecovery();
|
|
63
65
|
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
66
|
+
const vpsSelfUpdateTasks = await loadVpsSelfUpdateAdminChatTasks();
|
|
67
|
+
const pagePreviewBrowserTasks = listPagePreviewBrowserAdminTasks();
|
|
68
|
+
const injectableTasks = [...vpsSelfUpdateTasks, ...pagePreviewBrowserTasks];
|
|
69
|
+
const injectedTasks = collectAdminChatTasksToInject(injectableTasks, parsedQuery);
|
|
70
|
+
const databaseQuery = createInjectedAwareAdminChatTaskQuery(parsedQuery, injectedTasks.length);
|
|
71
|
+
const adminChatTasks = await getAdminChatTasks(databaseQuery);
|
|
67
72
|
const { items, total } = mergeInjectedAdminChatTasks({
|
|
68
73
|
databaseItems: adminChatTasks.items,
|
|
69
74
|
databaseTotal: adminChatTasks.total,
|
|
@@ -71,7 +76,7 @@ export async function getAdminChatTasksResponse(
|
|
|
71
76
|
page: parsedQuery.page,
|
|
72
77
|
pageSize: parsedQuery.pageSize,
|
|
73
78
|
});
|
|
74
|
-
const counters = mergeInjectedAdminChatTaskCounters(adminChatTasks.counters,
|
|
79
|
+
const counters = mergeInjectedAdminChatTaskCounters(adminChatTasks.counters, injectableTasks);
|
|
75
80
|
|
|
76
81
|
return {
|
|
77
82
|
status: 200,
|
|
@@ -90,50 +95,72 @@ export async function getAdminChatTasksResponse(
|
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
/**
|
|
93
|
-
* Loads
|
|
98
|
+
* Loads persisted standalone VPS self-update tasks, if any.
|
|
94
99
|
*
|
|
95
100
|
* The read is defensive so a corrupt status file cannot block the admin task manager from rendering.
|
|
96
101
|
*
|
|
97
|
-
* @returns Injectable task
|
|
102
|
+
* @returns Injectable task records.
|
|
98
103
|
*/
|
|
99
|
-
async function
|
|
104
|
+
async function loadVpsSelfUpdateAdminChatTasks(): Promise<Array<AdminChatTaskRecord>> {
|
|
100
105
|
try {
|
|
101
|
-
const
|
|
102
|
-
return
|
|
106
|
+
const jobSnapshots = await readVpsSelfUpdateJobTaskSnapshots();
|
|
107
|
+
return jobSnapshots
|
|
108
|
+
.map(mapVpsSelfUpdateJobToAdminChatTask)
|
|
109
|
+
.filter((task): task is AdminChatTaskRecord => task !== null);
|
|
103
110
|
} catch (error) {
|
|
104
|
-
console.error('[admin-chat-task] failed to load VPS self-update task
|
|
105
|
-
return
|
|
111
|
+
console.error('[admin-chat-task] failed to load VPS self-update task snapshots', error);
|
|
112
|
+
return [];
|
|
106
113
|
}
|
|
107
114
|
}
|
|
108
115
|
|
|
109
116
|
/**
|
|
110
117
|
* Filters out injected tasks that do not belong to the requested admin task-manager view or search.
|
|
111
118
|
*
|
|
112
|
-
* @param
|
|
119
|
+
* @param injectableTasks - Synthetic task rows collected from process-local state.
|
|
113
120
|
* @param query - Parsed admin task-manager query.
|
|
114
121
|
* @returns Tasks to inject on top of the database-backed items.
|
|
115
122
|
*/
|
|
116
123
|
function collectAdminChatTasksToInject(
|
|
117
|
-
|
|
124
|
+
injectableTasks: ReadonlyArray<AdminChatTaskRecord>,
|
|
118
125
|
query: ParsedAdminChatTaskQuery,
|
|
119
126
|
): ReadonlyArray<AdminChatTaskRecord> {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
const nowTimestamp = Date.now();
|
|
128
|
+
return injectableTasks
|
|
129
|
+
.filter(
|
|
130
|
+
(task) =>
|
|
131
|
+
matchesAdminChatTaskView(task, query, nowTimestamp) &&
|
|
132
|
+
matchesAdminChatTaskSearch(task, query.search),
|
|
133
|
+
)
|
|
134
|
+
.sort((leftTask, rightTask) => compareAdminChatTasks(leftTask, rightTask, query.view));
|
|
135
|
+
}
|
|
123
136
|
|
|
124
|
-
|
|
125
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Builds the database query needed to merge injected task rows into the requested page.
|
|
139
|
+
*
|
|
140
|
+
* @param query - Parsed admin task-manager query.
|
|
141
|
+
* @param injectedTaskCount - Number of injected rows that appear before database-backed rows.
|
|
142
|
+
* @returns Query used for loading enough database-backed rows to fill the final page.
|
|
143
|
+
*/
|
|
144
|
+
function createInjectedAwareAdminChatTaskQuery(
|
|
145
|
+
query: ParsedAdminChatTaskQuery,
|
|
146
|
+
injectedTaskCount: number,
|
|
147
|
+
): ParsedAdminChatTaskQuery {
|
|
148
|
+
if (injectedTaskCount === 0) {
|
|
149
|
+
return query;
|
|
126
150
|
}
|
|
127
151
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
152
|
+
const pageOffset = (query.page - 1) * query.pageSize;
|
|
153
|
+
const databaseEndOffset = Math.max(0, pageOffset + query.pageSize - injectedTaskCount);
|
|
131
154
|
|
|
132
|
-
return
|
|
155
|
+
return {
|
|
156
|
+
...query,
|
|
157
|
+
page: 1,
|
|
158
|
+
pageSize: Math.max(1, databaseEndOffset),
|
|
159
|
+
};
|
|
133
160
|
}
|
|
134
161
|
|
|
135
162
|
/**
|
|
136
|
-
* Prepends
|
|
163
|
+
* Prepends injected task rows to the database-backed items and returns the requested combined page.
|
|
137
164
|
*
|
|
138
165
|
* @param options - Merge inputs.
|
|
139
166
|
* @returns Merged items for the current page and the updated total row count.
|
|
@@ -146,48 +173,83 @@ function mergeInjectedAdminChatTasks(options: {
|
|
|
146
173
|
readonly pageSize: number;
|
|
147
174
|
}): { items: Array<AdminChatTaskRecord>; total: number } {
|
|
148
175
|
const total = options.databaseTotal + options.injectedTasks.length;
|
|
149
|
-
|
|
150
176
|
if (options.injectedTasks.length === 0) {
|
|
151
177
|
return { items: [...options.databaseItems], total };
|
|
152
178
|
}
|
|
153
179
|
|
|
154
|
-
|
|
155
|
-
|
|
180
|
+
const pageOffset = (options.page - 1) * options.pageSize;
|
|
181
|
+
const injectedItems = options.injectedTasks.slice(pageOffset, pageOffset + options.pageSize);
|
|
182
|
+
const remainingPageSize = options.pageSize - injectedItems.length;
|
|
183
|
+
|
|
184
|
+
if (remainingPageSize <= 0) {
|
|
185
|
+
return { items: [...injectedItems], total };
|
|
156
186
|
}
|
|
157
187
|
|
|
158
|
-
const
|
|
188
|
+
const databaseOffset = Math.max(0, pageOffset - options.injectedTasks.length);
|
|
189
|
+
const databaseItems = options.databaseItems.slice(databaseOffset, databaseOffset + remainingPageSize);
|
|
190
|
+
const items = [...injectedItems, ...databaseItems];
|
|
159
191
|
return { items, total };
|
|
160
192
|
}
|
|
161
193
|
|
|
162
194
|
/**
|
|
163
|
-
* Adds
|
|
195
|
+
* Adds injected tasks to the summary counters so the header metrics stay accurate.
|
|
164
196
|
*
|
|
165
197
|
* @param databaseCounters - Counters computed from durable database rows.
|
|
166
|
-
* @param
|
|
167
|
-
* @returns Merged counters including the injected
|
|
198
|
+
* @param injectedTasks - Synthetic task rows collected from process-local state.
|
|
199
|
+
* @returns Merged counters including the injected tasks.
|
|
168
200
|
*/
|
|
169
201
|
function mergeInjectedAdminChatTaskCounters(
|
|
170
202
|
databaseCounters: AdminChatTaskCounters,
|
|
171
|
-
|
|
203
|
+
injectedTasks: ReadonlyArray<AdminChatTaskRecord>,
|
|
172
204
|
): AdminChatTaskCounters {
|
|
173
|
-
if (
|
|
205
|
+
if (injectedTasks.length === 0) {
|
|
174
206
|
return databaseCounters;
|
|
175
207
|
}
|
|
176
208
|
|
|
177
209
|
const nowTimestamp = Date.now();
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
210
|
+
const injectedQueuedTimestamps = injectedTasks
|
|
211
|
+
.filter((task) => task.status === 'QUEUED')
|
|
212
|
+
.map((task) => Date.parse(task.queuedAt))
|
|
213
|
+
.filter((timestamp) => Number.isFinite(timestamp));
|
|
214
|
+
const oldestInjectedQueuedAgeMs =
|
|
215
|
+
injectedQueuedTimestamps.length === 0 ? null : nowTimestamp - Math.min(...injectedQueuedTimestamps);
|
|
182
216
|
|
|
183
217
|
return {
|
|
184
|
-
runningCount: databaseCounters.runningCount + (
|
|
185
|
-
queuedCount: databaseCounters.queuedCount,
|
|
186
|
-
failedLast24hCount:
|
|
187
|
-
|
|
218
|
+
runningCount: databaseCounters.runningCount + injectedTasks.filter((task) => task.status === 'RUNNING').length,
|
|
219
|
+
queuedCount: databaseCounters.queuedCount + injectedTasks.filter((task) => task.status === 'QUEUED').length,
|
|
220
|
+
failedLast24hCount:
|
|
221
|
+
databaseCounters.failedLast24hCount +
|
|
222
|
+
injectedTasks.filter(
|
|
223
|
+
(task) =>
|
|
224
|
+
task.status === 'FAILED' &&
|
|
225
|
+
isIsoTimestampAtOrAfter(task.finishedAt, nowTimestamp - 24 * HOUR_IN_MILLISECONDS),
|
|
226
|
+
).length,
|
|
227
|
+
oldestQueuedAgeMs: mergeOldestQueuedAge(databaseCounters.oldestQueuedAgeMs, oldestInjectedQueuedAgeMs),
|
|
188
228
|
};
|
|
189
229
|
}
|
|
190
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Merges durable and injected queued-task ages.
|
|
233
|
+
*
|
|
234
|
+
* @param databaseOldestQueuedAgeMs - Oldest durable queued-task age.
|
|
235
|
+
* @param injectedOldestQueuedAgeMs - Oldest injected queued-task age.
|
|
236
|
+
* @returns Oldest queued age across both sources.
|
|
237
|
+
*/
|
|
238
|
+
function mergeOldestQueuedAge(
|
|
239
|
+
databaseOldestQueuedAgeMs: number | null,
|
|
240
|
+
injectedOldestQueuedAgeMs: number | null,
|
|
241
|
+
): number | null {
|
|
242
|
+
if (databaseOldestQueuedAgeMs === null) {
|
|
243
|
+
return injectedOldestQueuedAgeMs;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (injectedOldestQueuedAgeMs === null) {
|
|
247
|
+
return databaseOldestQueuedAgeMs;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return Math.max(databaseOldestQueuedAgeMs, injectedOldestQueuedAgeMs);
|
|
251
|
+
}
|
|
252
|
+
|
|
191
253
|
/**
|
|
192
254
|
* Returns whether the injected task belongs in the requested admin task-manager view.
|
|
193
255
|
*
|
package/apps/agents-server/src/utils/{codeRunnerAuthentication.ts → harnessAuthentication.ts}
RENAMED
|
@@ -11,21 +11,23 @@ import {
|
|
|
11
11
|
} from './interactiveTerminalSession';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Serializable snapshot of one interactive
|
|
14
|
+
* Serializable snapshot of one interactive harness authentication session.
|
|
15
|
+
*
|
|
16
|
+
* @private internal utility of Agents Server Harness Auth
|
|
15
17
|
*/
|
|
16
|
-
export type
|
|
18
|
+
export type HarnessAuthenticationSessionSnapshot = {
|
|
17
19
|
/**
|
|
18
20
|
* Session identifier used by the browser UI.
|
|
19
21
|
*/
|
|
20
22
|
readonly id: string;
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
|
-
*
|
|
25
|
+
* Harness being authenticated.
|
|
24
26
|
*/
|
|
25
|
-
readonly
|
|
27
|
+
readonly harness: string;
|
|
26
28
|
|
|
27
29
|
/**
|
|
28
|
-
* Whether the interactive
|
|
30
|
+
* Whether the interactive harness process is still active.
|
|
29
31
|
*/
|
|
30
32
|
readonly isRunning: boolean;
|
|
31
33
|
|
|
@@ -57,8 +59,10 @@ export type CodeRunnerAuthenticationSessionSnapshot = {
|
|
|
57
59
|
|
|
58
60
|
/**
|
|
59
61
|
* Browser stream callbacks used by one subscribed UI client.
|
|
62
|
+
*
|
|
63
|
+
* @private internal utility of Agents Server Harness Auth
|
|
60
64
|
*/
|
|
61
|
-
export type
|
|
65
|
+
export type HarnessAuthenticationSessionSubscriber = {
|
|
62
66
|
/**
|
|
63
67
|
* Called whenever new terminal output arrives.
|
|
64
68
|
*/
|
|
@@ -67,27 +71,29 @@ export type CodeRunnerAuthenticationSessionSubscriber = {
|
|
|
67
71
|
/**
|
|
68
72
|
* Called once the session exits.
|
|
69
73
|
*/
|
|
70
|
-
readonly onExit: (event: { readonly type: 'exit'; readonly snapshot:
|
|
74
|
+
readonly onExit: (event: { readonly type: 'exit'; readonly snapshot: HarnessAuthenticationSessionSnapshot }) => void;
|
|
71
75
|
};
|
|
72
76
|
|
|
73
77
|
/**
|
|
74
|
-
* Starts a streamed authentication session for the currently configured standalone
|
|
78
|
+
* Starts a streamed authentication session for the currently configured standalone harness.
|
|
75
79
|
*
|
|
76
|
-
* @param
|
|
77
|
-
* @returns Existing running session for the same
|
|
80
|
+
* @param harness - Harness identifier stored in `.env`.
|
|
81
|
+
* @returns Existing running session for the same harness or a new one.
|
|
82
|
+
*
|
|
83
|
+
* @private internal utility of Agents Server Harness Auth
|
|
78
84
|
*/
|
|
79
|
-
export async function
|
|
80
|
-
|
|
81
|
-
): Promise<
|
|
85
|
+
export async function startHarnessAuthenticationSession(
|
|
86
|
+
harness: string,
|
|
87
|
+
): Promise<HarnessAuthenticationSessionSnapshot> {
|
|
82
88
|
const scriptPath = await resolveVpsInstallerScriptPath();
|
|
83
89
|
if (!scriptPath) {
|
|
84
90
|
throw new Error('The VPS installer script could not be found on this server.');
|
|
85
91
|
}
|
|
86
92
|
|
|
87
|
-
return
|
|
93
|
+
return toRequiredHarnessAuthenticationSessionSnapshot(
|
|
88
94
|
startInteractiveTerminalSession({
|
|
89
|
-
sessionKey:
|
|
90
|
-
title: `${
|
|
95
|
+
sessionKey: buildHarnessAuthenticationSessionKey(harness),
|
|
96
|
+
title: `${harness} authentication`,
|
|
91
97
|
command: 'bash',
|
|
92
98
|
arguments: [scriptPath, 'authenticate-runner'],
|
|
93
99
|
env: createVpsInstallerCommandEnvironment({
|
|
@@ -95,26 +101,28 @@ export async function startCodeRunnerAuthenticationSession(
|
|
|
95
101
|
isProcessRestartEnabled: false,
|
|
96
102
|
}),
|
|
97
103
|
metadata: {
|
|
98
|
-
|
|
104
|
+
harness,
|
|
99
105
|
},
|
|
100
|
-
unavailableErrorMessage: 'Interactive
|
|
106
|
+
unavailableErrorMessage: 'Interactive harness authentication is available only on the Linux VPS runtime.',
|
|
101
107
|
}),
|
|
102
|
-
|
|
108
|
+
harness,
|
|
103
109
|
);
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
/**
|
|
107
|
-
* Returns the latest known authentication session for a
|
|
113
|
+
* Returns the latest known authentication session for a harness.
|
|
108
114
|
*
|
|
109
|
-
* @param
|
|
115
|
+
* @param harness - Harness identifier.
|
|
110
116
|
* @returns Serializable session snapshot or `null`.
|
|
117
|
+
*
|
|
118
|
+
* @private internal utility of Agents Server Harness Auth
|
|
111
119
|
*/
|
|
112
|
-
export function
|
|
113
|
-
|
|
114
|
-
):
|
|
115
|
-
return
|
|
116
|
-
getLatestInteractiveTerminalSession(
|
|
117
|
-
|
|
120
|
+
export function getLatestHarnessAuthenticationSession(
|
|
121
|
+
harness: string,
|
|
122
|
+
): HarnessAuthenticationSessionSnapshot | null {
|
|
123
|
+
return toHarnessAuthenticationSessionSnapshot(
|
|
124
|
+
getLatestInteractiveTerminalSession(buildHarnessAuthenticationSessionKey(harness)),
|
|
125
|
+
harness,
|
|
118
126
|
);
|
|
119
127
|
}
|
|
120
128
|
|
|
@@ -123,11 +131,13 @@ export function getLatestCodeRunnerAuthenticationSession(
|
|
|
123
131
|
*
|
|
124
132
|
* @param sessionId - Session identifier.
|
|
125
133
|
* @returns Serializable session snapshot or `null`.
|
|
134
|
+
*
|
|
135
|
+
* @private internal utility of Agents Server Harness Auth
|
|
126
136
|
*/
|
|
127
|
-
export function
|
|
137
|
+
export function getHarnessAuthenticationSession(
|
|
128
138
|
sessionId: string,
|
|
129
|
-
):
|
|
130
|
-
return
|
|
139
|
+
): HarnessAuthenticationSessionSnapshot | null {
|
|
140
|
+
return toHarnessAuthenticationSessionSnapshot(getInteractiveTerminalSession(sessionId));
|
|
131
141
|
}
|
|
132
142
|
|
|
133
143
|
/**
|
|
@@ -136,17 +146,19 @@ export function getCodeRunnerAuthenticationSession(
|
|
|
136
146
|
* @param sessionId - Session identifier.
|
|
137
147
|
* @param subscriber - Stream callbacks.
|
|
138
148
|
* @returns Cleanup callback.
|
|
149
|
+
*
|
|
150
|
+
* @private internal utility of Agents Server Harness Auth
|
|
139
151
|
*/
|
|
140
|
-
export function
|
|
152
|
+
export function subscribeToHarnessAuthenticationSession(
|
|
141
153
|
sessionId: string,
|
|
142
|
-
subscriber:
|
|
154
|
+
subscriber: HarnessAuthenticationSessionSubscriber,
|
|
143
155
|
): (() => void) | null {
|
|
144
156
|
return subscribeToInteractiveTerminalSession(sessionId, {
|
|
145
157
|
onOutput: subscriber.onOutput,
|
|
146
158
|
onExit: ({ snapshot }) =>
|
|
147
159
|
subscriber.onExit({
|
|
148
160
|
type: 'exit',
|
|
149
|
-
snapshot:
|
|
161
|
+
snapshot: toRequiredHarnessAuthenticationSessionSnapshot(snapshot),
|
|
150
162
|
}),
|
|
151
163
|
});
|
|
152
164
|
}
|
|
@@ -157,12 +169,14 @@ export function subscribeToCodeRunnerAuthenticationSession(
|
|
|
157
169
|
* @param sessionId - Session identifier.
|
|
158
170
|
* @param input - Raw text to write to stdin.
|
|
159
171
|
* @returns Updated session snapshot.
|
|
172
|
+
*
|
|
173
|
+
* @private internal utility of Agents Server Harness Auth
|
|
160
174
|
*/
|
|
161
|
-
export function
|
|
175
|
+
export function writeHarnessAuthenticationSessionInput(
|
|
162
176
|
sessionId: string,
|
|
163
177
|
input: string,
|
|
164
|
-
):
|
|
165
|
-
return
|
|
178
|
+
): HarnessAuthenticationSessionSnapshot {
|
|
179
|
+
return toRequiredHarnessAuthenticationSessionSnapshot(writeInteractiveTerminalSessionInput(sessionId, input));
|
|
166
180
|
}
|
|
167
181
|
|
|
168
182
|
/**
|
|
@@ -170,41 +184,43 @@ export function writeCodeRunnerAuthenticationSessionInput(
|
|
|
170
184
|
*
|
|
171
185
|
* @param sessionId - Session identifier.
|
|
172
186
|
* @returns Updated session snapshot.
|
|
187
|
+
*
|
|
188
|
+
* @private internal utility of Agents Server Harness Auth
|
|
173
189
|
*/
|
|
174
|
-
export function
|
|
190
|
+
export function stopHarnessAuthenticationSession(
|
|
175
191
|
sessionId: string,
|
|
176
|
-
):
|
|
177
|
-
return
|
|
192
|
+
): HarnessAuthenticationSessionSnapshot {
|
|
193
|
+
return toRequiredHarnessAuthenticationSessionSnapshot(stopInteractiveTerminalSession(sessionId));
|
|
178
194
|
}
|
|
179
195
|
|
|
180
196
|
/**
|
|
181
|
-
* Builds the stable logical session key for one
|
|
197
|
+
* Builds the stable logical session key for one harness authentication terminal.
|
|
182
198
|
*
|
|
183
|
-
* @param
|
|
199
|
+
* @param harness - Harness identifier.
|
|
184
200
|
* @returns Stable session key.
|
|
185
201
|
*/
|
|
186
|
-
function
|
|
187
|
-
return `
|
|
202
|
+
function buildHarnessAuthenticationSessionKey(harness: string): string {
|
|
203
|
+
return `harness-authentication:${harness}`;
|
|
188
204
|
}
|
|
189
205
|
|
|
190
206
|
/**
|
|
191
|
-
* Converts one generic terminal snapshot into the
|
|
207
|
+
* Converts one generic terminal snapshot into the harness-specific browser shape.
|
|
192
208
|
*
|
|
193
209
|
* @param session - Generic terminal snapshot.
|
|
194
|
-
* @param
|
|
195
|
-
* @returns
|
|
210
|
+
* @param fallbackHarness - Harness name used when older sessions miss metadata.
|
|
211
|
+
* @returns Harness-specific snapshot or `null`.
|
|
196
212
|
*/
|
|
197
|
-
function
|
|
213
|
+
function toHarnessAuthenticationSessionSnapshot(
|
|
198
214
|
session: InteractiveTerminalSessionSnapshot | null,
|
|
199
|
-
|
|
200
|
-
):
|
|
215
|
+
fallbackHarness = '',
|
|
216
|
+
): HarnessAuthenticationSessionSnapshot | null {
|
|
201
217
|
if (!session) {
|
|
202
218
|
return null;
|
|
203
219
|
}
|
|
204
220
|
|
|
205
221
|
return {
|
|
206
222
|
id: session.id,
|
|
207
|
-
|
|
223
|
+
harness: session.metadata.harness || session.metadata.agent || fallbackHarness,
|
|
208
224
|
isRunning: session.isRunning,
|
|
209
225
|
output: session.output,
|
|
210
226
|
startedAt: session.startedAt,
|
|
@@ -215,16 +231,16 @@ function toCodeRunnerAuthenticationSessionSnapshot(
|
|
|
215
231
|
}
|
|
216
232
|
|
|
217
233
|
/**
|
|
218
|
-
* Converts one generic terminal snapshot into a required
|
|
234
|
+
* Converts one generic terminal snapshot into a required harness-specific snapshot.
|
|
219
235
|
*
|
|
220
236
|
* @param session - Generic terminal snapshot.
|
|
221
|
-
* @returns
|
|
237
|
+
* @returns Harness-specific snapshot.
|
|
222
238
|
*/
|
|
223
|
-
function
|
|
239
|
+
function toRequiredHarnessAuthenticationSessionSnapshot(
|
|
224
240
|
session: InteractiveTerminalSessionSnapshot | null,
|
|
225
|
-
|
|
226
|
-
):
|
|
227
|
-
const mappedSession =
|
|
241
|
+
fallbackHarness = '',
|
|
242
|
+
): HarnessAuthenticationSessionSnapshot {
|
|
243
|
+
const mappedSession = toHarnessAuthenticationSessionSnapshot(session, fallbackHarness);
|
|
228
244
|
|
|
229
245
|
if (!mappedSession) {
|
|
230
246
|
throw new Error('Authentication session was not found.');
|
|
@@ -5,13 +5,15 @@ import { listVpsEnvironmentVariables } from './vpsConfiguration';
|
|
|
5
5
|
const execFileAsync = promisify(execFile);
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Saved standalone VPS
|
|
8
|
+
* Saved standalone VPS harness configuration exposed to the admin UI.
|
|
9
|
+
*
|
|
10
|
+
* @private internal utility of Agents Server Harness Auth
|
|
9
11
|
*/
|
|
10
|
-
export type
|
|
12
|
+
export type ConfiguredHarness = {
|
|
11
13
|
/**
|
|
12
|
-
*
|
|
14
|
+
* Harness identifier persisted in `.env`.
|
|
13
15
|
*/
|
|
14
|
-
readonly
|
|
16
|
+
readonly harness: string;
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* Model identifier persisted in `.env`.
|
|
@@ -25,11 +27,13 @@ export type ConfiguredCodeRunner = {
|
|
|
25
27
|
};
|
|
26
28
|
|
|
27
29
|
/**
|
|
28
|
-
* Reads the currently configured standalone VPS
|
|
30
|
+
* Reads the currently configured standalone VPS harness from managed environment variables.
|
|
31
|
+
*
|
|
32
|
+
* @returns Saved harness settings with fallback defaults.
|
|
29
33
|
*
|
|
30
|
-
* @
|
|
34
|
+
* @private internal utility of Agents Server Harness Auth
|
|
31
35
|
*/
|
|
32
|
-
export async function
|
|
36
|
+
export async function readConfiguredHarness(): Promise<ConfiguredHarness> {
|
|
33
37
|
const snapshot = await listVpsEnvironmentVariables();
|
|
34
38
|
const environmentByKey = Object.fromEntries(snapshot.variables.map((variable) => [variable.key, variable.value])) as Record<
|
|
35
39
|
string,
|
|
@@ -37,20 +41,22 @@ export async function readConfiguredCodeRunner(): Promise<ConfiguredCodeRunner>
|
|
|
37
41
|
>;
|
|
38
42
|
|
|
39
43
|
return {
|
|
40
|
-
|
|
44
|
+
harness: environmentByKey.PTBK_HARNESS || process.env.PTBK_HARNESS || process.env.PTBK_AGENT || 'github-copilot',
|
|
41
45
|
model: environmentByKey.PTBK_MODEL || process.env.PTBK_MODEL || 'gpt-5.4',
|
|
42
46
|
thinkingLevel: environmentByKey.PTBK_THINKING_LEVEL || process.env.PTBK_THINKING_LEVEL || 'xhigh',
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
/**
|
|
47
|
-
* Resolves a short
|
|
51
|
+
* Resolves a short authentication status for the configured harness.
|
|
48
52
|
*
|
|
49
|
-
* @param
|
|
53
|
+
* @param harness - Harness id.
|
|
50
54
|
* @returns Human-readable status.
|
|
55
|
+
*
|
|
56
|
+
* @private internal utility of Agents Server Harness Auth
|
|
51
57
|
*/
|
|
52
|
-
export async function
|
|
53
|
-
if (
|
|
58
|
+
export async function resolveHarnessStatus(harness: string): Promise<string> {
|
|
59
|
+
if (harness !== 'github-copilot') {
|
|
54
60
|
return 'Status check is currently available for GitHub Copilot CLI only.';
|
|
55
61
|
}
|
|
56
62
|
|