@promptbook/cli 0.114.0-5 → 0.114.0-50
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 +65 -31
- package/agents/default/.core/adam.book +33 -0
- package/agents/default/copywriter.book +15 -0
- package/agents/default/developer.book +16 -18
- package/agents/default/lawyer.book +14 -0
- package/agents/default/planner.book +16 -0
- package/apps/agents-server/README.md +1 -1
- package/apps/agents-server/next.config.ts +28 -0
- package/apps/agents-server/package.json +7 -7
- package/apps/agents-server/scripts/build-agents-server.js +47 -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 +3 -4
- 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]/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/globals.css +15 -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/swagger/SwaggerPageClient.tsx +35 -19
- package/apps/agents-server/src/components/AgentNaming/legacyAgentTextTranslations.cs.yaml +7 -0
- 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/ContextMenu/ContextMenuPanel.tsx +1 -11
- 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/buildActiveAgentViewItems.ts +5 -4
- package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +7 -0
- 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/Homepage/DefaultAgentsStatusNotice.tsx +1 -7
- package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +22 -10
- 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 -1
- package/apps/agents-server/src/languages/translations/czech.yaml +16 -1
- package/apps/agents-server/src/languages/translations/english.yaml +16 -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/$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/types/swagger-ui-dist.d.ts +5 -0
- 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/AgentReferenceResolutionIssue.ts +1 -69
- 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/extractAgentReferenceTokens.ts +1 -61
- package/apps/agents-server/src/utils/agentReferenceResolver/resolveCoreAgentAwareMissingReferences.ts +156 -0
- package/apps/agents-server/src/utils/applicationFonts.ts +4 -25
- 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 +1 -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 -1
- 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 -11
- 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/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 +33 -799
- 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/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 +2 -5
- 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/vpsSelfUpdate/vpsSelfUpdateCron.ts +23 -316
- package/apps/agents-server/tests/e2e/mockSupabaseServer.cjs +79 -2
- package/apps/agents-server/tests/e2e/support/AgentManagementApi.ts +3 -3
- package/apps/agents-server/tests/e2e/support/ChatHistoryNavigationSupport.ts +12 -2
- package/apps/agents-server/tests/e2e/support/auth.ts +6 -0
- package/esm/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
- package/esm/index.es.js +48587 -33692
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/find-fresh-emoji-tags/find-fresh-emoji-tags.d.ts +1 -1
- package/esm/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +2 -0
- package/esm/scripts/find-refactor-candidates/resolveRefactorCandidateProject.d.ts +3 -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/createAgentRunnerSystemMessage.d.ts +2 -1
- 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/checks/CheckBeforeMode.d.ts +20 -0
- package/esm/scripts/run-codex-prompts/checks/CoderCheckExecutionError.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/checks/CoderCheckFailedError.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/checks/buildCheckBeforeScriptPath.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/checks/checkRepairInstructions.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/checks/createCheckBeforeRepairPrompt.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/checks/limitCheckOutput.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/checks/projectCheck.d.ts +26 -0
- package/esm/scripts/run-codex-prompts/checks/projectScriptReferences.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/checks/runCheckBefore.d.ts +31 -0
- package/esm/scripts/run-codex-prompts/checks/runCoderCheck.d.ts +17 -0
- package/esm/scripts/run-codex-prompts/checks/runCoderCheckRepair.d.ts +40 -0
- package/esm/scripts/run-codex-prompts/checks/runPromptCheckCommand.d.ts +16 -0
- package/esm/scripts/run-codex-prompts/{testing/runPromptWithTestFeedback.d.ts → checks/runPromptWithCheckFeedback.d.ts} +14 -9
- 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/createFreeDiskSpaceGuard.d.ts +28 -0
- package/esm/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
- package/esm/scripts/run-codex-prompts/common/formatUnknownErrorDetails.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +18 -0
- package/esm/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
- package/esm/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +44 -5
- package/esm/scripts/run-codex-prompts/common/resolveCoderContext.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/common/resolveCoderProjectContext.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/common/resolveInlineOrFileText.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +29 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/buildCoderExecutionArtifactPaths.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/captureLiveScriptOutput.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/createScriptOutputLineReader.d.ts +26 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/quoteBashArgument.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/resolveShellHereDocumentDelimiter.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -1
- package/esm/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
- package/esm/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +16 -0
- package/esm/scripts/run-codex-prompts/common/withCoderWorkspaceLock.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/git/CoderGitOperationError.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/git/CoderPhasePersistence.d.ts +105 -0
- package/esm/scripts/run-codex-prompts/git/CoderPhaseRecovery.d.ts +43 -0
- package/esm/scripts/run-codex-prompts/git/buildCoderCheckCommitMessage.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +47 -0
- package/esm/scripts/run-codex-prompts/git/coderFinalizationFiles.d.ts +14 -0
- package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +20 -2
- package/esm/scripts/run-codex-prompts/git/coderIndexLease.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/git/coderRepositoryFiles.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/git/coderRepositorySnapshot.d.ts +62 -0
- package/esm/scripts/run-codex-prompts/git/coderRepositoryView.d.ts +30 -0
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +43 -4
- package/esm/scripts/run-codex-prompts/git/commitInitializedAgentBooks.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/git/ensureWorkingTreeClean.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/git/gitLongPathsSupport.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/git/pullLatestChanges.d.ts +3 -1
- package/esm/scripts/run-codex-prompts/git/quoteGitArgument.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/git/runGitCommand.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/git/runWorkspaceGitWithIndexReadRetry.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
- package/esm/scripts/run-codex-prompts/isolation/coderIsolationArtifacts.d.ts +16 -0
- package/esm/scripts/run-codex-prompts/isolation/coderIsolationIgnoredFiles.d.ts +18 -0
- package/esm/scripts/run-codex-prompts/isolation/copyCoderIsolationEnvironment.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/isolation/createCoderIsolationWorktree.d.ts +3 -2
- package/esm/scripts/run-codex-prompts/isolation/mapProjectReferenceToWorktree.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/isolation/mergeCoderIsolationWorktree.d.ts +5 -5
- package/esm/scripts/run-codex-prompts/isolation/preserveCoderIsolationRecovery.d.ts +3 -0
- package/esm/scripts/run-codex-prompts/isolation/runIsolatedPromptRound.d.ts +2 -2
- package/esm/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/main/listCoderPrompts.d.ts +22 -0
- package/esm/scripts/run-codex-prompts/main/prepareCoderPromptExecution.d.ts +18 -0
- package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +16 -8
- package/esm/scripts/run-codex-prompts/main/runCoderFix.d.ts +24 -0
- package/esm/scripts/run-codex-prompts/main/runPromptRound.d.ts +16 -6
- 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/buildPromptLabelForDisplay.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/prompts/buildPromptRunTraceContent.d.ts +70 -0
- package/esm/scripts/run-codex-prompts/prompts/buildPromptRunTracePath.d.ts +10 -0
- package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +9 -13
- package/esm/scripts/run-codex-prompts/prompts/findFirstNonEmptyLineIndex.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +2 -2
- package/esm/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +14 -1
- package/esm/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +11 -6
- package/esm/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/prompts/loadPromptFiles.d.ts +10 -2
- package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
- package/esm/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +28 -1
- package/esm/scripts/run-codex-prompts/prompts/printPromptsToBeWritten.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
- package/esm/scripts/run-codex-prompts/prompts/refreshPromptSelection.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/prompts/writePromptErrorLog.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/prompts/writePromptFile.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/prompts/writePromptRunTrace.d.ts +21 -0
- package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +3 -2
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +27 -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/cline/ClineRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/common/buildHarnessAuthenticationError.d.ts +20 -0
- package/esm/scripts/run-codex-prompts/runners/common/createAuthenticationAwarePromptRunner.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/extractHarnessAuthenticationFailureReason.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
- package/esm/scripts/run-codex-prompts/runners/gemini/GeminiRunner.d.ts +3 -1
- package/esm/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
- package/esm/scripts/run-codex-prompts/runners/github-copilot/GitHubCopilotRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +10 -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/opencode/OpencodeRunner.d.ts +2 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +25 -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 +3 -1
- package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +3 -0
- package/esm/scripts/run-codex-prompts/team/CoderTeamRuntime.d.ts +87 -0
- package/esm/scripts/run-codex-prompts/team/coderTeamProtocol.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/team/compileCoderTeamAgent.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/team/createCoderTeamPromptRunner.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/team/startCoderTeamBridge.d.ts +14 -0
- package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +39 -4
- package/esm/scripts/run-codex-prompts/ui/buildCoderCheckRepairUiFrame.d.ts +3 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +17 -1
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiViewport.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +15 -1
- package/esm/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/ui/coderRunUiText.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/ui/output/CoderOutputEvent.d.ts +20 -0
- package/esm/scripts/run-codex-prompts/ui/output/CoderRunOutput.d.ts +48 -0
- package/esm/scripts/run-codex-prompts/ui/output/buildCoderOutputLines.d.ts +18 -0
- package/esm/scripts/run-codex-prompts/ui/output/normalizeCoderOutputRecord.d.ts +10 -0
- package/esm/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
- package/esm/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/ui/startCoderRunUiSubscriptionUsageRefresh.d.ts +37 -0
- package/esm/scripts/utils/emojiTags/scanEmojiTagUsage.d.ts +2 -0
- package/esm/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
- package/esm/scripts/utils/prompts/isPromptDocumentationFile.d.ts +5 -0
- package/esm/scripts/utils/prompts/promptEmojiTags.d.ts +2 -0
- package/esm/scripts/verify-prompts/verify-prompts.d.ts +3 -0
- 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/AgentReferenceResolutionIssue.d.ts +45 -0
- package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
- package/esm/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +2 -0
- package/esm/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
- package/esm/src/book-2.0/agent-source/deduplicateSystemMessage.d.ts +14 -0
- package/esm/src/book-2.0/agent-source/explicitFromCommitment.d.ts +62 -0
- package/esm/src/book-2.0/agent-source/extractAgentReferenceTokens.d.ts +32 -0
- package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
- package/esm/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/resolveInheritedAgentSource.d.ts +73 -0
- package/esm/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
- 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/AgentPlannedMessagesSidecar.test.d.ts +1 -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/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
- package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
- package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -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/MockedChat/MockedChat.test.d.ts +2 -0
- package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
- package/esm/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -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/$initializePromptbookCliProgram.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +10 -0
- package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
- package/esm/src/cli/cli-commands/coder/add.d.ts +22 -1
- package/esm/src/cli/cli-commands/coder/agentCliOptions.d.ts +27 -0
- package/esm/src/cli/cli-commands/coder/augmentCoderAgentTeam.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
- package/esm/src/cli/cli-commands/coder/coderAgentRole.d.ts +21 -0
- package/esm/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +34 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderGitattributesFile.d.ts +13 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
- package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +5 -2
- package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.d.ts +12 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
- package/esm/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/findLegacyCoderCheckCallers.d.ts +5 -0
- package/esm/src/cli/cli-commands/coder/fix.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/fix.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/fixWorkflow.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +2 -2
- package/esm/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.d.ts +9 -0
- package/esm/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/init.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +18 -6
- package/esm/src/cli/cli-commands/coder/list.d.ts +10 -0
- package/esm/src/cli/cli-commands/coder/list.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +21 -1
- package/esm/src/cli/cli-commands/coder/plan.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningTerminal.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningTerminal.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningWorkspace.d.ts +11 -0
- package/esm/src/cli/cli-commands/coder/planning/discussPlanningTurn.d.ts +15 -0
- package/esm/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.d.ts +5 -0
- package/esm/src/cli/cli-commands/coder/planning/planningGitSync.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/planningPackagedCli.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/planningProtocol.d.ts +152 -0
- package/esm/src/cli/cli-commands/coder/planning/planningTeam.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/preparePlanningChanges.d.ts +16 -0
- package/esm/src/cli/cli-commands/coder/planning/readPlanningContext.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/resolvePlanningPath.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningHarness.d.ts +30 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningHarness.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningSession.d.ts +24 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningSession.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/savePlanningChanges.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/prepareCoderPackageJsonScripts.d.ts +12 -0
- package/esm/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/printInitializationSummary.d.ts +2 -1
- package/esm/src/cli/cli-commands/coder/promptsReadmeTemplate.d.ts +13 -0
- package/esm/src/cli/cli-commands/coder/promptsReadmeTemplate.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/readCoderAgentBook.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/server.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
- package/esm/src/cli/cli-commands/coder/workspacePreflight.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder.d.ts +3 -0
- package/esm/src/cli/cli-commands/common/$askForConfirmation.d.ts +11 -0
- package/esm/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +48 -0
- package/esm/src/cli/cli-commands/common/coderCheckCliOptions.d.ts +21 -0
- package/esm/src/cli/cli-commands/common/coderCheckCliOptions.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/createLocalAgentReferenceResolver.d.ts +8 -0
- package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
- package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
- package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
- package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
- package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/ensureAdamAgentBook.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/ensureProjectTextFile.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +3 -2
- package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
- package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +6 -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/HARNESS_DEFAULT_MODELS.d.ts +25 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +62 -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/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
- package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +11 -0
- 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/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
- 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/buildNpmPackageInstallCommand.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/projectCliOptions.d.ts +30 -0
- package/esm/src/cli/cli-commands/common/projectCliOptions.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
- package/esm/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -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/$checkPromptbookCliInstallations.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +15 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -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/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
- package/esm/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/resolveBundledAgentBookPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +26 -0
- package/esm/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +6 -0
- package/esm/src/cli/cli-commands/common/workspaceRepository.d.ts +48 -0
- package/esm/src/cli/cli-commands/common/workspaceRepository.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/workspaceRepositoryCliOptions.d.ts +11 -0
- package/esm/src/cli/common/$deprecateCliCommand.d.ts +3 -0
- package/esm/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
- package/esm/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
- package/esm/src/cli/common/$requireCliSubcommand.d.ts +18 -0
- package/esm/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
- package/esm/src/commitments/TEAM/TEAM.test.d.ts +1 -0
- package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
- package/esm/src/commitments/index.d.ts +1 -1
- package/esm/src/conversion/archive/loadJsZipModule.d.ts +10 -0
- package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
- package/esm/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
- package/esm/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
- 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/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -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/files/findFilesByGlob.d.ts +28 -0
- package/esm/src/utils/misc/debounce.d.ts +4 -2
- package/esm/src/utils/misc/debounce.test.d.ts +1 -0
- package/esm/src/utils/misc/emojis.d.ts +3 -2
- package/esm/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +20 -25
- package/src/_packages/cli.readme.md +15 -0
- package/src/_packages/components.index.ts +4 -0
- 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/AgentReferenceResolutionIssue.ts +75 -0
- package/src/book-2.0/agent-source/AgentSourceParseResult.ts +6 -0
- package/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.ts +2 -0
- package/src/book-2.0/agent-source/ParsedUnknownCommitment.ts +29 -0
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/applyCommitmentsToAgentModelRequirements.ts +8 -3
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.ts +38 -1
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +9 -2
- package/src/book-2.0/agent-source/deduplicateSystemMessage.ts +327 -0
- package/src/book-2.0/agent-source/explicitFromCommitment.ts +132 -0
- package/src/book-2.0/agent-source/extractAgentReferenceTokens.ts +65 -0
- package/src/book-2.0/agent-source/getBookCommitmentLineType.ts +36 -0
- package/src/book-2.0/agent-source/parseAgentSourceWithCommitments.ts +128 -61
- package/src/book-2.0/agent-source/resolveInheritedAgentSource.ts +841 -0
- package/src/book-2.0/agent-source/string_book.ts +1 -1
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +5 -4
- package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +6 -1
- package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +6 -1
- package/src/book-2.0/book-language-documentation/getSafeCodeBlock.ts +1 -1
- 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/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/MockedChat/MockedChat.tsx +25 -1
- 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/$initializePromptbookCliProgram.ts +89 -0
- package/src/cli/cli-commands/agent/chat.ts +11 -2
- package/src/cli/cli-commands/agent/exec.ts +11 -2
- package/src/cli/cli-commands/agent-folder/init.ts +6 -2
- package/src/cli/cli-commands/agent-folder/initializeAgentRunnerCommand.ts +9 -2
- package/src/cli/cli-commands/agent-folder.ts +2 -6
- package/src/cli/cli-commands/agent.ts +2 -6
- package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +1 -1
- package/src/cli/cli-commands/agents-server.ts +2 -6
- package/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.ts +54 -0
- package/src/cli/cli-commands/coder/GitChangesMode.ts +35 -0
- package/src/cli/cli-commands/coder/add.ts +97 -19
- package/src/cli/cli-commands/coder/agentCliOptions.ts +48 -0
- package/src/cli/cli-commands/coder/augmentCoderAgentTeam.ts +152 -0
- package/src/cli/cli-commands/coder/boilerplateCount.ts +1 -1
- package/src/cli/cli-commands/coder/boilerplateTemplates.ts +20 -59
- package/src/cli/cli-commands/coder/coderAgentRole.ts +28 -0
- package/src/cli/cli-commands/coder/coderReferencedArtifacts.ts +103 -0
- package/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.ts +90 -0
- package/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.ts +2 -47
- package/src/cli/cli-commands/coder/ensureCoderGitattributesFile.ts +25 -0
- package/src/cli/cli-commands/coder/ensureCoderGitignoreFile.ts +37 -3
- package/src/cli/cli-commands/coder/ensureCoderMarkdownFile.ts +2 -20
- package/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.ts +24 -3
- package/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.ts +36 -0
- package/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.ts +5 -1
- package/src/cli/cli-commands/coder/ensureDirectory.ts +27 -1
- package/src/cli/cli-commands/coder/find-fresh-emoji-tags.ts +14 -2
- package/src/cli/cli-commands/coder/find-refactor-candidates.ts +13 -1
- package/src/cli/cli-commands/coder/find-unwritten.ts +13 -1
- package/src/cli/cli-commands/coder/findLegacyCoderCheckCallers.ts +87 -0
- package/src/cli/cli-commands/coder/fix.ts +166 -0
- package/src/cli/cli-commands/coder/fixtures/fix.cjs +29 -0
- package/src/cli/cli-commands/coder/fixtures/healthyDisk.cjs +4 -0
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +41 -29
- package/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.ts +44 -0
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +103 -9
- package/src/cli/cli-commands/coder/init.ts +116 -26
- package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +93 -32
- package/src/cli/cli-commands/coder/list.ts +102 -0
- package/src/cli/cli-commands/coder/mergeStringRecordJsonFile.ts +42 -8
- package/src/cli/cli-commands/coder/ping.ts +73 -19
- package/src/cli/cli-commands/coder/plan.ts +139 -0
- package/src/cli/cli-commands/coder/planning/README.md +39 -0
- package/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.ts +23 -0
- package/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.ts +57 -0
- package/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.ts +34 -0
- package/src/cli/cli-commands/coder/planning/createPlanningTerminal.ts +57 -0
- package/src/cli/cli-commands/coder/planning/createPlanningWorkspace.ts +36 -0
- package/src/cli/cli-commands/coder/planning/discussPlanningTurn.ts +61 -0
- package/src/cli/cli-commands/coder/planning/fixtures/codex.cjs +54 -0
- package/src/cli/cli-commands/coder/planning/fixtures/coding.cjs +26 -0
- package/src/cli/cli-commands/coder/planning/fixtures/conversation.json +70 -0
- package/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.ts +17 -0
- package/src/cli/cli-commands/coder/planning/fixtures/terminal.cjs +26 -0
- package/src/cli/cli-commands/coder/planning/planningProtocol.ts +132 -0
- package/src/cli/cli-commands/coder/planning/preparePlanningChanges.ts +178 -0
- package/src/cli/cli-commands/coder/planning/readPlanningContext.ts +108 -0
- package/src/cli/cli-commands/coder/planning/resolvePlanningPath.ts +72 -0
- package/src/cli/cli-commands/coder/planning/runPlanningHarness.ts +249 -0
- package/src/cli/cli-commands/coder/planning/runPlanningSession.ts +254 -0
- package/src/cli/cli-commands/coder/planning/savePlanningChanges.ts +105 -0
- package/src/cli/cli-commands/coder/prepareCoderPackageJsonScripts.ts +304 -0
- package/src/cli/cli-commands/coder/printCoderRunFailure.ts +14 -0
- package/src/cli/cli-commands/coder/printInitializationSummary.ts +61 -19
- package/src/cli/cli-commands/coder/promptsReadmeTemplate.ts +400 -0
- package/src/cli/cli-commands/coder/readCoderAgentBook.ts +62 -0
- package/src/cli/cli-commands/coder/run.ts +109 -90
- package/src/cli/cli-commands/coder/server.ts +87 -71
- package/src/cli/cli-commands/coder/verify.ts +21 -1
- package/src/cli/cli-commands/coder/waitOptions.ts +33 -0
- package/src/cli/cli-commands/coder.ts +17 -6
- package/src/cli/cli-commands/common/$askForConfirmation.ts +41 -0
- package/src/cli/cli-commands/common/LocalAgentBookCollection.ts +258 -0
- package/src/cli/cli-commands/common/coderCheckCliOptions.ts +108 -0
- package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +7 -3
- package/src/cli/cli-commands/common/createLocalAgentReferenceResolver.ts +69 -0
- package/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.ts +35 -0
- package/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.ts +37 -0
- package/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.ts +39 -0
- package/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.ts +26 -0
- package/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.ts +33 -0
- package/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.ts +33 -0
- package/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.ts +21 -0
- package/src/cli/cli-commands/common/ensureAdamAgentBook.ts +40 -0
- package/src/cli/cli-commands/common/ensureProjectTextFile.ts +35 -0
- package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +79 -11
- package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +32 -9
- package/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.ts +25 -4
- 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/HARNESS_DEFAULT_MODELS.ts +37 -0
- package/src/cli/cli-commands/common/harness/HarnessDefinition.ts +101 -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/npm/$askForNpmPackageInstallationApproval.ts +20 -0
- 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/projectCliOptions.ts +78 -0
- package/src/cli/cli-commands/common/projectInitialization.ts +35 -3
- package/src/cli/cli-commands/common/promptPriorityCliOptions.ts +30 -0
- package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +51 -17
- package/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.ts +71 -0
- package/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.ts +129 -0
- package/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.ts +263 -0
- package/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.ts +58 -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/cli/cli-commands/common/questionsCliOptions.ts +89 -0
- package/src/cli/cli-commands/common/resolveBundledAgentBookPath.ts +38 -0
- package/src/cli/cli-commands/common/resolveLocalAgentSource.ts +147 -0
- package/src/cli/cli-commands/common/validateCoderRunOptions.ts +113 -0
- package/src/cli/cli-commands/common/workspaceRepository.md +46 -0
- package/src/cli/cli-commands/common/workspaceRepository.ts +301 -0
- package/src/cli/cli-commands/common/workspaceRepositoryCliOptions.ts +31 -0
- package/src/cli/cli-commands/prettify.ts +2 -2
- package/src/cli/cli-commands/run.ts +3 -1
- package/src/cli/cli-commands/test-command.ts +2 -2
- package/src/cli/common/$deprecateCliCommand.ts +5 -0
- package/src/cli/common/$hideCliCommandFromHelp.ts +27 -0
- package/src/cli/common/$requireCliSubcommand.ts +35 -0
- package/src/cli/promptbookCli.ts +6 -87
- 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/FROM/FROM.ts +13 -0
- package/src/commitments/TEAM/TEAM.ts +26 -4
- package/src/commitments/WRITING_RULES/WRITING_RULES.ts +16 -8
- package/src/commitments/index.ts +2 -1
- package/src/conversion/archive/loadJsZipModule.ts +3 -1
- package/src/executables/platforms/locateAppOnWindows.ts +12 -9
- package/src/execution/translation/automatic-translate/translateMessages.ts +2 -2
- package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +21 -18
- package/src/llm-providers/vercel/VercelExecutionToolsOptions.ts +7 -2
- package/src/llm-providers/vercel/createExecutionToolsFromVercelProvider.ts +18 -17
- package/src/other/templates/getTemplatesPipelineCollection.ts +2156 -950
- 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/execCommand/$execCommand.ts +2 -1
- package/src/utils/files/findFilesByGlob.ts +46 -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 +42 -0
- package/umd/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
- package/umd/index.umd.js +48038 -33148
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/find-fresh-emoji-tags/find-fresh-emoji-tags.d.ts +1 -1
- package/umd/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +2 -0
- package/umd/scripts/find-refactor-candidates/resolveRefactorCandidateProject.d.ts +3 -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/createAgentRunnerSystemMessage.d.ts +2 -1
- 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/checks/CheckBeforeMode.d.ts +20 -0
- package/umd/scripts/run-codex-prompts/checks/CoderCheckExecutionError.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/checks/CoderCheckFailedError.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/checks/buildCheckBeforeScriptPath.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/checks/checkRepairInstructions.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/checks/createCheckBeforeRepairPrompt.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/checks/limitCheckOutput.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/checks/projectCheck.d.ts +26 -0
- package/umd/scripts/run-codex-prompts/checks/projectScriptReferences.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/checks/runCheckBefore.d.ts +31 -0
- package/umd/scripts/run-codex-prompts/checks/runCoderCheck.d.ts +17 -0
- package/umd/scripts/run-codex-prompts/checks/runCoderCheckRepair.d.ts +40 -0
- package/umd/scripts/run-codex-prompts/checks/runPromptCheckCommand.d.ts +16 -0
- package/umd/scripts/run-codex-prompts/{testing/runPromptWithTestFeedback.d.ts → checks/runPromptWithCheckFeedback.d.ts} +14 -9
- 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/createFreeDiskSpaceGuard.d.ts +28 -0
- package/umd/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
- package/umd/scripts/run-codex-prompts/common/formatUnknownErrorDetails.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +18 -0
- package/umd/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
- package/umd/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +44 -5
- package/umd/scripts/run-codex-prompts/common/resolveCoderContext.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/common/resolveCoderProjectContext.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/common/resolveInlineOrFileText.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +29 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/buildCoderExecutionArtifactPaths.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/captureLiveScriptOutput.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/createScriptOutputLineReader.d.ts +26 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/quoteBashArgument.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/resolveShellHereDocumentDelimiter.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -1
- package/umd/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
- package/umd/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +16 -0
- package/umd/scripts/run-codex-prompts/common/withCoderWorkspaceLock.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/git/CoderGitOperationError.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/git/CoderPhasePersistence.d.ts +105 -0
- package/umd/scripts/run-codex-prompts/git/CoderPhaseRecovery.d.ts +43 -0
- package/umd/scripts/run-codex-prompts/git/buildCoderCheckCommitMessage.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +47 -0
- package/umd/scripts/run-codex-prompts/git/coderFinalizationFiles.d.ts +14 -0
- package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +20 -2
- package/umd/scripts/run-codex-prompts/git/coderIndexLease.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/git/coderRepositoryFiles.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/git/coderRepositorySnapshot.d.ts +62 -0
- package/umd/scripts/run-codex-prompts/git/coderRepositoryView.d.ts +30 -0
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +43 -4
- package/umd/scripts/run-codex-prompts/git/commitInitializedAgentBooks.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/git/ensureWorkingTreeClean.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/git/gitLongPathsSupport.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/git/pullLatestChanges.d.ts +3 -1
- package/umd/scripts/run-codex-prompts/git/quoteGitArgument.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/git/runGitCommand.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/git/runWorkspaceGitWithIndexReadRetry.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
- package/umd/scripts/run-codex-prompts/isolation/coderIsolationArtifacts.d.ts +16 -0
- package/umd/scripts/run-codex-prompts/isolation/coderIsolationIgnoredFiles.d.ts +18 -0
- package/umd/scripts/run-codex-prompts/isolation/copyCoderIsolationEnvironment.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/isolation/createCoderIsolationWorktree.d.ts +3 -2
- package/umd/scripts/run-codex-prompts/isolation/mapProjectReferenceToWorktree.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/isolation/mergeCoderIsolationWorktree.d.ts +5 -5
- package/umd/scripts/run-codex-prompts/isolation/preserveCoderIsolationRecovery.d.ts +3 -0
- package/umd/scripts/run-codex-prompts/isolation/runIsolatedPromptRound.d.ts +2 -2
- package/umd/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/main/listCoderPrompts.d.ts +22 -0
- package/umd/scripts/run-codex-prompts/main/prepareCoderPromptExecution.d.ts +18 -0
- package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +16 -8
- package/umd/scripts/run-codex-prompts/main/runCoderFix.d.ts +24 -0
- package/umd/scripts/run-codex-prompts/main/runPromptRound.d.ts +16 -6
- 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/buildPromptLabelForDisplay.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/prompts/buildPromptRunTraceContent.d.ts +70 -0
- package/umd/scripts/run-codex-prompts/prompts/buildPromptRunTracePath.d.ts +10 -0
- package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +9 -13
- package/umd/scripts/run-codex-prompts/prompts/findFirstNonEmptyLineIndex.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +2 -2
- package/umd/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +14 -1
- package/umd/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +11 -6
- package/umd/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/prompts/loadPromptFiles.d.ts +10 -2
- package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
- package/umd/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +28 -1
- package/umd/scripts/run-codex-prompts/prompts/printPromptsToBeWritten.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
- package/umd/scripts/run-codex-prompts/prompts/refreshPromptSelection.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/prompts/writePromptErrorLog.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/prompts/writePromptFile.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/prompts/writePromptRunTrace.d.ts +21 -0
- package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +3 -2
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +27 -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/cline/ClineRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/common/buildHarnessAuthenticationError.d.ts +20 -0
- package/umd/scripts/run-codex-prompts/runners/common/createAuthenticationAwarePromptRunner.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/extractHarnessAuthenticationFailureReason.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
- package/umd/scripts/run-codex-prompts/runners/gemini/GeminiRunner.d.ts +3 -1
- package/umd/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
- package/umd/scripts/run-codex-prompts/runners/github-copilot/GitHubCopilotRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +10 -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/opencode/OpencodeRunner.d.ts +2 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +25 -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 +3 -1
- package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +3 -0
- package/umd/scripts/run-codex-prompts/team/CoderTeamRuntime.d.ts +87 -0
- package/umd/scripts/run-codex-prompts/team/coderTeamProtocol.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/team/compileCoderTeamAgent.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/team/createCoderTeamPromptRunner.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/team/startCoderTeamBridge.d.ts +14 -0
- package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +39 -4
- package/umd/scripts/run-codex-prompts/ui/buildCoderCheckRepairUiFrame.d.ts +3 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +17 -1
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiViewport.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +15 -1
- package/umd/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/ui/coderRunUiText.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/ui/output/CoderOutputEvent.d.ts +20 -0
- package/umd/scripts/run-codex-prompts/ui/output/CoderRunOutput.d.ts +48 -0
- package/umd/scripts/run-codex-prompts/ui/output/buildCoderOutputLines.d.ts +18 -0
- package/umd/scripts/run-codex-prompts/ui/output/normalizeCoderOutputRecord.d.ts +10 -0
- package/umd/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
- package/umd/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/ui/startCoderRunUiSubscriptionUsageRefresh.d.ts +37 -0
- package/umd/scripts/utils/emojiTags/scanEmojiTagUsage.d.ts +2 -0
- package/umd/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
- package/umd/scripts/utils/prompts/isPromptDocumentationFile.d.ts +5 -0
- package/umd/scripts/utils/prompts/promptEmojiTags.d.ts +2 -0
- package/umd/scripts/verify-prompts/verify-prompts.d.ts +3 -0
- 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/AgentReferenceResolutionIssue.d.ts +45 -0
- package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
- package/umd/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +2 -0
- package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.deduplication.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/deduplicateSystemMessage.d.ts +14 -0
- package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/explicitFromCommitment.d.ts +62 -0
- package/umd/src/book-2.0/agent-source/extractAgentReferenceTokens.d.ts +32 -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-2.0/agent-source/resolveInheritedAgentSource.d.ts +73 -0
- package/umd/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
- 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/MockedChat/MockedChat.test.d.ts +2 -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/$initializePromptbookCliProgram.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +10 -0
- package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
- package/umd/src/cli/cli-commands/coder/add.d.ts +22 -1
- package/umd/src/cli/cli-commands/coder/agentCliOptions.d.ts +27 -0
- package/umd/src/cli/cli-commands/coder/augmentCoderAgentTeam.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
- package/umd/src/cli/cli-commands/coder/coderAgentRole.d.ts +21 -0
- package/umd/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +34 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderGitattributesFile.d.ts +13 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
- package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +5 -2
- package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.d.ts +12 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
- package/umd/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/findLegacyCoderCheckCallers.d.ts +5 -0
- package/umd/src/cli/cli-commands/coder/fix.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/fix.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/fixWorkflow.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +2 -2
- package/umd/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.d.ts +9 -0
- package/umd/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/init.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +18 -6
- package/umd/src/cli/cli-commands/coder/list.d.ts +10 -0
- package/umd/src/cli/cli-commands/coder/list.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +21 -1
- package/umd/src/cli/cli-commands/coder/plan.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningTerminal.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningTerminal.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningWorkspace.d.ts +11 -0
- package/umd/src/cli/cli-commands/coder/planning/discussPlanningTurn.d.ts +15 -0
- package/umd/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.d.ts +5 -0
- package/umd/src/cli/cli-commands/coder/planning/planningGitSync.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/planningPackagedCli.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/planningProtocol.d.ts +152 -0
- package/umd/src/cli/cli-commands/coder/planning/planningTeam.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/preparePlanningChanges.d.ts +16 -0
- package/umd/src/cli/cli-commands/coder/planning/readPlanningContext.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/resolvePlanningPath.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningHarness.d.ts +30 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningHarness.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningSession.d.ts +24 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningSession.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/savePlanningChanges.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/prepareCoderPackageJsonScripts.d.ts +12 -0
- package/umd/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/printInitializationSummary.d.ts +2 -1
- package/umd/src/cli/cli-commands/coder/promptsReadmeTemplate.d.ts +13 -0
- package/umd/src/cli/cli-commands/coder/promptsReadmeTemplate.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/readCoderAgentBook.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/server.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
- package/umd/src/cli/cli-commands/coder/workspacePreflight.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder.d.ts +3 -0
- package/umd/src/cli/cli-commands/common/$askForConfirmation.d.ts +11 -0
- package/umd/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +48 -0
- package/umd/src/cli/cli-commands/common/coderCheckCliOptions.d.ts +21 -0
- package/umd/src/cli/cli-commands/common/coderCheckCliOptions.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/createLocalAgentReferenceResolver.d.ts +8 -0
- package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
- package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
- package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
- package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
- package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
- package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/ensureAdamAgentBook.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/ensureProjectTextFile.d.ts +7 -0
- package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +3 -2
- 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 +6 -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/HARNESS_DEFAULT_MODELS.d.ts +25 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +62 -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/npm/$askForNpmPackageInstallationApproval.d.ts +11 -0
- 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/projectCliOptions.d.ts +30 -0
- package/umd/src/cli/cli-commands/common/projectCliOptions.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
- package/umd/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -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 +15 -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/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
- package/umd/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/resolveBundledAgentBookPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +26 -0
- package/umd/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +6 -0
- package/umd/src/cli/cli-commands/common/workspaceRepository.d.ts +48 -0
- package/umd/src/cli/cli-commands/common/workspaceRepository.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/workspaceRepositoryCliOptions.d.ts +11 -0
- package/umd/src/cli/common/$deprecateCliCommand.d.ts +3 -0
- package/umd/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
- package/umd/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
- package/umd/src/cli/common/$requireCliSubcommand.d.ts +18 -0
- package/umd/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
- package/umd/src/commitments/TEAM/TEAM.test.d.ts +1 -0
- package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
- package/umd/src/commitments/index.d.ts +1 -1
- package/umd/src/conversion/archive/loadJsZipModule.d.ts +10 -0
- 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/vercel/VercelExecutionToolsOptions.d.ts +5 -2
- 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/files/findFilesByGlob.d.ts +28 -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/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/testing/TestBeforeMode.d.ts +0 -16
- package/esm/scripts/run-codex-prompts/testing/createTestBeforeRepairPrompt.d.ts +0 -9
- package/esm/scripts/run-codex-prompts/testing/limitTestOutput.d.ts +0 -4
- package/esm/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +0 -14
- package/esm/scripts/run-codex-prompts/testing/runTestBefore.d.ts +0 -24
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
- package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
- package/esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +0 -9
- 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/src/cli/cli-commands/coder/agentCodingFile.ts +0 -25
- package/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.ts +0 -31
- 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/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/testing/TestBeforeMode.d.ts +0 -16
- package/umd/scripts/run-codex-prompts/testing/createTestBeforeRepairPrompt.d.ts +0 -9
- package/umd/scripts/run-codex-prompts/testing/limitTestOutput.d.ts +0 -4
- package/umd/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +0 -14
- package/umd/scripts/run-codex-prompts/testing/runTestBefore.d.ts +0 -24
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
- package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
- package/umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +0 -9
- 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/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
- /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts} +0 -0
- /package/{umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts} +0 -0
- /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → esm/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts} +0 -0
|
@@ -12,12 +12,10 @@ export { fetchAgentUserTimeouts } from './userChatClient/fetchAgentUserTimeouts'
|
|
|
12
12
|
export { fetchUserChat } from './userChatClient/fetchUserChat';
|
|
13
13
|
export { fetchUserChats } from './userChatClient/fetchUserChats';
|
|
14
14
|
export { removeUserChat } from './userChatClient/removeUserChat';
|
|
15
|
-
export { runAgentUserTimeoutBulkAction } from './userChatClient/runAgentUserTimeoutBulkAction';
|
|
16
15
|
export { saveUserChatDraft } from './userChatClient/saveUserChatDraft';
|
|
17
16
|
export { saveUserChatMessages } from './userChatClient/saveUserChatMessages';
|
|
18
17
|
export { sendUserChatMessage } from './userChatClient/sendUserChatMessage';
|
|
19
18
|
export { streamUserChat } from './userChatClient/streamUserChat';
|
|
20
|
-
export { updateAgentUserTimeout } from './userChatClient/updateAgentUserTimeout';
|
|
21
19
|
export { UserChatApiError } from './userChatClient/UserChatApiError';
|
|
22
20
|
|
|
23
21
|
/**
|
|
@@ -39,12 +37,21 @@ export type UserChatSummary = {
|
|
|
39
37
|
updatedAt: string;
|
|
40
38
|
lastMessageAt: string | null;
|
|
41
39
|
source: UserChatSource;
|
|
40
|
+
/**
|
|
41
|
+
* Database user id owning the chat, used to link a super-admin to its owner.
|
|
42
|
+
*/
|
|
43
|
+
userId?: number;
|
|
42
44
|
isReadOnly: boolean;
|
|
43
45
|
/**
|
|
44
46
|
* True when the chat belongs to a different user than the current viewer
|
|
45
47
|
* (visible only to admins/super-admins browsing external chats).
|
|
46
48
|
*/
|
|
47
49
|
isExternalUserChat?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* True for the singleton goal chat the agent keeps with itself, which is pinned above
|
|
52
|
+
* every other chat and rendered with its own icon.
|
|
53
|
+
*/
|
|
54
|
+
isAgentGoalChat?: boolean;
|
|
48
55
|
messagesCount: number;
|
|
49
56
|
title: string;
|
|
50
57
|
preview: string;
|
|
@@ -100,6 +107,10 @@ export type UserChatTimeout = {
|
|
|
100
107
|
durationMs: number;
|
|
101
108
|
dueAt: string;
|
|
102
109
|
recurrenceIntervalMs: number | null;
|
|
110
|
+
cronExpression: string | null;
|
|
111
|
+
startsAt: string | null;
|
|
112
|
+
endsAt: string | null;
|
|
113
|
+
maxRunCount: number | null;
|
|
103
114
|
queuedAt: string;
|
|
104
115
|
startedAt: string | null;
|
|
105
116
|
completedAt: string | null;
|
|
@@ -134,35 +145,6 @@ export type AgentUserTimeoutListResponse = {
|
|
|
134
145
|
generatedAt: string;
|
|
135
146
|
};
|
|
136
147
|
|
|
137
|
-
/**
|
|
138
|
-
* Editable timeout fields accepted by the agent-wide timeout update endpoint.
|
|
139
|
-
*/
|
|
140
|
-
export type AgentUserTimeoutUpdatePayload = {
|
|
141
|
-
dueAt?: string;
|
|
142
|
-
recurrenceIntervalMs?: number | null;
|
|
143
|
-
message?: string | null;
|
|
144
|
-
parameters?: Record<string, unknown>;
|
|
145
|
-
paused?: boolean;
|
|
146
|
-
extendByMs?: number;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Supported bulk timeout actions in the agent-wide timeout manager.
|
|
151
|
-
*/
|
|
152
|
-
export type AgentUserTimeoutBulkAction = 'cancel_all_active' | 'pause_all_active' | 'resume_all_paused';
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* API payload returned after one bulk timeout action.
|
|
156
|
-
*/
|
|
157
|
-
export type AgentUserTimeoutBulkActionResponse = {
|
|
158
|
-
action: AgentUserTimeoutBulkAction;
|
|
159
|
-
matchedCount: number;
|
|
160
|
-
updatedCount: number;
|
|
161
|
-
timeoutIds: Array<string>;
|
|
162
|
-
hasMore: boolean;
|
|
163
|
-
generatedAt: string;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
148
|
/**
|
|
167
149
|
* API payload for list endpoint.
|
|
168
150
|
*/
|
|
@@ -27,6 +27,10 @@ export type UserChatTimeoutRecord = {
|
|
|
27
27
|
durationMs: number;
|
|
28
28
|
dueAt: string;
|
|
29
29
|
recurrenceIntervalMs: number | null;
|
|
30
|
+
cronExpression: string | null;
|
|
31
|
+
startsAt: string | null;
|
|
32
|
+
endsAt: string | null;
|
|
33
|
+
maxRunCount: number | null;
|
|
30
34
|
queuedAt: string;
|
|
31
35
|
startedAt: string | null;
|
|
32
36
|
completedAt: string | null;
|
|
@@ -55,6 +59,10 @@ export type UserChatTimeoutRow = {
|
|
|
55
59
|
durationMs: number;
|
|
56
60
|
dueAt: string;
|
|
57
61
|
recurrenceIntervalMs: number | null;
|
|
62
|
+
cronExpression: string | null;
|
|
63
|
+
startsAt: string | null;
|
|
64
|
+
endsAt: string | null;
|
|
65
|
+
maxRunCount: number | null;
|
|
58
66
|
queuedAt: string;
|
|
59
67
|
startedAt: string | null;
|
|
60
68
|
completedAt: string | null;
|
|
@@ -83,6 +91,10 @@ export type UserChatTimeoutInsert = {
|
|
|
83
91
|
durationMs: number;
|
|
84
92
|
dueAt: string;
|
|
85
93
|
recurrenceIntervalMs?: number | null;
|
|
94
|
+
cronExpression?: string | null;
|
|
95
|
+
startsAt?: string | null;
|
|
96
|
+
endsAt?: string | null;
|
|
97
|
+
maxRunCount?: number | null;
|
|
86
98
|
queuedAt: string;
|
|
87
99
|
startedAt?: string | null;
|
|
88
100
|
completedAt?: string | null;
|
|
@@ -97,15 +109,22 @@ export type UserChatTimeoutInsert = {
|
|
|
97
109
|
|
|
98
110
|
/**
|
|
99
111
|
* Input used when persisting one new chat timeout.
|
|
112
|
+
*
|
|
113
|
+
* The schedule fields describe the whole life of a planned message, so `durationMs` and `dueAt` are
|
|
114
|
+
* only needed by a caller that schedules one plain wake-up at a fixed delay.
|
|
100
115
|
*/
|
|
101
116
|
export type CreateUserChatTimeoutOptions = {
|
|
102
117
|
id?: string;
|
|
103
118
|
userId: number;
|
|
104
119
|
agentPermanentId: string;
|
|
105
120
|
chatId: string;
|
|
106
|
-
durationMs
|
|
121
|
+
durationMs?: number;
|
|
107
122
|
dueAt?: string;
|
|
108
123
|
recurrenceIntervalMs?: number | null;
|
|
124
|
+
cronExpression?: string | null;
|
|
125
|
+
startsAt?: string | null;
|
|
126
|
+
endsAt?: string | null;
|
|
127
|
+
maxRunCount?: number | null;
|
|
109
128
|
message?: string;
|
|
110
129
|
parameters?: UserChatTimeoutParameters;
|
|
111
130
|
};
|
|
@@ -130,11 +149,25 @@ export type ListUserChatTimeoutsOptions = {
|
|
|
130
149
|
onlyActive?: boolean;
|
|
131
150
|
};
|
|
132
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Query options for listing the timeouts of every agent on the server.
|
|
154
|
+
*/
|
|
155
|
+
export type ListAllUserChatTimeoutsOptions = {
|
|
156
|
+
/**
|
|
157
|
+
* Largest number of rows to return, newest first.
|
|
158
|
+
*/
|
|
159
|
+
limit: number;
|
|
160
|
+
};
|
|
161
|
+
|
|
133
162
|
/**
|
|
134
163
|
* Query options for loading one timeout scoped only to user + agent.
|
|
135
164
|
*/
|
|
136
165
|
export type GetAgentScopedUserChatTimeoutOptions = {
|
|
137
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Owning user, or `undefined` to span every user of the agent
|
|
168
|
+
* (used by the agent goal chat, which plans on behalf of the agent itself).
|
|
169
|
+
*/
|
|
170
|
+
userId?: number;
|
|
138
171
|
agentPermanentId: string;
|
|
139
172
|
timeoutId: string;
|
|
140
173
|
};
|
|
@@ -143,7 +176,11 @@ export type GetAgentScopedUserChatTimeoutOptions = {
|
|
|
143
176
|
* Query options for listing all timeouts owned by one user+agent across chats.
|
|
144
177
|
*/
|
|
145
178
|
export type ListAgentUserChatTimeoutsOptions = {
|
|
146
|
-
|
|
179
|
+
/**
|
|
180
|
+
* Owning user, or `undefined` to span every user of the agent
|
|
181
|
+
* (used by the agent goal chat, which plans on behalf of the agent itself).
|
|
182
|
+
*/
|
|
183
|
+
userId?: number;
|
|
147
184
|
agentPermanentId: string;
|
|
148
185
|
statuses?: ReadonlyArray<UserChatTimeoutStatus>;
|
|
149
186
|
includePaused?: boolean;
|
|
@@ -154,10 +191,17 @@ export type ListAgentUserChatTimeoutsOptions = {
|
|
|
154
191
|
|
|
155
192
|
/**
|
|
156
193
|
* Mutable fields accepted when editing one agent-scoped timeout.
|
|
194
|
+
*
|
|
195
|
+
* Every schedule field that is present is written, so leaving one out keeps it as it is and passing
|
|
196
|
+
* `null` removes it.
|
|
157
197
|
*/
|
|
158
198
|
export type UpdateAgentScopedUserChatTimeoutPatch = {
|
|
159
199
|
dueAt?: string;
|
|
160
200
|
recurrenceIntervalMs?: number | null;
|
|
201
|
+
cronExpression?: string | null;
|
|
202
|
+
startsAt?: string | null;
|
|
203
|
+
endsAt?: string | null;
|
|
204
|
+
maxRunCount?: number | null;
|
|
161
205
|
message?: string | null;
|
|
162
206
|
parameters?: UserChatTimeoutParameters;
|
|
163
207
|
pausedAt?: string | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { setAgentScopedUserChatTimeoutPausedState } from './setAgentScopedUserChatTimeoutPausedState';
|
|
1
2
|
import type { UserChatTimeoutStatus, UserChatTimeoutRecord } from './UserChatTimeoutRecord';
|
|
2
|
-
import { listAgentUserChatTimeouts
|
|
3
|
-
import { cancelScheduledUserChatTimeout
|
|
3
|
+
import { listAgentUserChatTimeouts } from './userChatTimeoutStore';
|
|
4
|
+
import { cancelScheduledUserChatTimeout } from './userChatTimeoutWorker';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Number of timeout rows loaded per page while collecting bulk-mutation targets.
|
|
@@ -68,22 +69,18 @@ export async function pauseAllActiveAgentScopedUserChatTimeouts(options: {
|
|
|
68
69
|
statuses: ['QUEUED'],
|
|
69
70
|
paused: false,
|
|
70
71
|
});
|
|
71
|
-
const pausedAtIso = new Date().toISOString();
|
|
72
72
|
const pausedTimeoutIds: Array<string> = [];
|
|
73
73
|
|
|
74
74
|
for (const timeout of collectedTimeouts.timeouts) {
|
|
75
|
-
const
|
|
75
|
+
const pauseResult = await setAgentScopedUserChatTimeoutPausedState({
|
|
76
76
|
userId: options.userId,
|
|
77
77
|
agentPermanentId: options.agentPermanentId,
|
|
78
78
|
timeoutId: timeout.timeoutId,
|
|
79
|
-
|
|
80
|
-
pausedAt: pausedAtIso,
|
|
81
|
-
},
|
|
79
|
+
isPaused: true,
|
|
82
80
|
});
|
|
83
81
|
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
pausedTimeoutIds.push(updatedTimeout.timeoutId);
|
|
82
|
+
if (pauseResult.isApplied) {
|
|
83
|
+
pausedTimeoutIds.push(pauseResult.plannedMessage.timeoutId);
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
86
|
|
|
@@ -111,18 +108,15 @@ export async function resumeAllPausedAgentScopedUserChatTimeouts(options: {
|
|
|
111
108
|
const resumedTimeoutIds: Array<string> = [];
|
|
112
109
|
|
|
113
110
|
for (const timeout of collectedTimeouts.timeouts) {
|
|
114
|
-
const
|
|
111
|
+
const resumeResult = await setAgentScopedUserChatTimeoutPausedState({
|
|
115
112
|
userId: options.userId,
|
|
116
113
|
agentPermanentId: options.agentPermanentId,
|
|
117
114
|
timeoutId: timeout.timeoutId,
|
|
118
|
-
|
|
119
|
-
pausedAt: null,
|
|
120
|
-
},
|
|
115
|
+
isPaused: false,
|
|
121
116
|
});
|
|
122
117
|
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
resumedTimeoutIds.push(updatedTimeout.timeoutId);
|
|
118
|
+
if (resumeResult.isApplied) {
|
|
119
|
+
resumedTimeoutIds.push(resumeResult.plannedMessage.timeoutId);
|
|
126
120
|
}
|
|
127
121
|
}
|
|
128
122
|
|
|
@@ -1,22 +1,54 @@
|
|
|
1
1
|
import { spaceTrim } from 'spacetrim';
|
|
2
|
+
import {
|
|
3
|
+
describeAgentPlannedMessageSchedule,
|
|
4
|
+
type AgentPlannedMessageScheduleDescription,
|
|
5
|
+
} from '../../../../../src/book-3.0/describeAgentPlannedMessageSchedule';
|
|
2
6
|
|
|
3
7
|
/**
|
|
4
8
|
* Builds the synthetic user-like message injected when a timeout elapses.
|
|
5
9
|
*
|
|
10
|
+
* A planned message carries its whole schedule into its own wake-up, so the agent immediately knows
|
|
11
|
+
* whether this was its last run and does not have to plan anything again just to keep the plan alive.
|
|
12
|
+
*
|
|
6
13
|
* @private internal utility of userChatTimeout
|
|
7
14
|
*/
|
|
8
|
-
export function createTimeoutWakeUpMessage(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
export function createTimeoutWakeUpMessage(
|
|
16
|
+
options: AgentPlannedMessageScheduleDescription & {
|
|
17
|
+
readonly timeoutId: string;
|
|
18
|
+
readonly durationMs: number;
|
|
19
|
+
readonly message?: string | null;
|
|
20
|
+
},
|
|
21
|
+
): string {
|
|
13
22
|
const message = options.message?.trim() || '';
|
|
14
23
|
|
|
15
24
|
return spaceTrim(
|
|
16
25
|
(block) => `
|
|
17
|
-
|
|
26
|
+
${createTimeoutWakeUpHeadline(options)}
|
|
18
27
|
timeoutId: ${options.timeoutId}
|
|
19
28
|
${message ? block(message) : ''}
|
|
20
29
|
`,
|
|
21
30
|
);
|
|
22
31
|
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Builds the first line of one wake-up, telling the agent what woke it and where in its plan it is.
|
|
35
|
+
*
|
|
36
|
+
* @param options - Schedule of the planned message together with the plain timeout duration.
|
|
37
|
+
* @returns Headline of the wake-up message.
|
|
38
|
+
*
|
|
39
|
+
* @private internal utility of `createTimeoutWakeUpMessage`
|
|
40
|
+
*/
|
|
41
|
+
function createTimeoutWakeUpHeadline(
|
|
42
|
+
options: AgentPlannedMessageScheduleDescription & { readonly durationMs: number },
|
|
43
|
+
): string {
|
|
44
|
+
if (options.intervalMs || options.cronExpression) {
|
|
45
|
+
// Note: The next wake-up is resolved only after this one is queued, so the schedule is described without it
|
|
46
|
+
return `⏱️ Planned message elapsed, ${describeAgentPlannedMessageSchedule({ ...options, dueAt: null })}.`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (options.maxRunCount || options.startsAt) {
|
|
50
|
+
return '⏱️ Planned message elapsed, this was its only wake-up.';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return `⏱️ Timeout elapsed after ${options.durationMs}ms.`;
|
|
54
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shortest repeat interval one planned message may use.
|
|
3
|
+
*
|
|
4
|
+
* A planned message wakes a whole agent invocation, so an interval below one minute would turn a plan
|
|
5
|
+
* into an unattended self-invocation loop. Cron expressions have the very same one-minute resolution.
|
|
6
|
+
*
|
|
7
|
+
* @private constant of `plannedMessageSchedule`
|
|
8
|
+
*/
|
|
9
|
+
export const MINIMUM_PLANNED_MESSAGE_INTERVAL_MS = 60_000;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Complete recurrence rule of one planned message.
|
|
13
|
+
*
|
|
14
|
+
* A planned message can be a one-shot wake-up, an endless repetition, or anything between the two:
|
|
15
|
+
* `cronExpression` or `recurrenceIntervalMs` says how it repeats, while `startsAt`, `endsAt`, and
|
|
16
|
+
* `maxRunCount` bound how long it keeps repeating.
|
|
17
|
+
*
|
|
18
|
+
* Field names match `UserChatTimeoutRecord`, so one stored timeout row is already a valid schedule.
|
|
19
|
+
*
|
|
20
|
+
* @private type of `plannedMessageSchedule`
|
|
21
|
+
*/
|
|
22
|
+
export type PlannedMessageSchedule = {
|
|
23
|
+
/**
|
|
24
|
+
* Five-field cron expression evaluated in the local server time, or `null` when the planned
|
|
25
|
+
* message does not follow a cron.
|
|
26
|
+
*/
|
|
27
|
+
readonly cronExpression: string | null;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Fixed repeat interval in milliseconds, or `null` when the planned message does not repeat at a
|
|
31
|
+
* fixed interval.
|
|
32
|
+
*/
|
|
33
|
+
readonly recurrenceIntervalMs: number | null;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Moment before which the planned message never wakes the agent, or `null` when it may start
|
|
37
|
+
* immediately.
|
|
38
|
+
*/
|
|
39
|
+
readonly startsAt: string | null;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Moment after which the planned message never wakes the agent again, or `null` when it has no
|
|
43
|
+
* ending date.
|
|
44
|
+
*/
|
|
45
|
+
readonly endsAt: string | null;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Total number of times the planned message wakes the agent, or `null` when it repeats until it
|
|
49
|
+
* is cancelled.
|
|
50
|
+
*/
|
|
51
|
+
readonly maxRunCount: number | null;
|
|
52
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PlannedMessageSchedule } from './PlannedMessageSchedule';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Determines whether one planned message can wake the agent more than once.
|
|
5
|
+
*
|
|
6
|
+
* @param schedule - Recurrence rule of the planned message.
|
|
7
|
+
* @returns `true` when the schedule has a cron expression or a fixed repeat interval.
|
|
8
|
+
*
|
|
9
|
+
* @private function of `plannedMessageSchedule`
|
|
10
|
+
*/
|
|
11
|
+
export function hasPlannedMessageRecurrence(schedule: PlannedMessageSchedule): boolean {
|
|
12
|
+
return Boolean(schedule.cronExpression || schedule.recurrenceIntervalMs);
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PlannedMessageSchedule } from './PlannedMessageSchedule';
|
|
2
|
+
import { normalizePlannedMessageDateIso } from './normalizePlannedMessageScheduleValues';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Determines whether one planned message must never wake the agent again.
|
|
6
|
+
*
|
|
7
|
+
* A planned message is finished once it ran as many times as it was planned to run, or once its
|
|
8
|
+
* ending date has passed. Such a message is closed instead of being fired, so an agent is never woken
|
|
9
|
+
* by a plan it already completed.
|
|
10
|
+
*
|
|
11
|
+
* @param options - Recurrence rule, how many times it already ran, and the moment being judged.
|
|
12
|
+
* @returns `true` when no further wake-up is allowed.
|
|
13
|
+
*
|
|
14
|
+
* @private function of `plannedMessageSchedule`
|
|
15
|
+
*/
|
|
16
|
+
export function isPlannedMessageScheduleFinished(options: {
|
|
17
|
+
readonly schedule: PlannedMessageSchedule;
|
|
18
|
+
readonly completedRunCount: number;
|
|
19
|
+
readonly atDate: Date;
|
|
20
|
+
}): boolean {
|
|
21
|
+
const { schedule, completedRunCount, atDate } = options;
|
|
22
|
+
|
|
23
|
+
if (schedule.maxRunCount !== null && completedRunCount >= schedule.maxRunCount) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const endsAtIso = normalizePlannedMessageDateIso(schedule.endsAt);
|
|
28
|
+
|
|
29
|
+
return endsAtIso !== null && atDate.getTime() > Date.parse(endsAtIso);
|
|
30
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes one stored or untrusted total run count.
|
|
3
|
+
*
|
|
4
|
+
* @param value - Raw run-count limit.
|
|
5
|
+
* @returns Whole positive limit, or `null` when the planned message repeats without a count limit.
|
|
6
|
+
*
|
|
7
|
+
* @private function of `plannedMessageSchedule`
|
|
8
|
+
*/
|
|
9
|
+
export function normalizePlannedMessageMaxRunCount(value: unknown): number | null {
|
|
10
|
+
const maxRunCount = Number(value);
|
|
11
|
+
|
|
12
|
+
if (!Number.isFinite(maxRunCount) || maxRunCount < 1) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return Math.floor(maxRunCount);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Normalizes one stored or untrusted schedule boundary into an ISO timestamp.
|
|
21
|
+
*
|
|
22
|
+
* @param value - Raw date value.
|
|
23
|
+
* @returns ISO timestamp, or `null` when the value is not a usable date.
|
|
24
|
+
*
|
|
25
|
+
* @private function of `plannedMessageSchedule`
|
|
26
|
+
*/
|
|
27
|
+
export function normalizePlannedMessageDateIso(value: unknown): string | null {
|
|
28
|
+
if (value === null || value === undefined || value === '') {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (typeof value !== 'string' && typeof value !== 'number' && !(value instanceof Date)) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
37
|
+
|
|
38
|
+
if (Number.isNaN(date.getTime())) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return date.toISOString();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Normalizes one stored or untrusted cron expression without validating its fields.
|
|
47
|
+
*
|
|
48
|
+
* Stored expressions were already validated when they were planned, and mapping one database row must
|
|
49
|
+
* never throw, so the field syntax is checked only where a new schedule is accepted.
|
|
50
|
+
*
|
|
51
|
+
* @param value - Raw cron expression.
|
|
52
|
+
* @returns Trimmed expression, or `null` when there is none.
|
|
53
|
+
*
|
|
54
|
+
* @private function of `plannedMessageSchedule`
|
|
55
|
+
*/
|
|
56
|
+
export function normalizePlannedMessageCronExpression(value: unknown): string | null {
|
|
57
|
+
if (typeof value !== 'string') {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return value.trim() || null;
|
|
62
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { spaceTrim } from 'spacetrim';
|
|
2
|
+
import { ParseError } from '../../../../../../src/errors/ParseError';
|
|
3
|
+
import { normalizeCronExpression } from '../../cronExpression';
|
|
4
|
+
import { MINIMUM_PLANNED_MESSAGE_INTERVAL_MS, type PlannedMessageSchedule } from './PlannedMessageSchedule';
|
|
5
|
+
import { normalizePlannedMessageDateIso } from './normalizePlannedMessageScheduleValues';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Untrusted schedule fields of one planned message, as written by a model, a coding harness, or the
|
|
9
|
+
* internal runtime API.
|
|
10
|
+
*
|
|
11
|
+
* A missing field means "not requested", while an explicit `null` means "no such bound", which is what
|
|
12
|
+
* lets one update remove an ending date or a run-count limit.
|
|
13
|
+
*
|
|
14
|
+
* @private type of `plannedMessageSchedule`
|
|
15
|
+
*/
|
|
16
|
+
export type PlannedMessageScheduleInput = {
|
|
17
|
+
readonly milliseconds?: unknown;
|
|
18
|
+
readonly cronExpression?: unknown;
|
|
19
|
+
readonly startsAt?: unknown;
|
|
20
|
+
readonly endsAt?: unknown;
|
|
21
|
+
readonly maxRunCount?: unknown;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Parses one untrusted planned-message schedule.
|
|
26
|
+
*
|
|
27
|
+
* @param input - Schedule fields requested by an agent.
|
|
28
|
+
* @returns Validated recurrence rule.
|
|
29
|
+
*
|
|
30
|
+
* @private function of `plannedMessageSchedule`
|
|
31
|
+
*/
|
|
32
|
+
export function parsePlannedMessageSchedule(input: PlannedMessageScheduleInput): PlannedMessageSchedule {
|
|
33
|
+
const cronExpression = parsePlannedMessageCronExpression(input.cronExpression);
|
|
34
|
+
const recurrenceIntervalMs = parsePlannedMessageIntervalMs(input.milliseconds);
|
|
35
|
+
|
|
36
|
+
if (cronExpression !== null && recurrenceIntervalMs !== null) {
|
|
37
|
+
throw new ParseError(
|
|
38
|
+
spaceTrim(`
|
|
39
|
+
Invalid planned-message schedule.
|
|
40
|
+
|
|
41
|
+
- Use either \`cronExpression\` or \`milliseconds\`, **not both**.
|
|
42
|
+
`),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const startsAt = parsePlannedMessageBoundaryDate(input.startsAt, 'startsAt');
|
|
47
|
+
const endsAt = parsePlannedMessageBoundaryDate(input.endsAt, 'endsAt');
|
|
48
|
+
|
|
49
|
+
if (startsAt !== null && endsAt !== null && Date.parse(endsAt) <= Date.parse(startsAt)) {
|
|
50
|
+
throw new ParseError(
|
|
51
|
+
spaceTrim(`
|
|
52
|
+
Invalid planned-message schedule.
|
|
53
|
+
|
|
54
|
+
- \`endsAt\` must be **after** \`startsAt\`.
|
|
55
|
+
`),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (cronExpression === null && recurrenceIntervalMs === null && startsAt === null) {
|
|
60
|
+
throw new ParseError(
|
|
61
|
+
spaceTrim(`
|
|
62
|
+
Invalid planned-message schedule.
|
|
63
|
+
|
|
64
|
+
- Say when the planned message wakes you with \`cronExpression\`, \`milliseconds\`, or \`startsAt\`.
|
|
65
|
+
- Use \`maxRunCount\` and \`endsAt\` only to **bound** a schedule, never as the schedule itself.
|
|
66
|
+
`),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
cronExpression,
|
|
72
|
+
recurrenceIntervalMs,
|
|
73
|
+
startsAt,
|
|
74
|
+
endsAt,
|
|
75
|
+
maxRunCount: parsePlannedMessageMaxRunCount(input.maxRunCount),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Parses one untrusted cron expression of a planned message.
|
|
81
|
+
*
|
|
82
|
+
* @param rawCronExpression - Untrusted cron expression.
|
|
83
|
+
* @returns Normalized expression, or `null` when none was requested.
|
|
84
|
+
*
|
|
85
|
+
* @private function of `parsePlannedMessageSchedule`
|
|
86
|
+
*/
|
|
87
|
+
function parsePlannedMessageCronExpression(rawCronExpression: unknown): string | null {
|
|
88
|
+
if (rawCronExpression === undefined || rawCronExpression === null || rawCronExpression === '') {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (typeof rawCronExpression !== 'string') {
|
|
93
|
+
throw new ParseError(
|
|
94
|
+
spaceTrim(`
|
|
95
|
+
Invalid planned-message \`cronExpression\`.
|
|
96
|
+
|
|
97
|
+
- Use a five-field cron string such as \`0 9 * * 1-5\`.
|
|
98
|
+
`),
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
try {
|
|
103
|
+
return normalizeCronExpression(rawCronExpression);
|
|
104
|
+
} catch (error) {
|
|
105
|
+
throw new ParseError(
|
|
106
|
+
spaceTrim(
|
|
107
|
+
(block) => `
|
|
108
|
+
Invalid planned-message \`cronExpression\`.
|
|
109
|
+
|
|
110
|
+
${block(error instanceof Error ? error.message : String(error))}
|
|
111
|
+
`,
|
|
112
|
+
),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Parses one untrusted repeat interval of a planned message.
|
|
119
|
+
*
|
|
120
|
+
* @param rawMilliseconds - Untrusted interval in milliseconds.
|
|
121
|
+
* @returns Repeat interval in whole milliseconds, or `null` when none was requested.
|
|
122
|
+
*
|
|
123
|
+
* @private function of `parsePlannedMessageSchedule`
|
|
124
|
+
*/
|
|
125
|
+
function parsePlannedMessageIntervalMs(rawMilliseconds: unknown): number | null {
|
|
126
|
+
if (rawMilliseconds === undefined || rawMilliseconds === null) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const milliseconds = Number(rawMilliseconds);
|
|
131
|
+
|
|
132
|
+
if (!Number.isFinite(milliseconds) || milliseconds < MINIMUM_PLANNED_MESSAGE_INTERVAL_MS) {
|
|
133
|
+
throw new ParseError(
|
|
134
|
+
spaceTrim(`
|
|
135
|
+
Invalid planned-message interval.
|
|
136
|
+
|
|
137
|
+
- A planned message **repeats** at this interval until it is cancelled or bounded by \`maxRunCount\` or \`endsAt\`.
|
|
138
|
+
- \`milliseconds\` must be a number of at least \`${MINIMUM_PLANNED_MESSAGE_INTERVAL_MS}\`.
|
|
139
|
+
`),
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return Math.floor(milliseconds);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Parses one untrusted total run count of a planned message.
|
|
148
|
+
*
|
|
149
|
+
* @param rawMaxRunCount - Untrusted run-count limit.
|
|
150
|
+
* @returns Whole positive limit, or `null` when the planned message repeats without a count limit.
|
|
151
|
+
*
|
|
152
|
+
* @private function of `parsePlannedMessageSchedule`
|
|
153
|
+
*/
|
|
154
|
+
function parsePlannedMessageMaxRunCount(rawMaxRunCount: unknown): number | null {
|
|
155
|
+
if (rawMaxRunCount === undefined || rawMaxRunCount === null) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const maxRunCount = Number(rawMaxRunCount);
|
|
160
|
+
|
|
161
|
+
if (!Number.isInteger(maxRunCount) || maxRunCount < 1) {
|
|
162
|
+
throw new ParseError(
|
|
163
|
+
spaceTrim(`
|
|
164
|
+
Invalid planned-message \`maxRunCount\`.
|
|
165
|
+
|
|
166
|
+
- Use a whole number of at least \`1\`, which is **how many times in total** the planned message wakes you.
|
|
167
|
+
- Leave it out for a planned message that repeats until it is cancelled.
|
|
168
|
+
`),
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return maxRunCount;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Parses one untrusted starting or ending date of a planned message.
|
|
177
|
+
*
|
|
178
|
+
* @param rawDate - Untrusted date value.
|
|
179
|
+
* @param fieldName - Field name used in a detailed parse error.
|
|
180
|
+
* @returns ISO timestamp, or `null` when the boundary was not requested.
|
|
181
|
+
*
|
|
182
|
+
* @private function of `parsePlannedMessageSchedule`
|
|
183
|
+
*/
|
|
184
|
+
function parsePlannedMessageBoundaryDate(rawDate: unknown, fieldName: 'startsAt' | 'endsAt'): string | null {
|
|
185
|
+
if (rawDate === undefined || rawDate === null || rawDate === '') {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const dateIso = normalizePlannedMessageDateIso(rawDate);
|
|
190
|
+
|
|
191
|
+
if (dateIso === null) {
|
|
192
|
+
throw new ParseError(
|
|
193
|
+
spaceTrim(`
|
|
194
|
+
Invalid planned-message \`${fieldName}\`.
|
|
195
|
+
|
|
196
|
+
- Use an ISO date such as \`2026-08-20T09:00:00.000Z\`.
|
|
197
|
+
`),
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return dateIso;
|
|
202
|
+
}
|