@promptbook/javascript 0.113.0-8 → 0.114.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/esm/index.es.js +122 -122
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/components.index.d.ts +8 -0
- package/esm/src/_packages/core.index.d.ts +4 -0
- package/esm/src/_packages/types.index.d.ts +14 -2
- package/esm/src/avatars/renderAvatarVisualAsciiArt.d.ts +24 -1
- package/esm/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +1 -1
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +7 -0
- package/esm/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.d.ts +1 -1
- package/esm/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +5 -13
- package/esm/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +195 -0
- package/esm/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +2 -1
- package/esm/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +43 -1
- package/esm/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.d.ts +10 -0
- package/esm/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.d.ts +10 -0
- package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +33 -0
- package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualDictionary.d.ts +15 -0
- package/esm/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +10 -0
- package/esm/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +30 -0
- package/esm/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +2 -1
- package/esm/src/book-2.0/book-language-documentation/toStableAnchorId.d.ts +12 -0
- package/esm/src/book-3.0/AgentMessageRunReport.d.ts +78 -0
- package/esm/src/book-3.0/agentFolderPaths.d.ts +9 -0
- package/esm/src/book-3.0/codexLoginMethod.d.ts +38 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +1 -1
- package/esm/src/book-components/BookEditor/BookEditorSyntaxTokenStyles.d.ts +39 -0
- package/esm/src/book-components/BookEditor/createBookSourceHighlightStyles.d.ts +12 -0
- package/esm/src/book-components/BookEditor/highlightBookSourceToHtml.d.ts +20 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.d.ts +120 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.d.ts +6 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.d.ts +26 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.d.ts +23 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.d.ts +21 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.d.ts +12 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.d.ts +27 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.d.ts +12 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +5 -58
- package/esm/src/book-components/Chat/Chat/ChatCitationModal.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatCitationModal.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatFeedbackStar.d.ts +37 -0
- package/esm/src/book-components/Chat/Chat/ChatImageAttachmentModal.d.ts +25 -0
- package/esm/src/book-components/Chat/Chat/ChatInputArea.d.ts +3 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageAttachments.d.ts +27 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +21 -0
- package/esm/src/book-components/Chat/Chat/ChatRatingModal.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +25 -2
- package/esm/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.d.ts +39 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreviewToolbar.d.ts +71 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewInputEvent.d.ts +72 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.d.ts +64 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.test.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewSessionState.d.ts +14 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/PagePreviewViewport.d.ts +37 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/createPagePreviewSessionId.d.ts +20 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.d.ts +13 -0
- package/esm/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.test.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/resolveChatRatingMessageKey.d.ts +8 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaComposer.d.ts +12 -0
- package/esm/src/book-components/Chat/Chat/useChatInputAreaComposer.draftMessage.test.d.ts +2 -0
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -0
- package/esm/src/book-components/Chat/SourceChip/SourceChip.test.d.ts +2 -0
- package/esm/src/book-components/Chat/hooks/useResolvedCitationLabel.test.d.ts +2 -0
- package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +1 -1
- package/esm/src/book-components/Chat/utils/parseMessageButtons.d.ts +16 -2
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +78 -0
- package/esm/src/book-components/Chat/utils/resolveCitationSourceDisplay.d.ts +149 -0
- package/esm/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +9 -0
- package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -2
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.d.ts +10 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.d.ts +10 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.d.ts +18 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +28 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.d.ts +19 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.d.ts +11 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.d.ts +8 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.d.ts +12 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.d.ts +11 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +8 -109
- package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +1 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts +17 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.d.ts +30 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts +19 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts +37 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts +13 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts +24 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +13 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts +18 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +20 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +15 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.d.ts +8 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts +16 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +3 -30
- package/esm/src/cli/cli-commands/coder/add.d.ts +36 -0
- package/esm/src/cli/cli-commands/coder/add.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +24 -0
- package/esm/src/cli/cli-commands/coder.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/createNonNegativeIntegerOptionParser.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +13 -0
- package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +13 -0
- package/esm/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +40 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +35 -0
- package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +11 -0
- package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
- package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +1 -1
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.d.ts +18 -0
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.test.d.ts +1 -0
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
- package/esm/src/commitments/META/META.d.ts +4 -2
- package/esm/src/commitments/META_AVATAR/META_AVATAR.d.ts +9 -4
- package/esm/src/commitments/META_THINKING_MESSAGE/META_THINKING_MESSAGE.d.ts +26 -0
- package/esm/src/commitments/index.d.ts +2 -1
- package/esm/src/conversion/validation/validatePipeline/createPipelineValidationContext.d.ts +16 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineMetadata.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineParameters.d.ts +7 -0
- package/esm/src/conversion/validation/validatePipeline/validatePipelineTasks.d.ts +7 -0
- package/esm/src/execution/utils/formatUsagePrice.d.ts +12 -0
- package/esm/src/execution/utils/formatUsagePrice.test.d.ts +1 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.d.ts +46 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.d.ts +11 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.d.ts +14 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.d.ts +9 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.d.ts +7 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.d.ts +8 -0
- package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/esm/src/utils/agent-message-runtime/agentMessageRuntimePaths.d.ts +24 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +16 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.test.d.ts +1 -0
- package/esm/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -2
- package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +104 -0
- package/esm/src/utils/agents/terminalAgentAvatarVisual.test.d.ts +1 -0
- package/esm/src/utils/color/Color.d.ts +1 -1
- package/esm/src/utils/html/escapeHtml.d.ts +9 -0
- package/esm/src/utils/markdown/shiftMarkdownHeadingLevels.d.ts +15 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +122 -122
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/components.index.d.ts +8 -0
- package/umd/src/_packages/core.index.d.ts +4 -0
- package/umd/src/_packages/types.index.d.ts +14 -2
- package/umd/src/avatars/renderAvatarVisualAsciiArt.d.ts +24 -1
- package/umd/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +1 -1
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +7 -0
- package/umd/src/book-2.0/agent-source/parseAgentSource/ParsedAgentProfile.d.ts +1 -1
- package/umd/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +5 -13
- package/umd/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +195 -0
- package/umd/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +2 -1
- package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +43 -1
- package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.test.d.ts +1 -0
- package/umd/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.d.ts +10 -0
- package/umd/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.d.ts +10 -0
- package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +33 -0
- package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualDictionary.d.ts +15 -0
- package/umd/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +10 -0
- package/umd/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +30 -0
- package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +2 -1
- package/umd/src/book-2.0/book-language-documentation/toStableAnchorId.d.ts +12 -0
- package/umd/src/book-3.0/AgentMessageRunReport.d.ts +78 -0
- package/umd/src/book-3.0/AgentMessageRunReport.test.d.ts +1 -0
- package/umd/src/book-3.0/agentFolderPaths.d.ts +9 -0
- package/umd/src/book-3.0/codexLoginMethod.d.ts +38 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +1 -1
- package/umd/src/book-components/BookEditor/BookEditorSyntaxTokenStyles.d.ts +39 -0
- package/umd/src/book-components/BookEditor/createBookSourceHighlightStyles.d.ts +12 -0
- package/umd/src/book-components/BookEditor/highlightBookSourceToHtml.d.ts +20 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.d.ts +120 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.d.ts +6 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.d.ts +26 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.d.ts +23 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.d.ts +21 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.d.ts +12 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.d.ts +27 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.d.ts +12 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +5 -58
- package/umd/src/book-components/Chat/Chat/ChatCitationModal.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatCitationModal.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatFeedbackStar.d.ts +37 -0
- package/umd/src/book-components/Chat/Chat/ChatImageAttachmentModal.d.ts +25 -0
- package/umd/src/book-components/Chat/Chat/ChatInputArea.d.ts +3 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageAttachments.d.ts +27 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +21 -0
- package/umd/src/book-components/Chat/Chat/ChatRatingModal.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +25 -2
- package/umd/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.d.ts +39 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreview.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/LiveBrowserPreviewToolbar.d.ts +71 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewInputEvent.d.ts +72 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.d.ts +64 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewInputQueue.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewSessionState.d.ts +14 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/PagePreviewViewport.d.ts +37 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/createPagePreviewSessionId.d.ts +20 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.d.ts +13 -0
- package/umd/src/book-components/Chat/Chat/pagePreview/normalizePagePreviewInputEvent.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/resolveChatRatingMessageKey.d.ts +8 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaComposer.d.ts +12 -0
- package/umd/src/book-components/Chat/Chat/useChatInputAreaComposer.draftMessage.test.d.ts +2 -0
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -0
- package/umd/src/book-components/Chat/SourceChip/SourceChip.test.d.ts +2 -0
- package/umd/src/book-components/Chat/hooks/useResolvedCitationLabel.test.d.ts +2 -0
- package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +1 -1
- package/umd/src/book-components/Chat/utils/parseMessageButtons.d.ts +16 -2
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +78 -0
- package/umd/src/book-components/Chat/utils/resolveCitationSourceDisplay.d.ts +149 -0
- package/umd/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +9 -0
- package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -2
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.d.ts +10 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.d.ts +10 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.d.ts +18 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +28 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.d.ts +19 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.d.ts +11 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.d.ts +8 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.d.ts +12 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.d.ts +11 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +8 -109
- package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +1 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts +17 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.d.ts +30 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts +19 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts +37 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts +13 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts +24 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +13 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts +18 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +20 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +15 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.d.ts +8 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts +16 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +3 -30
- package/umd/src/cli/cli-commands/coder/add.d.ts +36 -0
- package/umd/src/cli/cli-commands/coder/add.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +24 -0
- package/umd/src/cli/cli-commands/coder.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/createNonNegativeIntegerOptionParser.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +13 -0
- package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +13 -0
- package/umd/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +40 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +35 -0
- package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +11 -0
- package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.d.ts +7 -0
- package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
- package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +1 -1
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.d.ts +18 -0
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/buildAgentNameOrPermanentIdFilter.test.d.ts +1 -0
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
- package/umd/src/commitments/META/META.d.ts +4 -2
- package/umd/src/commitments/META_AVATAR/META_AVATAR.d.ts +9 -4
- package/umd/src/commitments/META_THINKING_MESSAGE/META_THINKING_MESSAGE.d.ts +26 -0
- package/umd/src/commitments/index.d.ts +2 -1
- package/umd/src/conversion/validation/validatePipeline/createPipelineValidationContext.d.ts +16 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineMetadata.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineParameters.d.ts +7 -0
- package/umd/src/conversion/validation/validatePipeline/validatePipelineTasks.d.ts +7 -0
- package/umd/src/execution/utils/formatUsagePrice.d.ts +12 -0
- package/umd/src/execution/utils/formatUsagePrice.test.d.ts +1 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.d.ts +46 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.d.ts +11 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.d.ts +14 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.d.ts +9 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.d.ts +7 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.d.ts +8 -0
- package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
- package/umd/src/utils/agent-message-runtime/agentMessageRuntimePaths.d.ts +24 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +16 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.test.d.ts +1 -0
- package/umd/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -2
- package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +104 -0
- package/umd/src/utils/agents/terminalAgentAvatarVisual.test.d.ts +1 -0
- package/umd/src/utils/color/Color.d.ts +1 -1
- package/umd/src/utils/html/escapeHtml.d.ts +9 -0
- package/umd/src/utils/markdown/shiftMarkdownHeadingLevels.d.ts +15 -0
- package/umd/src/version.d.ts +1 -1
- package/esm/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +0 -25
- package/esm/src/book-components/_common/react-utils/escapeHtml.d.ts +0 -6
- package/umd/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +0 -25
- package/umd/src/book-components/_common/react-utils/escapeHtml.d.ts +0 -6
- /package/esm/src/{executables/browsers/locateInternetExplorer.test.d.ts → book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.test.d.ts} +0 -0
- /package/{umd/src/executables/browsers/locateInternetExplorer.test.d.ts → esm/src/book-3.0/AgentMessageRunReport.test.d.ts} +0 -0
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { number_port } from '../../../../types/number_positive';
|
|
3
|
+
/**
|
|
4
|
+
* Subprocess environment carrying the explicit local worker credential.
|
|
5
|
+
*
|
|
6
|
+
* @private internal type of `startAgentsServer`
|
|
7
|
+
*/
|
|
8
|
+
export type AgentsServerChildEnvironment = NodeJS.ProcessEnv & {
|
|
9
|
+
readonly PTBK_AGENTS_SERVER_URL: string;
|
|
10
|
+
readonly PTBK_AGENTS_SERVER_USER_CHAT_WORKER_TOKEN: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Creates the subprocess environment for Next and its internal local runner bridge.
|
|
14
|
+
*
|
|
15
|
+
* @private internal utility of `startAgentsServer`
|
|
16
|
+
*/
|
|
17
|
+
export declare function createAgentsServerChildEnvironment(port: number_port, agentRootPath: string): AgentsServerChildEnvironment;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { type WriteStream } from 'fs';
|
|
3
|
+
import type { AgentsServerRuntimePaths } from './AgentsServerRuntimePaths';
|
|
4
|
+
/**
|
|
5
|
+
* Logger handles kept open for the foreground Agents Server lifetime.
|
|
6
|
+
*
|
|
7
|
+
* @private internal type of `startAgentsServer`
|
|
8
|
+
*/
|
|
9
|
+
export type AgentsServerLogStreams = {
|
|
10
|
+
readonly next: WriteStream;
|
|
11
|
+
readonly runner: WriteStream;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Creates file streams for service output persisted below `./logs`.
|
|
15
|
+
*
|
|
16
|
+
* @private internal utility of `startAgentsServer`
|
|
17
|
+
*/
|
|
18
|
+
export declare function createAgentsServerLogStreams(runtimePaths: AgentsServerRuntimePaths): AgentsServerLogStreams;
|
|
19
|
+
/**
|
|
20
|
+
* Closes all foreground service log streams.
|
|
21
|
+
*
|
|
22
|
+
* @private internal utility of `startAgentsServer`
|
|
23
|
+
*/
|
|
24
|
+
export declare function closeAgentsServerLogStreams(logStreams: AgentsServerLogStreams): void;
|
|
25
|
+
/**
|
|
26
|
+
* Appends one timestamped runner lifecycle event into its persistent log file.
|
|
27
|
+
*
|
|
28
|
+
* @private internal utility of `startAgentsServer`
|
|
29
|
+
*/
|
|
30
|
+
export declare function logRunnerEvent(logStream: WriteStream, event: string): void;
|
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Captures foreground file locations for one Agents Server launch.
|
|
3
|
+
*
|
|
4
|
+
* @private internal type of `startAgentsServer`
|
|
5
|
+
*/
|
|
6
|
+
export type AgentsServerRuntimePaths = {
|
|
7
|
+
readonly launchWorkingDirectory: string;
|
|
8
|
+
readonly appPath: string;
|
|
9
|
+
readonly agentRootPath: string;
|
|
10
|
+
readonly logDirectoryPath: string;
|
|
11
|
+
readonly nextLogPath: string;
|
|
12
|
+
readonly runnerLogPath: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Resolves local app, agent-root, and log paths for one foreground launch.
|
|
16
|
+
*
|
|
17
|
+
* @private internal utility of `startAgentsServer`
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveAgentsServerRuntimePaths(): Promise<AgentsServerRuntimePaths>;
|
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { CoderRunUiHandle } from '../../../../../scripts/run-codex-prompts/ui/renderCoderRunUi';
|
|
3
|
+
/**
|
|
4
|
+
* Mutable supervisor state shared with child-process and watcher callbacks.
|
|
5
|
+
*
|
|
6
|
+
* @private internal type of `startAgentsServer`
|
|
7
|
+
*/
|
|
8
|
+
export type AgentsServerSupervisorState = {
|
|
9
|
+
isContinuing: boolean;
|
|
10
|
+
uiHandle?: CoderRunUiHandle;
|
|
11
|
+
lastUserChatJobWorkerError?: {
|
|
12
|
+
message: string;
|
|
13
|
+
repeatCount: number;
|
|
14
|
+
};
|
|
15
|
+
nextExit?: {
|
|
16
|
+
code: number | null;
|
|
17
|
+
signal: NodeJS.Signals | null;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Adds one Next or worker output line to the rich terminal UI when it is active.
|
|
22
|
+
*
|
|
23
|
+
* @private internal utility of `startAgentsServer`
|
|
24
|
+
*/
|
|
25
|
+
export declare function addUiOutput(state: AgentsServerSupervisorState, output: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Adds one service error line to the rich terminal UI when it is active.
|
|
28
|
+
*
|
|
29
|
+
* @private internal utility of `startAgentsServer`
|
|
30
|
+
*/
|
|
31
|
+
export declare function addUiError(state: AgentsServerSupervisorState, error: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Throws when the server child stopped while the watcher was still expected to be foreground work.
|
|
34
|
+
*
|
|
35
|
+
* @private internal utility of `startAgentsServer`
|
|
36
|
+
*/
|
|
37
|
+
export declare function assertNextServerStillRunning(state: AgentsServerSupervisorState): void;
|
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PreparedAgentsServerRuntime } from '../buildAgentsServer/PreparedAgentsServerRuntime';
|
|
2
|
+
import type { AgentsServerChildEnvironment } from './AgentsServerChildEnvironment';
|
|
3
|
+
import type { AgentsServerRuntimePaths } from './AgentsServerRuntimePaths';
|
|
4
|
+
/**
|
|
5
|
+
* Prepared Next runtime and child environment used by one foreground launch.
|
|
6
|
+
*
|
|
7
|
+
* @private internal type of `startAgentsServer`
|
|
8
|
+
*/
|
|
9
|
+
export type PreparedAgentsServerLaunch = {
|
|
10
|
+
readonly runtimeArtifacts: PreparedAgentsServerRuntime;
|
|
11
|
+
readonly runtimeChildEnvironment: AgentsServerChildEnvironment;
|
|
12
|
+
readonly runtimePaths: AgentsServerRuntimePaths;
|
|
13
|
+
};
|
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { number_port } from '../../../../types/number_positive';
|
|
2
|
+
import type { ThinkingLevel } from '../../coder/ThinkingLevel';
|
|
3
|
+
import type { PromptRunnerHarnessName } from '../../common/promptRunnerCliOptions';
|
|
4
|
+
/**
|
|
5
|
+
* Next runtime mode supported by the local Agents Server foreground launcher.
|
|
6
|
+
*
|
|
7
|
+
* @private internal type of `startAgentsServer`
|
|
8
|
+
*/
|
|
9
|
+
export type AgentsServerNextRuntimeMode = 'start' | 'dev';
|
|
10
|
+
/**
|
|
11
|
+
* Options required to start the foreground Agents Server service group.
|
|
12
|
+
*
|
|
13
|
+
* @private internal type of `startAgentsServer`
|
|
14
|
+
*/
|
|
15
|
+
export type StartAgentsServerOptions = {
|
|
16
|
+
readonly port: number_port;
|
|
17
|
+
readonly agentName: PromptRunnerHarnessName;
|
|
18
|
+
readonly model?: string;
|
|
19
|
+
readonly noUi: boolean;
|
|
20
|
+
readonly thinkingLevel?: ThinkingLevel;
|
|
21
|
+
readonly allowCredits: boolean;
|
|
22
|
+
readonly nextRuntimeMode: AgentsServerNextRuntimeMode;
|
|
23
|
+
readonly isBuildForced: boolean;
|
|
24
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a foreground failure message for one internal Agents Server route.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility of `startAgentsServer`
|
|
5
|
+
*/
|
|
6
|
+
export declare function createInternalRouteErrorMessage(routeLabel: string, response: Response, details: string | null): string;
|
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AgentRunOptions } from '../../../../../scripts/run-agent-messages/AgentRunOptions';
|
|
2
|
+
import type { LocalAgentRunnerLimits } from './LocalAgentRunnerLimits';
|
|
3
|
+
import type { StartAgentsServerOptions } from './StartAgentsServerOptions';
|
|
4
|
+
/**
|
|
5
|
+
* Creates local no-git agent runner options for folders managed by the Agents Server database.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `startAgentsServer`
|
|
8
|
+
*/
|
|
9
|
+
export declare function createLocalAgentRunOptions(options: StartAgentsServerOptions, localAgentRunnerLimits: LocalAgentRunnerLimits): AgentRunOptions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { WriteStream } from 'fs';
|
|
3
|
+
import type { AgentsServerSupervisorState } from './AgentsServerSupervisorState';
|
|
4
|
+
/**
|
|
5
|
+
* Persists one child output chunk and forwards readable lines into UI or plain output.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `startAgentsServer`
|
|
8
|
+
*/
|
|
9
|
+
export declare function forwardChildOutput(chunk: string, options: {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly logStream: WriteStream;
|
|
12
|
+
readonly state: AgentsServerSupervisorState;
|
|
13
|
+
}): void;
|
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AgentsServerChildEnvironment } from './AgentsServerChildEnvironment';
|
|
2
|
+
import type { AgentsServerLogStreams } from './AgentsServerLogStreams';
|
|
3
|
+
import type { AgentsServerRuntimePaths } from './AgentsServerRuntimePaths';
|
|
4
|
+
import type { AgentsServerSupervisorState } from './AgentsServerSupervisorState';
|
|
5
|
+
import type { PreparedAgentsServerLaunch } from './PreparedAgentsServerLaunch';
|
|
6
|
+
import type { StartAgentsServerOptions } from './StartAgentsServerOptions';
|
|
7
|
+
/**
|
|
8
|
+
* Prepares the shared Next runtime for either production start or hot-reloading development mode.
|
|
9
|
+
*
|
|
10
|
+
* @private internal utility of `startAgentsServer`
|
|
11
|
+
*/
|
|
12
|
+
export declare function prepareAgentsServerLaunch(options: {
|
|
13
|
+
readonly childEnvironment: AgentsServerChildEnvironment;
|
|
14
|
+
readonly logStreams: AgentsServerLogStreams;
|
|
15
|
+
readonly startOptions: StartAgentsServerOptions;
|
|
16
|
+
readonly runtimePaths: AgentsServerRuntimePaths;
|
|
17
|
+
readonly state: AgentsServerSupervisorState;
|
|
18
|
+
}): Promise<PreparedAgentsServerLaunch>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the optional Next hostname from the prepared child environment.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `startAgentsServer`
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveAgentsServerChildHostname(environment: NodeJS.ProcessEnv): string | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { type ChildProcess } from 'child_process';
|
|
3
|
+
import type { AgentsServerChildEnvironment } from './AgentsServerChildEnvironment';
|
|
4
|
+
import type { AgentsServerLogStreams } from './AgentsServerLogStreams';
|
|
5
|
+
import type { AgentsServerRuntimePaths } from './AgentsServerRuntimePaths';
|
|
6
|
+
import type { AgentsServerSupervisorState } from './AgentsServerSupervisorState';
|
|
7
|
+
import type { StartAgentsServerOptions } from './StartAgentsServerOptions';
|
|
8
|
+
/**
|
|
9
|
+
* Starts the configured Next server mode and wires its logs into the foreground dashboard.
|
|
10
|
+
*
|
|
11
|
+
* @private internal utility of `startAgentsServer`
|
|
12
|
+
*/
|
|
13
|
+
export declare function startNextServer(options: {
|
|
14
|
+
readonly nextCliPath: string;
|
|
15
|
+
readonly startOptions: StartAgentsServerOptions;
|
|
16
|
+
readonly runtimePaths: AgentsServerRuntimePaths;
|
|
17
|
+
readonly childEnvironment: AgentsServerChildEnvironment;
|
|
18
|
+
readonly logStreams: AgentsServerLogStreams;
|
|
19
|
+
readonly state: AgentsServerSupervisorState;
|
|
20
|
+
}): ChildProcess;
|
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { number_port } from '../../../../types/number_positive';
|
|
2
|
+
import type { AgentsServerChildEnvironment } from './AgentsServerChildEnvironment';
|
|
3
|
+
import type { AgentsServerLogStreams } from './AgentsServerLogStreams';
|
|
4
|
+
import type { AgentsServerSupervisorState } from './AgentsServerSupervisorState';
|
|
5
|
+
/**
|
|
6
|
+
* Starts periodic internal worker calls that queue and reconcile local message-folder jobs.
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `startAgentsServer`
|
|
9
|
+
*/
|
|
10
|
+
export declare function startUserChatJobWorkerPump(options: {
|
|
11
|
+
readonly port: number_port;
|
|
12
|
+
readonly environment: AgentsServerChildEnvironment;
|
|
13
|
+
readonly logStreams: AgentsServerLogStreams;
|
|
14
|
+
readonly state: AgentsServerSupervisorState;
|
|
15
|
+
}): () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { ChildProcess } from 'child_process';
|
|
3
|
+
/**
|
|
4
|
+
* Stops only the child process spawned for the local Next server.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `startAgentsServer`
|
|
7
|
+
*/
|
|
8
|
+
export declare function stopChildProcess(commandProcess: ChildProcess | undefined): void;
|
package/esm/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { number_port } from '../../../../types/number_positive';
|
|
2
|
+
import type { AgentsServerChildEnvironment } from './AgentsServerChildEnvironment';
|
|
3
|
+
import type { AgentsServerLogStreams } from './AgentsServerLogStreams';
|
|
4
|
+
import type { AgentsServerSupervisorState } from './AgentsServerSupervisorState';
|
|
5
|
+
import type { LocalAgentRunnerLimits } from './LocalAgentRunnerLimits';
|
|
6
|
+
/**
|
|
7
|
+
* Waits until the internal Next route can return current local runner limits.
|
|
8
|
+
*
|
|
9
|
+
* @private internal utility of `startAgentsServer`
|
|
10
|
+
*/
|
|
11
|
+
export declare function waitForLocalAgentRunnerLimits(options: {
|
|
12
|
+
readonly port: number_port;
|
|
13
|
+
readonly environment: AgentsServerChildEnvironment;
|
|
14
|
+
readonly logStreams: AgentsServerLogStreams;
|
|
15
|
+
readonly state: AgentsServerSupervisorState;
|
|
16
|
+
}): Promise<LocalAgentRunnerLimits>;
|
|
@@ -1,36 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Next runtime mode supported by the local Agents Server foreground launcher.
|
|
6
|
-
*
|
|
7
|
-
* @private internal type of `ptbk agents-server`
|
|
8
|
-
*/
|
|
9
|
-
export type AgentsServerNextRuntimeMode = 'start' | 'dev';
|
|
10
|
-
/**
|
|
11
|
-
* Options required to start the foreground Agents Server service group.
|
|
12
|
-
*
|
|
13
|
-
* @private internal type of `ptbk agents-server`
|
|
14
|
-
*/
|
|
15
|
-
export type StartAgentsServerOptions = {
|
|
16
|
-
readonly port: number_port;
|
|
17
|
-
readonly agentName: PromptRunnerHarnessName;
|
|
18
|
-
readonly model?: string;
|
|
19
|
-
readonly noUi: boolean;
|
|
20
|
-
readonly thinkingLevel?: ThinkingLevel;
|
|
21
|
-
readonly allowCredits: boolean;
|
|
22
|
-
readonly nextRuntimeMode: AgentsServerNextRuntimeMode;
|
|
23
|
-
readonly isBuildForced: boolean;
|
|
24
|
-
};
|
|
1
|
+
import type { StartAgentsServerOptions } from './startAgentsServer/StartAgentsServerOptions';
|
|
2
|
+
export { loadAgentsServerProjectEnvironment } from './startAgentsServer/loadAgentsServerProjectEnvironment';
|
|
3
|
+
export type { AgentsServerNextRuntimeMode, StartAgentsServerOptions, } from './startAgentsServer/StartAgentsServerOptions';
|
|
25
4
|
/**
|
|
26
5
|
* Starts the Agents Server web app and local coding-agent queue workers in the foreground.
|
|
27
6
|
*
|
|
28
7
|
* @private internal utility of `ptbk agents-server`
|
|
29
8
|
*/
|
|
30
9
|
export declare function startAgentsServer(options: StartAgentsServerOptions): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Loads launch-directory `.env` values without overriding explicit process environment.
|
|
33
|
-
*
|
|
34
|
-
* @private internal utility of `ptbk agents-server`
|
|
35
|
-
*/
|
|
36
|
-
export declare function loadAgentsServerProjectEnvironment(launchWorkingDirectory: string): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
/**
|
|
4
|
+
* Initializes `coder add` command for Promptbook CLI utilities
|
|
5
|
+
*
|
|
6
|
+
* Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
|
|
7
|
+
*
|
|
8
|
+
* @private internal function of `promptbookCli`
|
|
9
|
+
*/
|
|
10
|
+
export declare function $initializeCoderAddCommand(program: Program): $side_effect;
|
|
11
|
+
/**
|
|
12
|
+
* Result of adding one prompt file with `coder add`.
|
|
13
|
+
*
|
|
14
|
+
* @private internal utility of `coder add` command
|
|
15
|
+
*/
|
|
16
|
+
export type AddCoderPromptResult = {
|
|
17
|
+
/**
|
|
18
|
+
* Project-relative path of the created prompt file.
|
|
19
|
+
*/
|
|
20
|
+
readonly filePath: string;
|
|
21
|
+
/**
|
|
22
|
+
* Emoji tag assigned to the created prompt, for example `[✨🪴]`.
|
|
23
|
+
*/
|
|
24
|
+
readonly emojiTag: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Adds one ready-to-run prompt file containing a single prompt built from the description and template.
|
|
28
|
+
*
|
|
29
|
+
* @private internal utility of `coder add` command
|
|
30
|
+
*/
|
|
31
|
+
export declare function addCoderPrompt({ projectPath, description, priority, templateOption, }: {
|
|
32
|
+
readonly projectPath: string;
|
|
33
|
+
readonly description: string;
|
|
34
|
+
readonly priority: number;
|
|
35
|
+
readonly templateOption?: string;
|
|
36
|
+
}): Promise<AddCoderPromptResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -135,3 +135,27 @@ export declare function resolveCoderPromptTemplate({ projectPath, templateOption
|
|
|
135
135
|
readonly projectPath: string;
|
|
136
136
|
readonly templateOption?: string;
|
|
137
137
|
}): Promise<ResolvedCoderPromptTemplate>;
|
|
138
|
+
/**
|
|
139
|
+
* Builds one prompt section (status line, emoji-tagged title, and body) shared by
|
|
140
|
+
* `coder generate-boilerplates` and `coder add`.
|
|
141
|
+
*
|
|
142
|
+
* @private internal utility of `ptbk coder`
|
|
143
|
+
*/
|
|
144
|
+
export declare function buildCoderPromptSection({ statusLine, emojiTag, title, body, }: {
|
|
145
|
+
/**
|
|
146
|
+
* Checklist status marker of the section, for example `[-]`, `[ ]`, or `[ ] !!`.
|
|
147
|
+
*/
|
|
148
|
+
readonly statusLine: string;
|
|
149
|
+
/**
|
|
150
|
+
* Emoji tag rendered before the title, for example `[✨🪴]`.
|
|
151
|
+
*/
|
|
152
|
+
readonly emojiTag: string;
|
|
153
|
+
/**
|
|
154
|
+
* Single-line title rendered right after the emoji tag.
|
|
155
|
+
*/
|
|
156
|
+
readonly title: string;
|
|
157
|
+
/**
|
|
158
|
+
* Markdown body rendered below the title.
|
|
159
|
+
*/
|
|
160
|
+
readonly body: string;
|
|
161
|
+
}): string;
|
|
@@ -5,6 +5,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
|
|
|
5
5
|
*
|
|
6
6
|
* The coder command provides utilities for automated coding:
|
|
7
7
|
* - init: Initialize coder configuration in current project
|
|
8
|
+
* - add: Add one ready-to-run prompt file to the queue
|
|
8
9
|
* - generate-boilerplates: Generate prompt boilerplate files
|
|
9
10
|
* - find-refactor-candidates: Find files that need refactoring
|
|
10
11
|
* - run: Run coding prompts with AI agents
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a Commander argument parser that accepts only non-negative integers.
|
|
3
|
+
*
|
|
4
|
+
* The returned parser is meant to be passed as the coercion callback of `command.option(...)`.
|
|
5
|
+
* It throws a branded `NotAllowed` error with a clear message referencing the given option name
|
|
6
|
+
* when the provided value is not a non-negative integer.
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `promptbookCli`
|
|
9
|
+
*/
|
|
10
|
+
export declare function createNonNegativeIntegerOptionParser(optionName: string): (value: string) => number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
|
|
2
|
+
/**
|
|
3
|
+
* Reports one detected harness installation status and offers to install or update the harness.
|
|
4
|
+
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it asks the user and installs npm packages
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `promptbookCli`
|
|
8
|
+
*/
|
|
9
|
+
export declare function $applyHarnessInstallationStatus(status: HarnessInstallationStatus): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asks the user in the terminal whether the harness should be installed or updated right now.
|
|
3
|
+
*
|
|
4
|
+
* Note: `$` is used to indicate that this function is not a pure function - it reads the answer from stdin
|
|
5
|
+
*
|
|
6
|
+
* @returns `true` when the user confirms, `false` when the user declines or the terminal is not interactive
|
|
7
|
+
* @private internal utility of `promptbookCli`
|
|
8
|
+
*/
|
|
9
|
+
export declare function $askForHarnessInstallationApproval(question: string): Promise<boolean>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
|
|
3
|
+
/**
|
|
4
|
+
* Detects whether one CLI coding harness is installed globally and whether it is up to date.
|
|
5
|
+
*
|
|
6
|
+
* Note: `$` is used to indicate that this function is not a pure function - it runs the harness command and queries npm
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `promptbookCli`
|
|
9
|
+
*/
|
|
10
|
+
export declare function $checkHarnessInstallation(definition: HarnessDefinition): Promise<HarnessInstallationStatus>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Checks that every given CLI coding harness is installed globally and up to date and offers to
|
|
4
|
+
* install or update the ones which are not.
|
|
5
|
+
*
|
|
6
|
+
* Harness names which are `undefined`, for example when no `--harness` is selected in a dry run,
|
|
7
|
+
* are ignored so that every call site can pass its raw selection.
|
|
8
|
+
*
|
|
9
|
+
* Note: `$` is used to indicate that this function is not a pure function - it may install npm packages
|
|
10
|
+
*
|
|
11
|
+
* @private internal utility of `promptbookCli`
|
|
12
|
+
*/
|
|
13
|
+
export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined>): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Installs or updates one CLI coding harness globally through npm.
|
|
4
|
+
*
|
|
5
|
+
* A failed installation is reported but never aborts the running command, because the harness check
|
|
6
|
+
* is only an assistant - the command itself may still work with a manually managed harness.
|
|
7
|
+
*
|
|
8
|
+
* Note: `$` is used to indicate that this function is not a pure function - it installs a global npm package
|
|
9
|
+
*
|
|
10
|
+
* @returns `true` when the harness has been installed, `false` when the installation failed
|
|
11
|
+
* @private internal utility of `promptbookCli`
|
|
12
|
+
*/
|
|
13
|
+
export declare function $installHarness(definition: HarnessDefinition): Promise<boolean>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Reads the version of the globally installed harness command.
|
|
4
|
+
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it runs the harness command
|
|
6
|
+
*
|
|
7
|
+
* @returns The installed version or `null` when the harness command is not available globally
|
|
8
|
+
* @private internal utility of `promptbookCli`
|
|
9
|
+
*/
|
|
10
|
+
export declare function $resolveInstalledHarnessVersion(definition: HarnessDefinition): Promise<string | null>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Reads the newest version of the harness published to npm.
|
|
4
|
+
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it queries the npm registry
|
|
6
|
+
*
|
|
7
|
+
* @returns The newest published version or `null` when the registry could not be reached
|
|
8
|
+
* @private internal utility of `promptbookCli`
|
|
9
|
+
*/
|
|
10
|
+
export declare function $resolveLatestHarnessVersion(definition: HarnessDefinition): Promise<string | null>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Static description of one supported CLI coding harness.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `promptbookCli`
|
|
6
|
+
*/
|
|
7
|
+
export type HarnessDefinition = {
|
|
8
|
+
/**
|
|
9
|
+
* Harness identifier used by the `--harness` option.
|
|
10
|
+
*/
|
|
11
|
+
readonly harnessName: PromptRunnerHarnessName;
|
|
12
|
+
/**
|
|
13
|
+
* Human-readable harness name shown in the terminal.
|
|
14
|
+
*/
|
|
15
|
+
readonly label: string;
|
|
16
|
+
/**
|
|
17
|
+
* Globally installed command which runs the harness.
|
|
18
|
+
*/
|
|
19
|
+
readonly commandName: string;
|
|
20
|
+
/**
|
|
21
|
+
* Npm package which installs the harness command globally.
|
|
22
|
+
*/
|
|
23
|
+
readonly npmPackageName: string;
|
|
24
|
+
/**
|
|
25
|
+
* Extra environment variables required by the global npm installation of this harness.
|
|
26
|
+
*/
|
|
27
|
+
readonly npmInstallEnvironment?: Readonly<Record<string, string>>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Single source of truth about how each supported CLI coding harness is installed and detected.
|
|
31
|
+
*
|
|
32
|
+
* @private internal utility of `promptbookCli`
|
|
33
|
+
*/
|
|
34
|
+
export declare const HARNESS_DEFINITIONS: Readonly<Record<PromptRunnerHarnessName, HarnessDefinition>>;
|
|
35
|
+
/**
|
|
36
|
+
* Looks up the definition of one supported CLI coding harness.
|
|
37
|
+
*
|
|
38
|
+
* @private internal utility of `promptbookCli`
|
|
39
|
+
*/
|
|
40
|
+
export declare function getHarnessDefinition(harnessName: PromptRunnerHarnessName): HarnessDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Result of comparing the globally installed harness version with the newest published one.
|
|
4
|
+
*
|
|
5
|
+
* - `up-to-date` the newest published version is installed
|
|
6
|
+
* - `outdated` an older version is installed
|
|
7
|
+
* - `not-installed` the harness command is not available globally
|
|
8
|
+
* - `unknown` the harness is installed but the newest published version could not be resolved, for example when offline
|
|
9
|
+
*
|
|
10
|
+
* @private internal utility of `promptbookCli`
|
|
11
|
+
*/
|
|
12
|
+
export type HarnessInstallationState = 'up-to-date' | 'outdated' | 'not-installed' | 'unknown';
|
|
13
|
+
/**
|
|
14
|
+
* Installation state of one CLI coding harness on the current machine.
|
|
15
|
+
*
|
|
16
|
+
* @private internal utility of `promptbookCli`
|
|
17
|
+
*/
|
|
18
|
+
export type HarnessInstallationStatus = {
|
|
19
|
+
/**
|
|
20
|
+
* Harness the status belongs to.
|
|
21
|
+
*/
|
|
22
|
+
readonly definition: HarnessDefinition;
|
|
23
|
+
/**
|
|
24
|
+
* Comparison of the installed version with the newest published one.
|
|
25
|
+
*/
|
|
26
|
+
readonly installationState: HarnessInstallationState;
|
|
27
|
+
/**
|
|
28
|
+
* Version of the globally installed harness command or `null` when the harness is not installed.
|
|
29
|
+
*/
|
|
30
|
+
readonly installedVersion: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Newest version published to npm or `null` when it could not be resolved.
|
|
33
|
+
*/
|
|
34
|
+
readonly latestVersion: string | null;
|
|
35
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the shell command which installs or updates one CLI coding harness globally.
|
|
4
|
+
*
|
|
5
|
+
* The very same command is executed by `$installHarness` and printed as the manual fallback,
|
|
6
|
+
* so the user always sees exactly what Promptbook would run.
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `promptbookCli`
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildHarnessInstallCommand(definition: HarnessDefinition): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the version from the raw output of a harness `--version` command.
|
|
3
|
+
*
|
|
4
|
+
* Harness CLIs print their version in many shapes, for example `2.1.199 (Claude Code)`,
|
|
5
|
+
* `codex-cli 0.144.4`, `GitHub Copilot CLI 1.0.61.` or after unrelated deprecation warning lines,
|
|
6
|
+
* so the first version-looking token of the first matching line wins.
|
|
7
|
+
*
|
|
8
|
+
* @returns The parsed version or `null` when the output contains no version
|
|
9
|
+
* @private internal utility of `promptbookCli`
|
|
10
|
+
*/
|
|
11
|
+
export declare function extractHarnessVersionFromOutput(output: string): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
|
|
2
|
+
/**
|
|
3
|
+
* Formats the warning shown when a harness is missing or outdated.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `promptbookCli`
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatHarnessInstallationWarning(status: HarnessInstallationStatus): string;
|