@promptbook/google 0.112.0-71 → 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 +1 -1
- package/esm/src/book-3.0/Book.d.ts +6 -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/getToolCallChipletInfo.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 +14 -2
- package/esm/src/cli/cli-commands/agent/initializeAgentRunnerCommand.d.ts +2 -0
- package/esm/src/cli/cli-commands/common/handleActionErrors.d.ts +9 -4
- package/esm/src/cli/cli-commands/run/prepareRunCommandResources.d.ts +20 -0
- package/esm/src/cli/cli-commands/run/resolveRunInputParameters.d.ts +12 -0
- package/esm/src/cli/cli-commands/run/runCommandAction.d.ts +21 -0
- package/esm/src/cli/cli-commands/run/runPipelineExecution.d.ts +14 -0
- package/esm/src/cli/cli-commands/run.d.ts +1 -1
- package/esm/src/conversion/parsePipeline/applyPipelineHead.d.ts +8 -0
- package/esm/src/conversion/parsePipeline/createInitialPipelineJson.d.ts +8 -0
- package/esm/src/conversion/parsePipeline/createUniqueSectionNameResolver.d.ts +14 -0
- package/esm/src/conversion/parsePipeline/defineParameter.d.ts +8 -0
- package/esm/src/conversion/parsePipeline/extractPipelineDescription.d.ts +6 -0
- package/esm/src/conversion/parsePipeline/finalizeParsedPipeline.d.ts +8 -0
- package/esm/src/conversion/parsePipeline/getPipelineIdentification.d.ts +7 -0
- package/esm/src/conversion/parsePipeline/parsePreparedPipelineSections.d.ts +18 -0
- package/esm/src/conversion/parsePipeline/preparePipelineString.d.ts +8 -0
- package/esm/src/conversion/parsePipeline/processPipelineSection.d.ts +9 -0
- 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 +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/src/book-3.0/Book.d.ts +6 -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/getToolCallChipletInfo.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 +14 -2
- package/umd/src/cli/cli-commands/agent/initializeAgentRunnerCommand.d.ts +2 -0
- package/umd/src/cli/cli-commands/common/handleActionErrors.d.ts +9 -4
- package/umd/src/cli/cli-commands/run/prepareRunCommandResources.d.ts +20 -0
- package/umd/src/cli/cli-commands/run/resolveRunInputParameters.d.ts +12 -0
- package/umd/src/cli/cli-commands/run/runCommandAction.d.ts +21 -0
- package/umd/src/cli/cli-commands/run/runPipelineExecution.d.ts +14 -0
- package/umd/src/cli/cli-commands/run.d.ts +1 -1
- package/umd/src/conversion/parsePipeline/applyPipelineHead.d.ts +8 -0
- package/umd/src/conversion/parsePipeline/createInitialPipelineJson.d.ts +8 -0
- package/umd/src/conversion/parsePipeline/createUniqueSectionNameResolver.d.ts +14 -0
- package/umd/src/conversion/parsePipeline/defineParameter.d.ts +8 -0
- package/umd/src/conversion/parsePipeline/extractPipelineDescription.d.ts +6 -0
- package/umd/src/conversion/parsePipeline/finalizeParsedPipeline.d.ts +8 -0
- package/umd/src/conversion/parsePipeline/getPipelineIdentification.d.ts +7 -0
- package/umd/src/conversion/parsePipeline/parsePreparedPipelineSections.d.ts +18 -0
- package/umd/src/conversion/parsePipeline/preparePipelineString.d.ts +8 -0
- package/umd/src/conversion/parsePipeline/processPipelineSection.d.ts +9 -0
- 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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Socket } from 'socket.io';
|
|
2
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
3
|
+
/**
|
|
4
|
+
* Registers the socket prepare-pipeline request handler.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `startRemoteServer`
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerPreparePipelineSocketHandler<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>, socket: Socket): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Socket } from 'socket.io';
|
|
2
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
3
|
+
/**
|
|
4
|
+
* Registers the socket prompt execution request handler.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `startRemoteServer`
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerPromptSocketHandler<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>, socket: Socket): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
2
|
+
/**
|
|
3
|
+
* Registers all HTTP middleware and routes in the original order.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `startRemoteServer`
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerRemoteServerHttpRoutes<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Server } from 'socket.io';
|
|
2
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
3
|
+
/**
|
|
4
|
+
* Registers socket connection lifecycle handlers and per-event request handlers.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `startRemoteServer`
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerRemoteServerSocketHandlers<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>, server: Server): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
2
|
+
/**
|
|
3
|
+
* Registers the server homepage route for both rich and markdown UIs.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `startRemoteServer`
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerServerIndexRoute<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RemoteServerOptions } from '../types/RemoteServerOptions';
|
|
2
|
+
import type { StartRemoteServerConfiguration } from './StartRemoteServerConfiguration';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves option defaults once so the rest of the remote-server flow can work with a single shape.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `startRemoteServer`
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveStartRemoteServerConfiguration<TCustomOptions>(startOptions: RemoteServerOptions<TCustomOptions>): StartRemoteServerConfiguration<TCustomOptions>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Socket } from 'socket.io';
|
|
2
|
+
import type { SocketResponse } from './SocketResponse';
|
|
3
|
+
/**
|
|
4
|
+
* Executes one socket request and guarantees consistent error emission and cleanup.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `startRemoteServer`
|
|
7
|
+
*/
|
|
8
|
+
export declare function respondToSocketRequest<TPayload>(socket: Socket, createResponse: () => Promise<SocketResponse<TPayload>>): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type http from 'http';
|
|
3
|
+
import type { StartRemoteServerConfiguration } from './StartRemoteServerConfiguration';
|
|
4
|
+
/**
|
|
5
|
+
* Starts the HTTP server and prints the startup diagnostics.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `startRemoteServer`
|
|
8
|
+
*/
|
|
9
|
+
export declare function startListening<TCustomOptions>(httpServer: http.Server, configuration: StartRemoteServerConfiguration<TCustomOptions>): void;
|
|
@@ -3,6 +3,18 @@ import type { ExecutionTools } from '../../../execution/ExecutionTools';
|
|
|
3
3
|
import type { KnowledgeSourceJson } from '../../../pipeline/PipelineJson/KnowledgeSourceJson';
|
|
4
4
|
import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeOptions';
|
|
5
5
|
import type { ScraperSourceHandler } from '../Scraper';
|
|
6
|
+
/**
|
|
7
|
+
* Tools needed for knowledge source handler creation.
|
|
8
|
+
*
|
|
9
|
+
* @private internal utility of `makeKnowledgeSourceHandler`
|
|
10
|
+
*/
|
|
11
|
+
type MakeKnowledgeSourceHandlerTools = Pick<ExecutionTools, 'fs' | 'fetch'>;
|
|
12
|
+
/**
|
|
13
|
+
* Options relevant for knowledge source handler creation.
|
|
14
|
+
*
|
|
15
|
+
* @private internal utility of `makeKnowledgeSourceHandler`
|
|
16
|
+
*/
|
|
17
|
+
type MakeKnowledgeSourceHandlerOptions = Pick<PrepareAndScrapeOptions, 'rootDirname' | 'isVerbose'>;
|
|
6
18
|
/**
|
|
7
19
|
* Factory function that creates a handler for processing knowledge sources.
|
|
8
20
|
* Provides standardized processing of different types of knowledge sources
|
|
@@ -10,4 +22,5 @@ import type { ScraperSourceHandler } from '../Scraper';
|
|
|
10
22
|
*
|
|
11
23
|
* @public exported from `@promptbook/core`
|
|
12
24
|
*/
|
|
13
|
-
export declare function makeKnowledgeSourceHandler(knowledgeSource: SetOptional<KnowledgeSourceJson, 'name'>, tools:
|
|
25
|
+
export declare function makeKnowledgeSourceHandler(knowledgeSource: SetOptional<KnowledgeSourceJson, 'name'>, tools: MakeKnowledgeSourceHandlerTools, options?: MakeKnowledgeSourceHandlerOptions): Promise<ScraperSourceHandler>;
|
|
26
|
+
export {};
|
|
@@ -2,6 +2,8 @@ import type { string_javascript } from '../../types/string_markdown';
|
|
|
2
2
|
import type { TODO_any } from '../organization/TODO_any';
|
|
3
3
|
/**
|
|
4
4
|
* Type describing serialize to promptbook javascript return.
|
|
5
|
+
*
|
|
6
|
+
* @private Internal return type for `serializeToPromptbookJavascript`.
|
|
5
7
|
*/
|
|
6
8
|
type SerializeToPromptbookJavascriptReturn = {
|
|
7
9
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/src/version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-72`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/google",
|
|
3
|
-
"version": "0.112.0-
|
|
3
|
+
"version": "0.112.0-73",
|
|
4
4
|
"description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"types": "./esm/src/_packages/google.index.d.ts",
|
|
100
100
|
"typings": "./esm/src/_packages/google.index.d.ts",
|
|
101
101
|
"peerDependencies": {
|
|
102
|
-
"@promptbook/core": "0.112.0-
|
|
102
|
+
"@promptbook/core": "0.112.0-73"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"@ai-sdk/google": "1.0.17",
|
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* @generated
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
25
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-73';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -24,6 +24,12 @@ export declare class Book {
|
|
|
24
24
|
private constructor();
|
|
25
25
|
stringify(): string_book;
|
|
26
26
|
getMessages(): ReadonlyArray<ChatMessage>;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the newest parsed chat message written by the given sender.
|
|
29
|
+
*
|
|
30
|
+
* @public exported from `@promptbook/core`
|
|
31
|
+
*/
|
|
32
|
+
getLatestMessageBySender(sender: string): ChatMessage | null;
|
|
27
33
|
}
|
|
28
34
|
type Commitment = {
|
|
29
35
|
type: string;
|
|
@@ -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 @@
|
|
|
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 {};
|
|
@@ -4,10 +4,22 @@ import type { NormalizedPromptRunnerCliOptions, PromptRunnerCliOptions } from '.
|
|
|
4
4
|
*
|
|
5
5
|
* @private internal utility of `ptbk agent`
|
|
6
6
|
*/
|
|
7
|
-
export type AgentRunCliOptions = PromptRunnerCliOptions
|
|
7
|
+
export type AgentRunCliOptions = PromptRunnerCliOptions & {
|
|
8
|
+
readonly autoClone?: boolean;
|
|
9
|
+
readonly ignore?: string | readonly string[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Normalized options passed from `ptbk agent` CLI commands to the message runner.
|
|
13
|
+
*
|
|
14
|
+
* @private internal utility of `ptbk agent`
|
|
15
|
+
*/
|
|
16
|
+
export type NormalizedAgentRunCliOptions = NormalizedPromptRunnerCliOptions & {
|
|
17
|
+
readonly autoClone: boolean;
|
|
18
|
+
readonly ignorePatterns: readonly string[];
|
|
19
|
+
};
|
|
8
20
|
/**
|
|
9
21
|
* Converts Commander options into the `scripts/run-agent-messages` option shape.
|
|
10
22
|
*
|
|
11
23
|
* @private internal utility of `ptbk agent`
|
|
12
24
|
*/
|
|
13
|
-
export declare function createAgentRunOptionsFromCliOptions(cliOptions: AgentRunCliOptions):
|
|
25
|
+
export declare function createAgentRunOptionsFromCliOptions(cliOptions: AgentRunCliOptions): NormalizedAgentRunCliOptions;
|
|
@@ -11,6 +11,8 @@ type InitializeAgentRunnerCommandOptions = {
|
|
|
11
11
|
readonly aliases?: ReadonlyArray<string>;
|
|
12
12
|
readonly summary: string;
|
|
13
13
|
readonly featureLines: ReadonlyArray<string>;
|
|
14
|
+
readonly isExitingOnSuccess?: boolean;
|
|
15
|
+
readonly configureCommand?: (command: Program) => void;
|
|
14
16
|
readonly loadExecutor: () => Promise<(runOptions: ReturnType<typeof createAgentRunOptionsFromCliOptions>) => Promise<unknown>>;
|
|
15
17
|
};
|
|
16
18
|
/**
|
|
@@ -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,20 @@
|
|
|
1
|
+
import type { PipelineExecutor } from '../../../execution/PipelineExecutor';
|
|
2
|
+
import type { PipelineJson } from '../../../pipeline/PipelineJson/PipelineJson';
|
|
3
|
+
import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeOptions';
|
|
4
|
+
import type { RunCommandCliOptions } from './runCommandAction';
|
|
5
|
+
/**
|
|
6
|
+
* Prepares the tools, pipeline, and executor required to run one `ptbk run` invocation.
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `$initializeRunCommand`
|
|
9
|
+
*/
|
|
10
|
+
export declare function prepareRunCommandResources(options: {
|
|
11
|
+
readonly pipelineSource?: string;
|
|
12
|
+
readonly cliOptions: RunCommandCliOptions;
|
|
13
|
+
readonly prepareAndScrapeOptions: Pick<PrepareAndScrapeOptions, 'isVerbose'> & {
|
|
14
|
+
readonly isCacheReloaded: boolean;
|
|
15
|
+
};
|
|
16
|
+
readonly logStage: (stage: string) => void;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
readonly pipeline: PipelineJson;
|
|
19
|
+
readonly pipelineExecutor: PipelineExecutor;
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PipelineJson } from '../../../pipeline/PipelineJson/PipelineJson';
|
|
2
|
+
import type { string_parameter_name, string_parameter_value } from '../../../types/string_name';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves all missing input parameters while keeping the current interactive and non-interactive behavior.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `$initializeRunCommand`
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveRunInputParameters(options: {
|
|
9
|
+
readonly pipeline: PipelineJson;
|
|
10
|
+
readonly inputParameters: Record<string_parameter_name, string_parameter_value>;
|
|
11
|
+
readonly isInteractive: boolean;
|
|
12
|
+
}): Promise<Record<string_parameter_name, string_parameter_value>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI options consumed by the `run` command action.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility of `$initializeRunCommand`
|
|
5
|
+
*/
|
|
6
|
+
export type RunCommandCliOptions = {
|
|
7
|
+
readonly reload: boolean;
|
|
8
|
+
readonly interactive: boolean;
|
|
9
|
+
readonly formfactor: boolean;
|
|
10
|
+
readonly json?: string;
|
|
11
|
+
readonly verbose: boolean;
|
|
12
|
+
readonly saveReport?: string;
|
|
13
|
+
readonly provider: string;
|
|
14
|
+
readonly remoteServerUrl: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Runs the whole `ptbk run` flow as a top-down orchestration of focused steps.
|
|
18
|
+
*
|
|
19
|
+
* @private internal utility of `$initializeRunCommand`
|
|
20
|
+
*/
|
|
21
|
+
export declare function runCommandAction(pipelineSource: string | undefined, cliOptions: RunCommandCliOptions): Promise<void | never>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PipelineExecutor } from '../../../execution/PipelineExecutor';
|
|
2
|
+
import type { string_parameter_name, string_parameter_value } from '../../../types/string_name';
|
|
3
|
+
/**
|
|
4
|
+
* Executes the pipeline, persists any requested report, and prints the final CLI output.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `$initializeRunCommand`
|
|
7
|
+
*/
|
|
8
|
+
export declare function runPipelineExecution(options: {
|
|
9
|
+
readonly pipelineExecutor: PipelineExecutor;
|
|
10
|
+
readonly inputParameters: Record<string_parameter_name, string_parameter_value>;
|
|
11
|
+
readonly isVerbose: boolean;
|
|
12
|
+
readonly json?: string;
|
|
13
|
+
readonly saveReport?: string;
|
|
14
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
|
|
2
|
+
import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
|
|
3
|
+
/**
|
|
4
|
+
* Applies the pipeline head title, description, and head-level commands.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parsePipeline`
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyPipelineHead(pipelineHead: MarkdownSection, $pipelineJson: $PipelineJson): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
|
|
2
|
+
import type { PipelineString } from '../../pipeline/PipelineString';
|
|
3
|
+
/**
|
|
4
|
+
* Creates the mutable pipeline JSON structure used throughout parsing.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parsePipeline`
|
|
7
|
+
*/
|
|
8
|
+
export declare function createInitialPipelineJson(pipelineString: PipelineString): $PipelineJson;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { string_name } from '../../types/string_name';
|
|
2
|
+
import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves a unique task name for one parsed markdown section title.
|
|
5
|
+
*
|
|
6
|
+
* @private internal type of `parsePipeline`
|
|
7
|
+
*/
|
|
8
|
+
export type UniqueSectionNameResolver = (title: string) => string_name;
|
|
9
|
+
/**
|
|
10
|
+
* Creates stable unique task names for duplicate section titles.
|
|
11
|
+
*
|
|
12
|
+
* @private internal utility of `parsePipeline`
|
|
13
|
+
*/
|
|
14
|
+
export declare function createUniqueSectionNameResolver(pipelineSections: ReadonlyArray<MarkdownSection>): UniqueSectionNameResolver;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParameterCommand } from '../../commands/PARAMETER/ParameterCommand';
|
|
2
|
+
import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
|
|
3
|
+
/**
|
|
4
|
+
* Merges one parameter declaration into the mutable pipeline parameter list.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parsePipeline`
|
|
7
|
+
*/
|
|
8
|
+
export declare function defineParameter($pipelineJson: $PipelineJson, parameterCommand: Omit<ParameterCommand, 'type'>): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
|
|
2
|
+
import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
|
|
3
|
+
/**
|
|
4
|
+
* Applies postprocessing and exports the parsed pipeline JSON.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parsePipeline`
|
|
7
|
+
*/
|
|
8
|
+
export declare function finalizeParsedPipeline($pipelineJson: $PipelineJson): PipelineJson;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a short file/url identification block for parse errors.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `parsePipeline`
|
|
6
|
+
*/
|
|
7
|
+
export declare function getPipelineIdentification($pipelineJson: $PipelineJson): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
|
|
2
|
+
import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
|
|
3
|
+
import type { PipelineString } from '../../pipeline/PipelineString';
|
|
4
|
+
/**
|
|
5
|
+
* Parsed markdown structure split into the pipeline head and task sections.
|
|
6
|
+
*
|
|
7
|
+
* @private internal type of `parsePipeline`
|
|
8
|
+
*/
|
|
9
|
+
export type ParsedPipelineSections = {
|
|
10
|
+
readonly pipelineHead: MarkdownSection;
|
|
11
|
+
readonly pipelineSections: ReadonlyArray<MarkdownSection>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Splits the prepared markdown into the pipeline head and task sections.
|
|
15
|
+
*
|
|
16
|
+
* @private internal utility of `parsePipeline`
|
|
17
|
+
*/
|
|
18
|
+
export declare function parsePreparedPipelineSections(pipelineString: PipelineString, $pipelineJson: $PipelineJson): ParsedPipelineSections;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
|
|
2
|
+
import type { PipelineString } from '../../pipeline/PipelineString';
|
|
3
|
+
/**
|
|
4
|
+
* Removes shebang/comments and normalizes markdown into a parseable pipeline form.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `parsePipeline`
|
|
7
|
+
*/
|
|
8
|
+
export declare function preparePipelineString(pipelineString: PipelineString, $pipelineJson: $PipelineJson): PipelineString;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { $PipelineJson } from '../../commands/_common/types/CommandParser';
|
|
2
|
+
import type { MarkdownSection } from '../../utils/markdown/parseMarkdownSection';
|
|
3
|
+
import type { UniqueSectionNameResolver } from './createUniqueSectionNameResolver';
|
|
4
|
+
/**
|
|
5
|
+
* Parses, applies, and persists one h2 task section.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `parsePipeline`
|
|
8
|
+
*/
|
|
9
|
+
export declare function processPipelineSection(pipelineSection: MarkdownSection, $pipelineJson: $PipelineJson, getUniqueSectionName: UniqueSectionNameResolver): void;
|
|
@@ -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>;
|