@promptbook/cli 0.114.0-0 → 0.114.0-10
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 +20 -27
- package/agents/default/developer.book +1 -0
- package/apps/agents-server/README.md +1 -1
- package/apps/agents-server/{USE_TIMEOUT_CHIP_QA.md → TIMEOUT_CHIP_QA.md} +1 -1
- package/apps/agents-server/next.config.ts +33 -0
- package/apps/agents-server/package.json +11 -9
- package/apps/agents-server/playwright.config.ts +28 -38
- package/apps/agents-server/scripts/build-agents-server.js +98 -0
- package/apps/agents-server/scripts/build-e2e.js +48 -0
- package/apps/agents-server/scripts/ensure-root-dependencies.js +86 -0
- 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/prerender-homepage.js +1 -1
- package/apps/agents-server/scripts/run-e2e-tests.js +47 -0
- package/apps/agents-server/scripts/run-npm.js +118 -0
- package/apps/agents-server/src/app/admin/email-server/page.tsx +17 -10
- 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 +21 -32
- package/apps/agents-server/src/app/admin/messages/messageAdminPresentation.ts +289 -0
- 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 +2 -0
- package/apps/agents-server/src/app/admin/task-manager/taskManagerTaskPresentation.tsx +23 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +5 -9
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +5 -9
- package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +8 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/chat/resolveAgentChatRouteContext.ts +8 -16
- package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/[timeoutId]/route.ts +10 -153
- package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/route.ts +9 -4
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/route.ts +3 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +2 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/resolveUserChatScope.ts +8 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/route.ts +15 -7
- package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +4 -9
- package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorSaving.ts +18 -28
- 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 +168 -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 +18 -9
- 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/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]/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/dns-records/cloudflare/route.ts +26 -16
- package/apps/agents-server/src/app/api/elevenlabs/tts/route.ts +3 -3
- 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 +146 -0
- package/apps/agents-server/src/app/api/onboarding/book/route.ts +7 -6
- package/apps/agents-server/src/app/api/scrape/route.ts +1 -1
- package/apps/agents-server/src/app/layout.tsx +31 -0
- package/apps/agents-server/src/app/superadmin/servers/ServersRegistryTable.tsx +124 -129
- package/apps/agents-server/src/app/superadmin/servers/useServersRegistryState.ts +15 -7
- package/apps/agents-server/src/app/system/user-wallet/UserWalletDraft.ts +2 -2
- package/apps/agents-server/src/components/AgentNaming/legacyAgentTextTranslations.cs.yaml +7 -0
- package/apps/agents-server/src/components/AgentProfile/AgentCapabilityChips.tsx +1 -24
- package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +10 -3
- package/apps/agents-server/src/components/AgentProjects/AgentProjectIcon.tsx +137 -0
- package/apps/agents-server/src/components/AgentProjects/AgentProjectItem.tsx +26 -10
- package/apps/agents-server/src/components/AgentProjects/useAgentProjectMarkdownReferences.ts +184 -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/DnsRecordsInstructions/DnsRecordsInstructions.tsx +91 -57
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionPanel.tsx +63 -0
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionVariantTabs.tsx +67 -0
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsTable.tsx +40 -0
- package/apps/agents-server/src/components/Header/Header.tsx +8 -0
- package/apps/agents-server/src/components/Header/HeaderTypes.ts +5 -0
- package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +5 -4
- package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +118 -30
- package/apps/agents-server/src/components/Header/createAgentViewLabel.tsx +4 -4
- package/apps/agents-server/src/components/Header/resolveActiveAgentNavigation.ts +2 -2
- package/apps/agents-server/src/components/Header/resolveHeaderSystemActivities.ts +86 -0
- package/apps/agents-server/src/components/Homepage/AgentCard.tsx +0 -3
- package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +22 -10
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +8 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ManGoBookEditor.tsx +82 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/WizardShell.tsx +2 -2
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/BookStep.tsx +13 -16
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/ZadaniStep.tsx +4 -4
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/config/bookSections.ts +23 -16
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/lib/bookSource.ts +54 -0
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/bookService.ts +15 -8
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/createManGoAgentSource.ts +3 -37
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/createManGoOpenEditorRequest.ts +1 -1
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/state/OnboardingProvider.tsx +2 -2
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardState.ts +0 -12
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardUseSetupStep.tsx +0 -58
- package/apps/agents-server/src/components/NewAgentDialog/newAgentWizardPresets.ts +0 -56
- package/apps/agents-server/src/components/UsersList/CreateUserDialog.tsx +13 -22
- package/apps/agents-server/src/components/UsersList/PasswordGeneratorDialog.tsx +216 -0
- package/apps/agents-server/src/components/UsersList/UsersList.tsx +16 -11
- package/apps/agents-server/src/components/UsersList/generateSecurePassword.ts +112 -24
- package/apps/agents-server/src/components/UsersList/userDialogClassNames.ts +11 -0
- package/apps/agents-server/src/components/WalletRecordDialog/useWalletRecordDialogState.ts +1 -1
- package/apps/agents-server/src/components/_utils/generateMetaTxt.ts +1 -1
- package/apps/agents-server/src/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/generated/reservedPaths.ts +42 -42
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +20 -11
- package/apps/agents-server/src/languages/translations/czech.yaml +20 -11
- package/apps/agents-server/src/languages/translations/english.yaml +20 -11
- package/apps/agents-server/src/message-providers/email/smtp/SmtpMessageProvider.ts +1 -1
- package/apps/agents-server/src/message-providers/email/stalwart/StalwartMessageProvider.ts +57 -18
- package/apps/agents-server/src/message-providers/email/stalwart/parseInboundStalwartEmail.ts +17 -2
- package/apps/agents-server/src/tools/$provideOpenAiAgentKitExecutionToolsForServer.ts +0 -191
- package/apps/agents-server/src/tools/$provideOpenAiAssistantExecutionToolsForServer.ts +0 -3
- package/apps/agents-server/src/tools/agentGoalChatTimeoutToolFunctions.ts +180 -0
- package/apps/agents-server/src/tools/agentGoalChatTimeoutTools.ts +92 -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/run_browser.ts +1 -1
- package/apps/agents-server/src/tools/send_email.ts +3 -3
- 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 +307 -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 +92 -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 +24 -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 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectsPaths.ts +15 -5
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectDnsRecords.ts +53 -7
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectInitials.ts +36 -0
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +143 -28
- 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/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/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/bookLanguageDocumentation/createBookLanguageDocumentationPdfResponse.ts +19 -17
- 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/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/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +41 -36
- 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/handleChatCompletion/createHandleChatCompletionPromptContext.ts +3 -2
- package/apps/agents-server/src/utils/handleChatCompletion/resolveHandleChatCompletionRuntime.ts +4 -12
- 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/prepareLocalTeamConversationWorkspace.ts +233 -0
- package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +37 -6
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +2 -14
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentRuntime.ts +21 -73
- package/apps/agents-server/src/utils/messages/parseUseEmailSmtpCredential.ts +1 -1
- package/apps/agents-server/src/utils/resolveUseEmailSmtpCredential.ts +1 -1
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/insertManagedServerRegistryRow.ts +2 -2
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +7 -6
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +5 -4
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerMetadata.ts +3 -2
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerUsers.ts +3 -2
- package/apps/agents-server/src/utils/serverManagement/deleteManagedServer.ts +2 -2
- package/apps/agents-server/src/utils/stalwart/createEmailDnsInstructions.ts +9 -5
- package/apps/agents-server/src/utils/stalwart/createEmailDnsRecordsSection.ts +53 -0
- package/apps/agents-server/src/utils/stalwart/readStalwartEmailSnapshot.ts +23 -5
- package/apps/agents-server/src/utils/stalwart/stalwartBootstrap.ts +2 -1
- package/apps/agents-server/src/utils/stalwart/stalwartMailBridge.ts +7 -0
- package/apps/agents-server/src/utils/useEmailSmtpWalletConstants.ts +5 -5
- package/apps/agents-server/src/utils/userChat/UserChatRecord.ts +13 -0
- package/apps/agents-server/src/utils/userChat/UserChatSource.ts +14 -0
- package/apps/agents-server/src/utils/userChat/appendQueuedUserChatTurn.ts +9 -2
- package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +7 -17
- package/apps/agents-server/src/utils/userChat/createUserChatSummary.ts +10 -2
- package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +3 -2
- package/apps/agents-server/src/utils/userChat/getUserChat.ts +16 -1
- package/apps/agents-server/src/utils/userChat/getUserChatForJobRunner.ts +31 -0
- package/apps/agents-server/src/utils/userChat/listUserChats.ts +113 -110
- package/apps/agents-server/src/utils/userChat/persistFrozenUserChat.ts +21 -6
- package/apps/agents-server/src/utils/userChat/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/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 +9 -31
- package/apps/agents-server/src/utils/userChatTimeout/UserChatTimeoutRecord.ts +10 -2
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/claimNextDueUserChatTimeout.ts +28 -25
- 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/recoverExpiredRunningUserChatTimeouts.ts +3 -2
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +55 -0
- package/apps/agents-server/src/utils/userWallet/UserWalletRecord.ts +1 -1
- package/apps/agents-server/src/utils/userWallet/resolveUseEmailSmtpCredentialFromWallet.ts +1 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/deleteVpsSelfUpdateInstalledVersion.ts +2 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/isVpsSelfUpdateJobRunning.ts +16 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/startVpsSelfUpdate.ts +2 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate.ts +1 -0
- package/apps/agents-server/tests/e2e/e2eEnvironment.cjs +49 -0
- package/esm/apps/agents-server/src/utils/agentGoalChat/agentGoalChatConstants.d.ts +12 -0
- package/esm/index.es.js +5260 -6573
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +8 -0
- package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
- package/esm/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
- package/esm/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
- package/esm/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
- package/esm/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
- package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -0
- package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
- package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +56 -0
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +12 -3
- package/esm/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
- package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +8 -1
- package/esm/scripts/run-codex-prompts/ping/buildCoderPingPrompt.d.ts +20 -0
- package/esm/scripts/run-codex-prompts/ping/extractCoderPingAnswer.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/ping/pingCoderHarness.d.ts +23 -0
- package/esm/scripts/run-codex-prompts/ping/printCoderPingResult.d.ts +5 -0
- package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +43 -0
- package/esm/scripts/run-codex-prompts/prompts/findNextTodoPrompt.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
- package/esm/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/prompts/listRunnablePrompts.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +2 -1
- package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/testing/TestBeforeMode.d.ts +16 -0
- package/esm/scripts/run-codex-prompts/testing/createTestBeforeRepairPrompt.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/testing/limitTestOutput.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +1 -2
- package/esm/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/testing/runTestBefore.d.ts +24 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +1 -0
- package/esm/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
- package/esm/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
- package/esm/scripts/verify-prompts/verify-prompts.d.ts +8 -2
- package/esm/src/_packages/components.index.d.ts +4 -0
- package/esm/src/_packages/types.index.d.ts +4 -0
- package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/esm/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +1 -15
- package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +1 -1
- package/esm/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +0 -4
- package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
- package/esm/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +72 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +2 -3
- package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
- package/esm/src/cli/cli-commands/coder/ping.d.ts +10 -0
- package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
- package/esm/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
- package/{umd/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
- package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
- package/esm/src/cli/common/loadPromptsModule.d.ts +16 -0
- package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/esm/src/commitments/index.d.ts +4 -12
- package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
- package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
- package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
- package/esm/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
- package/esm/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
- package/esm/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
- package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
- package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
- package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
- package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
- package/esm/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
- package/esm/src/utils/misc/debounce.d.ts +4 -2
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/_packages/components.index.ts +4 -0
- package/src/_packages/components.readme.md +1 -1
- package/src/_packages/types.index.ts +4 -0
- package/src/avatars/renderAvatarVisualTerminalText.ts +249 -0
- package/src/avatars/types/AvatarVisualDefinition.ts +60 -0
- package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +144 -22
- package/src/book-2.0/agent-source/AgentBasicInformation.ts +3 -9
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.ts +0 -23
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +0 -2
- package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +16 -31
- package/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.ts +0 -35
- package/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.ts +1 -15
- package/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.ts +1 -27
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +96 -44
- package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +23 -71
- package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +22 -67
- package/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.ts +9 -1
- package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +5 -55
- package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +278 -4
- package/src/book-3.0/AgentTeamConversationWorkspace.ts +172 -0
- package/src/book-3.0/LiteAgent.ts +11 -9
- package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +1 -1
- package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +56 -55
- package/src/book-components/Chat/Chat/Chat.module.css +1 -8
- package/src/book-components/Chat/Chat/ChatMessageMap.tsx +8 -4
- package/src/book-components/Chat/Chat/ChatProps.tsx +3 -2
- package/src/book-components/Chat/MarkdownContent/MarkdownContent.module.css +85 -17
- package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +116 -2
- package/src/book-components/Chat/save/react/exports/chat-preview-2025-10-13 (1).jsx +95 -5
- package/src/book-components/Chat/utils/$provideServerDomWindow.ts +77 -0
- package/src/book-components/Chat/utils/renderMarkdown.ts +716 -44
- package/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.ts +14 -0
- package/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.ts +1 -0
- package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +1 -0
- package/src/cli/cli-commands/coder/add.ts +40 -12
- package/src/cli/cli-commands/coder/agentCodingFile.ts +6 -129
- package/src/cli/cli-commands/coder/boilerplateCount.ts +139 -0
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +81 -47
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +7 -4
- package/src/cli/cli-commands/coder/init.ts +29 -2
- package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +1 -4
- package/src/cli/cli-commands/coder/ping.ts +72 -0
- package/src/cli/cli-commands/coder/run.ts +35 -4
- package/src/cli/cli-commands/coder/verify.ts +55 -16
- package/src/cli/cli-commands/coder.ts +4 -0
- package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +82 -0
- package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +2 -2
- package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +6 -4
- package/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts +2 -2
- package/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.ts +2 -1
- package/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.ts → npm/$askForNpmPackageInstallationApproval.ts} +3 -3
- package/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.ts +49 -0
- package/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.ts +28 -0
- package/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.ts +25 -0
- package/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.ts +165 -0
- package/src/cli/cli-commands/common/projectInitialization.ts +10 -1
- package/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.ts +69 -0
- package/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.ts +117 -0
- package/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.ts +259 -0
- package/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.ts +55 -0
- package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.ts +76 -0
- package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.ts +32 -0
- package/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.ts +13 -0
- package/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.ts +45 -0
- package/src/cli/cli-commands/run/prepareRunCommandResources.ts +2 -1
- package/src/cli/cli-commands/run/resolveRunInputParameters.ts +2 -1
- package/src/cli/cli-commands/runInteractiveChatbot.ts +2 -1
- package/src/cli/common/$provideLlmToolsForCli.ts +2 -1
- package/src/cli/common/loadPromptsModule.ts +13 -0
- package/src/commands/FORMAT/formatCommandParser.ts +2 -2
- package/src/commitments/ACTION/ACTION.ts +3 -3
- package/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.ts +1 -1
- package/src/commitments/META_FULLNAME/META_FULLNAME.ts +70 -0
- package/src/commitments/META_ID/META_ID.ts +78 -0
- package/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.ts +1 -49
- package/src/commitments/index.ts +6 -24
- package/src/conversion/archive/loadArchive.ts +2 -1
- package/src/conversion/archive/loadJsZipModule.ts +10 -0
- package/src/conversion/archive/saveArchive.ts +2 -1
- package/src/llm-providers/agent/Agent.ts +1 -1
- package/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.ts +13 -1
- package/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.ts +13 -1
- package/src/llm-providers/openai/OpenAiAgentKitExecutionTools.ts +6 -2
- package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +9 -7
- package/src/llm-providers/openai/OpenAiAssistantExecutionTools.ts +1 -1
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.ts +1 -1
- package/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.ts +1 -1
- package/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.ts +1 -1
- package/src/llm-providers/openai/OpenAiCompatibleRequestManager.ts +12 -1
- package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +21 -18
- package/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.ts +1 -1
- package/src/llm-providers/openai/utils/loadOpenAiAgentsModule.ts +11 -0
- package/src/llm-providers/openai/utils/uploadFilesToOpenAi.ts +1 -1
- package/src/other/templates/getTemplatesPipelineCollection.ts +786 -1141
- package/src/remote-server/createRemoteClient.ts +12 -1
- package/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.ts +8 -9
- package/src/scrapers/website/WebsiteScraper.ts +22 -2
- package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +157 -3
- package/src/utils/agents/terminalAgentAvatarVisual.ts +31 -3
- package/src/utils/ascii-art/convertImageDataToAsciiArt.ts +9 -109
- package/src/utils/ascii-art/createAnsiColorCode.ts +132 -0
- package/src/utils/misc/createLazyModuleLoader.ts +27 -0
- package/src/utils/misc/debounce.ts +26 -5
- package/src/version.ts +2 -2
- package/src/versions.txt +8 -1
- package/umd/apps/agents-server/src/utils/agentGoalChat/agentGoalChatConstants.d.ts +12 -0
- package/umd/index.umd.js +5718 -7025
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +8 -0
- package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
- package/umd/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
- package/umd/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
- package/umd/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
- package/umd/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
- package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -0
- package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
- package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +56 -0
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +12 -3
- package/umd/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
- package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +8 -1
- package/umd/scripts/run-codex-prompts/ping/buildCoderPingPrompt.d.ts +20 -0
- package/umd/scripts/run-codex-prompts/ping/extractCoderPingAnswer.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/ping/pingCoderHarness.d.ts +23 -0
- package/umd/scripts/run-codex-prompts/ping/printCoderPingResult.d.ts +5 -0
- package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +43 -0
- package/umd/scripts/run-codex-prompts/prompts/findNextTodoPrompt.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
- package/umd/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/prompts/listRunnablePrompts.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +2 -1
- package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/testing/TestBeforeMode.d.ts +16 -0
- package/umd/scripts/run-codex-prompts/testing/createTestBeforeRepairPrompt.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/testing/limitTestOutput.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +1 -2
- package/umd/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/testing/runTestBefore.d.ts +24 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +1 -0
- package/umd/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
- package/umd/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
- package/umd/scripts/verify-prompts/verify-prompts.d.ts +8 -2
- package/umd/src/_packages/components.index.d.ts +4 -0
- package/umd/src/_packages/types.index.d.ts +4 -0
- package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/umd/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +1 -15
- package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +1 -1
- package/umd/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +0 -4
- package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
- package/umd/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +72 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +2 -3
- package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
- package/umd/src/cli/cli-commands/coder/ping.d.ts +10 -0
- package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
- package/umd/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
- package/{esm/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
- package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -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/common/loadPromptsModule.d.ts +16 -0
- package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/umd/src/commitments/index.d.ts +4 -12
- package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
- package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
- package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
- package/umd/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
- package/umd/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
- package/umd/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
- package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
- package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
- package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
- package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
- package/umd/src/utils/misc/createLazyModuleLoader.d.ts +14 -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/version.d.ts +1 -1
- package/apps/agents-server/scripts/ignore-kill-eperm.js +0 -31
- 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/app/api/onboarding/draft/route.ts +0 -23
- package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +0 -182
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/BookLanguagePanel.tsx +0 -125
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/MarkdownBookEditor.tsx +0 -154
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/MarkdownPreview.tsx +0 -188
- package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/draftService.ts +0 -32
- package/apps/agents-server/src/tools/configureTimeoutToolRuntimeAdapterForServer.ts +0 -381
- package/apps/agents-server/src/utils/emails/extractUseEmailConfigurationFromAgentSource.ts +0 -42
- package/apps/agents-server/src/utils/userChatClient/runAgentUserTimeoutBulkAction.ts +0 -24
- package/apps/agents-server/src/utils/userChatClient/updateAgentUserTimeout.ts +0 -25
- package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
- package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/META/META.d.ts +0 -65
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- package/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.ts +0 -34
- package/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.ts +0 -28
- package/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.ts +0 -39
- package/src/commitments/COMPONENT/COMPONENT.ts +0 -70
- package/src/commitments/MEMORY/MEMORY.ts +0 -94
- package/src/commitments/MEMORY/MemoryToolNames.ts +0 -13
- package/src/commitments/MEMORY/MemoryToolRuntimeAdapter.ts +0 -180
- package/src/commitments/MEMORY/createMemorySystemMessage.ts +0 -27
- package/src/commitments/MEMORY/createMemoryToolFunctions.ts +0 -134
- package/src/commitments/MEMORY/createMemoryTools.ts +0 -115
- package/src/commitments/MEMORY/getMemoryCommitmentDocumentation.ts +0 -47
- package/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.ts +0 -104
- package/src/commitments/MEMORY/getMemoryToolTitles.ts +0 -16
- package/src/commitments/MEMORY/parseMemoryToolArgs.ts +0 -126
- package/src/commitments/MEMORY/resolveMemoryRuntimeContext.ts +0 -23
- package/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.ts +0 -26
- package/src/commitments/META/META.ts +0 -168
- package/src/commitments/USE/TODO.txt +0 -1
- package/src/commitments/USE/aggregateUseCommitmentSystemMessages.ts +0 -219
- package/src/commitments/USE_BROWSER/TODO.txt +0 -1
- package/src/commitments/USE_BROWSER/USE_BROWSER.ts +0 -257
- package/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.ts +0 -45
- package/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.ts +0 -83
- package/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.ts +0 -146
- package/src/commitments/USE_EMAIL/USE_EMAIL.ts +0 -201
- package/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.ts +0 -75
- package/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.ts +0 -44
- package/src/commitments/USE_EMAIL/sendEmailViaBrowser.ts +0 -47
- package/src/commitments/USE_SEARCH_ENGINE/TODO.txt +0 -1
- package/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.ts +0 -171
- package/src/commitments/USE_SPAWN/USE_SPAWN.ts +0 -150
- package/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.ts +0 -42
- package/src/commitments/USE_SPAWN/spawnAgentViaBrowser.ts +0 -50
- package/src/commitments/USE_TIME/USE_TIME.ts +0 -177
- package/src/commitments/USE_TIMEOUT/TimeoutToolNames.ts +0 -13
- package/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.ts +0 -255
- package/src/commitments/USE_TIMEOUT/USE_TIMEOUT.ts +0 -117
- package/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.ts +0 -22
- package/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.ts +0 -361
- package/src/commitments/USE_TIMEOUT/createTimeoutTools.ts +0 -127
- package/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.ts +0 -67
- package/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.ts +0 -460
- package/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.ts +0 -36
- package/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.ts +0 -26
- package/src/commitments/WALLET/WALLET.ts +0 -71
- package/src/commitments/WALLET/WalletToolNames.ts +0 -14
- package/src/commitments/WALLET/WalletToolRuntimeAdapter.ts +0 -180
- package/src/commitments/WALLET/createWalletSystemMessage.ts +0 -22
- package/src/commitments/WALLET/createWalletToolFunctions.ts +0 -145
- package/src/commitments/WALLET/createWalletTools.ts +0 -129
- package/src/commitments/WALLET/getWalletCommitmentDocumentation.ts +0 -14
- package/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.ts +0 -64
- package/src/commitments/WALLET/getWalletToolTitles.ts +0 -17
- package/src/commitments/WALLET/parseWalletToolArgs.ts +0 -231
- package/src/commitments/WALLET/resolveWalletRuntimeContext.ts +0 -23
- package/src/commitments/WALLET/setWalletToolRuntimeAdapter.ts +0 -26
- package/src/commitments/_common/createSerpSearchToolFunction.ts +0 -46
- package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
- package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/META/META.d.ts +0 -65
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- /package/esm/src/{book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
- /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
- /package/esm/src/cli/cli-commands/{common/harness/isHarnessVersionOutdated.test.d.ts → coder/boilerplateCount.test.d.ts} +0 -0
- /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → cli/cli-commands/coder/ping.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
- /package/esm/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts} +0 -0
- /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
- /package/{umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → esm/src/utils/misc/debounce.test.d.ts} +0 -0
- /package/umd/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
- /package/umd/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
- /package/umd/src/{commitments/MEMORY/MEMORY.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → cli/cli-commands/coder/ping.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
- /package/umd/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
- /package/umd/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
- /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import type { Socket } from 'socket.io-client';
|
|
2
|
-
import { io } from 'socket.io-client';
|
|
3
2
|
import { spaceTrim } from 'spacetrim';
|
|
4
3
|
import { CONNECTION_RETRIES_LIMIT, CONNECTION_TIMEOUT_MS } from '../config';
|
|
4
|
+
import { createLazyModuleLoader } from '../utils/misc/createLazyModuleLoader';
|
|
5
5
|
import { isValidUrl } from '../utils/validators/url/isValidUrl';
|
|
6
6
|
import type { RemoteClientOptions } from './types/RemoteClientOptions';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Loads the Socket.io client (`socket.io-client`) on demand
|
|
10
|
+
*
|
|
11
|
+
* Note: [🐌] Loaded lazily to keep the startup of the `ptbk` CLI utility fast
|
|
12
|
+
*
|
|
13
|
+
* @private internal utility of `createRemoteClient`
|
|
14
|
+
*/
|
|
15
|
+
const loadSocketIoClientModule = createLazyModuleLoader(() => import('socket.io-client'));
|
|
16
|
+
|
|
8
17
|
/**
|
|
9
18
|
* Creates a connection to the remote proxy server.
|
|
10
19
|
*
|
|
@@ -44,6 +53,8 @@ export async function createRemoteClient<TCustomOptions = undefined>(
|
|
|
44
53
|
);
|
|
45
54
|
}
|
|
46
55
|
|
|
56
|
+
const { io } = await loadSocketIoClientModule();
|
|
57
|
+
|
|
47
58
|
return new Promise((resolve, reject) => {
|
|
48
59
|
const socket = io(remoteServerUrl, {
|
|
49
60
|
retries: CONNECTION_RETRIES_LIMIT,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { spaceTrim } from 'spacetrim';
|
|
2
|
-
import type { LlmExecutionTools } from '
|
|
3
|
-
import { $provideFilesystemForNode } from '
|
|
4
|
-
import type { ScraperSourceHandler } from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
|
|
3
|
+
import { $provideFilesystemForNode } from '../register/$provideFilesystemForNode';
|
|
4
|
+
import type { ScraperSourceHandler } from '../Scraper';
|
|
5
|
+
import { WebsiteScraper } from '../../website/WebsiteScraper';
|
|
6
|
+
import { promptbookFetch } from './promptbookFetch';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Fetches and scrapes content from a URL (SERVER-SIDE ONLY)
|
|
@@ -15,13 +15,12 @@ import { WebsiteScraper } from '../../scrapers/website/WebsiteScraper';
|
|
|
15
15
|
* 4. Returns the scraped markdown content
|
|
16
16
|
*
|
|
17
17
|
* WARNING: This function should NOT be used directly in browser environments.
|
|
18
|
-
* For browser environments,
|
|
19
|
-
* the Agents Server API endpoint at /api/scrape
|
|
18
|
+
* For browser environments, proxy the request through the Agents Server API endpoint at /api/scrape
|
|
20
19
|
*
|
|
21
20
|
* @param url The URL to fetch and scrape
|
|
22
21
|
* @returns Markdown content from the URL
|
|
23
22
|
*
|
|
24
|
-
* @private internal utility
|
|
23
|
+
* @private internal scraping utility
|
|
25
24
|
*/
|
|
26
25
|
export async function fetchUrlContent(url: string): Promise<string> {
|
|
27
26
|
try {
|
|
@@ -137,4 +136,4 @@ export async function fetchUrlContent(url: string): Promise<string> {
|
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
138
|
|
|
140
|
-
// Note: [🟢] Code for Node
|
|
139
|
+
// Note: [🟢] Code for Node fetch-and-scrape helper [fetchUrlContent](src/scrapers/_common/utils/fetchUrlContent.ts) should never be published into packages that could be imported into browser environment
|
|
@@ -4,8 +4,6 @@ import type { Converter } from '../_common/Converter';
|
|
|
4
4
|
import type { Scraper, ScraperSourceHandler } from '../_common/Scraper';
|
|
5
5
|
// TODO: [🏳🌈] Finally take pick of .json vs .ts
|
|
6
6
|
// import PipelineCollection from '../../../books/books';
|
|
7
|
-
import { Readability } from '@mozilla/readability';
|
|
8
|
-
import { JSDOM } from 'jsdom';
|
|
9
7
|
import type { Converter as ShowdownConverter } from 'showdown';
|
|
10
8
|
import { DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_VERBOSE, DEFAULT_SCRAPE_CACHE_DIRNAME } from '../../config';
|
|
11
9
|
import { EnvironmentMismatchError } from '../../errors/EnvironmentMismatchError';
|
|
@@ -13,6 +11,7 @@ import { KnowledgeScrapeError } from '../../errors/KnowledgeScrapeError';
|
|
|
13
11
|
import { UnexpectedError } from '../../errors/UnexpectedError';
|
|
14
12
|
import type { ExecutionTools } from '../../execution/ExecutionTools';
|
|
15
13
|
import type { PrepareAndScrapeOptions } from '../../prepare/PrepareAndScrapeOptions';
|
|
14
|
+
import { createLazyModuleLoader } from '../../utils/misc/createLazyModuleLoader';
|
|
16
15
|
import { MarkdownScraper } from '../markdown/MarkdownScraper';
|
|
17
16
|
import type { ScraperAndConverterMetadata } from '../_common/register/ScraperAndConverterMetadata';
|
|
18
17
|
import type { ScraperIntermediateSource } from '../_common/ScraperIntermediateSource';
|
|
@@ -20,6 +19,25 @@ import { getScraperIntermediateSource } from '../_common/utils/getScraperInterme
|
|
|
20
19
|
import { websiteScraperMetadata } from './register-metadata';
|
|
21
20
|
import { createShowdownConverter } from './utils/createShowdownConverter';
|
|
22
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Loads `jsdom` on demand
|
|
24
|
+
*
|
|
25
|
+
* Note: [🐌] `jsdom` is by far the heaviest dependency of Promptbook, loading it eagerly would slow down every single
|
|
26
|
+
* run of the `ptbk` CLI utility even when no website is scraped
|
|
27
|
+
*
|
|
28
|
+
* @private internal utility of `WebsiteScraper`
|
|
29
|
+
*/
|
|
30
|
+
const loadJsdomModule = createLazyModuleLoader(() => import('jsdom'));
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Loads `@mozilla/readability` on demand
|
|
34
|
+
*
|
|
35
|
+
* Note: [🐌] Loaded lazily to keep the startup of the `ptbk` CLI utility fast
|
|
36
|
+
*
|
|
37
|
+
* @private internal utility of `WebsiteScraper`
|
|
38
|
+
*/
|
|
39
|
+
const loadReadabilityModule = createLazyModuleLoader(() => import('@mozilla/readability'));
|
|
40
|
+
|
|
23
41
|
/**
|
|
24
42
|
* Scraper for websites
|
|
25
43
|
*
|
|
@@ -77,6 +95,8 @@ export class WebsiteScraper implements Converter, Scraper {
|
|
|
77
95
|
throw new EnvironmentMismatchError('Can not scrape websites without filesystem tools');
|
|
78
96
|
}
|
|
79
97
|
|
|
98
|
+
const [{ JSDOM }, { Readability }] = await Promise.all([loadJsdomModule(), loadReadabilityModule()]);
|
|
99
|
+
|
|
80
100
|
const jsdom = new JSDOM(await source.asText(), {
|
|
81
101
|
url: source.url,
|
|
82
102
|
});
|
|
@@ -5,6 +5,72 @@
|
|
|
5
5
|
*/
|
|
6
6
|
const MAX_RUNTIME_ACTIVITY_LENGTH = 160;
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* One safe, concrete category of a command emitted by the Codex runtime.
|
|
10
|
+
*
|
|
11
|
+
* @private internal type of agent-message runtime activity
|
|
12
|
+
*/
|
|
13
|
+
type CodexCommandActivity = {
|
|
14
|
+
readonly pattern: RegExp;
|
|
15
|
+
readonly running: string;
|
|
16
|
+
readonly completed: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Ordered command categories that can be described truthfully without showing raw commands,
|
|
21
|
+
* arguments, file names, or other private runtime details.
|
|
22
|
+
*
|
|
23
|
+
* The local runner can execute on either Unix or Windows. Keeping the variants together here
|
|
24
|
+
* ensures that equivalent shell commands yield the same concise status in the chat.
|
|
25
|
+
*
|
|
26
|
+
* @private internal constant of agent-message runtime activity
|
|
27
|
+
*/
|
|
28
|
+
const CODEX_COMMAND_ACTIVITIES: ReadonlyArray<CodexCommandActivity> = [
|
|
29
|
+
{
|
|
30
|
+
pattern:
|
|
31
|
+
/(^|\s)(npm\s+(?:run\s+)?test|pnpm\s+(?:run\s+)?test|yarn\s+test|jest|vitest|pytest)\b/u,
|
|
32
|
+
running: 'Running tests.',
|
|
33
|
+
completed: 'Finished running tests.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
pattern: /(^|\s)(npm\s+run\s+build|pnpm\s+(?:run\s+)?build|yarn\s+build|next\s+build)\b/u,
|
|
37
|
+
running: 'Building the project.',
|
|
38
|
+
completed: 'Finished building the project.',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
pattern: /(^|\s)(npm|pnpm|yarn)\s+(?:install|add)\b/u,
|
|
42
|
+
running: 'Installing dependencies.',
|
|
43
|
+
completed: 'Finished installing dependencies.',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
pattern: /(^|\s)(npm\s+(?:run\s+)?lint|pnpm\s+(?:run\s+)?lint|yarn\s+lint|eslint|prettier)\b/u,
|
|
47
|
+
running: 'Checking the implementation.',
|
|
48
|
+
completed: 'Finished checking the implementation.',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
pattern: /(^|\s)git\s+(?:status|diff|log|show)\b/u,
|
|
52
|
+
running: 'Reviewing changes.',
|
|
53
|
+
completed: 'Finished reviewing changes.',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
pattern:
|
|
57
|
+
/(^|\s)(apply_patch|set-content|add-content|out-file|new-item|copy-item|move-item|set-item)\b/u,
|
|
58
|
+
running: 'Updating relevant files.',
|
|
59
|
+
completed: 'Finished updating relevant files.',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
pattern:
|
|
63
|
+
/(^|\s)(ls|find|rg|grep|sed|cat|head|tail|get-content|get-childitem|get-item|select-string|findstr|type)\b/u,
|
|
64
|
+
running: 'Inspecting relevant files.',
|
|
65
|
+
completed: 'Finished inspecting relevant files.',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
pattern: /(^|\s)(curl|wget|invoke-webrequest)\b/u,
|
|
69
|
+
running: 'Looking up information.',
|
|
70
|
+
completed: 'Finished looking up information.',
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
|
|
8
74
|
/**
|
|
9
75
|
* Minimal shape of one coding-harness `stream-json` event relevant to progress extraction.
|
|
10
76
|
*
|
|
@@ -21,6 +87,11 @@ type RuntimeLogEvent = {
|
|
|
21
87
|
readonly text?: string;
|
|
22
88
|
}>;
|
|
23
89
|
};
|
|
90
|
+
readonly item?: {
|
|
91
|
+
readonly type?: string;
|
|
92
|
+
readonly command?: string;
|
|
93
|
+
readonly exit_code?: number | null;
|
|
94
|
+
};
|
|
24
95
|
};
|
|
25
96
|
|
|
26
97
|
/**
|
|
@@ -30,9 +101,9 @@ type RuntimeLogEvent = {
|
|
|
30
101
|
* Claude Code `--output-format stream-json`) into a live runtime log file next to the queued
|
|
31
102
|
* message. This helper extracts the most recent natural-language assistant narration so the
|
|
32
103
|
* durable chat can show what the agent is doing right now instead of a generic thinking
|
|
33
|
-
* placeholder. Only
|
|
34
|
-
*
|
|
35
|
-
*
|
|
104
|
+
* placeholder. Only concrete, safe activity is surfaced; raw tool payloads, JSON envelopes,
|
|
105
|
+
* and private reasoning are intentionally ignored. When no concrete activity is known, this
|
|
106
|
+
* resolves to `null` so the caller keeps the browser's rotating generic thinking state.
|
|
36
107
|
*
|
|
37
108
|
* @param logText - Raw runtime log content.
|
|
38
109
|
* @returns Latest human-readable activity snippet, or `null` when none can be resolved.
|
|
@@ -89,6 +160,11 @@ function parseRuntimeLogEvent(line: string): RuntimeLogEvent | null {
|
|
|
89
160
|
* @private internal helper of `resolveAgentMessageRuntimeActivity`
|
|
90
161
|
*/
|
|
91
162
|
function resolveRuntimeLogEventActivity(event: RuntimeLogEvent): string | null {
|
|
163
|
+
const codexActivity = resolveCodexRuntimeLogEventActivity(event);
|
|
164
|
+
if (codexActivity) {
|
|
165
|
+
return codexActivity;
|
|
166
|
+
}
|
|
167
|
+
|
|
92
168
|
if (event.type !== 'assistant' || !Array.isArray(event.message?.content)) {
|
|
93
169
|
return null;
|
|
94
170
|
}
|
|
@@ -103,6 +179,84 @@ function resolveRuntimeLogEventActivity(event: RuntimeLogEvent): string | null {
|
|
|
103
179
|
return assistantText.length > 0 ? assistantText : null;
|
|
104
180
|
}
|
|
105
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Resolves one short user-facing status from a structured Codex JSONL event.
|
|
184
|
+
*
|
|
185
|
+
* Codex reasoning and raw command text deliberately remain private. The event type tells us
|
|
186
|
+
* enough to report a useful action without exposing the internal trace or a command payload.
|
|
187
|
+
* Reasoning events are intentionally not a progress update: while they are the only signal,
|
|
188
|
+
* the chat retains its configured generic thinking rotation. Once a concrete action arrives,
|
|
189
|
+
* it becomes the latest user-facing status instead.
|
|
190
|
+
*
|
|
191
|
+
* @private internal helper of `resolveAgentMessageRuntimeActivity`
|
|
192
|
+
*/
|
|
193
|
+
function resolveCodexRuntimeLogEventActivity(event: RuntimeLogEvent): string | null {
|
|
194
|
+
if (!event.item || !isCodexItemEvent(event.type)) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const isCompleted = event.type === 'item.completed';
|
|
199
|
+
|
|
200
|
+
switch (event.item.type) {
|
|
201
|
+
case 'reasoning':
|
|
202
|
+
return null;
|
|
203
|
+
case 'command_execution':
|
|
204
|
+
return resolveCodexCommandActivity(event.item.command, isCompleted, event.item.exit_code);
|
|
205
|
+
case 'file_change':
|
|
206
|
+
return isCompleted ? 'Updated relevant files.' : 'Updating relevant files.';
|
|
207
|
+
case 'web_search':
|
|
208
|
+
return isCompleted ? 'Finished searching the web.' : 'Searching the web.';
|
|
209
|
+
case 'mcp_tool_call':
|
|
210
|
+
return isCompleted ? 'Finished using an integration.' : 'Using an integration.';
|
|
211
|
+
case 'plan_update':
|
|
212
|
+
return isCompleted ? 'Updated the plan.' : 'Planning the work.';
|
|
213
|
+
default:
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Returns whether one runtime event is a Codex item lifecycle event.
|
|
220
|
+
*
|
|
221
|
+
* @private internal helper of `resolveAgentMessageRuntimeActivity`
|
|
222
|
+
*/
|
|
223
|
+
function isCodexItemEvent(eventType: string | undefined): boolean {
|
|
224
|
+
return eventType === 'item.started' || eventType === 'item.updated' || eventType === 'item.completed';
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Maps one Codex command event to a concise action without revealing the command itself.
|
|
229
|
+
*
|
|
230
|
+
* @private internal helper of `resolveAgentMessageRuntimeActivity`
|
|
231
|
+
*/
|
|
232
|
+
function resolveCodexCommandActivity(
|
|
233
|
+
command: string | undefined,
|
|
234
|
+
isCompleted: boolean,
|
|
235
|
+
exitCode: number | null | undefined,
|
|
236
|
+
): string | null {
|
|
237
|
+
if (isCompleted && exitCode !== undefined && exitCode !== null && exitCode !== 0) {
|
|
238
|
+
return 'A command needs attention.';
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const activity = resolveCodexCommandActivityLabel(command);
|
|
242
|
+
if (!activity) {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return isCompleted ? activity.completed : activity.running;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Resolves the short running/completed labels for one safe command category.
|
|
251
|
+
*
|
|
252
|
+
* @private internal helper of `resolveAgentMessageRuntimeActivity`
|
|
253
|
+
*/
|
|
254
|
+
function resolveCodexCommandActivityLabel(command: string | undefined): CodexCommandActivity | null {
|
|
255
|
+
const normalizedCommand = command?.toLowerCase() || '';
|
|
256
|
+
|
|
257
|
+
return CODEX_COMMAND_ACTIVITIES.find((activity) => activity.pattern.test(normalizedCommand)) ?? null;
|
|
258
|
+
}
|
|
259
|
+
|
|
106
260
|
/**
|
|
107
261
|
* Collapses one activity string to a single trimmed line, truncated for the progress card.
|
|
108
262
|
*
|
|
@@ -6,6 +6,7 @@ import type { ResolvedAvatarRenderDefinition } from '../../avatars/renderAvatarV
|
|
|
6
6
|
import { resolveAvatarRenderDefinition } from '../../avatars/renderAvatarVisual';
|
|
7
7
|
import type { CreateCanvasForAsciiArt } from '../../avatars/renderAvatarVisualAsciiArt';
|
|
8
8
|
import { renderAvatarVisualAsciiArt } from '../../avatars/renderAvatarVisualAsciiArt';
|
|
9
|
+
import { renderAvatarVisualTerminalTextLines } from '../../avatars/renderAvatarVisualTerminalText';
|
|
9
10
|
import type { AvatarDefinition } from '../../avatars/types/AvatarDefinition';
|
|
10
11
|
import type { AvatarVisualId } from '../../avatars/types/AvatarVisualDefinition';
|
|
11
12
|
import { resolveAvatarVisualId } from '../../avatars/visuals/avatarVisualRegistry';
|
|
@@ -127,9 +128,12 @@ export type CreateTerminalAgentAvatarVisualOptions = {
|
|
|
127
128
|
readonly colorDepth?: AsciiArtColorDepth;
|
|
128
129
|
|
|
129
130
|
/**
|
|
130
|
-
* Platform-specific canvas factory used to rasterize
|
|
131
|
+
* Platform-specific canvas factory used to rasterize pixel-based visuals.
|
|
132
|
+
*
|
|
133
|
+
* Character-based visuals such as `AsciiOctopus` paint the terminal grid directly, so they
|
|
134
|
+
* render without any canvas; a pixel-based visual renders an empty frame when it is missing.
|
|
131
135
|
*/
|
|
132
|
-
readonly createCanvas
|
|
136
|
+
readonly createCanvas?: CreateCanvasForAsciiArt;
|
|
133
137
|
};
|
|
134
138
|
|
|
135
139
|
/**
|
|
@@ -251,15 +255,39 @@ function resolveTerminalAgentAvatarVisualIdFromAgentBasicInformation(
|
|
|
251
255
|
/**
|
|
252
256
|
* Renders one terminal avatar frame through the shared avatar-to-ASCII pipeline.
|
|
253
257
|
*
|
|
258
|
+
* Visuals which are made of characters themselves, for example `AsciiOctopus`, paint the terminal
|
|
259
|
+
* character grid directly, because rasterizing them into half-block ASCII art averages every glyph
|
|
260
|
+
* away and makes them indistinguishable from the other blob-shaped visuals.
|
|
261
|
+
*
|
|
254
262
|
* @private shared helper for terminal avatar rendering
|
|
255
263
|
*/
|
|
256
264
|
function renderTerminalAgentAvatarVisualFrame(
|
|
257
265
|
options: TerminalAgentAvatarVisualRenderInputs & {
|
|
258
266
|
readonly animationTimeMs: number;
|
|
259
267
|
readonly colorDepth?: AsciiArtColorDepth;
|
|
260
|
-
readonly createCanvas
|
|
268
|
+
readonly createCanvas?: CreateCanvasForAsciiArt;
|
|
261
269
|
},
|
|
262
270
|
): ReadonlyArray<string> {
|
|
271
|
+
const terminalTextLines = renderAvatarVisualTerminalTextLines({
|
|
272
|
+
avatarDefinition: options.avatarDefinition,
|
|
273
|
+
visualId: options.avatarVisualId,
|
|
274
|
+
surface: 'transparent',
|
|
275
|
+
columns: TERMINAL_AGENT_AVATAR_VISUAL_COLUMNS,
|
|
276
|
+
rows: TERMINAL_AGENT_AVATAR_VISUAL_ROWS,
|
|
277
|
+
colorDepth: options.colorDepth,
|
|
278
|
+
timeMs: options.animationTimeMs,
|
|
279
|
+
resolvedAvatarRenderDefinition: options.resolvedAvatarRenderDefinition,
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
if (terminalTextLines !== null) {
|
|
283
|
+
return terminalTextLines;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (options.createCanvas === undefined) {
|
|
287
|
+
// Note: A pixel-based visual cannot be rasterized without a canvas, so the caller keeps its default banner
|
|
288
|
+
return [];
|
|
289
|
+
}
|
|
290
|
+
|
|
263
291
|
return renderAvatarVisualAsciiArt({
|
|
264
292
|
avatarDefinition: options.avatarDefinition,
|
|
265
293
|
visualId: options.avatarVisualId,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { spaceTrim } from 'spacetrim';
|
|
2
2
|
import { UnexpectedError } from '../../errors/UnexpectedError';
|
|
3
|
+
import type { AnsiRgbColor } from './createAnsiColorCode';
|
|
4
|
+
import { ANSI_RESET, createAnsiBackgroundColorCode, createAnsiForegroundColorCode } from './createAnsiColorCode';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Color depth of the ANSI escape codes emitted by the ASCII-art conversion.
|
|
@@ -75,11 +77,11 @@ export type ConvertImageDataToAsciiArtOptions = {
|
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
/**
|
|
78
|
-
* Default alpha channel value below which a
|
|
80
|
+
* Default alpha channel value below which a cell is rendered as terminal background.
|
|
79
81
|
*
|
|
80
82
|
* @private within the repository
|
|
81
83
|
*/
|
|
82
|
-
const DEFAULT_ALPHA_THRESHOLD = 32;
|
|
84
|
+
export const DEFAULT_ALPHA_THRESHOLD = 32;
|
|
83
85
|
|
|
84
86
|
/**
|
|
85
87
|
* Number of channels per pixel in an RGBA buffer.
|
|
@@ -102,57 +104,12 @@ const UPPER_HALF_BLOCK = '▀'; // <- ▀
|
|
|
102
104
|
*/
|
|
103
105
|
const LOWER_HALF_BLOCK = '▄'; // <- ▄
|
|
104
106
|
|
|
105
|
-
/**
|
|
106
|
-
* ANSI escape sequence that resets all colors and attributes.
|
|
107
|
-
*
|
|
108
|
-
* @private within the repository
|
|
109
|
-
*/
|
|
110
|
-
const ANSI_RESET = '\u001b[0m';
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Maximum spread between RGB channels for a color to be treated as (nearly) achromatic gray.
|
|
114
|
-
*
|
|
115
|
-
* @private within the repository
|
|
116
|
-
*/
|
|
117
|
-
const ANSI_256_ACHROMATIC_CHANNEL_SPREAD = 12;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Gray level above which an achromatic color maps to the pure white color-cube entry.
|
|
121
|
-
*
|
|
122
|
-
* @private within the repository
|
|
123
|
-
*/
|
|
124
|
-
const ANSI_256_NEAR_WHITE_GRAY_LEVEL = 246;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Index of pure white inside the 6×6×6 ANSI color cube.
|
|
128
|
-
*
|
|
129
|
-
* @private within the repository
|
|
130
|
-
*/
|
|
131
|
-
const ANSI_256_WHITE_INDEX = 231;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Brightness of the lightest entry of the ANSI 256 grayscale ramp.
|
|
135
|
-
*
|
|
136
|
-
* @private within the repository
|
|
137
|
-
*/
|
|
138
|
-
const ANSI_256_GRAYSCALE_RAMP_MAX_LEVEL = 238;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Number of grayscale ramp steps above its first entry (ANSI indexes 232-255).
|
|
142
|
-
*
|
|
143
|
-
* @private within the repository
|
|
144
|
-
*/
|
|
145
|
-
const ANSI_256_GRAYSCALE_RAMP_INDEX_SPAN = 23;
|
|
146
|
-
|
|
147
107
|
/**
|
|
148
108
|
* Area-averaged color of one half of a character cell.
|
|
149
109
|
*
|
|
150
110
|
* @private helper of `convertImageDataToAsciiArt`
|
|
151
111
|
*/
|
|
152
|
-
type HalfCellColor = {
|
|
153
|
-
readonly red: number;
|
|
154
|
-
readonly green: number;
|
|
155
|
-
readonly blue: number;
|
|
112
|
+
type HalfCellColor = AnsiRgbColor & {
|
|
156
113
|
readonly isOpaque: boolean;
|
|
157
114
|
};
|
|
158
115
|
|
|
@@ -231,15 +188,15 @@ export function convertImageDataToAsciiArt(options: ConvertImageDataToAsciiArtOp
|
|
|
231
188
|
|
|
232
189
|
if (topHalfColor.isOpaque && bottomHalfColor.isOpaque) {
|
|
233
190
|
character = UPPER_HALF_BLOCK;
|
|
234
|
-
nextForegroundCode =
|
|
235
|
-
nextBackgroundCode =
|
|
191
|
+
nextForegroundCode = createAnsiForegroundColorCode(topHalfColor, colorDepth);
|
|
192
|
+
nextBackgroundCode = createAnsiBackgroundColorCode(bottomHalfColor, colorDepth);
|
|
236
193
|
} else if (topHalfColor.isOpaque) {
|
|
237
194
|
character = UPPER_HALF_BLOCK;
|
|
238
|
-
nextForegroundCode =
|
|
195
|
+
nextForegroundCode = createAnsiForegroundColorCode(topHalfColor, colorDepth);
|
|
239
196
|
nextBackgroundCode = undefined;
|
|
240
197
|
} else if (bottomHalfColor.isOpaque) {
|
|
241
198
|
character = LOWER_HALF_BLOCK;
|
|
242
|
-
nextForegroundCode =
|
|
199
|
+
nextForegroundCode = createAnsiForegroundColorCode(bottomHalfColor, colorDepth);
|
|
243
200
|
nextBackgroundCode = undefined;
|
|
244
201
|
} else {
|
|
245
202
|
character = ' ';
|
|
@@ -337,60 +294,3 @@ function computeHalfCellColor(
|
|
|
337
294
|
isOpaque: true,
|
|
338
295
|
};
|
|
339
296
|
}
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Creates the ANSI escape code that sets the foreground color of following characters.
|
|
343
|
-
*
|
|
344
|
-
* @private helper of `convertImageDataToAsciiArt`
|
|
345
|
-
*/
|
|
346
|
-
function createForegroundColorCode(color: HalfCellColor, colorDepth: AsciiArtColorDepth): string {
|
|
347
|
-
if (colorDepth === 'TRUE_COLOR') {
|
|
348
|
-
return `\u001b[38;2;${color.red};${color.green};${color.blue}m`;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
return `\u001b[38;5;${mapColorToAnsi256(color)}m`;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Creates the ANSI escape code that sets the background color of following characters.
|
|
356
|
-
*
|
|
357
|
-
* @private helper of `convertImageDataToAsciiArt`
|
|
358
|
-
*/
|
|
359
|
-
function createBackgroundColorCode(color: HalfCellColor, colorDepth: AsciiArtColorDepth): string {
|
|
360
|
-
if (colorDepth === 'TRUE_COLOR') {
|
|
361
|
-
return `\u001b[48;2;${color.red};${color.green};${color.blue}m`;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
return `\u001b[48;5;${mapColorToAnsi256(color)}m`;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* Maps a 24-bit color onto the closest entry of the 256-color ANSI palette.
|
|
369
|
-
*
|
|
370
|
-
* Uses the 6×6×6 color cube (entries 16-231) and the grayscale ramp (entries 232-255).
|
|
371
|
-
*
|
|
372
|
-
* @private helper of `convertImageDataToAsciiArt`
|
|
373
|
-
*/
|
|
374
|
-
function mapColorToAnsi256(color: HalfCellColor): number {
|
|
375
|
-
const { red, green, blue } = color;
|
|
376
|
-
|
|
377
|
-
// Note: Prefer the finer grayscale ramp when the color is (nearly) achromatic
|
|
378
|
-
const maxChannel = Math.max(red, green, blue);
|
|
379
|
-
const minChannel = Math.min(red, green, blue);
|
|
380
|
-
if (maxChannel - minChannel < ANSI_256_ACHROMATIC_CHANNEL_SPREAD) {
|
|
381
|
-
const gray = Math.round((red + green + blue) / 3);
|
|
382
|
-
if (gray < 4) {
|
|
383
|
-
return 16; // <- Note: Pure black lives in the color cube
|
|
384
|
-
}
|
|
385
|
-
if (gray > ANSI_256_NEAR_WHITE_GRAY_LEVEL) {
|
|
386
|
-
return ANSI_256_WHITE_INDEX; // <- Note: Pure white lives in the color cube
|
|
387
|
-
}
|
|
388
|
-
return 232 + Math.round(((gray - 8) / ANSI_256_GRAYSCALE_RAMP_MAX_LEVEL) * ANSI_256_GRAYSCALE_RAMP_INDEX_SPAN);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
const redIndex = Math.round((red / 255) * 5);
|
|
392
|
-
const greenIndex = Math.round((green / 255) * 5);
|
|
393
|
-
const blueIndex = Math.round((blue / 255) * 5);
|
|
394
|
-
|
|
395
|
-
return 16 + 36 * redIndex + 6 * greenIndex + blueIndex;
|
|
396
|
-
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { AsciiArtColorDepth } from './convertImageDataToAsciiArt';
|
|
2
|
+
|
|
3
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* ANSI escape sequence that resets all colors and attributes.
|
|
7
|
+
*
|
|
8
|
+
* @private within the repository
|
|
9
|
+
*/
|
|
10
|
+
export const ANSI_RESET = '\u001b[0m';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Maximum spread between RGB channels for a color to be treated as (nearly) achromatic gray.
|
|
14
|
+
*
|
|
15
|
+
* @private within the repository
|
|
16
|
+
*/
|
|
17
|
+
const ANSI_256_ACHROMATIC_CHANNEL_SPREAD = 12;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Gray level above which an achromatic color maps to the pure white color-cube entry.
|
|
21
|
+
*
|
|
22
|
+
* @private within the repository
|
|
23
|
+
*/
|
|
24
|
+
const ANSI_256_NEAR_WHITE_GRAY_LEVEL = 246;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Index of pure white inside the 6×6×6 ANSI color cube.
|
|
28
|
+
*
|
|
29
|
+
* @private within the repository
|
|
30
|
+
*/
|
|
31
|
+
const ANSI_256_WHITE_INDEX = 231;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Brightness of the lightest entry of the ANSI 256 grayscale ramp.
|
|
35
|
+
*
|
|
36
|
+
* @private within the repository
|
|
37
|
+
*/
|
|
38
|
+
const ANSI_256_GRAYSCALE_RAMP_MAX_LEVEL = 238;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Number of grayscale ramp steps above its first entry (ANSI indexes 232-255).
|
|
42
|
+
*
|
|
43
|
+
* @private within the repository
|
|
44
|
+
*/
|
|
45
|
+
const ANSI_256_GRAYSCALE_RAMP_INDEX_SPAN = 23;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* One opaque 24-bit color which should be written into an ANSI escape sequence.
|
|
49
|
+
*
|
|
50
|
+
* @private within the repository
|
|
51
|
+
*/
|
|
52
|
+
export type AnsiRgbColor = {
|
|
53
|
+
/**
|
|
54
|
+
* Red channel in the range `[0, 255]`.
|
|
55
|
+
*/
|
|
56
|
+
readonly red: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Green channel in the range `[0, 255]`.
|
|
60
|
+
*/
|
|
61
|
+
readonly green: number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Blue channel in the range `[0, 255]`.
|
|
65
|
+
*/
|
|
66
|
+
readonly blue: number;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Creates the ANSI escape code that sets the foreground color of following characters.
|
|
71
|
+
*
|
|
72
|
+
* @param color Color painted onto the characters.
|
|
73
|
+
* @param colorDepth Color depth supported by the target terminal.
|
|
74
|
+
* @returns ANSI escape sequence.
|
|
75
|
+
*
|
|
76
|
+
* @private within the repository
|
|
77
|
+
*/
|
|
78
|
+
export function createAnsiForegroundColorCode(color: AnsiRgbColor, colorDepth: AsciiArtColorDepth): string {
|
|
79
|
+
if (colorDepth === 'TRUE_COLOR') {
|
|
80
|
+
return `\u001b[38;2;${color.red};${color.green};${color.blue}m`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return `\u001b[38;5;${mapColorToAnsi256(color)}m`;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Creates the ANSI escape code that sets the background color of following characters.
|
|
88
|
+
*
|
|
89
|
+
* @param color Color painted behind the characters.
|
|
90
|
+
* @param colorDepth Color depth supported by the target terminal.
|
|
91
|
+
* @returns ANSI escape sequence.
|
|
92
|
+
*
|
|
93
|
+
* @private within the repository
|
|
94
|
+
*/
|
|
95
|
+
export function createAnsiBackgroundColorCode(color: AnsiRgbColor, colorDepth: AsciiArtColorDepth): string {
|
|
96
|
+
if (colorDepth === 'TRUE_COLOR') {
|
|
97
|
+
return `\u001b[48;2;${color.red};${color.green};${color.blue}m`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return `\u001b[48;5;${mapColorToAnsi256(color)}m`;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Maps a 24-bit color onto the closest entry of the 256-color ANSI palette.
|
|
105
|
+
*
|
|
106
|
+
* Uses the 6×6×6 color cube (entries 16-231) and the grayscale ramp (entries 232-255).
|
|
107
|
+
*
|
|
108
|
+
* @private helper of `createAnsiForegroundColorCode` and `createAnsiBackgroundColorCode`
|
|
109
|
+
*/
|
|
110
|
+
function mapColorToAnsi256(color: AnsiRgbColor): number {
|
|
111
|
+
const { red, green, blue } = color;
|
|
112
|
+
|
|
113
|
+
// Note: Prefer the finer grayscale ramp when the color is (nearly) achromatic
|
|
114
|
+
const maxChannel = Math.max(red, green, blue);
|
|
115
|
+
const minChannel = Math.min(red, green, blue);
|
|
116
|
+
if (maxChannel - minChannel < ANSI_256_ACHROMATIC_CHANNEL_SPREAD) {
|
|
117
|
+
const gray = Math.round((red + green + blue) / 3);
|
|
118
|
+
if (gray < 4) {
|
|
119
|
+
return 16; // <- Note: Pure black lives in the color cube
|
|
120
|
+
}
|
|
121
|
+
if (gray > ANSI_256_NEAR_WHITE_GRAY_LEVEL) {
|
|
122
|
+
return ANSI_256_WHITE_INDEX; // <- Note: Pure white lives in the color cube
|
|
123
|
+
}
|
|
124
|
+
return 232 + Math.round(((gray - 8) / ANSI_256_GRAYSCALE_RAMP_MAX_LEVEL) * ANSI_256_GRAYSCALE_RAMP_INDEX_SPAN);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const redIndex = Math.round((red / 255) * 5);
|
|
128
|
+
const greenIndex = Math.round((green / 255) * 5);
|
|
129
|
+
const blueIndex = Math.round((blue / 255) * 5);
|
|
130
|
+
|
|
131
|
+
return 16 + 36 * redIndex + 6 * greenIndex + blueIndex;
|
|
132
|
+
}
|