@promptbook/node 0.114.0-3 → 0.114.0-31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -18
- package/esm/index.es.js +2124 -4853
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
- package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
- package/esm/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +4 -0
- package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +92 -0
- package/esm/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +15 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
- package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
- package/esm/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
- package/esm/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
- package/esm/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
- package/esm/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
- package/esm/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +23 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
- package/esm/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
- package/esm/src/_packages/components.index.d.ts +4 -0
- package/esm/src/_packages/types.index.d.ts +4 -0
- package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
- package/esm/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
- package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
- package/esm/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
- package/esm/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
- package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
- package/esm/src/book-3.0/cliAgentEnv.d.ts +3 -3
- package/esm/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
- package/esm/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
- package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
- package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
- package/esm/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
- package/esm/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
- package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
- package/esm/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
- package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
- package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +9 -0
- package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
- package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
- package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/$askForConfirmation.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
- package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
- package/esm/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
- package/esm/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +36 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
- package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
- package/esm/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
- package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
- package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
- package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
- package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
- package/{umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts → esm/src/cli/cli-commands/common/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/$resolveNpmGlobalPrefixPath.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
- package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
- package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
- package/esm/src/commitments/index.d.ts +4 -12
- package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
- package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/esm/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
- package/esm/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
- package/esm/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
- package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
- package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
- package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
- package/esm/src/utils/misc/debounce.d.ts +4 -2
- package/esm/src/utils/misc/debounce.test.d.ts +1 -0
- package/esm/src/utils/misc/emojis.d.ts +3 -2
- package/esm/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -5
- package/umd/index.umd.js +2124 -4854
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
- package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
- package/umd/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +4 -0
- package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +92 -0
- package/umd/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +15 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
- package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
- package/umd/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
- package/umd/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
- package/umd/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
- package/umd/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
- package/umd/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +23 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
- package/umd/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
- package/umd/src/_packages/components.index.d.ts +4 -0
- package/umd/src/_packages/types.index.d.ts +4 -0
- package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
- package/umd/src/avatars/renderAvatarVisualTerminalText.test.d.ts +1 -0
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
- package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
- package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
- package/umd/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
- package/umd/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
- package/umd/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
- package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
- package/umd/src/book-3.0/cliAgentEnv.d.ts +3 -3
- package/umd/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
- package/umd/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
- package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
- package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
- package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
- package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
- package/umd/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
- package/umd/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
- package/umd/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
- package/umd/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
- package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
- package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +9 -0
- package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
- package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/umd/src/cli/cli-commands/coder/boilerplateCount.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/server.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/$askForConfirmation.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
- package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
- package/umd/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
- package/umd/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +36 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
- package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
- package/umd/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
- package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
- package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
- package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
- package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
- package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts +1 -0
- package/{esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts → umd/src/cli/cli-commands/common/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/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
- package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
- package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
- package/umd/src/commitments/index.d.ts +4 -12
- package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
- package/umd/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
- package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/umd/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
- package/umd/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
- package/umd/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
- package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
- package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
- package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
- package/umd/src/utils/misc/debounce.d.ts +4 -2
- package/umd/src/utils/misc/debounce.test.d.ts +1 -0
- package/umd/src/utils/misc/emojis.d.ts +3 -2
- package/umd/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
- package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
- package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/META/META.d.ts +0 -65
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
- package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
- package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/META/META.d.ts +0 -65
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- /package/esm/src/{book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
- /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
- /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts} +0 -0
- /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → book-3.0/AgentPlannedMessagesSidecar.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → book-components/Chat/utils/agentProjectToolCall.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/coder/server.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts} +0 -0
- /package/esm/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts} +0 -0
- /package/{umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts} +0 -0
- /package/{umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts} +0 -0
- /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → esm/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts} +0 -0
- /package/{umd/src/commitments/MEMORY/MEMORY.test.d.ts → esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts → esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts} +0 -0
- /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
- /package/{umd/src/commitments/USE_TIME/USE_TIME.test.d.ts → esm/src/executables/platforms/locateAppOnWindows.test.d.ts} +0 -0
- /package/{umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts} +0 -0
- /package/{umd/src/commitments/WALLET/WALLET.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts} +0 -0
- /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
2
|
+
/**
|
|
3
|
+
* Monaco diagnostic shown when a Book source uses an uppercase commitment not registered by Promptbook.
|
|
4
|
+
*
|
|
5
|
+
* @private internal type of `BookEditorMonaco`
|
|
6
|
+
*/
|
|
7
|
+
type UnknownCommitmentDiagnostic = {
|
|
8
|
+
readonly startLineNumber: number;
|
|
9
|
+
readonly startColumn: number;
|
|
10
|
+
readonly endLineNumber: number;
|
|
11
|
+
readonly endColumn: number;
|
|
12
|
+
readonly message: string;
|
|
13
|
+
readonly source: string;
|
|
14
|
+
readonly severity: 'error';
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Creates Book editor diagnostics for uppercase commitments not registered by Promptbook.
|
|
18
|
+
*
|
|
19
|
+
* Unknown commitment blocks remain valid extra context in the generated system message,
|
|
20
|
+
* but the editor marks their keywords so authors can spot likely typos immediately.
|
|
21
|
+
*
|
|
22
|
+
* @param agentSource - Current editor content.
|
|
23
|
+
* @returns Error markers for all unknown commitment keywords.
|
|
24
|
+
*
|
|
25
|
+
* @private internal utility of `BookEditorMonaco`
|
|
26
|
+
*/
|
|
27
|
+
export declare function createUnknownCommitmentDiagnostics(agentSource?: string_book): ReadonlyArray<UnknownCommitmentDiagnostic>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -591,8 +591,9 @@ export type ChatProps = {
|
|
|
591
591
|
progress?: number;
|
|
592
592
|
}>;
|
|
593
593
|
/**
|
|
594
|
-
*
|
|
595
|
-
*
|
|
594
|
+
* Optional content displayed in the chat header above the message list.
|
|
595
|
+
*
|
|
596
|
+
* If not provided, the header row is not rendered.
|
|
596
597
|
*/
|
|
597
598
|
readonly children?: ReactNode;
|
|
598
599
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Renders one unified diff with added, removed and context lines told apart.
|
|
4
|
+
*
|
|
5
|
+
* @param options - Diff text and whether it holds only the beginning of the real diff.
|
|
6
|
+
* @returns Readable diff block.
|
|
7
|
+
*
|
|
8
|
+
* @private function of ChatToolCallModal
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderAgentProjectDiff(options: {
|
|
11
|
+
readonly diff: string;
|
|
12
|
+
readonly isDiffTruncated: boolean;
|
|
13
|
+
}): ReactElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import type { AgentProjectToolCallResult } from '../utils/agentProjectToolCall';
|
|
3
|
+
/**
|
|
4
|
+
* Renders the detail view of one project the answer worked with.
|
|
5
|
+
*
|
|
6
|
+
* The card answers the two questions a project chip raises: what this project is right now — its
|
|
7
|
+
* runtime state and where to open it — and what this very message did to it.
|
|
8
|
+
*
|
|
9
|
+
* @param options - Parsed project chip payload.
|
|
10
|
+
* @returns Project details section for the tool modal.
|
|
11
|
+
*
|
|
12
|
+
* @private function of ChatToolCallModal
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderAgentProjectToolCallDetails(options: {
|
|
15
|
+
readonly project: AgentProjectToolCallResult;
|
|
16
|
+
}): ReactElement;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { AgentMessageProjectChange } from '../../../utils/agent-message-runtime/AgentMessageProjectChange';
|
|
2
|
+
/**
|
|
3
|
+
* Synthetic tool name used for agent-project chips in chat UI.
|
|
4
|
+
*
|
|
5
|
+
* The Agents Server emits one such tool call per project an answer viewed or edited, so the chat
|
|
6
|
+
* shows which projects the agent worked with below the message that touched them.
|
|
7
|
+
*
|
|
8
|
+
* @private internal chat-ui marker for touched agent projects
|
|
9
|
+
*/
|
|
10
|
+
export declare const AGENT_PROJECT_TOOL_CALL_NAME = "agent_project_touched";
|
|
11
|
+
/**
|
|
12
|
+
* Safe, user-facing metadata shown in agent-project chips.
|
|
13
|
+
*
|
|
14
|
+
* Everything besides the project name is optional, because a chip written by an older server — or
|
|
15
|
+
* one whose project has meanwhile been deleted — still has to render.
|
|
16
|
+
*
|
|
17
|
+
* @private internal chat-ui type for touched agent projects
|
|
18
|
+
*/
|
|
19
|
+
export type AgentProjectToolCallResult = {
|
|
20
|
+
/**
|
|
21
|
+
* Directory name of the project.
|
|
22
|
+
*/
|
|
23
|
+
readonly projectName: string;
|
|
24
|
+
/**
|
|
25
|
+
* Human-readable project name shown in the chip.
|
|
26
|
+
*/
|
|
27
|
+
readonly displayName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Short project description, resolved the same way as on the project page.
|
|
30
|
+
*/
|
|
31
|
+
readonly description?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Link to the project page, when the chat knows where the project lives.
|
|
34
|
+
*/
|
|
35
|
+
readonly projectHref?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Address the running project itself is served on, when it has one.
|
|
38
|
+
*/
|
|
39
|
+
readonly projectUrl?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the project was running when the answer finished.
|
|
42
|
+
*/
|
|
43
|
+
readonly isRunning?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Runtime status label, the same one the project page shows.
|
|
46
|
+
*/
|
|
47
|
+
readonly runtimeStatusLabel?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Total size of the project, already formatted for display.
|
|
50
|
+
*/
|
|
51
|
+
readonly sizeLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Count of files inside the project.
|
|
54
|
+
*/
|
|
55
|
+
readonly fileCount?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the project folder is a git repository.
|
|
58
|
+
*/
|
|
59
|
+
readonly isGitRepository?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* What this very message changed in the project, when it changed anything.
|
|
62
|
+
*
|
|
63
|
+
* Its `projectName` repeats the one above because the change is reported by the agent runner
|
|
64
|
+
* in exactly this shape, and reusing it keeps the two descriptions from drifting apart.
|
|
65
|
+
*/
|
|
66
|
+
readonly change?: AgentMessageProjectChange;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Parses the project-chip payload from one tool result.
|
|
70
|
+
*
|
|
71
|
+
* @param result - Raw tool result payload.
|
|
72
|
+
* @returns Parsed project metadata, or `null` when the result describes no project.
|
|
73
|
+
*
|
|
74
|
+
* @private internal helper reused by chip and modal rendering
|
|
75
|
+
*/
|
|
76
|
+
export declare function parseAgentProjectToolCallResult(result: unknown): AgentProjectToolCallResult | null;
|
|
77
|
+
/**
|
|
78
|
+
* Resolves the chip label of one touched agent project.
|
|
79
|
+
*
|
|
80
|
+
* @param projectResult - Parsed project metadata.
|
|
81
|
+
* @returns Human-readable project name.
|
|
82
|
+
*
|
|
83
|
+
* @private internal helper reused by chip and modal rendering
|
|
84
|
+
*/
|
|
85
|
+
export declare function resolveAgentProjectToolCallLabel(projectResult: AgentProjectToolCallResult): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AgentMessageTouchedExternalSource } from '../../../utils/agent-message-runtime/AgentMessageTouchedExternalSource';
|
|
2
|
+
/**
|
|
3
|
+
* Synthetic tool name used for external-source chips in chat UI.
|
|
4
|
+
*
|
|
5
|
+
* The Agents Server emits one such tool call per source outside the agent an answer viewed or
|
|
6
|
+
* edited, so the chat shows which services, websites and searches the agent really reached below
|
|
7
|
+
* the message that touched them. Work the agent does inside itself emits nothing.
|
|
8
|
+
*
|
|
9
|
+
* @private internal chat-ui marker for touched external sources
|
|
10
|
+
*/
|
|
11
|
+
export declare const EXTERNAL_SOURCE_TOOL_CALL_NAME = "external_source_touched";
|
|
12
|
+
/**
|
|
13
|
+
* Parses the external-source chip payload from one tool result.
|
|
14
|
+
*
|
|
15
|
+
* @param result - Raw tool result payload.
|
|
16
|
+
* @returns Parsed source metadata, or `null` when the result describes no external source.
|
|
17
|
+
*
|
|
18
|
+
* @private internal helper reused by chip and modal rendering
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseExternalSourceToolCallResult(result: unknown): AgentMessageTouchedExternalSource | null;
|
|
21
|
+
/**
|
|
22
|
+
* Resolves the chip label of one touched external source.
|
|
23
|
+
*
|
|
24
|
+
* @param externalSource - Parsed source metadata.
|
|
25
|
+
* @returns User-facing name of the source.
|
|
26
|
+
*
|
|
27
|
+
* @private internal helper reused by chip and modal rendering
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveExternalSourceToolCallLabel(externalSource: AgentMessageTouchedExternalSource): string;
|
|
30
|
+
/**
|
|
31
|
+
* Resolves the chip emoji of one touched external source.
|
|
32
|
+
*
|
|
33
|
+
* @param externalSource - Parsed source metadata.
|
|
34
|
+
* @returns Emoji telling apart an integration, a website and a search.
|
|
35
|
+
*
|
|
36
|
+
* @private internal helper reused by chip and modal rendering
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveExternalSourceToolCallEmoji(externalSource: AgentMessageTouchedExternalSource): string;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { string_html, string_markdown } from '../../../types/string_markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Attribute marking a client action generated for an inline-reference menu.
|
|
4
|
+
*
|
|
5
|
+
* @private utility shared with `MarkdownContent`
|
|
6
|
+
*/
|
|
7
|
+
export declare const MARKDOWN_INLINE_REFERENCE_MENU_ACTION_ATTRIBUTE = "data-promptbook-inline-reference-menu-action";
|
|
8
|
+
/**
|
|
9
|
+
* Attribute identifying the inline reference which owns a client menu action.
|
|
10
|
+
*
|
|
11
|
+
* @private utility shared with `MarkdownContent`
|
|
12
|
+
*/
|
|
13
|
+
export declare const MARKDOWN_INLINE_REFERENCE_MENU_ACTION_REFERENCE_ATTRIBUTE = "data-promptbook-inline-reference-menu-action-reference";
|
|
14
|
+
/**
|
|
15
|
+
* Attribute marking a favicon rendered inside an inline-reference chip.
|
|
16
|
+
*
|
|
17
|
+
* @private utility shared with `MarkdownContent`
|
|
18
|
+
*/
|
|
19
|
+
export declare const MARKDOWN_INLINE_REFERENCE_ICON_ATTRIBUTE = "data-promptbook-inline-reference-icon";
|
|
2
20
|
/**
|
|
3
21
|
* Options for markdown rendering.
|
|
4
22
|
*/
|
|
@@ -17,6 +35,13 @@ export type MarkdownInlineReference = {
|
|
|
17
35
|
* Raw reference text between `[[` and `]]`.
|
|
18
36
|
*/
|
|
19
37
|
readonly reference: string;
|
|
38
|
+
/**
|
|
39
|
+
* Optional text aliases which should render as this reference when an agent mentions them in markdown.
|
|
40
|
+
*
|
|
41
|
+
* They are also accepted inside a `[[reference]]` token. This lets application code use a stable
|
|
42
|
+
* technical reference while recognizing a human-facing name in older messages.
|
|
43
|
+
*/
|
|
44
|
+
readonly sourceTextAliases?: ReadonlyArray<string>;
|
|
20
45
|
/**
|
|
21
46
|
* Human-readable label rendered inside the link chip.
|
|
22
47
|
*/
|
|
@@ -26,21 +51,42 @@ export type MarkdownInlineReference = {
|
|
|
26
51
|
*/
|
|
27
52
|
readonly href: string;
|
|
28
53
|
/**
|
|
29
|
-
*
|
|
54
|
+
* Optional URL prefixes which also identify this reference in the authored markdown.
|
|
30
55
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
56
|
+
* A markdown link or a bare URL pointing to one of these prefixes is rendered as the same chip
|
|
57
|
+
* as the `[[reference]]` token. Both absolute URLs (for example `https://project.example.com`)
|
|
58
|
+
* and application paths (for example `/agents/agent/projects/website`) are supported; a path
|
|
59
|
+
* prefix matches on any host so that both relative and absolute links are recognized.
|
|
33
60
|
*/
|
|
34
61
|
readonly sourceHrefPrefixes?: ReadonlyArray<string>;
|
|
35
62
|
/**
|
|
36
63
|
* Optional hover title for the rendered reference.
|
|
37
64
|
*/
|
|
38
65
|
readonly title?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Optional favicon and text fallback rendered before the reference label.
|
|
68
|
+
*/
|
|
69
|
+
readonly icon?: MarkdownInlineReferenceIcon;
|
|
39
70
|
/**
|
|
40
71
|
* Optional expandable menu shown when the reference chip is clicked.
|
|
41
72
|
*/
|
|
42
73
|
readonly menu?: MarkdownInlineReferenceMenu;
|
|
43
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* Visual identity rendered inside one markdown inline-reference chip.
|
|
77
|
+
*
|
|
78
|
+
* @public exported from `@promptbook/components`
|
|
79
|
+
*/
|
|
80
|
+
export type MarkdownInlineReferenceIcon = {
|
|
81
|
+
/**
|
|
82
|
+
* Optional image URL. The fallback remains visible when the image is unavailable.
|
|
83
|
+
*/
|
|
84
|
+
readonly src?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Short text rendered when the image is missing or broken.
|
|
87
|
+
*/
|
|
88
|
+
readonly fallbackText: string;
|
|
89
|
+
};
|
|
44
90
|
/**
|
|
45
91
|
* Status displayed alongside an expandable markdown inline reference.
|
|
46
92
|
*
|
|
@@ -74,6 +120,25 @@ export type MarkdownInlineReferenceMenuOption = {
|
|
|
74
120
|
* Optional hover text for the option.
|
|
75
121
|
*/
|
|
76
122
|
readonly title?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Optional client action rendered as a button instead of a link.
|
|
125
|
+
*/
|
|
126
|
+
readonly action?: MarkdownInlineReferenceMenuAction;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Client-side action exposed by an expandable markdown inline-reference menu.
|
|
130
|
+
*
|
|
131
|
+
* @public exported from `@promptbook/components`
|
|
132
|
+
*/
|
|
133
|
+
export type MarkdownInlineReferenceMenuAction = {
|
|
134
|
+
/**
|
|
135
|
+
* Stable identifier unique within the owning reference menu.
|
|
136
|
+
*/
|
|
137
|
+
readonly id: string;
|
|
138
|
+
/**
|
|
139
|
+
* Callback invoked when the menu button is selected.
|
|
140
|
+
*/
|
|
141
|
+
readonly onSelect: () => void | Promise<void>;
|
|
77
142
|
};
|
|
78
143
|
/**
|
|
79
144
|
* Expandable menu configuration for a markdown inline reference.
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { TODO_any } from '../../../utils/organization/TODO_any';
|
|
2
|
+
/**
|
|
3
|
+
* Tool name of one scheduled wake-up, used by every producer of timeout chips.
|
|
4
|
+
*
|
|
5
|
+
* @private internal timeout-chat constant
|
|
6
|
+
*/
|
|
7
|
+
export declare const SET_TIMEOUT_TOOL_CALL_NAME = "set_timeout";
|
|
8
|
+
/**
|
|
9
|
+
* Tool name of one re-planned wake-up, used by every producer of timeout chips.
|
|
10
|
+
*
|
|
11
|
+
* @private internal timeout-chat constant
|
|
12
|
+
*/
|
|
13
|
+
export declare const UPDATE_TIMEOUT_TOOL_CALL_NAME = "update_timeout";
|
|
14
|
+
/**
|
|
15
|
+
* Tool name of one cancelled wake-up, used by every producer of timeout chips.
|
|
16
|
+
*
|
|
17
|
+
* @private internal timeout-chat constant
|
|
18
|
+
*/
|
|
19
|
+
export declare const CANCEL_TIMEOUT_TOOL_CALL_NAME = "cancel_timeout";
|
|
2
20
|
/**
|
|
3
21
|
* Action performed by timeout tools.
|
|
4
22
|
*
|
|
@@ -140,4 +158,16 @@ export declare function buildTimeoutToolPrimarySentence(presentation: TimeoutToo
|
|
|
140
158
|
* @private internal utility of `<Chat/>`
|
|
141
159
|
*/
|
|
142
160
|
export declare function buildTimeoutToolScheduleSentence(presentation: TimeoutToolCallPresentation, translations?: TimeoutToolCallTranslations): string | null;
|
|
161
|
+
/**
|
|
162
|
+
* Converts timeout duration into natural language sentence fragments.
|
|
163
|
+
*
|
|
164
|
+
* Shared by every timeout surface: the chat chips, the goal-chat planned messages of the Agents
|
|
165
|
+
* Server, and the planned-message prompt section of the agent-folder runner.
|
|
166
|
+
*
|
|
167
|
+
* @param milliseconds - Duration or repeat interval in milliseconds.
|
|
168
|
+
* @returns Label such as `5 minutes` or `1 hour 30 minutes`.
|
|
169
|
+
*
|
|
170
|
+
* @private internal utility of `<Chat/>` and the Agents Server planned messages
|
|
171
|
+
*/
|
|
172
|
+
export declare function formatTimeoutDurationHuman(milliseconds: number): string;
|
|
143
173
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PromptRunnerHarnessName } from '../common/promptRunnerCliOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Offers to add missing project-local ignore rules for the selected coding harness.
|
|
4
|
+
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it may ask the user and update `.gitignore`.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `ptbk coder`
|
|
8
|
+
*/
|
|
9
|
+
export declare function $ensureCoderHarnessGitignoreRules(projectPath: string, harnessName: PromptRunnerHarnessName | undefined): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported values of the `--git-changes` option, which decides what happens with a dirty working tree.
|
|
3
|
+
*
|
|
4
|
+
* - `fail` — refuse to start while the working tree has uncommitted changes
|
|
5
|
+
* - `ignore` — start anyway and leave the uncommitted changes where they are
|
|
6
|
+
* - `continue` — resume the single prompt which was left in the middle of its implementation
|
|
7
|
+
*
|
|
8
|
+
* @private internal shared utility of `ptbk coder run`
|
|
9
|
+
*/
|
|
10
|
+
export declare const GIT_CHANGES_MODE_VALUES: readonly ["fail", "ignore", "continue"];
|
|
11
|
+
/**
|
|
12
|
+
* Behavior requested for a working tree which has uncommitted changes.
|
|
13
|
+
*
|
|
14
|
+
* @private internal shared utility of `ptbk coder run`
|
|
15
|
+
*/
|
|
16
|
+
export type GitChangesMode = (typeof GIT_CHANGES_MODE_VALUES)[number];
|
|
17
|
+
/**
|
|
18
|
+
* Mode applied when `--git-changes` is not used at all.
|
|
19
|
+
*
|
|
20
|
+
* @private internal shared utility of `ptbk coder run`
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEFAULT_GIT_CHANGES_MODE: GitChangesMode;
|
|
23
|
+
/**
|
|
24
|
+
* Checks whether a value is a supported `--git-changes` mode.
|
|
25
|
+
*
|
|
26
|
+
* @private internal shared utility of `ptbk coder run`
|
|
27
|
+
*/
|
|
28
|
+
export declare function isGitChangesMode(value: string): value is GitChangesMode;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How many prompt boilerplate files are generated and how many prompts each of them contains.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility of `ptbk coder`
|
|
5
|
+
*/
|
|
6
|
+
export type BoilerplateCount = {
|
|
7
|
+
/**
|
|
8
|
+
* Number of generated prompt boilerplate files.
|
|
9
|
+
*/
|
|
10
|
+
readonly filesCount: number;
|
|
11
|
+
/**
|
|
12
|
+
* Number of prompts written into each generated file.
|
|
13
|
+
*
|
|
14
|
+
* Note: More than one prompt per file is an advanced option - each prompt is one separate
|
|
15
|
+
* coding task separated by `---`, with all prompts in the file sharing its fresh emoji tag.
|
|
16
|
+
*/
|
|
17
|
+
readonly promptsPerFileCount: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Number of prompt boilerplate files and prompts per file used when `--count` is not provided.
|
|
21
|
+
*
|
|
22
|
+
* @private internal utility of `ptbk coder`
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_BOILERPLATE_COUNT: BoilerplateCount;
|
|
25
|
+
/**
|
|
26
|
+
* Formats one boilerplate count back into the `N*M` notation of the `--count` option.
|
|
27
|
+
*
|
|
28
|
+
* @private internal utility of `ptbk coder`
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatBoilerplateCount({ filesCount, promptsPerFileCount }: BoilerplateCount): string;
|
|
31
|
+
/**
|
|
32
|
+
* Default value of the `--count` option rendered in the `N*M` notation, for example `5*1`.
|
|
33
|
+
*
|
|
34
|
+
* @private internal utility of `ptbk coder`
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_BOILERPLATE_COUNT_OPTION_VALUE: string;
|
|
37
|
+
/**
|
|
38
|
+
* Description of the `--count` option shared by all commands which generate prompt boilerplates.
|
|
39
|
+
*
|
|
40
|
+
* @private internal utility of `ptbk coder`
|
|
41
|
+
*/
|
|
42
|
+
export declare const BOILERPLATE_COUNT_OPTION_DESCRIPTION: string;
|
|
43
|
+
/**
|
|
44
|
+
* Parses the `--count` option value into the number of files and the number of prompts in each of them.
|
|
45
|
+
*
|
|
46
|
+
* Both notations are supported:
|
|
47
|
+
* - `N` and `N*1` => N files with one prompt each
|
|
48
|
+
* - `N*M` => N files with M prompts each
|
|
49
|
+
*
|
|
50
|
+
* @private internal utility of `ptbk coder`
|
|
51
|
+
*/
|
|
52
|
+
export declare function parseBoilerplateCount(countOption: string): BoilerplateCount;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
import { type PromptRunnerHarnessName } from '../common/promptRunnerCliOptions';
|
|
1
2
|
import type { InitializationStatus } from './boilerplateTemplates';
|
|
2
3
|
/**
|
|
3
|
-
* Ensures `.gitignore` contains
|
|
4
|
+
* Ensures `.gitignore` contains Promptbook Coder's local artifacts and every supported harness's local artifacts.
|
|
4
5
|
*
|
|
5
6
|
* @private function of `initializeCoderProjectConfiguration`
|
|
6
7
|
*/
|
|
7
8
|
export declare function ensureCoderGitignoreFile(projectPath: string): Promise<InitializationStatus>;
|
|
9
|
+
/**
|
|
10
|
+
* Lists missing project-local ignore rules for the selected harnesses.
|
|
11
|
+
*
|
|
12
|
+
* @private internal utility of `ptbk coder`
|
|
13
|
+
*/
|
|
14
|
+
export declare function getMissingCoderHarnessGitignoreRules(projectPath: string, harnessNames: ReadonlyArray<PromptRunnerHarnessName>): Promise<ReadonlyArray<string>>;
|
|
15
|
+
/**
|
|
16
|
+
* Adds the given Promptbook Coder rules to a project's `.gitignore` file.
|
|
17
|
+
*
|
|
18
|
+
* @private internal utility of `ptbk coder`
|
|
19
|
+
*/
|
|
20
|
+
export declare function ensureCoderGitignoreRules(projectPath: string, rules: ReadonlyArray<string>): Promise<InitializationStatus>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Command as Program } from 'commander';
|
|
2
2
|
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
import type { BoilerplateCount } from './boilerplateCount';
|
|
3
4
|
/**
|
|
4
5
|
* Initializes `coder generate-boilerplates` command for Promptbook CLI utilities
|
|
5
6
|
*
|
|
@@ -9,12 +10,12 @@ import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
|
9
10
|
*/
|
|
10
11
|
export declare function $initializeCoderGenerateBoilerplatesCommand(program: Program): $side_effect;
|
|
11
12
|
/**
|
|
12
|
-
* Generates boilerplate prompt files with unique emoji
|
|
13
|
+
* Generates boilerplate prompt files with one unique emoji tag per file.
|
|
13
14
|
*
|
|
14
15
|
* @private internal function of `generatePromptBoilerplate` command
|
|
15
16
|
*/
|
|
16
|
-
export declare function generatePromptBoilerplate({ projectPath,
|
|
17
|
+
export declare function generatePromptBoilerplate({ projectPath, boilerplateCount, templateOption, }: {
|
|
17
18
|
readonly projectPath: string;
|
|
18
|
-
readonly
|
|
19
|
+
readonly boilerplateCount: BoilerplateCount;
|
|
19
20
|
readonly templateOption?: string;
|
|
20
21
|
}): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,3 +12,15 @@ export declare const DEFAULT_WAIT_AFTER_ERROR_MS: number;
|
|
|
12
12
|
* @private internal utility of `ptbk coder` wait handling
|
|
13
13
|
*/
|
|
14
14
|
export declare function parseOptionalWaitDuration(value: string | undefined, defaultMs: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* Parses an optional Commander period duration string and returns the resolved milliseconds.
|
|
17
|
+
*
|
|
18
|
+
* Returns `undefined` when the flag was not provided or was provided without a non-empty value,
|
|
19
|
+
* which means the command runs only once instead of repeating itself.
|
|
20
|
+
*
|
|
21
|
+
* @throws {NotAllowed} When the duration is not a positive one, because a non-positive period
|
|
22
|
+
* would repeat the command without ever pausing between two rounds
|
|
23
|
+
*
|
|
24
|
+
* @private internal utility of `ptbk coder` wait handling
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseOptionalPeriodDuration(optionName: string, value: string | undefined): number | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asks the user in the terminal to confirm one optional change.
|
|
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 $askForConfirmation(question: string): Promise<boolean>;
|
|
@@ -2,7 +2,7 @@ import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
|
|
|
2
2
|
/**
|
|
3
3
|
* Reports one detected harness installation status and offers to install or update the harness.
|
|
4
4
|
*
|
|
5
|
-
* Note: `$` is used to indicate that this function is not a pure function - it asks the user and installs
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it asks the user and installs software
|
|
6
6
|
*
|
|
7
7
|
* @private internal utility of `promptbookCli`
|
|
8
8
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
2
|
import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
|
|
3
3
|
/**
|
|
4
|
-
* Detects whether one CLI coding harness is installed globally and whether it is up to date.
|
|
4
|
+
* Detects whether one CLI coding harness is installed globally and, when enabled, whether it is up to date.
|
|
5
5
|
*
|
|
6
|
-
* Note: `$` is used to indicate that this function is not a pure function - it runs the harness command and
|
|
6
|
+
* Note: `$` is used to indicate that this function is not a pure function - it runs the harness command and may query npm
|
|
7
7
|
*
|
|
8
8
|
* @private internal utility of `promptbookCli`
|
|
9
9
|
*/
|
|
10
|
-
export declare function $checkHarnessInstallation(definition: HarnessDefinition): Promise<HarnessInstallationStatus>;
|
|
10
|
+
export declare function $checkHarnessInstallation(definition: HarnessDefinition, isHarnessUpdateCheckEnabled?: boolean): Promise<HarnessInstallationStatus>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
|
|
2
2
|
/**
|
|
3
|
-
* Checks that every given CLI coding harness is installed globally and up to date
|
|
4
|
-
* install
|
|
3
|
+
* Checks that every given CLI coding harness is installed globally and, when enabled, up to date.
|
|
4
|
+
* Offers to install missing harnesses and update outdated ones.
|
|
5
5
|
*
|
|
6
6
|
* Harness names which are `undefined`, for example when no `--harness` is selected in a dry run,
|
|
7
7
|
* are ignored so that every call site can pass its raw selection.
|
|
@@ -10,4 +10,4 @@ import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
|
|
|
10
10
|
*
|
|
11
11
|
* @private internal utility of `promptbookCli`
|
|
12
12
|
*/
|
|
13
|
-
export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined
|
|
13
|
+
export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined>, isHarnessUpdateCheckEnabled?: boolean): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Finds out which file is really executed when the harness command runs.
|
|
4
|
+
*
|
|
5
|
+
* The lookup deliberately uses the very same `PATH` which runs the harness, so it reports the copy of the
|
|
6
|
+
* harness which Promptbook itself would use. Symbolic links are followed, because installers like the
|
|
7
|
+
* standalone OpenAI Codex installer only link their package into a directory on `PATH`.
|
|
8
|
+
*
|
|
9
|
+
* Note: `$` is used to indicate that this function is not a pure function - it runs a command in a shell
|
|
10
|
+
*
|
|
11
|
+
* @returns Resolved path of the harness command or `null` when the command is not available
|
|
12
|
+
* @private internal utility of `promptbookCli`
|
|
13
|
+
*/
|
|
14
|
+
export declare function $resolveHarnessCommandPath(definition: HarnessDefinition): Promise<string | null>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
import type { HarnessInstallationOrigin } from './HarnessInstallationOrigin';
|
|
3
|
+
/**
|
|
4
|
+
* Finds out where one CLI coding harness is really installed and which tool manages it.
|
|
5
|
+
*
|
|
6
|
+
* Note: `$` is used to indicate that this function is not a pure function - it runs shell commands
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `promptbookCli`
|
|
9
|
+
*/
|
|
10
|
+
export declare function $resolveHarnessInstallationOrigin(definition: HarnessDefinition): Promise<HarnessInstallationOrigin>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { HarnessDefinition } from './HarnessDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* What one harness installation command does with the harness.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `promptbookCli`
|
|
6
|
+
*/
|
|
7
|
+
export type HarnessInstallationOperation = 'install' | 'update';
|
|
8
|
+
/**
|
|
9
|
+
* Options of one command which installs or updates a CLI coding harness.
|
|
10
|
+
*
|
|
11
|
+
* @private internal utility of `$runHarnessInstallationCommand`
|
|
12
|
+
*/
|
|
13
|
+
type HarnessInstallationCommandOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* Harness which is installed or updated.
|
|
16
|
+
*/
|
|
17
|
+
readonly definition: HarnessDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* What the command does with the harness.
|
|
20
|
+
*/
|
|
21
|
+
readonly operation: HarnessInstallationOperation;
|
|
22
|
+
/**
|
|
23
|
+
* Shell command which does it.
|
|
24
|
+
*/
|
|
25
|
+
readonly command: string;
|
|
26
|
+
/**
|
|
27
|
+
* Extra environment variables required by the command.
|
|
28
|
+
*/
|
|
29
|
+
readonly environment?: Readonly<Record<string, string>>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Runs one command which installs or updates a CLI coding harness.
|
|
33
|
+
*
|
|
34
|
+
* A failed installation is reported but never aborts the running command, because the harness check
|
|
35
|
+
* is only an assistant - the command itself may still work with a manually managed harness.
|
|
36
|
+
*
|
|
37
|
+
* Note: `$` is used to indicate that this function is not a pure function - it installs software
|
|
38
|
+
*
|
|
39
|
+
* @returns `true` when the command succeeded, `false` when it failed
|
|
40
|
+
* @private internal utility of `promptbookCli`
|
|
41
|
+
*/
|
|
42
|
+
export declare function $runHarnessInstallationCommand(options: HarnessInstallationCommandOptions): Promise<boolean>;
|
|
43
|
+
export {};
|