@promptbook/cli 0.112.0-72 → 0.112.0-73
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/esm/index.es.js +8841 -7016
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-messages/main/agentIgnorePatterns.d.ts +33 -0
- package/esm/scripts/run-agent-messages/main/synchronizeGithubAgentRunnerRepositories.d.ts +5 -1
- package/esm/scripts/run-agent-messages/main/tickAgentMessages.d.ts +7 -0
- package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +1 -1
- package/esm/scripts/run-agent-messages/ui/agentRunUiConstants.d.ts +4 -0
- package/esm/scripts/run-agent-messages/ui/loadAgentRunUiMetadata.d.ts +13 -0
- package/esm/scripts/run-codex-prompts/common/runGoScript/buildTemporaryPromptScriptPath.d.ts +14 -0
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +1 -0
- package/esm/scripts/run-codex-prompts/git/pullLatestChanges.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/prompts/buildScriptPath.d.ts +2 -2
- package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +20 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +18 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +4 -0
- package/esm/src/book-components/Chat/save/_common/chatExportRendering.d.ts +28 -0
- package/esm/src/book-components/Chat/save/_common/getPromptbookExportBranding.d.ts +18 -0
- package/esm/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +1 -1
- package/esm/src/book-components/Chat/save/html/htmlSaveFormatDefinition.test.d.ts +1 -0
- package/esm/src/book-components/Chat/save/index.d.ts +4 -4
- package/esm/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.d.ts +1 -1
- package/esm/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.test.d.ts +1 -0
- package/esm/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +3 -2
- package/esm/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +2 -2
- package/esm/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.test.d.ts +1 -0
- package/esm/src/book-components/Chat/save/react/reactSaveFormatDefinition.test.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +26 -0
- package/esm/src/cli/cli-commands/agent/agentRunCliOptions.d.ts +2 -0
- package/esm/src/cli/cli-commands/agent/initializeAgentRunnerCommand.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/handleActionErrors.d.ts +9 -4
- package/esm/src/conversion/pipelineJsonToString/appendMarkdownBlock.d.ts +7 -0
- package/esm/src/conversion/pipelineJsonToString/createPipelineCommands.d.ts +7 -0
- package/esm/src/conversion/pipelineJsonToString/createPipelineIntroduction.d.ts +8 -0
- package/esm/src/conversion/pipelineJsonToString/createTaskSerialization.d.ts +23 -0
- package/esm/src/conversion/pipelineJsonToString/stringifyCommands.d.ts +7 -0
- package/esm/src/conversion/pipelineJsonToString/stringifyTask.d.ts +8 -0
- package/esm/src/conversion/pipelineJsonToString.test.d.ts +1 -0
- package/esm/src/execution/createPipelineExecutor/executeSingleAttempt.d.ts +31 -0
- package/esm/src/execution/createPipelineExecutor/handleAttemptFailure.d.ts +40 -0
- package/esm/src/execution/createPipelineExecutor/reportPromptExecution.d.ts +34 -0
- package/esm/src/execution/resolveTaskTldr.d.ts +32 -0
- package/esm/src/execution/resolveTaskTldr.test.d.ts +1 -0
- package/esm/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +22 -63
- package/esm/src/llm-providers/agent/AgentLlmExecutionToolsAgentKitRunner.d.ts +51 -0
- package/esm/src/llm-providers/agent/AgentLlmExecutionToolsOpenAiAssistantRunner.d.ts +43 -0
- package/esm/src/llm-providers/agent/AgentLlmExecutionToolsPromptPreparer.d.ts +41 -0
- package/esm/src/llm-providers/agent/emitAgentLlmExecutionToolsAssistantPreparationProgress.d.ts +26 -0
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +16 -93
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsInputBuilder.d.ts +41 -0
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOutputTypeMapper.d.ts +56 -0
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +99 -0
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +24 -120
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsProgressReporter.d.ts +62 -0
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsPromptBuilder.d.ts +29 -0
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +63 -0
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +89 -0
- package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +9 -28
- package/esm/src/llm-providers/openai/OpenAiCompatibleModelCatalog.d.ts +31 -0
- package/esm/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +57 -0
- package/esm/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +29 -0
- package/esm/src/llm-providers/openai/OpenAiVectorStoreFileBatchHandler.d.ts +51 -0
- package/esm/src/llm-providers/openai/OpenAiVectorStoreFileBatchPoller.d.ts +75 -0
- package/esm/src/llm-providers/openai/OpenAiVectorStoreHandler.d.ts +1 -98
- package/esm/src/llm-providers/openai/OpenAiVectorStoreKnowledgeSourcePreparer.d.ts +44 -0
- package/esm/src/llm-providers/openai/utils/OpenAiCompatibleChatProgressReporter.d.ts +86 -0
- package/esm/src/llm-providers/openai/utils/OpenAiCompatibleChatPromptBuilder.d.ts +57 -0
- package/esm/src/llm-providers/openai/utils/OpenAiCompatibleChatToolCaller.d.ts +57 -0
- package/esm/src/remote-server/startRemoteServer/RemoteServerRuntime.d.ts +14 -0
- package/esm/src/remote-server/startRemoteServer/SocketResponse.d.ts +9 -0
- package/esm/src/remote-server/startRemoteServer/StartRemoteServerConfiguration.d.ts +18 -0
- package/esm/src/remote-server/startRemoteServer/createRemoteServerExpressApp.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/createRemoteServerHandle.d.ts +11 -0
- package/esm/src/remote-server/startRemoteServer/createSocketServer.d.ts +9 -0
- package/esm/src/remote-server/startRemoteServer/getExecutionToolsFromIdentification.d.ts +12 -0
- package/esm/src/remote-server/startRemoteServer/registerBookRoutes.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/registerExecutionRoutes.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/registerListModelsSocketHandler.d.ts +8 -0
- package/esm/src/remote-server/startRemoteServer/registerLoginRoute.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/registerNotFoundRoute.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/registerOpenAiCompatibleChatCompletionsRoute.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/registerOpenApiRoutes.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/registerPreparePipelineSocketHandler.d.ts +8 -0
- package/esm/src/remote-server/startRemoteServer/registerPromptSocketHandler.d.ts +8 -0
- package/esm/src/remote-server/startRemoteServer/registerRemoteServerHttpRoutes.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/registerRemoteServerSocketHandlers.d.ts +8 -0
- package/esm/src/remote-server/startRemoteServer/registerServerIndexRoute.d.ts +7 -0
- package/esm/src/remote-server/startRemoteServer/resolveStartRemoteServerConfiguration.d.ts +8 -0
- package/esm/src/remote-server/startRemoteServer/respondToSocketRequest.d.ts +8 -0
- package/esm/src/remote-server/startRemoteServer/startListening.d.ts +9 -0
- package/esm/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +14 -1
- package/esm/src/utils/serialization/serializeToPromptbookJavascript.d.ts +2 -0
- package/esm/src/utils/serialization/serializeToPromptbookJavascript.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +8845 -7021
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-messages/main/agentIgnorePatterns.d.ts +33 -0
- package/umd/scripts/run-agent-messages/main/synchronizeGithubAgentRunnerRepositories.d.ts +5 -1
- package/umd/scripts/run-agent-messages/main/tickAgentMessages.d.ts +7 -0
- package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +1 -1
- package/umd/scripts/run-agent-messages/ui/agentRunUiConstants.d.ts +4 -0
- package/umd/scripts/run-agent-messages/ui/loadAgentRunUiMetadata.d.ts +13 -0
- package/umd/scripts/run-codex-prompts/common/runGoScript/buildTemporaryPromptScriptPath.d.ts +14 -0
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +1 -0
- package/umd/scripts/run-codex-prompts/git/pullLatestChanges.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/prompts/buildScriptPath.d.ts +2 -2
- package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +20 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +18 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +4 -0
- package/umd/src/book-components/Chat/save/_common/chatExportRendering.d.ts +28 -0
- package/umd/src/book-components/Chat/save/_common/getPromptbookExportBranding.d.ts +18 -0
- package/umd/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +1 -1
- package/umd/src/book-components/Chat/save/html/htmlSaveFormatDefinition.test.d.ts +1 -0
- package/umd/src/book-components/Chat/save/index.d.ts +4 -4
- package/umd/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.d.ts +1 -1
- package/umd/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.test.d.ts +1 -0
- package/umd/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +3 -2
- package/umd/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +2 -2
- package/umd/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.test.d.ts +1 -0
- package/umd/src/book-components/Chat/save/react/reactSaveFormatDefinition.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +26 -0
- package/umd/src/cli/cli-commands/agent/agentRunCliOptions.d.ts +2 -0
- package/umd/src/cli/cli-commands/agent/initializeAgentRunnerCommand.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/handleActionErrors.d.ts +9 -4
- package/umd/src/conversion/pipelineJsonToString/appendMarkdownBlock.d.ts +7 -0
- package/umd/src/conversion/pipelineJsonToString/createPipelineCommands.d.ts +7 -0
- package/umd/src/conversion/pipelineJsonToString/createPipelineIntroduction.d.ts +8 -0
- package/umd/src/conversion/pipelineJsonToString/createTaskSerialization.d.ts +23 -0
- package/umd/src/conversion/pipelineJsonToString/stringifyCommands.d.ts +7 -0
- package/umd/src/conversion/pipelineJsonToString/stringifyTask.d.ts +8 -0
- package/umd/src/conversion/pipelineJsonToString.test.d.ts +1 -0
- package/umd/src/execution/createPipelineExecutor/executeSingleAttempt.d.ts +31 -0
- package/umd/src/execution/createPipelineExecutor/handleAttemptFailure.d.ts +40 -0
- package/umd/src/execution/createPipelineExecutor/reportPromptExecution.d.ts +34 -0
- package/umd/src/execution/resolveTaskTldr.d.ts +32 -0
- package/umd/src/execution/resolveTaskTldr.test.d.ts +1 -0
- package/umd/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +22 -63
- package/umd/src/llm-providers/agent/AgentLlmExecutionToolsAgentKitRunner.d.ts +51 -0
- package/umd/src/llm-providers/agent/AgentLlmExecutionToolsOpenAiAssistantRunner.d.ts +43 -0
- package/umd/src/llm-providers/agent/AgentLlmExecutionToolsPromptPreparer.d.ts +41 -0
- package/umd/src/llm-providers/agent/emitAgentLlmExecutionToolsAssistantPreparationProgress.d.ts +26 -0
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +16 -93
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsInputBuilder.d.ts +41 -0
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOutputTypeMapper.d.ts +56 -0
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +99 -0
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +24 -120
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsProgressReporter.d.ts +62 -0
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsPromptBuilder.d.ts +29 -0
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +63 -0
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +89 -0
- package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +9 -28
- package/umd/src/llm-providers/openai/OpenAiCompatibleModelCatalog.d.ts +31 -0
- package/umd/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +57 -0
- package/umd/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +29 -0
- package/umd/src/llm-providers/openai/OpenAiVectorStoreFileBatchHandler.d.ts +51 -0
- package/umd/src/llm-providers/openai/OpenAiVectorStoreFileBatchPoller.d.ts +75 -0
- package/umd/src/llm-providers/openai/OpenAiVectorStoreHandler.d.ts +1 -98
- package/umd/src/llm-providers/openai/OpenAiVectorStoreKnowledgeSourcePreparer.d.ts +44 -0
- package/umd/src/llm-providers/openai/utils/OpenAiCompatibleChatProgressReporter.d.ts +86 -0
- package/umd/src/llm-providers/openai/utils/OpenAiCompatibleChatPromptBuilder.d.ts +57 -0
- package/umd/src/llm-providers/openai/utils/OpenAiCompatibleChatToolCaller.d.ts +57 -0
- package/umd/src/remote-server/startRemoteServer/RemoteServerRuntime.d.ts +14 -0
- package/umd/src/remote-server/startRemoteServer/SocketResponse.d.ts +9 -0
- package/umd/src/remote-server/startRemoteServer/StartRemoteServerConfiguration.d.ts +18 -0
- package/umd/src/remote-server/startRemoteServer/createRemoteServerExpressApp.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/createRemoteServerHandle.d.ts +11 -0
- package/umd/src/remote-server/startRemoteServer/createSocketServer.d.ts +9 -0
- package/umd/src/remote-server/startRemoteServer/getExecutionToolsFromIdentification.d.ts +12 -0
- package/umd/src/remote-server/startRemoteServer/registerBookRoutes.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/registerExecutionRoutes.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/registerListModelsSocketHandler.d.ts +8 -0
- package/umd/src/remote-server/startRemoteServer/registerLoginRoute.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/registerNotFoundRoute.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/registerOpenAiCompatibleChatCompletionsRoute.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/registerOpenApiRoutes.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/registerPreparePipelineSocketHandler.d.ts +8 -0
- package/umd/src/remote-server/startRemoteServer/registerPromptSocketHandler.d.ts +8 -0
- package/umd/src/remote-server/startRemoteServer/registerRemoteServerHttpRoutes.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/registerRemoteServerSocketHandlers.d.ts +8 -0
- package/umd/src/remote-server/startRemoteServer/registerServerIndexRoute.d.ts +7 -0
- package/umd/src/remote-server/startRemoteServer/resolveStartRemoteServerConfiguration.d.ts +8 -0
- package/umd/src/remote-server/startRemoteServer/respondToSocketRequest.d.ts +8 -0
- package/umd/src/remote-server/startRemoteServer/startListening.d.ts +9 -0
- package/umd/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +14 -1
- package/umd/src/utils/serialization/serializeToPromptbookJavascript.d.ts +2 -0
- package/umd/src/utils/serialization/serializeToPromptbookJavascript.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
- package/esm/scripts/run-agent-messages/main/withCurrentWorkingDirectory.d.ts +0 -4
- package/umd/scripts/run-agent-messages/main/withCurrentWorkingDirectory.d.ts +0 -4
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { string_book } from '../../../src/book-2.0/agent-source/string_book';
|
|
2
|
+
/**
|
|
3
|
+
* Prefix used by external runner repositories whose names carry the stable agent id.
|
|
4
|
+
*/
|
|
5
|
+
export declare const AGENT_RUNNER_REPOSITORY_PREFIX = "agent-";
|
|
6
|
+
/**
|
|
7
|
+
* Agent identity fields tested by `ptbk agent run-multiple --ignore`.
|
|
8
|
+
*/
|
|
9
|
+
export type AgentIgnoreIdentity = {
|
|
10
|
+
readonly agentName?: string;
|
|
11
|
+
readonly normalizedAgentName?: string;
|
|
12
|
+
readonly agentId?: string;
|
|
13
|
+
readonly repositoryName?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Case-insensitive wildcard matcher for `ptbk agent run-multiple --ignore`.
|
|
17
|
+
*/
|
|
18
|
+
export type AgentIgnoreMatcher = {
|
|
19
|
+
readonly isEnabled: boolean;
|
|
20
|
+
readonly isIgnored: (identity: AgentIgnoreIdentity) => boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Creates a case-insensitive matcher for agent ignore patterns.
|
|
24
|
+
*/
|
|
25
|
+
export declare function createAgentIgnoreMatcher(ignorePatterns: readonly string[] | undefined): AgentIgnoreMatcher;
|
|
26
|
+
/**
|
|
27
|
+
* Builds ignore identity fields from an agent source book.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createAgentIgnoreIdentityFromAgentSource(agentSource: string_book): AgentIgnoreIdentity;
|
|
30
|
+
/**
|
|
31
|
+
* Extracts the stable id part from canonical `agent-<id>` runner repository names.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveAgentIdFromRepositoryName(repositoryName: string): string | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AgentIgnoreMatcher } from './agentIgnorePatterns';
|
|
1
2
|
/**
|
|
2
3
|
* Environment variable carrying the GitHub token used to discover and clone agent repositories.
|
|
3
4
|
*/
|
|
@@ -11,6 +12,7 @@ export declare const PROMPTBOOK_AGENT_RUNNER_GITHUB_OWNER_ENV = "PROMPTBOOK_AGEN
|
|
|
11
12
|
*/
|
|
12
13
|
export type GithubAgentRunnerRepositoriesSynchronizationResult = {
|
|
13
14
|
readonly clonedRepositoryNames: ReadonlyArray<string>;
|
|
15
|
+
readonly ignoredRepositoryNames?: ReadonlyArray<string>;
|
|
14
16
|
readonly owner?: string;
|
|
15
17
|
readonly synchronizedAt?: number;
|
|
16
18
|
};
|
|
@@ -24,4 +26,6 @@ export declare function loadAgentRunnerGithubConfiguration(): {
|
|
|
24
26
|
/**
|
|
25
27
|
* Clones missing `agent-*` repositories from the configured GitHub owner into the direct child directories of `rootPath`.
|
|
26
28
|
*/
|
|
27
|
-
export declare function synchronizeGithubAgentRunnerRepositories(rootPath: string
|
|
29
|
+
export declare function synchronizeGithubAgentRunnerRepositories(rootPath: string, options?: {
|
|
30
|
+
readonly ignoreMatcher?: AgentIgnoreMatcher;
|
|
31
|
+
}): Promise<GithubAgentRunnerRepositoriesSynchronizationResult>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PromptStats } from '../../run-codex-prompts/prompts/types/PromptStats';
|
|
2
2
|
import { type CoderRunUiHandle } from '../../run-codex-prompts/ui/renderCoderRunUi';
|
|
3
|
+
import type { AgentRunMessagePreviewSection, AgentRunStatusTableRow } from '../../run-codex-prompts/ui/buildCoderRunUiFrame';
|
|
3
4
|
import type { AgentRunOptions } from '../AgentRunOptions';
|
|
4
5
|
import type { AgentMessageFile } from '../messages/AgentMessageFile';
|
|
5
6
|
import { type FinishedAgentMessageFile } from '../messages/moveAgentMessageToFinished';
|
|
@@ -17,6 +18,7 @@ export type AgentTickResult = {
|
|
|
17
18
|
*/
|
|
18
19
|
export type TickAgentMessagesOptions = {
|
|
19
20
|
readonly isQuietWhenIdle?: boolean;
|
|
21
|
+
readonly projectPath?: string;
|
|
20
22
|
readonly uiHandle?: CoderRunUiHandle;
|
|
21
23
|
readonly uiPresentation?: AgentTickUiPresentation;
|
|
22
24
|
};
|
|
@@ -24,12 +26,17 @@ export type TickAgentMessagesOptions = {
|
|
|
24
26
|
* Optional rich UI presentation overrides used by shared multi-agent sessions.
|
|
25
27
|
*/
|
|
26
28
|
export type AgentTickUiPresentation = {
|
|
29
|
+
readonly isSharedDashboard?: boolean;
|
|
27
30
|
readonly sessionAgentName?: string;
|
|
28
31
|
readonly agentStatusLines?: readonly string[];
|
|
32
|
+
readonly agentStatusTableRows?: readonly AgentRunStatusTableRow[];
|
|
29
33
|
readonly messagePreviewLines?: readonly string[];
|
|
34
|
+
readonly messagePreviewSections?: readonly AgentRunMessagePreviewSection[];
|
|
30
35
|
readonly progressStats?: PromptStats;
|
|
31
36
|
readonly completedAgentStatusLines?: readonly string[];
|
|
37
|
+
readonly completedAgentStatusTableRows?: readonly AgentRunStatusTableRow[];
|
|
32
38
|
readonly completedMessagePreviewLines?: readonly string[];
|
|
39
|
+
readonly completedMessagePreviewSections?: readonly AgentRunMessagePreviewSection[];
|
|
33
40
|
readonly completedProgressStats?: PromptStats;
|
|
34
41
|
};
|
|
35
42
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builds the prompt sent to the selected coding runner for one queued user-thread book.
|
|
3
3
|
*/
|
|
4
|
-
export declare function buildAgentMessagePrompt(messageRelativePath: string): string;
|
|
4
|
+
export declare function buildAgentMessagePrompt(messageRelativePath: string, agentSystemMessage: string): string;
|
|
@@ -6,6 +6,15 @@ export type AgentRunUiMetadata = {
|
|
|
6
6
|
readonly localAgentName: string;
|
|
7
7
|
readonly latestUserMessageLines: readonly string[];
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Local agent identity rendered in the rich `ptbk agent run` dashboard.
|
|
11
|
+
*/
|
|
12
|
+
export type AgentRunUiIdentity = {
|
|
13
|
+
readonly localAgentName: string;
|
|
14
|
+
readonly normalizedAgentName?: string;
|
|
15
|
+
readonly agentId?: string;
|
|
16
|
+
readonly localAgentUrl?: string;
|
|
17
|
+
};
|
|
9
18
|
/**
|
|
10
19
|
* Preview of one queued `.book` thread used by the rich terminal UI.
|
|
11
20
|
*/
|
|
@@ -26,6 +35,10 @@ export declare function loadAgentRunQueuedMessagePreview(queuedMessage: AgentMes
|
|
|
26
35
|
* Reads the local `agent.book` title and falls back to a stable generic name when unavailable.
|
|
27
36
|
*/
|
|
28
37
|
export declare function readLocalAgentName(projectPath: string): Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Reads the local `agent.book` identity and falls back to stable defaults when unavailable.
|
|
40
|
+
*/
|
|
41
|
+
export declare function readLocalAgentUiIdentity(projectPath: string): Promise<AgentRunUiIdentity>;
|
|
29
42
|
/**
|
|
30
43
|
* Extracts the latest `MESSAGE @User` block while preserving the original line breaks.
|
|
31
44
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options used to build one Promptbook-owned temporary shell script path.
|
|
3
|
+
*/
|
|
4
|
+
type BuildTemporaryPromptScriptPathOptions = {
|
|
5
|
+
readonly projectPath: string;
|
|
6
|
+
readonly scriptDirectoryName: string;
|
|
7
|
+
readonly sourceFileName: string;
|
|
8
|
+
readonly suffix?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Builds a normalized temporary shell script path for prompt runners.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildTemporaryPromptScriptPath(options: BuildTemporaryPromptScriptPathOptions): string;
|
|
14
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PromptFile } from './types/PromptFile';
|
|
2
2
|
import type { PromptSection } from './types/PromptSection';
|
|
3
3
|
/**
|
|
4
|
-
* Builds the script path for a prompt section.
|
|
4
|
+
* Builds the temporary script path for a prompt section.
|
|
5
5
|
*/
|
|
6
|
-
export declare function buildScriptPath(file: PromptFile, section: PromptSection): string;
|
|
6
|
+
export declare function buildScriptPath(file: PromptFile, section: PromptSection, projectPath?: string): string;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import moment from 'moment';
|
|
4
4
|
import { type CoderRunProgressSnapshot } from '../common/buildCoderRunProgressSnapshot';
|
|
5
|
+
import type { AgentRunMessagePreviewSection, AgentRunStatusTableRow } from './buildCoderRunUiFrame';
|
|
5
6
|
import type { PromptStats } from '../prompts/types/PromptStats';
|
|
6
7
|
/**
|
|
7
8
|
* Execution phase of the coder run process.
|
|
@@ -40,11 +41,14 @@ export type { CoderRunProgressSnapshot };
|
|
|
40
41
|
export declare class CoderRunUiState extends EventEmitter {
|
|
41
42
|
config: CoderRunConfig;
|
|
42
43
|
currentPromptLabel: string;
|
|
44
|
+
currentScriptPaths: string[];
|
|
43
45
|
currentAttempt: number;
|
|
44
46
|
maxAttempts: number;
|
|
45
47
|
detailLines: string[];
|
|
46
48
|
messagePreviewLines: string[];
|
|
49
|
+
messagePreviewSections: AgentRunMessagePreviewSection[];
|
|
47
50
|
agentStatusLines: string[];
|
|
51
|
+
agentStatusTableRows: AgentRunStatusTableRow[];
|
|
48
52
|
pendingEnterLabel: string | undefined;
|
|
49
53
|
agentOutputLines: string[];
|
|
50
54
|
phase: CoderRunPhase;
|
|
@@ -78,6 +82,14 @@ export declare class CoderRunUiState extends EventEmitter {
|
|
|
78
82
|
* Sets the label of the prompt currently being processed and resets per-prompt state.
|
|
79
83
|
*/
|
|
80
84
|
setCurrentPrompt(label: string): void;
|
|
85
|
+
/**
|
|
86
|
+
* Sets the temporary shell script currently used by the active prompt.
|
|
87
|
+
*/
|
|
88
|
+
setCurrentScriptPath(scriptPath: string | undefined): void;
|
|
89
|
+
/**
|
|
90
|
+
* Sets multiple temporary shell scripts used by a shared multi-agent session.
|
|
91
|
+
*/
|
|
92
|
+
setCurrentScriptPaths(scriptPaths: readonly string[]): void;
|
|
81
93
|
/**
|
|
82
94
|
* Updates the current retry attempt number.
|
|
83
95
|
*/
|
|
@@ -102,10 +114,18 @@ export declare class CoderRunUiState extends EventEmitter {
|
|
|
102
114
|
* Replaces the exact user-message preview lines shown in agent-specific panels.
|
|
103
115
|
*/
|
|
104
116
|
setMessagePreviewLines(messagePreviewLines: string[]): void;
|
|
117
|
+
/**
|
|
118
|
+
* Replaces the structured user-message panels shown in agent-specific dashboards.
|
|
119
|
+
*/
|
|
120
|
+
setMessagePreviewSections(messagePreviewSections: AgentRunMessagePreviewSection[]): void;
|
|
105
121
|
/**
|
|
106
122
|
* Replaces agent status rows shown by agent-specific terminal frames.
|
|
107
123
|
*/
|
|
108
124
|
setAgentStatusLines(agentStatusLines: string[]): void;
|
|
125
|
+
/**
|
|
126
|
+
* Replaces structured agent status rows shown by agent-specific terminal frames.
|
|
127
|
+
*/
|
|
128
|
+
setAgentStatusTableRows(agentStatusTableRows: AgentRunStatusTableRow[]): void;
|
|
109
129
|
/**
|
|
110
130
|
* Sets or clears the Enter-key action label shown in the controls panel.
|
|
111
131
|
*/
|
|
@@ -15,17 +15,35 @@ export type BuildCoderRunUiFrameOptions = {
|
|
|
15
15
|
readonly config: CoderRunConfig;
|
|
16
16
|
readonly phase: CoderRunPhase;
|
|
17
17
|
readonly currentPromptLabel: string;
|
|
18
|
+
readonly currentScriptPaths?: readonly string[];
|
|
18
19
|
readonly currentAttempt: number;
|
|
19
20
|
readonly maxAttempts: number;
|
|
20
21
|
readonly statusMessage: string;
|
|
21
22
|
readonly detailLines: readonly string[];
|
|
22
23
|
readonly messagePreviewLines?: readonly string[];
|
|
24
|
+
readonly messagePreviewSections?: readonly AgentRunMessagePreviewSection[];
|
|
23
25
|
readonly agentStatusLines?: readonly string[];
|
|
26
|
+
readonly agentStatusTableRows?: readonly AgentRunStatusTableRow[];
|
|
24
27
|
readonly pendingEnterLabel?: string;
|
|
25
28
|
readonly agentOutputLines: readonly string[];
|
|
26
29
|
readonly errors: readonly string[];
|
|
27
30
|
readonly progress: CoderRunProgressSnapshot;
|
|
28
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Structured row rendered in the agent-run `Agents` table.
|
|
34
|
+
*/
|
|
35
|
+
export type AgentRunStatusTableRow = {
|
|
36
|
+
readonly status: 'Idle' | 'Answering';
|
|
37
|
+
readonly agentName: string;
|
|
38
|
+
readonly url: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Structured user-message panel rendered by the agent-run dashboard.
|
|
42
|
+
*/
|
|
43
|
+
export type AgentRunMessagePreviewSection = {
|
|
44
|
+
readonly title: string;
|
|
45
|
+
readonly messagePreviewLines: readonly string[];
|
|
46
|
+
};
|
|
29
47
|
/**
|
|
30
48
|
* Builds the complete boxed terminal frame for the rich `ptbk coder run` UI.
|
|
31
49
|
*/
|
|
@@ -35,6 +35,10 @@ export declare function renderBox(title: string, lines: readonly string[], total
|
|
|
35
35
|
* Builds one aligned labeled line inside the session box.
|
|
36
36
|
*/
|
|
37
37
|
export declare function buildLabeledSessionLine(label: string, value: string, bodyWidth: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* Builds session rows with clickable links to active temporary runner shell scripts.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildScriptPathSessionRows(scriptPaths: readonly string[], bodyWidth: number): readonly SessionRow[];
|
|
38
42
|
/**
|
|
39
43
|
* Builds the colored phase badge shown in the session box.
|
|
40
44
|
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ChatParticipant } from '../../types/ChatParticipant';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal participant visuals needed by chat exports.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of chat save format definitions
|
|
6
|
+
*/
|
|
7
|
+
export type ChatExportParticipantVisuals = {
|
|
8
|
+
readonly displayName: string;
|
|
9
|
+
readonly accentColor: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Formats exported timestamps into a compact human-readable label.
|
|
13
|
+
*
|
|
14
|
+
* @private internal utility of chat save format definitions
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatChatExportTimestamp(value?: string | Date): string;
|
|
17
|
+
/**
|
|
18
|
+
* Builds a participant lookup indexed by both raw and upper-cased names.
|
|
19
|
+
*
|
|
20
|
+
* @private internal utility of chat save format definitions
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildChatExportParticipantMap(participants: ReadonlyArray<ChatParticipant>): ReadonlyMap<string, ChatParticipant>;
|
|
23
|
+
/**
|
|
24
|
+
* Resolves the display label and accent color for one message sender.
|
|
25
|
+
*
|
|
26
|
+
* @private internal utility of chat save format definitions
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveChatExportParticipantVisuals(participants: ReadonlyMap<string, ChatParticipant>, sender: string): ChatExportParticipantVisuals;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Promptbook branding metadata embedded into standalone chat exports.
|
|
3
|
+
*/
|
|
4
|
+
type PromptbookExportBranding = {
|
|
5
|
+
readonly productName: string;
|
|
6
|
+
readonly creatorTool: string;
|
|
7
|
+
readonly metadataSummary: string;
|
|
8
|
+
readonly keywords: ReadonlyArray<string>;
|
|
9
|
+
readonly commentLines: ReadonlyArray<string>;
|
|
10
|
+
readonly detailLines: ReadonlyArray<string>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Builds shared Promptbook export branding for standalone save formats.
|
|
14
|
+
*
|
|
15
|
+
* @private internal utility of chat save format definitions
|
|
16
|
+
*/
|
|
17
|
+
export declare function getPromptbookExportBranding(): PromptbookExportBranding;
|
|
18
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import type { ChatParticipant } from '../../types/ChatParticipant';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const htmlSaveFormatDefinition: {
|
|
9
9
|
readonly formatName: "html";
|
|
10
|
-
readonly label: "
|
|
10
|
+
readonly label: "HTML";
|
|
11
11
|
readonly getContent: ({ title, messages, participants }: {
|
|
12
12
|
readonly title: string;
|
|
13
13
|
readonly messages: readonly ChatMessage[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -26,7 +26,7 @@ export declare const CHAT_SAVE_FORMATS: readonly [{
|
|
|
26
26
|
}, {
|
|
27
27
|
readonly formatName: "md";
|
|
28
28
|
readonly label: "Markdown";
|
|
29
|
-
readonly getContent: ({ messages }: {
|
|
29
|
+
readonly getContent: ({ messages, participants }: {
|
|
30
30
|
readonly title: string;
|
|
31
31
|
readonly messages: readonly import("../types/ChatMessage").ChatMessage[];
|
|
32
32
|
readonly participants: readonly import("../types/ChatParticipant").ChatParticipant[];
|
|
@@ -35,7 +35,7 @@ export declare const CHAT_SAVE_FORMATS: readonly [{
|
|
|
35
35
|
readonly fileExtension: "md";
|
|
36
36
|
}, {
|
|
37
37
|
readonly formatName: "html";
|
|
38
|
-
readonly label: "
|
|
38
|
+
readonly label: "HTML";
|
|
39
39
|
readonly getContent: ({ title, messages, participants }: {
|
|
40
40
|
readonly title: string;
|
|
41
41
|
readonly messages: readonly import("../types/ChatMessage").ChatMessage[];
|
|
@@ -55,8 +55,8 @@ export declare const CHAT_SAVE_FORMATS: readonly [{
|
|
|
55
55
|
readonly fileExtension: "jsx";
|
|
56
56
|
}, {
|
|
57
57
|
readonly formatName: "pdf";
|
|
58
|
-
readonly label: "
|
|
59
|
-
readonly getContent: ({ messages, participants }: {
|
|
58
|
+
readonly label: "PDF";
|
|
59
|
+
readonly getContent: ({ title, messages, participants }: {
|
|
60
60
|
readonly title: string;
|
|
61
61
|
readonly messages: readonly import("../types/ChatMessage").ChatMessage[];
|
|
62
62
|
readonly participants: readonly import("../types/ChatParticipant").ChatParticipant[];
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export declare const mdSaveFormatDefinition: {
|
|
7
7
|
readonly formatName: "md";
|
|
8
8
|
readonly label: "Markdown";
|
|
9
|
-
readonly getContent: ({ messages }: {
|
|
9
|
+
readonly getContent: ({ messages, participants }: {
|
|
10
10
|
readonly title: string;
|
|
11
11
|
readonly messages: readonly import("../../types/ChatMessage").ChatMessage[];
|
|
12
12
|
readonly participants: readonly import("../../types/ChatParticipant").ChatParticipant[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ChatMessage } from '../../types/ChatMessage';
|
|
2
2
|
import type { ChatParticipant } from '../../types/ChatParticipant';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Builds a polished PDF representation of the provided chat.
|
|
5
5
|
*
|
|
6
|
+
* @param title - Title used in the PDF heading and metadata.
|
|
6
7
|
* @param messages - Messages that should be included in the PDF export.
|
|
7
8
|
* @param participants - Optional participant metadata to resolve sender names.
|
|
8
9
|
* @returns Binary data for the generated PDF file.
|
|
9
10
|
*
|
|
10
11
|
* @private Internal helper used by `pdfSaveFormatDefinition`.
|
|
11
12
|
*/
|
|
12
|
-
export declare function buildChatPdf(messages: ReadonlyArray<ChatMessage>, participants?: ReadonlyArray<ChatParticipant>): Uint8Array;
|
|
13
|
+
export declare function buildChatPdf(title: string, messages: ReadonlyArray<ChatMessage>, participants?: ReadonlyArray<ChatParticipant>): Uint8Array;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const pdfSaveFormatDefinition: {
|
|
7
7
|
readonly formatName: "pdf";
|
|
8
|
-
readonly label: "
|
|
9
|
-
readonly getContent: ({ messages, participants }: {
|
|
8
|
+
readonly label: "PDF";
|
|
9
|
+
readonly getContent: ({ title, messages, participants }: {
|
|
10
10
|
readonly title: string;
|
|
11
11
|
readonly messages: readonly import("../../types/ChatMessage").ChatMessage[];
|
|
12
12
|
readonly participants: readonly import("../../types/ChatParticipant").ChatParticipant[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { string_html, string_markdown } from '../../../types/string_markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Options for markdown rendering.
|
|
4
|
+
*/
|
|
5
|
+
type RenderMarkdownOptions = {
|
|
6
|
+
readonly citationReferenceClassName?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Convert markdown content to HTML.
|
|
10
|
+
*
|
|
11
|
+
* @param markdown - The markdown content to convert.
|
|
12
|
+
* @returns HTML string ready for rendering.
|
|
13
|
+
*
|
|
14
|
+
* @private internal utility of chat components and exports
|
|
15
|
+
*/
|
|
16
|
+
export declare function renderMarkdown(markdown: string_markdown, options?: RenderMarkdownOptions): string_html;
|
|
17
|
+
/**
|
|
18
|
+
* Detects whether text appears to contain markdown syntax.
|
|
19
|
+
*
|
|
20
|
+
* @param markdown - The text to inspect.
|
|
21
|
+
* @returns Whether the text contains known markdown markers.
|
|
22
|
+
*
|
|
23
|
+
* @private internal utility of chat components and exports
|
|
24
|
+
*/
|
|
25
|
+
export declare function isMarkdownContent(markdown: string_markdown): boolean;
|
|
26
|
+
export {};
|
|
@@ -6,6 +6,7 @@ import type { NormalizedPromptRunnerCliOptions, PromptRunnerCliOptions } from '.
|
|
|
6
6
|
*/
|
|
7
7
|
export type AgentRunCliOptions = PromptRunnerCliOptions & {
|
|
8
8
|
readonly autoClone?: boolean;
|
|
9
|
+
readonly ignore?: string | readonly string[];
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
12
|
* Normalized options passed from `ptbk agent` CLI commands to the message runner.
|
|
@@ -14,6 +15,7 @@ export type AgentRunCliOptions = PromptRunnerCliOptions & {
|
|
|
14
15
|
*/
|
|
15
16
|
export type NormalizedAgentRunCliOptions = NormalizedPromptRunnerCliOptions & {
|
|
16
17
|
readonly autoClone: boolean;
|
|
18
|
+
readonly ignorePatterns: readonly string[];
|
|
17
19
|
};
|
|
18
20
|
/**
|
|
19
21
|
* Converts Commander options into the `scripts/run-agent-messages` option shape.
|
|
@@ -11,6 +11,7 @@ type InitializeAgentRunnerCommandOptions = {
|
|
|
11
11
|
readonly aliases?: ReadonlyArray<string>;
|
|
12
12
|
readonly summary: string;
|
|
13
13
|
readonly featureLines: ReadonlyArray<string>;
|
|
14
|
+
readonly isExitingOnSuccess?: boolean;
|
|
14
15
|
readonly configureCommand?: (command: Program) => void;
|
|
15
16
|
readonly loadExecutor: () => Promise<(runOptions: ReturnType<typeof createAgentRunOptionsFromCliOptions>) => Promise<unknown>>;
|
|
16
17
|
};
|
|
@@ -4,12 +4,17 @@ import type { Command as Program } from 'commander';
|
|
|
4
4
|
*/
|
|
5
5
|
type actionCallbackFunction = Parameters<Program['action']>[0];
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Options controlling CLI process-exit behavior after one command action finishes.
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
10
|
-
|
|
9
|
+
* @private internal helper type for CLI commands
|
|
10
|
+
*/
|
|
11
|
+
type HandleActionErrorsOptions = {
|
|
12
|
+
readonly isExitingOnSuccess?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Wraps action to handle error console logging and exit process with error code.
|
|
11
16
|
*
|
|
12
17
|
* @private internal helper function for CLI commands
|
|
13
18
|
*/
|
|
14
|
-
export declare function handleActionErrors(action: actionCallbackFunction): actionCallbackFunction;
|
|
19
|
+
export declare function handleActionErrors(action: actionCallbackFunction, options?: HandleActionErrorsOptions): actionCallbackFunction;
|
|
15
20
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { string_markdown } from '../../types/string_markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Appends one markdown block to an existing markdown document.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `pipelineJsonToString`
|
|
6
|
+
*/
|
|
7
|
+
export declare function appendMarkdownBlock(pipelineString: string_markdown, markdownBlock: string_markdown): string_markdown;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
2
|
+
/**
|
|
3
|
+
* Collects pipeline-level commands in the existing serialization order.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `pipelineJsonToString`
|
|
6
|
+
*/
|
|
7
|
+
export declare function createPipelineCommands(pipelineJson: PipelineJson): Array<string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
2
|
+
import type { string_markdown } from '../../types/string_markdown';
|
|
3
|
+
/**
|
|
4
|
+
* Creates the initial markdown heading and description of a pipeline.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `pipelineJsonToString`
|
|
7
|
+
*/
|
|
8
|
+
export declare function createPipelineIntroduction(pipelineJson: PipelineJson): string_markdown;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TaskJson } from '../../pipeline/PipelineJson/TaskJson';
|
|
2
|
+
/**
|
|
3
|
+
* Code fence language used when stringifying a pipeline task.
|
|
4
|
+
*
|
|
5
|
+
* @private internal type of `createTaskSerialization`
|
|
6
|
+
*/
|
|
7
|
+
type PipelineTaskContentLanguage = 'markdown' | 'text' | 'javascript' | 'typescript' | 'python' | '';
|
|
8
|
+
/**
|
|
9
|
+
* All derived serialization details needed to render one task section.
|
|
10
|
+
*
|
|
11
|
+
* @private internal type of `createTaskSerialization`
|
|
12
|
+
*/
|
|
13
|
+
type TaskSerialization = {
|
|
14
|
+
readonly commands: Array<string>;
|
|
15
|
+
readonly contentLanguage: PipelineTaskContentLanguage;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Collects all task-specific serialization details.
|
|
19
|
+
*
|
|
20
|
+
* @private internal utility of `pipelineJsonToString`
|
|
21
|
+
*/
|
|
22
|
+
export declare function createTaskSerialization(task: TaskJson): TaskSerialization;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { string_markdown } from '../../types/string_markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Renders commands as markdown bullet items.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `pipelineJsonToString`
|
|
6
|
+
*/
|
|
7
|
+
export declare function stringifyCommands(commands: ReadonlyArray<string>): string_markdown;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TaskJson } from '../../pipeline/PipelineJson/TaskJson';
|
|
2
|
+
import type { string_markdown } from '../../types/string_markdown';
|
|
3
|
+
/**
|
|
4
|
+
* Stringifies one task section of the pipeline.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `pipelineJsonToString`
|
|
7
|
+
*/
|
|
8
|
+
export declare function stringifyTask(task: TaskJson): string_markdown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { string_parameter_name } from '../../types/string_name';
|
|
2
|
+
import type { LlmExecutionTools } from '../LlmExecutionTools';
|
|
3
|
+
import type { $OngoingTaskResult } from './$OngoingTaskResult';
|
|
4
|
+
import type { ExecuteAttemptsOptions } from './40-executeAttempts';
|
|
5
|
+
/**
|
|
6
|
+
* Executes one loop iteration, from joker resolution or task execution through validation.
|
|
7
|
+
*
|
|
8
|
+
* @private function of `executeAttempts`
|
|
9
|
+
*/
|
|
10
|
+
export declare function executeSingleAttempt(options: {
|
|
11
|
+
/**
|
|
12
|
+
* Metadata describing the current loop iteration.
|
|
13
|
+
*/
|
|
14
|
+
readonly attempt: {
|
|
15
|
+
readonly attemptIndex: number;
|
|
16
|
+
readonly isJokerAttempt: boolean;
|
|
17
|
+
readonly jokerParameterName?: string_parameter_name;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Immutable executor options shared across all attempts.
|
|
21
|
+
*/
|
|
22
|
+
readonly options: ExecuteAttemptsOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Narrowed LLM execution tools for prompt tasks.
|
|
25
|
+
*/
|
|
26
|
+
readonly llmTools: LlmExecutionTools;
|
|
27
|
+
/**
|
|
28
|
+
* Mutable per-task state accumulated across attempts.
|
|
29
|
+
*/
|
|
30
|
+
readonly $ongoingTaskResult: $OngoingTaskResult;
|
|
31
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { PartialDeep, Promisable } from 'type-fest';
|
|
2
|
+
import { ExpectError } from '../../errors/ExpectError';
|
|
3
|
+
import type { PipelineExecutorResult } from '../PipelineExecutorResult';
|
|
4
|
+
import type { $OngoingTaskResult } from './$OngoingTaskResult';
|
|
5
|
+
/**
|
|
6
|
+
* Stores one failed attempt, reports the expectation error, and throws the aggregated retry error after the final
|
|
7
|
+
* regular attempt.
|
|
8
|
+
*
|
|
9
|
+
* @private function of `executeAttempts`
|
|
10
|
+
*/
|
|
11
|
+
export declare function handleAttemptFailure(options: {
|
|
12
|
+
/**
|
|
13
|
+
* Expectation error raised by the current attempt.
|
|
14
|
+
*/
|
|
15
|
+
readonly error: ExpectError;
|
|
16
|
+
/**
|
|
17
|
+
* Zero-based attempt index for the current execution loop.
|
|
18
|
+
*/
|
|
19
|
+
readonly attemptIndex: number;
|
|
20
|
+
/**
|
|
21
|
+
* Maximum number of attempts for the current task type.
|
|
22
|
+
*/
|
|
23
|
+
readonly maxAttempts: number;
|
|
24
|
+
/**
|
|
25
|
+
* Maximum number of model execution attempts for prompt tasks.
|
|
26
|
+
*/
|
|
27
|
+
readonly maxExecutionAttempts: number;
|
|
28
|
+
/**
|
|
29
|
+
* Callback invoked with partial progress updates.
|
|
30
|
+
*/
|
|
31
|
+
onProgress(newOngoingResult: PartialDeep<PipelineExecutorResult>): Promisable<void>;
|
|
32
|
+
/**
|
|
33
|
+
* String identifier for the pipeline, used for error reporting.
|
|
34
|
+
*/
|
|
35
|
+
readonly pipelineIdentification: string;
|
|
36
|
+
/**
|
|
37
|
+
* Mutable per-task execution state.
|
|
38
|
+
*/
|
|
39
|
+
readonly $ongoingTaskResult: $OngoingTaskResult;
|
|
40
|
+
}): void;
|