@promptbook/cli 0.114.0-3 → 0.114.0-30
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 +10 -18
- package/agents/default/developer.book +1 -0
- package/apps/agents-server/README.md +1 -1
- package/apps/agents-server/{USE_TIMEOUT_CHIP_QA.md → TIMEOUT_CHIP_QA.md} +1 -1
- package/apps/agents-server/next.config.ts +28 -0
- package/apps/agents-server/package.json +6 -6
- package/apps/agents-server/scripts/build-agents-server.js +43 -7
- package/apps/agents-server/scripts/build-e2e.js +12 -2
- package/apps/agents-server/scripts/generate-reserved-paths/generate-reserved-paths.ts +30 -16
- package/apps/agents-server/scripts/kill-port.js +163 -0
- package/apps/agents-server/scripts/run-e2e-tests.js +21 -8
- package/apps/agents-server/scripts/run-npm.js +81 -5
- package/apps/agents-server/src/app/admin/_components/AdminFilterFields.tsx +84 -0
- package/apps/agents-server/src/app/admin/_components/AdminMetricCard.tsx +36 -0
- package/apps/agents-server/src/app/admin/_components/AdminTaskManagerTabs.tsx +97 -0
- package/apps/agents-server/src/app/admin/about/page.tsx +1 -1
- package/apps/agents-server/src/app/admin/email-server/page.tsx +17 -18
- package/apps/agents-server/src/app/admin/messages/MessageParticipants.tsx +84 -0
- package/apps/agents-server/src/app/admin/messages/MessageStatus.tsx +96 -0
- package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +29 -33
- package/apps/agents-server/src/app/admin/messages/messageAdminPresentation.ts +289 -0
- package/apps/agents-server/src/app/admin/messages/send-email/SendEmailClient.tsx +193 -63
- package/apps/agents-server/src/app/admin/messages/send-email/actions.ts +25 -28
- package/apps/agents-server/src/app/admin/messages/send-email/emailTesting.ts +153 -0
- package/apps/agents-server/src/app/admin/messages/send-email/emailTestingAccess.ts +30 -0
- package/apps/agents-server/src/app/admin/messages/send-email/page.tsx +18 -5
- package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerClient.tsx +103 -0
- package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerEditDialog.tsx +232 -0
- package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerFiltersCard.tsx +195 -0
- package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerRow.tsx +189 -0
- package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerSummaryMetrics.tsx +60 -0
- package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerTableCard.tsx +147 -0
- package/apps/agents-server/src/app/admin/planned-messages/page.tsx +17 -0
- package/apps/agents-server/src/app/admin/planned-messages/plannedMessageEditForm.ts +186 -0
- package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerDialogs.ts +46 -0
- package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerPresentation.tsx +188 -0
- package/apps/agents-server/src/app/admin/planned-messages/resolvePlannedMessageSortValue.ts +115 -0
- package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerData.ts +116 -0
- package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerState.ts +289 -0
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +7 -2
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerFiltersCard.tsx +7 -73
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerSummaryMetrics.tsx +5 -30
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +2 -0
- package/apps/agents-server/src/app/admin/task-manager/[taskId]/TaskManagerTaskDetailClient.tsx +3 -1
- package/apps/agents-server/src/app/admin/task-manager/taskManagerTaskPresentation.tsx +23 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +8 -9
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +5 -9
- package/apps/agents-server/src/app/agents/[agentName]/api/book/reference-diagnostics/route.ts +30 -7
- package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +9 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/book/test.http +3 -3
- package/apps/agents-server/src/app/agents/[agentName]/api/chat/resolveAgentChatRouteContext.ts +8 -16
- package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/[timeoutId]/route.ts +10 -153
- package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/route.ts +9 -4
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/route.ts +3 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +2 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/resolveUserChatScope.ts +8 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/route.ts +15 -7
- package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +4 -9
- package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorMissingReferences.tsx +106 -12
- package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +3 -0
- package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorDiagnostics.ts +12 -0
- package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorSaving.ts +18 -28
- package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorWrapper.tsx +2 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryClient.tsx +19 -1
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatSidebarDefault.tsx +17 -5
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatNotice.tsx +23 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatPlannedMessages.tsx +226 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatPanel.tsx +6 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +32 -12
- package/apps/agents-server/src/app/agents/[agentName]/chat/ExternalUserChatAdminActions.tsx +51 -3
- package/apps/agents-server/src/app/agents/[agentName]/chat/TeamMemberFrozenChatPrimaryAgentLink.tsx +31 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +2 -20
- package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatSidebarState.ts +26 -2
- package/apps/agents-server/src/app/agents/[agentName]/goal/page.tsx +35 -0
- package/apps/agents-server/src/app/agents/[agentName]/page.tsx +2 -1
- package/apps/agents-server/src/app/agents/[agentName]/projectReferenceActions.ts +61 -0
- package/apps/agents-server/src/app/agents/[agentName]/projectRuntimeActions.ts +97 -0
- package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/actions.ts +5 -50
- package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/page.tsx +2 -2
- package/apps/agents-server/src/app/api/admin/default-agents/reinstate/route.ts +5 -1
- package/apps/agents-server/src/app/api/admin/dns-records/cloudflare/route.ts +26 -16
- package/apps/agents-server/src/app/api/admin/planned-messages/[timeoutId]/route.ts +80 -0
- package/apps/agents-server/src/app/api/admin/planned-messages/route.ts +19 -0
- package/apps/agents-server/src/app/api/emails/incoming/stalwart/route.ts +9 -2
- package/apps/agents-server/src/app/api/internal/agent-goal-chat-planned-messages/route.ts +201 -0
- package/apps/agents-server/src/app/api/scrape/route.ts +1 -1
- package/apps/agents-server/src/app/layout.tsx +25 -0
- package/apps/agents-server/src/app/page.tsx +1 -1
- package/apps/agents-server/src/app/superadmin/servers/ServersRegistryTable.tsx +31 -39
- package/apps/agents-server/src/app/system/user-wallet/UserWalletDraft.ts +2 -2
- package/apps/agents-server/src/components/AgentNaming/legacyAgentTextTranslations.cs.yaml +7 -0
- package/apps/agents-server/src/components/AgentProfile/AgentCapabilityChips.tsx +1 -24
- package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +10 -3
- package/apps/agents-server/src/components/AgentProjects/AgentProjectIcon.tsx +137 -0
- package/apps/agents-server/src/components/AgentProjects/AgentProjectItem.tsx +26 -10
- package/apps/agents-server/src/components/AgentProjects/resolveLatestCompletedAgentMessageKey.ts +32 -0
- package/apps/agents-server/src/components/AgentProjects/useAgentProjectMarkdownReferences.ts +306 -0
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsApiTokenImportStep.tsx +5 -6
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsCheckStep.tsx +6 -5
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsManualStep.tsx +10 -14
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsWizard.tsx +11 -20
- package/apps/agents-server/src/components/CloudflareDnsWizard/useCloudflareDnsRecordImport.ts +5 -6
- package/apps/agents-server/src/components/DefaultAgents/ReinstateBundledAgentsButton.tsx +7 -0
- package/apps/agents-server/src/components/DefaultAgents/coreAgentsAdminRoute.ts +6 -0
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsInstructions.tsx +91 -57
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionPanel.tsx +63 -0
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionVariantTabs.tsx +67 -0
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsTable.tsx +40 -0
- package/apps/agents-server/src/components/Header/Header.tsx +8 -0
- package/apps/agents-server/src/components/Header/HeaderTypes.ts +5 -0
- package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +5 -4
- package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +125 -30
- package/apps/agents-server/src/components/Header/createAgentViewLabel.tsx +4 -4
- package/apps/agents-server/src/components/Header/resolveActiveAgentNavigation.ts +2 -2
- package/apps/agents-server/src/components/Header/resolveHeaderSystemActivities.ts +86 -0
- package/apps/agents-server/src/components/Homepage/AgentCard.tsx +0 -3
- package/apps/agents-server/src/components/Homepage/DefaultAgentsStatusNotice.tsx +1 -7
- package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +22 -10
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +8 -0
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardState.ts +0 -12
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardUseSetupStep.tsx +0 -58
- package/apps/agents-server/src/components/NewAgentDialog/newAgentWizardPresets.ts +0 -56
- package/apps/agents-server/src/components/WalletRecordDialog/useWalletRecordDialogState.ts +1 -1
- package/apps/agents-server/src/components/_utils/generateMetaTxt.ts +1 -1
- package/apps/agents-server/src/constants/federatedAgentImport.ts +7 -0
- package/apps/agents-server/src/database/migratePrefix.ts +13 -12
- package/apps/agents-server/src/database/migrations/2026-08-0100-agent-goal-chat-source.sql +10 -0
- package/apps/agents-server/src/database/migrations/2026-08-1800-user-chat-timeout-schedule.sql +11 -0
- package/apps/agents-server/src/generated/reservedPaths.ts +42 -42
- package/apps/agents-server/src/instrumentation-node.ts +18 -0
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +16 -11
- package/apps/agents-server/src/languages/translations/czech.yaml +16 -11
- package/apps/agents-server/src/languages/translations/english.yaml +16 -11
- package/apps/agents-server/src/message-providers/email/smtp/SmtpMessageProvider.ts +1 -1
- package/apps/agents-server/src/message-providers/email/stalwart/StalwartMessageProvider.ts +59 -19
- package/apps/agents-server/src/message-providers/email/stalwart/parseInboundStalwartEmail.ts +17 -2
- package/apps/agents-server/src/middleware/createMiddlewareRequestContext/loadRegisteredServers.ts +8 -0
- package/apps/agents-server/src/tools/$provideOpenAiAgentKitExecutionToolsForServer.ts +0 -191
- package/apps/agents-server/src/tools/$provideOpenAiAssistantExecutionToolsForServer.ts +0 -3
- package/apps/agents-server/src/tools/$provideServer.ts +2 -1
- package/apps/agents-server/src/tools/agentGoalChatTimeoutToolFunctions.ts +249 -0
- package/apps/agents-server/src/tools/agentGoalChatTimeoutTools.ts +147 -0
- package/apps/agents-server/src/tools/createServerChatRuntimeTools.ts +20 -0
- package/apps/agents-server/src/tools/getAllToolFunctionsForServer.ts +2 -0
- package/apps/agents-server/src/tools/mapRegisteredServerContexts.ts +1 -1
- package/apps/agents-server/src/tools/run_browser.ts +1 -1
- package/apps/agents-server/src/tools/send_email.ts +3 -3
- package/apps/agents-server/src/utils/adminEntityLookups/loadAgentNamesByPermanentId.ts +45 -0
- package/apps/agents-server/src/utils/adminEntityLookups/loadUsernamesByUserId.ts +36 -0
- package/apps/agents-server/src/utils/adminEntityLookups.ts +2 -0
- package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatConstants.ts +14 -0
- package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatIdentity.ts +28 -0
- package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatPlannedMessageActions.ts +583 -0
- package/apps/agents-server/src/utils/agentGoalChat/appendAgentGoalChatNote.ts +43 -0
- package/apps/agents-server/src/utils/agentGoalChat/canAccessAgentGoalChat.ts +14 -0
- package/apps/agents-server/src/utils/agentGoalChat/createAgentGoalChatNoteContent.ts +129 -0
- package/apps/agents-server/src/utils/agentGoalChat/enqueueAgentGoalChatTurn.ts +167 -0
- package/apps/agents-server/src/utils/agentGoalChat/ensureAgentGoalChat.ts +66 -0
- package/apps/agents-server/src/utils/agentGoalChat/prependAgentGoalChatSummarySeed.ts +40 -0
- package/apps/agents-server/src/utils/agentGoalChat/recordAgentGoalChatLifecycleNote.ts +53 -0
- package/apps/agents-server/src/utils/agentGoalChat/resolveAgentGoalChatOwnerUserId.ts +104 -0
- package/apps/agents-server/src/utils/agentGoalChat/resolveEffectiveAgentGoal.ts +29 -0
- package/apps/agents-server/src/utils/agentGoalChat/scheduleAgentGoalChatModifiedNote.ts +85 -0
- package/apps/agents-server/src/utils/agentGoalChat.ts +25 -0
- package/apps/agents-server/src/utils/agentProjects/AgentProjectInfo.ts +10 -1
- package/apps/agents-server/src/utils/agentProjects/AgentProjectReferenceInfo.ts +5 -2
- package/apps/agents-server/src/utils/agentProjects/AgentProjectRuntimeActionResult.ts +14 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectFileNames.ts +21 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectHrefs.ts +20 -11
- package/apps/agents-server/src/utils/agentProjects/agentProjectIdentity.ts +46 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeAutostartScheduler.ts +162 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDesiredState.ts +252 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDisplay.ts +6 -3
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDomains.ts +2 -44
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePaths.ts +25 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePm2.ts +60 -13
- package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeRegistry.ts +77 -24
- package/apps/agents-server/src/utils/agentProjects/agentProjectStateMutationQueue.ts +58 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectsPaths.ts +15 -5
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectInitials.ts +36 -0
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +124 -19
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectsDnsRecordsSection.ts +113 -0
- package/apps/agents-server/src/utils/agentProjects/createStaticAgentProjectServer.ts +2 -6
- package/apps/agents-server/src/utils/agentProjects/humanizeAgentProjectName.ts +25 -0
- package/apps/agents-server/src/utils/agentProjects/listAgentProjectChatReferences.ts +10 -3
- package/apps/agents-server/src/utils/agentProjects/listAgentProjectNames.ts +35 -0
- package/apps/agents-server/src/utils/agentProjects/listAgentProjects.ts +6 -23
- package/apps/agents-server/src/utils/agentProjects/listAllAgentProjectSummaries.ts +2 -1
- package/apps/agents-server/src/utils/agentProjects/listAllLocalAgentProjectIdentities.ts +48 -0
- package/apps/agents-server/src/utils/agentProjects/parseAgentProjectIndexHtml.ts +167 -0
- package/apps/agents-server/src/utils/agentProjects/readAgentProjectIndexHtmlProfile.ts +24 -0
- package/apps/agents-server/src/utils/agentProjects/readAgentProjectReadme.ts +3 -53
- package/apps/agents-server/src/utils/agentProjects/readAgentProjectRootTextFile.ts +73 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentChatProjectReferences.ts +25 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectFaviconRelativePath.ts +108 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectInfo.ts +12 -3
- package/apps/agents-server/src/utils/agentProjects/{resolveAgentProjectReadmeProfile.ts → resolveAgentProjectProfile.ts} +33 -33
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectPublicUrls.ts +34 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeEnvironmentFlag.ts +23 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeStatus.ts +73 -0
- package/apps/agents-server/src/utils/agentProjects/startDefaultAgentProjectRuntimes.ts +110 -0
- package/apps/agents-server/src/utils/agentReferenceResolver/MissingCoreAgentRecovery.ts +19 -0
- package/apps/agents-server/src/utils/agentReferenceResolver/bookScopedAgentReferences.ts +7 -0
- package/apps/agents-server/src/utils/agentReferenceResolver/createAgentInheritanceDiagnostics.ts +457 -0
- package/apps/agents-server/src/utils/agentReferenceResolver/createUnresolvedAgentReferenceDiagnostics.ts +27 -0
- package/apps/agents-server/src/utils/agentReferenceResolver/resolveCoreAgentAwareMissingReferences.ts +156 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationPdfResponse.ts +19 -17
- package/apps/agents-server/src/utils/chatMessageChips/createAnsweredMessageChipToolCalls.ts +49 -0
- package/apps/agents-server/src/utils/chatMessageChips/createPlannedMessageChipToolCalls.ts +44 -0
- package/apps/agents-server/src/utils/chatMessageChips/createTouchedExternalSourceChipToolCalls.ts +39 -0
- package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipResult.ts +45 -0
- package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipToolCalls.ts +109 -0
- package/apps/agents-server/src/utils/chatTasksAdmin.ts +9 -0
- package/apps/agents-server/src/utils/createAgentWithDefaultVisibility.ts +8 -0
- package/apps/agents-server/src/utils/createWellKnownAgentUrl.ts +17 -0
- package/apps/agents-server/src/utils/cronExpression/CronExpression.ts +63 -0
- package/apps/agents-server/src/utils/cronExpression/normalizeCronExpression.ts +34 -0
- package/apps/agents-server/src/utils/cronExpression/normalizeCronExpressionWhitespace.ts +11 -0
- package/apps/agents-server/src/utils/cronExpression/parseCronExpression.ts +41 -0
- package/apps/agents-server/src/utils/cronExpression/parseCronExpressionField.ts +140 -0
- package/apps/agents-server/src/utils/cronExpression/resolveNextCronRun.ts +100 -0
- package/apps/agents-server/src/utils/cronExpression/throwInvalidCronExpressionField.ts +20 -0
- package/apps/agents-server/src/utils/cronExpression.ts +10 -0
- package/apps/agents-server/src/utils/currentServerRegistryContext.ts +2 -1
- package/apps/agents-server/src/utils/customDomainRouting.ts +143 -10
- package/apps/agents-server/src/utils/dnsRecords/DnsRecordInstruction.ts +20 -0
- package/apps/agents-server/src/utils/dnsRecords/DnsRecordsSection.ts +77 -0
- package/apps/agents-server/src/utils/dnsRecords/createServerDnsRecordsSections.ts +58 -0
- package/apps/agents-server/src/utils/dnsRecords/createServerDomainDnsRecordsSection.ts +48 -0
- package/apps/agents-server/src/utils/dnsRecords/dnsRecordGroups.ts +52 -0
- package/apps/agents-server/src/utils/dnsRecords/resolveDnsRecordBatchPlan.ts +47 -1
- package/apps/agents-server/src/utils/email/agentEmailAddress.ts +14 -0
- package/apps/agents-server/src/utils/email/sendEmailThroughStalwart.ts +2 -1
- package/apps/agents-server/src/utils/explicitFromCommitment.ts +130 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +41 -36
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/loadAdminChatTaskFallbackData.ts +3 -77
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +3 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +2 -0
- package/apps/agents-server/src/utils/getFederatedServers.ts +5 -15
- package/apps/agents-server/src/utils/getWellKnownAgentUrl.ts +2 -3
- package/apps/agents-server/src/utils/handleChatCompletion/createHandleChatCompletionPromptContext.ts +3 -2
- package/apps/agents-server/src/utils/handleChatCompletion/resolveHandleChatCompletionRuntime.ts +4 -12
- package/apps/agents-server/src/utils/localChatRunner/applyLocalAgentPlannedMessageCommands.ts +261 -0
- package/apps/agents-server/src/utils/localChatRunner/parseLocalTeamConversations.ts +281 -0
- package/apps/agents-server/src/utils/localChatRunner/persistLocalTeamConversations.ts +71 -0
- package/apps/agents-server/src/utils/localChatRunner/prepareLocalAgentPlannedMessagesSidecar.ts +74 -0
- package/apps/agents-server/src/utils/localChatRunner/prepareLocalTeamConversationWorkspace.ts +233 -0
- package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +154 -27
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +5 -12
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentRuntime.ts +2 -2
- package/apps/agents-server/src/utils/managementApi/managementApiSchemas.ts +2 -2
- package/apps/agents-server/src/utils/messages/parseUseEmailSmtpCredential.ts +1 -1
- package/apps/agents-server/src/utils/parseFederatedServers.ts +14 -0
- package/apps/agents-server/src/utils/plannedMessageManager/cancelManagedPlannedMessage.ts +35 -0
- package/apps/agents-server/src/utils/plannedMessageManager/collectPlannedMessageAgentOptions.ts +56 -0
- package/apps/agents-server/src/utils/plannedMessageManager/createPlannedMessageManagerCounters.ts +104 -0
- package/apps/agents-server/src/utils/plannedMessageManager/filterPlannedMessages.ts +191 -0
- package/apps/agents-server/src/utils/plannedMessageManager/getPlannedMessageManagerResponse.ts +55 -0
- package/apps/agents-server/src/utils/plannedMessageManager/isPlannedMessageStillPlanned.ts +18 -0
- package/apps/agents-server/src/utils/plannedMessageManager/loadPlannedMessageManagerRecord.ts +32 -0
- package/apps/agents-server/src/utils/plannedMessageManager/mapPlannedMessageManagerRecord.ts +73 -0
- package/apps/agents-server/src/utils/plannedMessageManager/parsePlannedMessageManagerUpdateRequest.ts +76 -0
- package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageEndReason.ts +59 -0
- package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageLifecycle.ts +99 -0
- package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageRecurrenceKind.ts +40 -0
- package/apps/agents-server/src/utils/plannedMessageManager/updateManagedPlannedMessage.ts +121 -0
- package/apps/agents-server/src/utils/plannedMessagesAdmin.ts +200 -0
- package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +114 -95
- package/apps/agents-server/src/utils/resolveUseEmailSmtpCredential.ts +1 -1
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/insertManagedServerRegistryRow.ts +2 -2
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +7 -6
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +5 -4
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerMetadata.ts +3 -2
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerUsers.ts +3 -2
- package/apps/agents-server/src/utils/serverManagement/deleteManagedServer.ts +2 -2
- package/apps/agents-server/src/utils/serverManagement/getManagedServerById.ts +1 -1
- package/apps/agents-server/src/utils/serverManagement/listManagedServers.ts +1 -1
- package/apps/agents-server/src/utils/serverRegistry.ts +0 -24
- package/apps/agents-server/src/utils/serverRegistryNode.ts +27 -0
- package/apps/agents-server/src/utils/stalwart/createEmailDnsRecordsSection.ts +53 -0
- package/apps/agents-server/src/utils/useEmailSmtpWalletConstants.ts +5 -5
- package/apps/agents-server/src/utils/userChat/UserChatRecord.ts +13 -0
- package/apps/agents-server/src/utils/userChat/UserChatSource.ts +14 -0
- package/apps/agents-server/src/utils/userChat/appendQueuedUserChatTurn.ts +9 -2
- package/apps/agents-server/src/utils/userChat/createImmediateUserChatAnswerModelRequirements.ts +1 -0
- package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +7 -17
- package/apps/agents-server/src/utils/userChat/createUserChatSummary.ts +10 -2
- package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +3 -2
- package/apps/agents-server/src/utils/userChat/getUserChat.ts +16 -1
- package/apps/agents-server/src/utils/userChat/getUserChatForJobRunner.ts +31 -0
- package/apps/agents-server/src/utils/userChat/listUserChats.ts +113 -110
- package/apps/agents-server/src/utils/userChat/persistFrozenUserChat.ts +21 -6
- package/apps/agents-server/src/utils/userChat/persistUserChatJobTerminalState.ts +5 -0
- package/apps/agents-server/src/utils/userChat/resolveUserChatWorkerInternalToken.ts +5 -4
- package/apps/agents-server/src/utils/userChat/runImmediateUserChatAnswer.ts +2 -6
- package/apps/agents-server/src/utils/userChat/runUserChatJob.ts +2 -6
- package/apps/agents-server/src/utils/userChat/teamMemberUserChatContext.ts +63 -0
- package/apps/agents-server/src/utils/userChat/userChatJobRunReport.ts +30 -0
- package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +6 -1
- package/apps/agents-server/src/utils/userChat.ts +5 -1
- package/apps/agents-server/src/utils/userChatClient/cancelAgentUserTimeout.ts +2 -2
- package/apps/agents-server/src/utils/userChatClient/fetchAgentUserTimeouts.ts +2 -2
- package/apps/agents-server/src/utils/userChatClient.ts +13 -31
- package/apps/agents-server/src/utils/userChatTimeout/UserChatTimeoutRecord.ts +47 -3
- package/apps/agents-server/src/utils/userChatTimeout/agentScopedTimeoutBulkActions.ts +11 -17
- package/apps/agents-server/src/utils/userChatTimeout/createTimeoutWakeUpMessage.ts +38 -6
- package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/PlannedMessageSchedule.ts +52 -0
- package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/hasPlannedMessageRecurrence.ts +13 -0
- package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/isPlannedMessageScheduleFinished.ts +30 -0
- package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/normalizePlannedMessageScheduleValues.ts +62 -0
- package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/parsePlannedMessageSchedule.ts +202 -0
- package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/resolvePlannedMessageDueAt.ts +121 -0
- package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule.ts +12 -0
- package/apps/agents-server/src/utils/userChatTimeout/setAgentScopedUserChatTimeoutPausedState.ts +66 -0
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/claimNextDueUserChatTimeout.ts +28 -25
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/createUserChatTimeout.ts +76 -5
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/getAgentScopedUserChatTimeout.ts +8 -4
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAgentUserChatTimeouts.ts +4 -1
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAllUserChatTimeouts.ts +37 -0
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/mapUserChatTimeoutRow.ts +9 -0
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/recoverExpiredRunningUserChatTimeouts.ts +3 -2
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/repeatFiredUserChatTimeout.ts +84 -0
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/updateAgentScopedUserChatTimeout.ts +39 -6
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore.ts +2 -0
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +220 -57
- package/apps/agents-server/src/utils/userChatTimeout.ts +16 -0
- package/apps/agents-server/src/utils/userWallet/UserWalletRecord.ts +1 -1
- package/apps/agents-server/src/utils/userWallet/resolveUseEmailSmtpCredentialFromWallet.ts +1 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/deleteVpsSelfUpdateInstalledVersion.ts +2 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/isVpsSelfUpdateJobRunning.ts +16 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/startVpsSelfUpdate.ts +2 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateCron.ts +23 -316
- package/apps/agents-server/src/utils/vpsSelfUpdate.ts +1 -0
- package/apps/agents-server/tests/e2e/support/AgentManagementApi.ts +3 -3
- package/esm/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
- package/esm/index.es.js +9409 -8271
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
- package/esm/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
- package/esm/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
- package/esm/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
- package/esm/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
- package/esm/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
- package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
- package/esm/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
- package/esm/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
- package/esm/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
- package/esm/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
- package/esm/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
- package/esm/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
- package/esm/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
- package/esm/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
- package/esm/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
- package/esm/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
- package/esm/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +17 -0
- package/esm/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
- package/esm/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
- package/esm/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
- package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
- package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +15 -2
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +9 -3
- package/esm/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
- package/esm/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
- package/esm/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +51 -0
- package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
- package/esm/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
- package/esm/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +35 -1
- package/esm/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
- package/esm/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +15 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
- package/esm/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
- package/esm/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
- package/esm/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
- package/esm/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +23 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
- package/esm/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
- package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +21 -1
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +8 -1
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
- package/esm/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
- package/esm/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
- package/esm/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
- package/esm/scripts/verify-prompts/verify-prompts.d.ts +3 -2
- package/esm/src/_packages/components.index.d.ts +4 -0
- package/esm/src/_packages/types.index.d.ts +4 -0
- package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
- package/esm/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
- package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
- package/esm/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
- package/esm/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
- package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
- package/esm/src/book-3.0/cliAgentEnv.d.ts +3 -3
- package/esm/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
- package/esm/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
- package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
- package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
- package/esm/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
- package/esm/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
- package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
- package/esm/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
- package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
- package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
- package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
- package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
- package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
- package/esm/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
- package/esm/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +26 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
- package/esm/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
- package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
- package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
- package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
- package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
- package/esm/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
- package/esm/src/cli/cli-commands/common/{harness/$resolveLatestHarnessVersion.d.ts → npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
- package/esm/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
- package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
- package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
- package/esm/src/commitments/index.d.ts +4 -12
- package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
- package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/esm/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
- package/esm/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
- package/esm/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
- package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
- package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
- package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
- package/esm/src/utils/misc/debounce.d.ts +4 -2
- package/esm/src/utils/misc/emojis.d.ts +3 -2
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/_packages/components.index.ts +4 -0
- package/src/_packages/components.readme.md +1 -1
- package/src/_packages/types.index.ts +4 -0
- package/src/avatars/renderAvatarVisualTerminalText.ts +249 -0
- package/src/avatars/types/AvatarVisualDefinition.ts +60 -0
- package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +144 -22
- package/src/book-2.0/agent-source/AgentBasicInformation.ts +3 -9
- package/src/book-2.0/agent-source/AgentSourceParseResult.ts +6 -0
- package/src/book-2.0/agent-source/ParsedUnknownCommitment.ts +29 -0
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.ts +38 -1
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.ts +0 -23
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +0 -2
- package/src/book-2.0/agent-source/getBookCommitmentLineType.ts +36 -0
- package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +16 -31
- package/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.ts +0 -35
- package/src/book-2.0/agent-source/parseAgentSourceWithCommitments.ts +128 -61
- package/src/book-2.0/agent-source/string_book.ts +1 -1
- package/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.ts +0 -25
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +7 -14
- package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +13 -33
- package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +12 -32
- package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +1 -4
- package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +4 -17
- package/src/book-3.0/AgentMessageRunReport.ts +135 -0
- package/src/book-3.0/AgentPlannedMessagesSidecar.ts +284 -0
- package/src/book-3.0/AgentTeamConversationWorkspace.ts +170 -0
- package/src/book-3.0/cliAgentEnv.ts +3 -2
- package/src/book-3.0/createAgentMessageSidecarBaseName.ts +20 -0
- package/src/book-3.0/describeAgentPlannedMessageSchedule.ts +94 -0
- package/src/book-components/BookEditor/BookEditorMonaco.tsx +8 -1
- package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +3 -1
- package/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.ts +3 -11
- package/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.ts +71 -0
- package/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.ts +50 -0
- package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +1 -1
- package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +56 -55
- package/src/book-components/Chat/Chat/Chat.module.css +172 -27
- package/src/book-components/Chat/Chat/ChatMessageMap.tsx +7 -4
- package/src/book-components/Chat/Chat/ChatProps.tsx +3 -2
- package/src/book-components/Chat/Chat/renderAgentProjectDiff.tsx +85 -0
- package/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.tsx +206 -0
- package/src/book-components/Chat/Chat/renderToolCallDetails.tsx +9 -12
- package/src/book-components/Chat/MarkdownContent/MarkdownContent.module.css +85 -17
- package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +115 -2
- package/src/book-components/Chat/save/react/exports/chat-preview-2025-10-13 (1).jsx +95 -5
- package/src/book-components/Chat/utils/agentProjectToolCall.ts +151 -0
- package/src/book-components/Chat/utils/externalSourceToolCall.ts +65 -0
- package/src/book-components/Chat/utils/getToolCallChipletInfo.ts +64 -0
- package/src/book-components/Chat/utils/renderMarkdown.ts +658 -96
- package/src/book-components/Chat/utils/timeoutToolCallPresentation.ts +34 -3
- package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +1 -1
- package/src/cli/cli-commands/coder/GitChangesMode.ts +35 -0
- package/src/cli/cli-commands/coder/add.ts +3 -3
- package/src/cli/cli-commands/coder/boilerplateCount.ts +139 -0
- package/src/cli/cli-commands/coder/boilerplateTemplates.ts +3 -15
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +55 -47
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +7 -4
- package/src/cli/cli-commands/coder/init.ts +16 -6
- package/src/cli/cli-commands/coder/ping.ts +45 -9
- package/src/cli/cli-commands/coder/run.ts +23 -4
- package/src/cli/cli-commands/coder/server.ts +12 -3
- package/src/cli/cli-commands/coder/verify.ts +29 -5
- package/src/cli/cli-commands/coder/waitOptions.ts +33 -0
- package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +6 -2
- package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +66 -10
- package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +32 -9
- package/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.ts +6 -3
- package/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.ts +46 -0
- package/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.ts +36 -0
- package/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts +2 -2
- package/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.ts +100 -0
- package/src/cli/cli-commands/common/harness/HarnessDefinition.ts +40 -0
- package/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.ts +44 -0
- package/src/cli/cli-commands/common/harness/HarnessInstallationStatus.ts +9 -2
- package/src/cli/cli-commands/common/harness/HarnessUpdatePlan.ts +27 -0
- package/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.ts +6 -2
- package/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.ts +28 -6
- package/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.ts +41 -0
- package/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.ts +111 -0
- package/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.ts +47 -0
- package/src/cli/cli-commands/common/harnessUpdateCliOptions.ts +46 -0
- package/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.ts → npm/$askForNpmPackageInstallationApproval.ts} +3 -3
- package/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.ts +49 -0
- package/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.ts +51 -0
- package/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.ts +28 -0
- package/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.ts +25 -0
- package/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.ts +165 -0
- package/src/cli/cli-commands/common/projectInitialization.ts +10 -1
- package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +38 -12
- package/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.ts +69 -0
- package/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.ts +117 -0
- package/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.ts +259 -0
- package/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.ts +55 -0
- package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.ts +76 -0
- package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.ts +32 -0
- package/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.ts +13 -0
- package/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.ts +45 -0
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +47 -3
- package/src/commands/FORMAT/formatCommandParser.ts +4 -2
- package/src/commitments/ACTION/ACTION.ts +3 -3
- package/src/commitments/FROM/FROM.ts +13 -0
- package/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.ts +1 -1
- package/src/commitments/META_FULLNAME/META_FULLNAME.ts +70 -0
- package/src/commitments/META_ID/META_ID.ts +78 -0
- package/src/commitments/WRITING_RULES/WRITING_RULES.ts +16 -8
- package/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.ts +1 -49
- package/src/commitments/index.ts +8 -25
- package/src/executables/platforms/locateAppOnWindows.ts +12 -9
- package/src/llm-providers/agent/Agent.ts +1 -1
- package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +2 -2
- package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +21 -18
- package/src/other/templates/getTemplatesPipelineCollection.ts +1022 -697
- package/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.ts +8 -9
- package/src/utils/agent-message-runtime/AgentMessageProjectChange.ts +183 -0
- package/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.ts +80 -0
- package/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.ts +108 -0
- package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +78 -75
- package/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.ts +341 -0
- package/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.ts +147 -0
- package/src/utils/agents/terminalAgentAvatarVisual.ts +31 -3
- package/src/utils/ascii-art/convertImageDataToAsciiArt.ts +9 -109
- package/src/utils/ascii-art/createAnsiColorCode.ts +132 -0
- package/src/utils/misc/debounce.ts +26 -5
- package/src/utils/misc/emojis.ts +3 -3
- package/src/utils/random/$generateBookBoilerplate.ts +1 -1
- package/src/version.ts +2 -2
- package/src/versions.txt +25 -0
- package/umd/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
- package/umd/index.umd.js +9413 -8275
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
- package/umd/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
- package/umd/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
- package/umd/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
- package/umd/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
- package/umd/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
- package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
- package/umd/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
- package/umd/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
- package/umd/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
- package/umd/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
- package/umd/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
- package/umd/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
- package/umd/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
- package/umd/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
- package/umd/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
- package/umd/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
- package/umd/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +17 -0
- package/umd/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
- package/umd/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
- package/umd/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
- package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
- package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +15 -2
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +9 -3
- package/umd/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
- package/umd/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
- package/umd/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +51 -0
- package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
- package/umd/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
- package/umd/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +35 -1
- package/umd/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
- package/umd/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +15 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
- package/umd/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
- package/umd/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
- package/umd/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
- package/umd/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +23 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
- package/umd/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
- package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +21 -1
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +8 -1
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
- package/umd/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
- package/umd/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
- package/umd/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
- package/umd/scripts/verify-prompts/verify-prompts.d.ts +3 -2
- package/umd/src/_packages/components.index.d.ts +4 -0
- package/umd/src/_packages/types.index.d.ts +4 -0
- package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
- package/umd/src/avatars/renderAvatarVisualTerminalText.test.d.ts +1 -0
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
- package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
- package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
- package/umd/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
- package/umd/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
- package/umd/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
- package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
- package/umd/src/book-3.0/cliAgentEnv.d.ts +3 -3
- package/umd/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
- package/umd/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
- package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
- package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
- package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
- package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
- package/umd/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
- package/umd/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
- package/umd/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
- package/umd/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
- package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
- package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
- package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/umd/src/cli/cli-commands/coder/boilerplateCount.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
- package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
- package/umd/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
- package/umd/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +26 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
- package/umd/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
- package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
- package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
- package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
- package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
- package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
- package/umd/src/cli/cli-commands/common/{harness/$resolveLatestHarnessVersion.d.ts → npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
- package/umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
- package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
- package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
- package/umd/src/commitments/index.d.ts +4 -12
- package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
- package/umd/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
- package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/umd/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
- package/umd/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
- package/umd/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
- package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
- package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
- package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
- package/umd/src/utils/misc/debounce.d.ts +4 -2
- package/umd/src/utils/misc/debounce.test.d.ts +1 -0
- package/umd/src/utils/misc/emojis.d.ts +3 -2
- package/umd/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
- package/apps/agents-server/scripts/ignore-kill-eperm.js +0 -31
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerScopeTabs.tsx +0 -74
- package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/actions/route.ts +0 -103
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsClient.tsx +0 -43
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsEditDialog.tsx +0 -98
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsFiltersCard.tsx +0 -75
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsHeader.tsx +0 -53
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsSummaryMetrics.tsx +0 -70
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableCard.tsx +0 -58
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableRow.tsx +0 -242
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/loading.tsx +0 -15
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/page.tsx +0 -28
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/useAgentTimeoutsClientState.ts +0 -769
- package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +0 -182
- package/apps/agents-server/src/tools/configureTimeoutToolRuntimeAdapterForServer.ts +0 -381
- package/apps/agents-server/src/utils/emails/extractUseEmailConfigurationFromAgentSource.ts +0 -42
- package/apps/agents-server/src/utils/userChatClient/runAgentUserTimeoutBulkAction.ts +0 -24
- package/apps/agents-server/src/utils/userChatClient/updateAgentUserTimeout.ts +0 -25
- package/esm/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
- package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
- package/esm/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
- package/esm/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
- package/esm/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
- package/esm/scripts/find-fresh-emoji-tags/utils/emojis.d.ts +0 -16
- package/esm/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
- package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
- package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
- package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/META/META.d.ts +0 -65
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- package/src/cli/cli-commands/common/harness/$installHarness.ts +0 -56
- package/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.ts +0 -34
- package/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.ts +0 -28
- package/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.ts +0 -39
- package/src/commitments/COMPONENT/COMPONENT.ts +0 -70
- package/src/commitments/MEMORY/MEMORY.ts +0 -94
- package/src/commitments/MEMORY/MemoryToolNames.ts +0 -13
- package/src/commitments/MEMORY/MemoryToolRuntimeAdapter.ts +0 -180
- package/src/commitments/MEMORY/createMemorySystemMessage.ts +0 -27
- package/src/commitments/MEMORY/createMemoryToolFunctions.ts +0 -134
- package/src/commitments/MEMORY/createMemoryTools.ts +0 -115
- package/src/commitments/MEMORY/getMemoryCommitmentDocumentation.ts +0 -47
- package/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.ts +0 -104
- package/src/commitments/MEMORY/getMemoryToolTitles.ts +0 -16
- package/src/commitments/MEMORY/parseMemoryToolArgs.ts +0 -126
- package/src/commitments/MEMORY/resolveMemoryRuntimeContext.ts +0 -23
- package/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.ts +0 -26
- package/src/commitments/META/META.ts +0 -168
- package/src/commitments/USE/TODO.txt +0 -1
- package/src/commitments/USE/aggregateUseCommitmentSystemMessages.ts +0 -219
- package/src/commitments/USE_BROWSER/TODO.txt +0 -1
- package/src/commitments/USE_BROWSER/USE_BROWSER.ts +0 -257
- package/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.ts +0 -45
- package/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.ts +0 -83
- package/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.ts +0 -146
- package/src/commitments/USE_EMAIL/USE_EMAIL.ts +0 -201
- package/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.ts +0 -75
- package/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.ts +0 -44
- package/src/commitments/USE_EMAIL/sendEmailViaBrowser.ts +0 -47
- package/src/commitments/USE_SEARCH_ENGINE/TODO.txt +0 -1
- package/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.ts +0 -171
- package/src/commitments/USE_SPAWN/USE_SPAWN.ts +0 -150
- package/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.ts +0 -42
- package/src/commitments/USE_SPAWN/spawnAgentViaBrowser.ts +0 -50
- package/src/commitments/USE_TIME/USE_TIME.ts +0 -177
- package/src/commitments/USE_TIMEOUT/TimeoutToolNames.ts +0 -13
- package/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.ts +0 -255
- package/src/commitments/USE_TIMEOUT/USE_TIMEOUT.ts +0 -117
- package/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.ts +0 -22
- package/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.ts +0 -361
- package/src/commitments/USE_TIMEOUT/createTimeoutTools.ts +0 -127
- package/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.ts +0 -67
- package/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.ts +0 -460
- package/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.ts +0 -36
- package/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.ts +0 -26
- package/src/commitments/WALLET/WALLET.ts +0 -71
- package/src/commitments/WALLET/WalletToolNames.ts +0 -14
- package/src/commitments/WALLET/WalletToolRuntimeAdapter.ts +0 -180
- package/src/commitments/WALLET/createWalletSystemMessage.ts +0 -22
- package/src/commitments/WALLET/createWalletToolFunctions.ts +0 -145
- package/src/commitments/WALLET/createWalletTools.ts +0 -129
- package/src/commitments/WALLET/getWalletCommitmentDocumentation.ts +0 -14
- package/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.ts +0 -64
- package/src/commitments/WALLET/getWalletToolTitles.ts +0 -17
- package/src/commitments/WALLET/parseWalletToolArgs.ts +0 -231
- package/src/commitments/WALLET/resolveWalletRuntimeContext.ts +0 -23
- package/src/commitments/WALLET/setWalletToolRuntimeAdapter.ts +0 -26
- package/src/commitments/_common/createSerpSearchToolFunction.ts +0 -46
- package/umd/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
- package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
- package/umd/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
- package/umd/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
- package/umd/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
- package/umd/scripts/find-fresh-emoji-tags/utils/emojis.d.ts +0 -16
- package/umd/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
- package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
- package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
- package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/META/META.d.ts +0 -65
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- /package/esm/src/{book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
- /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
- /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts} +0 -0
- /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → book-3.0/AgentPlannedMessagesSidecar.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → book-components/Chat/utils/agentProjectToolCall.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts} +0 -0
- /package/esm/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts} +0 -0
- /package/{umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → esm/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts} +0 -0
- /package/{umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
- /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
- /package/{umd/src/commitments/MEMORY/MEMORY.test.d.ts → esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts → esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts} +0 -0
- /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
- /package/{umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → esm/src/executables/platforms/locateAppOnWindows.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_TIME/USE_TIME.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → esm/src/utils/misc/debounce.test.d.ts} +0 -0
- /package/{umd/src/commitments/WALLET/WALLET.test.d.ts → esm/src/utils/random/$generateBookBoilerplate.test.d.ts} +0 -0
- /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
package/apps/agents-server/src/app/agents/[agentName]/timeouts/useAgentTimeoutsClientState.ts
DELETED
|
@@ -1,769 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { showAlert, showConfirm, showPrompt } from '@/src/components/AsyncDialogs/asyncDialogs';
|
|
4
|
-
import { useDirtyModalGuard } from '@/src/components/utils/useDirtyModalGuard';
|
|
5
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
|
-
import {
|
|
7
|
-
cancelAgentUserTimeout,
|
|
8
|
-
fetchAgentUserTimeouts,
|
|
9
|
-
runAgentUserTimeoutBulkAction,
|
|
10
|
-
updateAgentUserTimeout,
|
|
11
|
-
type AgentUserTimeoutBulkAction,
|
|
12
|
-
type AgentUserTimeoutCounters,
|
|
13
|
-
type AgentUserTimeoutUpdatePayload,
|
|
14
|
-
type UserChatTimeout,
|
|
15
|
-
} from '@/src/utils/userChatClient';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Filter tabs available in the timeout manager.
|
|
19
|
-
*
|
|
20
|
-
* @private function of AgentTimeoutsClient
|
|
21
|
-
*/
|
|
22
|
-
type TimeoutManagerFilter = 'active' | 'paused' | 'history' | 'all';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Supported timeout actions shown as busy states in the manager.
|
|
26
|
-
*
|
|
27
|
-
* @private function of AgentTimeoutsClient
|
|
28
|
-
*/
|
|
29
|
-
type TimeoutManagerActionKind = 'save' | 'cancel' | 'pause' | 'resume' | 'extend';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Local edit form state for the timeout dialog.
|
|
33
|
-
*
|
|
34
|
-
* @private function of AgentTimeoutsClient
|
|
35
|
-
*/
|
|
36
|
-
type TimeoutEditDraft = {
|
|
37
|
-
dueAtLocalValue: string;
|
|
38
|
-
recurrenceMinutesValue: string;
|
|
39
|
-
messageValue: string;
|
|
40
|
-
parametersValue: string;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Props accepted by `useAgentTimeoutsClientState`.
|
|
45
|
-
*
|
|
46
|
-
* @private function of AgentTimeoutsClient
|
|
47
|
-
*/
|
|
48
|
-
type UseAgentTimeoutsClientStateProps = {
|
|
49
|
-
agentName: string;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Button metadata for one timeout-manager bulk action.
|
|
54
|
-
*
|
|
55
|
-
* @private function of AgentTimeoutsClient
|
|
56
|
-
*/
|
|
57
|
-
type TimeoutManagerBulkActionView = {
|
|
58
|
-
action: AgentUserTimeoutBulkAction;
|
|
59
|
-
idleLabel: string;
|
|
60
|
-
busyLabel: string;
|
|
61
|
-
buttonClassName: string;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Dialog copy and button styling for one bulk action.
|
|
66
|
-
*
|
|
67
|
-
* @private function of AgentTimeoutsClient
|
|
68
|
-
*/
|
|
69
|
-
type TimeoutManagerBulkActionConfig = TimeoutManagerBulkActionView & {
|
|
70
|
-
confirmTitle: string;
|
|
71
|
-
confirmMessage: string;
|
|
72
|
-
confirmLabel: string;
|
|
73
|
-
errorTitle: string;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* State and handlers exposed by `useAgentTimeoutsClientState`.
|
|
78
|
-
*
|
|
79
|
-
* @private function of AgentTimeoutsClient
|
|
80
|
-
*/
|
|
81
|
-
type UseAgentTimeoutsClientStateResult = {
|
|
82
|
-
bulkActions: ReadonlyArray<TimeoutManagerBulkActionView>;
|
|
83
|
-
busyAction: TimeoutManagerActionKind | null;
|
|
84
|
-
busyBulkAction: AgentUserTimeoutBulkAction | null;
|
|
85
|
-
busyTimeoutId: string | null;
|
|
86
|
-
counters: AgentUserTimeoutCounters | null;
|
|
87
|
-
closeEditDialog: () => void;
|
|
88
|
-
requestCloseEditDialog: () => void;
|
|
89
|
-
editDraft: TimeoutEditDraft;
|
|
90
|
-
editingTimeout: UserChatTimeout | null;
|
|
91
|
-
errorMessage: string | null;
|
|
92
|
-
filter: TimeoutManagerFilter;
|
|
93
|
-
filteredTimeouts: Array<UserChatTimeout>;
|
|
94
|
-
generatedAt: string | null;
|
|
95
|
-
isLoading: boolean;
|
|
96
|
-
isRefreshing: boolean;
|
|
97
|
-
cancelTimeout: (timeout: UserChatTimeout) => Promise<void>;
|
|
98
|
-
extendTimeout: (timeout: UserChatTimeout) => Promise<void>;
|
|
99
|
-
openEditDialog: (timeout: UserChatTimeout) => void;
|
|
100
|
-
refreshNow: () => Promise<void>;
|
|
101
|
-
runBulkAction: (action: AgentUserTimeoutBulkAction) => Promise<void>;
|
|
102
|
-
saveEdits: () => Promise<void>;
|
|
103
|
-
selectFilter: (nextFilter: TimeoutManagerFilter) => void;
|
|
104
|
-
toggleTimeoutPause: (timeout: UserChatTimeout) => Promise<void>;
|
|
105
|
-
updateEditDueAtLocalValue: (nextValue: string) => void;
|
|
106
|
-
updateEditMessageValue: (nextValue: string) => void;
|
|
107
|
-
updateEditParametersValue: (nextValue: string) => void;
|
|
108
|
-
updateEditRecurrenceMinutesValue: (nextValue: string) => void;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Polling cadence for refreshing timeout data.
|
|
113
|
-
*
|
|
114
|
-
* @private function of AgentTimeoutsClient
|
|
115
|
-
*/
|
|
116
|
-
const AGENT_TIMEOUT_MANAGER_POLL_INTERVAL_MS = 10_000;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* UX copy/configuration for supported timeout-manager bulk actions.
|
|
120
|
-
*
|
|
121
|
-
* @private function of AgentTimeoutsClient
|
|
122
|
-
*/
|
|
123
|
-
const TIMEOUT_MANAGER_BULK_ACTION_CONFIG: Record<AgentUserTimeoutBulkAction, TimeoutManagerBulkActionConfig> = {
|
|
124
|
-
cancel_all_active: {
|
|
125
|
-
action: 'cancel_all_active',
|
|
126
|
-
idleLabel: 'Cancel active',
|
|
127
|
-
busyLabel: 'Cancelling...',
|
|
128
|
-
confirmTitle: 'Cancel all active timeouts',
|
|
129
|
-
confirmMessage: 'Cancel all active timeouts for this agent across your chats?',
|
|
130
|
-
confirmLabel: 'Cancel all',
|
|
131
|
-
errorTitle: 'Bulk cancellation failed',
|
|
132
|
-
buttonClassName:
|
|
133
|
-
'rounded-md border border-red-200 bg-red-50 px-3 py-1.5 text-xs font-semibold text-red-700 disabled:cursor-not-allowed disabled:opacity-60',
|
|
134
|
-
},
|
|
135
|
-
pause_all_active: {
|
|
136
|
-
action: 'pause_all_active',
|
|
137
|
-
idleLabel: 'Pause active',
|
|
138
|
-
busyLabel: 'Pausing...',
|
|
139
|
-
confirmTitle: 'Pause all active timeouts',
|
|
140
|
-
confirmMessage: 'Pause all active queued timeouts for this agent across your chats?',
|
|
141
|
-
confirmLabel: 'Pause all',
|
|
142
|
-
errorTitle: 'Bulk pause failed',
|
|
143
|
-
buttonClassName:
|
|
144
|
-
'rounded-md border border-amber-200 bg-amber-50 px-3 py-1.5 text-xs font-semibold text-amber-700 disabled:cursor-not-allowed disabled:opacity-60',
|
|
145
|
-
},
|
|
146
|
-
resume_all_paused: {
|
|
147
|
-
action: 'resume_all_paused',
|
|
148
|
-
idleLabel: 'Resume paused',
|
|
149
|
-
busyLabel: 'Resuming...',
|
|
150
|
-
confirmTitle: 'Resume all paused timeouts',
|
|
151
|
-
confirmMessage: 'Resume all paused queued timeouts for this agent across your chats?',
|
|
152
|
-
confirmLabel: 'Resume all',
|
|
153
|
-
errorTitle: 'Bulk resume failed',
|
|
154
|
-
buttonClassName:
|
|
155
|
-
'rounded-md border border-emerald-200 bg-emerald-50 px-3 py-1.5 text-xs font-semibold text-emerald-700 disabled:cursor-not-allowed disabled:opacity-60',
|
|
156
|
-
},
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Render-ready bulk action list consumed by the page header.
|
|
161
|
-
*
|
|
162
|
-
* @private function of AgentTimeoutsClient
|
|
163
|
-
*/
|
|
164
|
-
const TIMEOUT_MANAGER_BULK_ACTIONS: ReadonlyArray<TimeoutManagerBulkActionView> = createBulkActionViews();
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Creates a render-ready list of bulk action buttons.
|
|
168
|
-
*
|
|
169
|
-
* @private function of AgentTimeoutsClient
|
|
170
|
-
*/
|
|
171
|
-
function createBulkActionViews(): Array<TimeoutManagerBulkActionView> {
|
|
172
|
-
return (
|
|
173
|
-
Object.entries(TIMEOUT_MANAGER_BULK_ACTION_CONFIG) as Array<
|
|
174
|
-
[AgentUserTimeoutBulkAction, TimeoutManagerBulkActionConfig]
|
|
175
|
-
>
|
|
176
|
-
).map(([action, actionConfig]) => ({
|
|
177
|
-
action,
|
|
178
|
-
idleLabel: actionConfig.idleLabel,
|
|
179
|
-
busyLabel: actionConfig.busyLabel,
|
|
180
|
-
buttonClassName: actionConfig.buttonClassName,
|
|
181
|
-
}));
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Creates the blank edit-draft state used when no timeout is selected.
|
|
186
|
-
*
|
|
187
|
-
* @private function of AgentTimeoutsClient
|
|
188
|
-
*/
|
|
189
|
-
function createEmptyTimeoutEditDraft(): TimeoutEditDraft {
|
|
190
|
-
return {
|
|
191
|
-
dueAtLocalValue: '',
|
|
192
|
-
recurrenceMinutesValue: '',
|
|
193
|
-
messageValue: '',
|
|
194
|
-
parametersValue: '{}',
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Prefills the edit dialog from one timeout record.
|
|
200
|
-
*
|
|
201
|
-
* @private function of AgentTimeoutsClient
|
|
202
|
-
*/
|
|
203
|
-
function createTimeoutEditDraft(timeout: UserChatTimeout): TimeoutEditDraft {
|
|
204
|
-
return {
|
|
205
|
-
dueAtLocalValue: toDateTimeLocalValue(timeout.dueAt),
|
|
206
|
-
recurrenceMinutesValue: timeout.recurrenceIntervalMs
|
|
207
|
-
? String(Math.floor(timeout.recurrenceIntervalMs / 60_000))
|
|
208
|
-
: '',
|
|
209
|
-
messageValue: timeout.message || '',
|
|
210
|
-
parametersValue: JSON.stringify(timeout.parameters || {}, null, 2),
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Filters timeouts for the selected manager tab.
|
|
216
|
-
*
|
|
217
|
-
* @private function of AgentTimeoutsClient
|
|
218
|
-
*/
|
|
219
|
-
function filterTimeoutsBySelectedView(
|
|
220
|
-
timeouts: ReadonlyArray<UserChatTimeout>,
|
|
221
|
-
filter: TimeoutManagerFilter,
|
|
222
|
-
): Array<UserChatTimeout> {
|
|
223
|
-
if (filter === 'all') {
|
|
224
|
-
return [...timeouts];
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (filter === 'active') {
|
|
228
|
-
return timeouts.filter(
|
|
229
|
-
(timeout) => (timeout.status === 'QUEUED' || timeout.status === 'RUNNING') && !timeout.pausedAt,
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (filter === 'paused') {
|
|
234
|
-
return timeouts.filter((timeout) => timeout.status === 'QUEUED' && Boolean(timeout.pausedAt));
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return timeouts.filter(
|
|
238
|
-
(timeout) =>
|
|
239
|
-
timeout.status === 'COMPLETED' || timeout.status === 'FAILED' || timeout.status === 'CANCELLED',
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Normalizes errors thrown while loading the timeout manager.
|
|
245
|
-
*
|
|
246
|
-
* @private function of AgentTimeoutsClient
|
|
247
|
-
*/
|
|
248
|
-
function resolveTimeoutLoadErrorMessage(loadError: unknown): string {
|
|
249
|
-
return loadError instanceof Error ? loadError.message : 'Failed to load agent timeouts.';
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Shows one timeout-manager alert dialog.
|
|
254
|
-
*
|
|
255
|
-
* @private function of AgentTimeoutsClient
|
|
256
|
-
*/
|
|
257
|
-
async function showTimeoutAlert(title: string, message: string): Promise<void> {
|
|
258
|
-
await showAlert({ title, message }).catch(() => undefined);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Shows a failed timeout action using the original fallback copy.
|
|
263
|
-
*
|
|
264
|
-
* @private function of AgentTimeoutsClient
|
|
265
|
-
*/
|
|
266
|
-
async function showTimeoutActionFailure(title: string, error: unknown, fallbackMessage: string): Promise<void> {
|
|
267
|
-
await showTimeoutAlert(title, error instanceof Error ? error.message : fallbackMessage);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Requests confirmation before one timeout cancellation.
|
|
272
|
-
*
|
|
273
|
-
* @private function of AgentTimeoutsClient
|
|
274
|
-
*/
|
|
275
|
-
async function confirmTimeoutCancellation(timeoutId: string): Promise<boolean> {
|
|
276
|
-
return showConfirm({
|
|
277
|
-
title: 'Cancel timeout',
|
|
278
|
-
message: `Cancel timeout "${timeoutId}"?`,
|
|
279
|
-
confirmLabel: 'Cancel timeout',
|
|
280
|
-
cancelLabel: 'Back',
|
|
281
|
-
}).catch(() => false);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Prompts the user for a positive number of extension minutes.
|
|
286
|
-
*
|
|
287
|
-
* @private function of AgentTimeoutsClient
|
|
288
|
-
*/
|
|
289
|
-
async function requestTimeoutExtensionMinutes(): Promise<number | null> {
|
|
290
|
-
const value = await showPrompt({
|
|
291
|
-
title: 'Extend timeout',
|
|
292
|
-
message: 'Add minutes to the current due time.',
|
|
293
|
-
confirmLabel: 'Extend',
|
|
294
|
-
cancelLabel: 'Back',
|
|
295
|
-
placeholder: 'Minutes',
|
|
296
|
-
inputLabel: 'Minutes',
|
|
297
|
-
}).catch(() => null);
|
|
298
|
-
|
|
299
|
-
if (value === null) {
|
|
300
|
-
return null;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const minutes = Number.parseFloat(value.trim());
|
|
304
|
-
if (!Number.isFinite(minutes) || minutes <= 0) {
|
|
305
|
-
await showTimeoutAlert('Invalid value', 'Please enter a positive number of minutes.');
|
|
306
|
-
return null;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
return minutes;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Requests confirmation before one bulk action.
|
|
314
|
-
*
|
|
315
|
-
* @private function of AgentTimeoutsClient
|
|
316
|
-
*/
|
|
317
|
-
async function confirmTimeoutBulkAction(actionConfig: TimeoutManagerBulkActionConfig): Promise<boolean> {
|
|
318
|
-
return showConfirm({
|
|
319
|
-
title: actionConfig.confirmTitle,
|
|
320
|
-
message: actionConfig.confirmMessage,
|
|
321
|
-
confirmLabel: actionConfig.confirmLabel,
|
|
322
|
-
cancelLabel: 'Back',
|
|
323
|
-
}).catch(() => false);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Validates and converts the edit dialog state into an API payload.
|
|
328
|
-
*
|
|
329
|
-
* @private function of AgentTimeoutsClient
|
|
330
|
-
*/
|
|
331
|
-
async function createTimeoutEditPayload(
|
|
332
|
-
editDraft: TimeoutEditDraft,
|
|
333
|
-
): Promise<AgentUserTimeoutUpdatePayload | null> {
|
|
334
|
-
let parsedParameters: Record<string, unknown>;
|
|
335
|
-
try {
|
|
336
|
-
parsedParameters = parseTimeoutEditParameters(editDraft.parametersValue);
|
|
337
|
-
} catch (error) {
|
|
338
|
-
await showTimeoutActionFailure('Invalid parameters JSON', error, 'Failed to parse parameters JSON.');
|
|
339
|
-
return null;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
let recurrenceIntervalMs: number | null;
|
|
343
|
-
try {
|
|
344
|
-
recurrenceIntervalMs = parseTimeoutEditRecurrenceIntervalMs(editDraft.recurrenceMinutesValue);
|
|
345
|
-
} catch (error) {
|
|
346
|
-
await showTimeoutActionFailure(
|
|
347
|
-
'Invalid recurrence',
|
|
348
|
-
error,
|
|
349
|
-
'Recurrence must be a positive number of minutes or empty.',
|
|
350
|
-
);
|
|
351
|
-
return null;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
const dueAt = fromDateTimeLocalValue(editDraft.dueAtLocalValue);
|
|
355
|
-
if (!dueAt) {
|
|
356
|
-
await showTimeoutAlert('Invalid date', 'Next run must be a valid date and time.');
|
|
357
|
-
return null;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
const trimmedMessage = editDraft.messageValue.trim();
|
|
361
|
-
|
|
362
|
-
return {
|
|
363
|
-
dueAt,
|
|
364
|
-
recurrenceIntervalMs,
|
|
365
|
-
message: trimmedMessage ? trimmedMessage : null,
|
|
366
|
-
parameters: parsedParameters,
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Parses the JSON parameters field and guarantees an object result.
|
|
372
|
-
*
|
|
373
|
-
* @private function of AgentTimeoutsClient
|
|
374
|
-
*/
|
|
375
|
-
function parseTimeoutEditParameters(parametersValue: string): Record<string, unknown> {
|
|
376
|
-
const parsedJson = JSON.parse(parametersValue || '{}') as unknown;
|
|
377
|
-
if (!parsedJson || typeof parsedJson !== 'object' || Array.isArray(parsedJson)) {
|
|
378
|
-
throw new Error('Parameters JSON must be an object.');
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
return parsedJson as Record<string, unknown>;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Parses the optional recurrence field into milliseconds.
|
|
386
|
-
*
|
|
387
|
-
* @private function of AgentTimeoutsClient
|
|
388
|
-
*/
|
|
389
|
-
function parseTimeoutEditRecurrenceIntervalMs(recurrenceMinutesValue: string): number | null {
|
|
390
|
-
const trimmedRecurrence = recurrenceMinutesValue.trim();
|
|
391
|
-
if (!trimmedRecurrence) {
|
|
392
|
-
return null;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
const recurrenceMinutes = Number.parseFloat(trimmedRecurrence);
|
|
396
|
-
if (!Number.isFinite(recurrenceMinutes) || recurrenceMinutes <= 0) {
|
|
397
|
-
throw new Error('Recurrence must be a positive number of minutes or empty.');
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
return Math.floor(recurrenceMinutes * 60_000);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* Converts an ISO date into a `datetime-local` compatible value.
|
|
405
|
-
*
|
|
406
|
-
* @private function of AgentTimeoutsClient
|
|
407
|
-
*/
|
|
408
|
-
function toDateTimeLocalValue(isoTimestamp: string): string {
|
|
409
|
-
const timestamp = Date.parse(isoTimestamp);
|
|
410
|
-
if (!Number.isFinite(timestamp)) {
|
|
411
|
-
return '';
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
const date = new Date(timestamp);
|
|
415
|
-
const year = String(date.getFullYear());
|
|
416
|
-
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
417
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
418
|
-
const hours = String(date.getHours()).padStart(2, '0');
|
|
419
|
-
const minutes = String(date.getMinutes()).padStart(2, '0');
|
|
420
|
-
|
|
421
|
-
return `${year}-${month}-${day}T${hours}:${minutes}`;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* Parses one `datetime-local` value into ISO format.
|
|
426
|
-
*
|
|
427
|
-
* @private function of AgentTimeoutsClient
|
|
428
|
-
*/
|
|
429
|
-
function fromDateTimeLocalValue(value: string): string | null {
|
|
430
|
-
if (!value.trim()) {
|
|
431
|
-
return null;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
const timestamp = Date.parse(value);
|
|
435
|
-
if (!Number.isFinite(timestamp)) {
|
|
436
|
-
return null;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
return new Date(timestamp).toISOString();
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Manages timeout-manager polling, mutations, filters, and edit-dialog state.
|
|
444
|
-
*
|
|
445
|
-
* @private function of AgentTimeoutsClient
|
|
446
|
-
*/
|
|
447
|
-
export function useAgentTimeoutsClientState({
|
|
448
|
-
agentName,
|
|
449
|
-
}: UseAgentTimeoutsClientStateProps): UseAgentTimeoutsClientStateResult {
|
|
450
|
-
const [timeouts, setTimeouts] = useState<Array<UserChatTimeout>>([]);
|
|
451
|
-
const [counters, setCounters] = useState<AgentUserTimeoutCounters | null>(null);
|
|
452
|
-
const [generatedAt, setGeneratedAt] = useState<string | null>(null);
|
|
453
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
454
|
-
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
455
|
-
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
|
456
|
-
const [filter, setFilter] = useState<TimeoutManagerFilter>('active');
|
|
457
|
-
const [editingTimeout, setEditingTimeout] = useState<UserChatTimeout | null>(null);
|
|
458
|
-
const [busyTimeoutId, setBusyTimeoutId] = useState<string | null>(null);
|
|
459
|
-
const [busyAction, setBusyAction] = useState<TimeoutManagerActionKind | null>(null);
|
|
460
|
-
const [busyBulkAction, setBusyBulkAction] = useState<AgentUserTimeoutBulkAction | null>(null);
|
|
461
|
-
const [editDraft, setEditDraft] = useState<TimeoutEditDraft>(createEmptyTimeoutEditDraft);
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Loads current agent-scoped timeout data.
|
|
465
|
-
*
|
|
466
|
-
* @private function of AgentTimeoutsClient
|
|
467
|
-
*/
|
|
468
|
-
const refreshTimeouts = useCallback(
|
|
469
|
-
async (showRefreshingState: boolean) => {
|
|
470
|
-
if (showRefreshingState) {
|
|
471
|
-
setIsRefreshing(true);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
try {
|
|
475
|
-
setErrorMessage(null);
|
|
476
|
-
const payload = await fetchAgentUserTimeouts(agentName);
|
|
477
|
-
setTimeouts(payload.items);
|
|
478
|
-
setCounters(payload.counters);
|
|
479
|
-
setGeneratedAt(payload.generatedAt);
|
|
480
|
-
} catch (error) {
|
|
481
|
-
setErrorMessage(resolveTimeoutLoadErrorMessage(error));
|
|
482
|
-
} finally {
|
|
483
|
-
setIsLoading(false);
|
|
484
|
-
setIsRefreshing(false);
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
[agentName],
|
|
488
|
-
);
|
|
489
|
-
|
|
490
|
-
useEffect(() => {
|
|
491
|
-
void refreshTimeouts(false);
|
|
492
|
-
|
|
493
|
-
const timer = window.setInterval(() => {
|
|
494
|
-
void refreshTimeouts(true);
|
|
495
|
-
}, AGENT_TIMEOUT_MANAGER_POLL_INTERVAL_MS);
|
|
496
|
-
|
|
497
|
-
return () => window.clearInterval(timer);
|
|
498
|
-
}, [refreshTimeouts]);
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Runs one timeout mutation while keeping the busy state and local refresh consistent.
|
|
502
|
-
*
|
|
503
|
-
* @private function of AgentTimeoutsClient
|
|
504
|
-
*/
|
|
505
|
-
const runBusyTimeoutAction = useCallback(
|
|
506
|
-
async (timeout: UserChatTimeout, action: TimeoutManagerActionKind, worker: () => Promise<void>) => {
|
|
507
|
-
try {
|
|
508
|
-
setBusyTimeoutId(timeout.timeoutId);
|
|
509
|
-
setBusyAction(action);
|
|
510
|
-
await worker();
|
|
511
|
-
await refreshTimeouts(false);
|
|
512
|
-
} finally {
|
|
513
|
-
setBusyTimeoutId(null);
|
|
514
|
-
setBusyAction(null);
|
|
515
|
-
}
|
|
516
|
-
},
|
|
517
|
-
[refreshTimeouts],
|
|
518
|
-
);
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* Applies one timeout patch and refreshes the manager data.
|
|
522
|
-
*
|
|
523
|
-
* @private function of AgentTimeoutsClient
|
|
524
|
-
*/
|
|
525
|
-
const applyTimeoutPatch = useCallback(
|
|
526
|
-
async (timeout: UserChatTimeout, payload: AgentUserTimeoutUpdatePayload, action: TimeoutManagerActionKind) => {
|
|
527
|
-
await runBusyTimeoutAction(timeout, action, async () => {
|
|
528
|
-
await updateAgentUserTimeout(agentName, timeout.timeoutId, payload);
|
|
529
|
-
});
|
|
530
|
-
},
|
|
531
|
-
[agentName, runBusyTimeoutAction],
|
|
532
|
-
);
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Opens the advanced timeout edit dialog with prefilled values.
|
|
536
|
-
*
|
|
537
|
-
* @private function of AgentTimeoutsClient
|
|
538
|
-
*/
|
|
539
|
-
const openEditDialog = useCallback((timeout: UserChatTimeout) => {
|
|
540
|
-
setEditingTimeout(timeout);
|
|
541
|
-
setEditDraft(createTimeoutEditDraft(timeout));
|
|
542
|
-
}, []);
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* Closes the edit dialog and resets its local form state.
|
|
546
|
-
*
|
|
547
|
-
* @private function of AgentTimeoutsClient
|
|
548
|
-
*/
|
|
549
|
-
const closeEditDialog = useCallback(() => {
|
|
550
|
-
setEditingTimeout(null);
|
|
551
|
-
setEditDraft(createEmptyTimeoutEditDraft());
|
|
552
|
-
}, []);
|
|
553
|
-
const hasEditDraftUnsavedChanges = useMemo(() => {
|
|
554
|
-
if (!editingTimeout) {
|
|
555
|
-
return false;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
const initialEditDraft = createTimeoutEditDraft(editingTimeout);
|
|
559
|
-
|
|
560
|
-
return (
|
|
561
|
-
editDraft.dueAtLocalValue !== initialEditDraft.dueAtLocalValue ||
|
|
562
|
-
editDraft.recurrenceMinutesValue !== initialEditDraft.recurrenceMinutesValue ||
|
|
563
|
-
editDraft.messageValue !== initialEditDraft.messageValue ||
|
|
564
|
-
editDraft.parametersValue !== initialEditDraft.parametersValue
|
|
565
|
-
);
|
|
566
|
-
}, [editDraft, editingTimeout]);
|
|
567
|
-
const { requestClose: requestCloseEditDialog } = useDirtyModalGuard({
|
|
568
|
-
hasUnsavedChanges: hasEditDraftUnsavedChanges,
|
|
569
|
-
isCloseBlocked: busyAction === 'save' && busyTimeoutId === editingTimeout?.timeoutId,
|
|
570
|
-
onClose: closeEditDialog,
|
|
571
|
-
});
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
* Updates the selected manager filter.
|
|
575
|
-
*
|
|
576
|
-
* @private function of AgentTimeoutsClient
|
|
577
|
-
*/
|
|
578
|
-
const selectFilter = useCallback((nextFilter: TimeoutManagerFilter) => {
|
|
579
|
-
setFilter(nextFilter);
|
|
580
|
-
}, []);
|
|
581
|
-
|
|
582
|
-
/**
|
|
583
|
-
* Forces an immediate manager refresh from the header button.
|
|
584
|
-
*
|
|
585
|
-
* @private function of AgentTimeoutsClient
|
|
586
|
-
*/
|
|
587
|
-
const refreshNow = useCallback(async () => {
|
|
588
|
-
await refreshTimeouts(true);
|
|
589
|
-
}, [refreshTimeouts]);
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* Cancels one timeout after confirmation.
|
|
593
|
-
*
|
|
594
|
-
* @private function of AgentTimeoutsClient
|
|
595
|
-
*/
|
|
596
|
-
const cancelTimeout = useCallback(
|
|
597
|
-
async (timeout: UserChatTimeout) => {
|
|
598
|
-
const isConfirmed = await confirmTimeoutCancellation(timeout.timeoutId);
|
|
599
|
-
if (!isConfirmed) {
|
|
600
|
-
return;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
try {
|
|
604
|
-
await runBusyTimeoutAction(timeout, 'cancel', async () => {
|
|
605
|
-
await cancelAgentUserTimeout(agentName, timeout.timeoutId);
|
|
606
|
-
});
|
|
607
|
-
} catch (error) {
|
|
608
|
-
await showTimeoutActionFailure('Cancellation failed', error, 'Failed to cancel timeout.');
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
[agentName, runBusyTimeoutAction],
|
|
612
|
-
);
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* Toggles one queued timeout between paused and active states.
|
|
616
|
-
*
|
|
617
|
-
* @private function of AgentTimeoutsClient
|
|
618
|
-
*/
|
|
619
|
-
const toggleTimeoutPause = useCallback(
|
|
620
|
-
async (timeout: UserChatTimeout) => {
|
|
621
|
-
const isPaused = timeout.status === 'QUEUED' && Boolean(timeout.pausedAt);
|
|
622
|
-
|
|
623
|
-
await applyTimeoutPatch(timeout, { paused: !isPaused }, isPaused ? 'resume' : 'pause');
|
|
624
|
-
},
|
|
625
|
-
[applyTimeoutPatch],
|
|
626
|
-
);
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* Prompts for and applies a quick timeout extension.
|
|
630
|
-
*
|
|
631
|
-
* @private function of AgentTimeoutsClient
|
|
632
|
-
*/
|
|
633
|
-
const extendTimeout = useCallback(
|
|
634
|
-
async (timeout: UserChatTimeout) => {
|
|
635
|
-
const minutes = await requestTimeoutExtensionMinutes();
|
|
636
|
-
if (minutes === null) {
|
|
637
|
-
return;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
try {
|
|
641
|
-
await applyTimeoutPatch(timeout, { extendByMs: Math.floor(minutes * 60_000) }, 'extend');
|
|
642
|
-
} catch (error) {
|
|
643
|
-
await showTimeoutActionFailure('Extension failed', error, 'Failed to extend timeout.');
|
|
644
|
-
}
|
|
645
|
-
},
|
|
646
|
-
[applyTimeoutPatch],
|
|
647
|
-
);
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* Executes one bulk timeout action and refreshes manager data.
|
|
651
|
-
*
|
|
652
|
-
* @private function of AgentTimeoutsClient
|
|
653
|
-
*/
|
|
654
|
-
const runBulkAction = useCallback(
|
|
655
|
-
async (action: AgentUserTimeoutBulkAction) => {
|
|
656
|
-
const actionConfig = TIMEOUT_MANAGER_BULK_ACTION_CONFIG[action];
|
|
657
|
-
const isConfirmed = await confirmTimeoutBulkAction(actionConfig);
|
|
658
|
-
if (!isConfirmed) {
|
|
659
|
-
return;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
try {
|
|
663
|
-
setBusyBulkAction(action);
|
|
664
|
-
await runAgentUserTimeoutBulkAction(agentName, action);
|
|
665
|
-
await refreshTimeouts(false);
|
|
666
|
-
} catch (error) {
|
|
667
|
-
await showTimeoutActionFailure(
|
|
668
|
-
actionConfig.errorTitle,
|
|
669
|
-
error,
|
|
670
|
-
'Failed to run timeout bulk action.',
|
|
671
|
-
);
|
|
672
|
-
} finally {
|
|
673
|
-
setBusyBulkAction(null);
|
|
674
|
-
}
|
|
675
|
-
},
|
|
676
|
-
[agentName, refreshTimeouts],
|
|
677
|
-
);
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* Updates the next-run field in the edit dialog.
|
|
681
|
-
*
|
|
682
|
-
* @private function of AgentTimeoutsClient
|
|
683
|
-
*/
|
|
684
|
-
const updateEditDueAtLocalValue = useCallback((nextValue: string) => {
|
|
685
|
-
setEditDraft((currentDraft) => ({ ...currentDraft, dueAtLocalValue: nextValue }));
|
|
686
|
-
}, []);
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
* Updates the recurrence field in the edit dialog.
|
|
690
|
-
*
|
|
691
|
-
* @private function of AgentTimeoutsClient
|
|
692
|
-
*/
|
|
693
|
-
const updateEditRecurrenceMinutesValue = useCallback((nextValue: string) => {
|
|
694
|
-
setEditDraft((currentDraft) => ({ ...currentDraft, recurrenceMinutesValue: nextValue }));
|
|
695
|
-
}, []);
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* Updates the wake-up message field in the edit dialog.
|
|
699
|
-
*
|
|
700
|
-
* @private function of AgentTimeoutsClient
|
|
701
|
-
*/
|
|
702
|
-
const updateEditMessageValue = useCallback((nextValue: string) => {
|
|
703
|
-
setEditDraft((currentDraft) => ({ ...currentDraft, messageValue: nextValue }));
|
|
704
|
-
}, []);
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* Updates the JSON parameters field in the edit dialog.
|
|
708
|
-
*
|
|
709
|
-
* @private function of AgentTimeoutsClient
|
|
710
|
-
*/
|
|
711
|
-
const updateEditParametersValue = useCallback((nextValue: string) => {
|
|
712
|
-
setEditDraft((currentDraft) => ({ ...currentDraft, parametersValue: nextValue }));
|
|
713
|
-
}, []);
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* Saves edits from the timeout dialog.
|
|
717
|
-
*
|
|
718
|
-
* @private function of AgentTimeoutsClient
|
|
719
|
-
*/
|
|
720
|
-
const saveEdits = useCallback(async () => {
|
|
721
|
-
if (!editingTimeout) {
|
|
722
|
-
return;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
const payload = await createTimeoutEditPayload(editDraft);
|
|
726
|
-
if (!payload) {
|
|
727
|
-
return;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
try {
|
|
731
|
-
await applyTimeoutPatch(editingTimeout, payload, 'save');
|
|
732
|
-
closeEditDialog();
|
|
733
|
-
} catch (error) {
|
|
734
|
-
await showTimeoutActionFailure('Update failed', error, 'Failed to save timeout edits.');
|
|
735
|
-
}
|
|
736
|
-
}, [applyTimeoutPatch, closeEditDialog, editDraft, editingTimeout]);
|
|
737
|
-
|
|
738
|
-
const filteredTimeouts = useMemo(() => filterTimeoutsBySelectedView(timeouts, filter), [filter, timeouts]);
|
|
739
|
-
|
|
740
|
-
return {
|
|
741
|
-
bulkActions: TIMEOUT_MANAGER_BULK_ACTIONS,
|
|
742
|
-
busyAction,
|
|
743
|
-
busyBulkAction,
|
|
744
|
-
busyTimeoutId,
|
|
745
|
-
counters,
|
|
746
|
-
closeEditDialog,
|
|
747
|
-
requestCloseEditDialog,
|
|
748
|
-
editDraft,
|
|
749
|
-
editingTimeout,
|
|
750
|
-
errorMessage,
|
|
751
|
-
filter,
|
|
752
|
-
filteredTimeouts,
|
|
753
|
-
generatedAt,
|
|
754
|
-
isLoading,
|
|
755
|
-
isRefreshing,
|
|
756
|
-
cancelTimeout,
|
|
757
|
-
extendTimeout,
|
|
758
|
-
openEditDialog,
|
|
759
|
-
refreshNow,
|
|
760
|
-
runBulkAction,
|
|
761
|
-
saveEdits,
|
|
762
|
-
selectFilter,
|
|
763
|
-
toggleTimeoutPause,
|
|
764
|
-
updateEditDueAtLocalValue,
|
|
765
|
-
updateEditMessageValue,
|
|
766
|
-
updateEditParametersValue,
|
|
767
|
-
updateEditRecurrenceMinutesValue,
|
|
768
|
-
};
|
|
769
|
-
}
|