@promptbook/components 0.112.0-72 → 0.112.0-79
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 +9 -9
- package/esm/index.es.js +12440 -10435
- package/esm/index.es.js.map +1 -1
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/esm/src/avatars/visuals/octopus3d2AvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +37 -0
- package/esm/src/book-components/Chat/save/_common/chatExportRendering.d.ts +75 -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 +13 -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 +5 -5
- package/esm/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.d.ts +5 -3
- 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 +4 -3
- package/esm/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +3 -3
- 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/agentProjectPaths.d.ts +8 -8
- 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/agents-server/buildAgentsServer.d.ts +56 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/init.d.ts +9 -0
- package/esm/src/cli/cli-commands/agents-server/init.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/agents-server/initializeAgentsServerProjectConfiguration.d.ts +17 -0
- package/esm/src/cli/cli-commands/agents-server/printAgentsServerInitializationSummary.d.ts +7 -0
- package/esm/src/cli/cli-commands/agents-server/run.d.ts +14 -0
- package/esm/src/cli/cli-commands/agents-server/run.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +23 -0
- package/esm/src/cli/cli-commands/agents-server.d.ts +8 -0
- package/esm/src/cli/cli-commands/common/handleActionErrors.d.ts +9 -4
- package/esm/src/cli/cli-commands/common/projectInitialization.d.ts +65 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +44 -0
- package/esm/src/cli/common/$deprecateCliCommand.d.ts +8 -0
- package/esm/src/cli/common/$deprecateCliCommand.test.d.ts +1 -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/color/Color.d.ts +4 -44
- package/esm/src/utils/color/ColorValue.d.ts +55 -0
- package/esm/src/utils/color/isHexColorString.d.ts +10 -0
- package/esm/src/utils/color/parseColorString.d.ts +11 -0
- 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 -1
- package/umd/index.umd.js +12441 -10437
- package/umd/index.umd.js.map +1 -1
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/umd/src/avatars/visuals/octopus3d2AvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +37 -0
- package/umd/src/book-components/Chat/save/_common/chatExportRendering.d.ts +75 -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 +13 -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 +5 -5
- package/umd/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.d.ts +5 -3
- 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 +4 -3
- package/umd/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +3 -3
- 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/agentProjectPaths.d.ts +8 -8
- 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/agents-server/buildAgentsServer.d.ts +56 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/init.d.ts +9 -0
- package/umd/src/cli/cli-commands/agents-server/init.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/agents-server/initializeAgentsServerProjectConfiguration.d.ts +17 -0
- package/umd/src/cli/cli-commands/agents-server/printAgentsServerInitializationSummary.d.ts +7 -0
- package/umd/src/cli/cli-commands/agents-server/run.d.ts +14 -0
- package/umd/src/cli/cli-commands/agents-server/run.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +23 -0
- package/umd/src/cli/cli-commands/agents-server.d.ts +8 -0
- package/umd/src/cli/cli-commands/common/handleActionErrors.d.ts +9 -4
- package/umd/src/cli/cli-commands/common/projectInitialization.d.ts +65 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +44 -0
- package/umd/src/cli/common/$deprecateCliCommand.d.ts +8 -0
- package/umd/src/cli/common/$deprecateCliCommand.test.d.ts +1 -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/color/Color.d.ts +4 -44
- package/umd/src/utils/color/ColorValue.d.ts +55 -0
- package/umd/src/utils/color/isHexColorString.d.ts +10 -0
- package/umd/src/utils/color/parseColorString.d.ts +11 -0
- 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/src/cli/cli-commands/coder/appendBlock.d.ts +0 -6
- package/esm/src/cli/cli-commands/coder/readTextFileIfExists.d.ts +0 -6
- package/umd/src/cli/cli-commands/coder/appendBlock.d.ts +0 -6
- package/umd/src/cli/cli-commands/coder/readTextFileIfExists.d.ts +0 -6
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
|
+
import type { ChatModelRequirements } from '../../../types/ModelRequirements';
|
|
3
|
+
import type { Prompt } from '../../../types/Prompt';
|
|
4
|
+
import type { string_model_name } from '../../../types/string_model_name';
|
|
5
|
+
import type { TODO_any } from '../../../utils/organization/TODO_any';
|
|
6
|
+
/**
|
|
7
|
+
* Builds cloned prompt payloads, OpenAI messages, and raw chat requests.
|
|
8
|
+
*
|
|
9
|
+
* @private helper of `callOpenAiCompatibleChatModel`
|
|
10
|
+
*/
|
|
11
|
+
export declare class OpenAiCompatibleChatPromptBuilder {
|
|
12
|
+
/**
|
|
13
|
+
* Creates a deep copy of the prompt while keeping attached files intact when structured clone is not available.
|
|
14
|
+
*/
|
|
15
|
+
clonePromptPreservingFiles(prompt: Prompt): Prompt;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves OpenAI chat creation settings from model requirements and prompt format.
|
|
18
|
+
*/
|
|
19
|
+
createModelSettings(options: {
|
|
20
|
+
readonly currentModelRequirements: ChatModelRequirements;
|
|
21
|
+
readonly format?: Prompt['format'];
|
|
22
|
+
readonly modelName: string_model_name;
|
|
23
|
+
}): OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming;
|
|
24
|
+
/**
|
|
25
|
+
* Creates the full OpenAI chat message list, including system, thread, and user content.
|
|
26
|
+
*/
|
|
27
|
+
createMessages(options: {
|
|
28
|
+
readonly prompt: Prompt;
|
|
29
|
+
readonly currentModelRequirements: ChatModelRequirements;
|
|
30
|
+
readonly rawPromptContent: string;
|
|
31
|
+
}): Promise<Array<OpenAI.Chat.Completions.ChatCompletionMessageParam>>;
|
|
32
|
+
/**
|
|
33
|
+
* Creates one raw OpenAI chat request from the current conversation state.
|
|
34
|
+
*/
|
|
35
|
+
createRawRequest(options: {
|
|
36
|
+
readonly modelSettings: OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming;
|
|
37
|
+
readonly messages: Array<OpenAI.Chat.Completions.ChatCompletionMessageParam>;
|
|
38
|
+
readonly tools: ReadonlyArray<TODO_any> | undefined;
|
|
39
|
+
readonly userId: string | number | undefined;
|
|
40
|
+
}): OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming;
|
|
41
|
+
/**
|
|
42
|
+
* Provides access to the structured clone implementation when available.
|
|
43
|
+
*/
|
|
44
|
+
private getStructuredCloneFunction;
|
|
45
|
+
/**
|
|
46
|
+
* Checks whether the prompt is a chat prompt that carries file attachments.
|
|
47
|
+
*/
|
|
48
|
+
private hasChatPromptFiles;
|
|
49
|
+
/**
|
|
50
|
+
* Converts the existing prompt thread into OpenAI chat messages.
|
|
51
|
+
*/
|
|
52
|
+
private createThreadMessages;
|
|
53
|
+
/**
|
|
54
|
+
* Builds the final user message, including inline image attachments when present.
|
|
55
|
+
*/
|
|
56
|
+
private createPromptUserMessage;
|
|
57
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type OpenAI from 'openai';
|
|
2
|
+
import type { ChatPromptResult } from '../../../execution/PromptResult';
|
|
3
|
+
import type { Usage } from '../../../execution/Usage';
|
|
4
|
+
import type { Prompt } from '../../../types/Prompt';
|
|
5
|
+
import type { string_date_iso8601 } from '../../../types/string_token';
|
|
6
|
+
import type { OpenAiCompatibleExecutionToolsNonProxiedOptions } from '../OpenAiCompatibleExecutionToolsOptions';
|
|
7
|
+
import { OpenAiCompatibleChatProgressReporter } from './OpenAiCompatibleChatProgressReporter';
|
|
8
|
+
/**
|
|
9
|
+
* Type describing streamed tool call.
|
|
10
|
+
*/
|
|
11
|
+
type StreamedToolCall = NonNullable<ChatPromptResult['toolCalls']>[number];
|
|
12
|
+
/**
|
|
13
|
+
* Dependencies required to execute tool calls requested by an OpenAI-compatible chat response.
|
|
14
|
+
*/
|
|
15
|
+
type OpenAiCompatibleChatToolCallerOptions = {
|
|
16
|
+
readonly executionToolsOptions: OpenAiCompatibleExecutionToolsNonProxiedOptions;
|
|
17
|
+
readonly progressReporter: OpenAiCompatibleChatProgressReporter;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Executes chat-requested tools and keeps their progress snapshots in sync with streamed progress updates.
|
|
21
|
+
*
|
|
22
|
+
* @private helper of `callOpenAiCompatibleChatModel`
|
|
23
|
+
*/
|
|
24
|
+
export declare class OpenAiCompatibleChatToolCaller {
|
|
25
|
+
private readonly options;
|
|
26
|
+
constructor(options: OpenAiCompatibleChatToolCallerOptions);
|
|
27
|
+
/**
|
|
28
|
+
* Executes all tool calls requested in one assistant response and appends their results to the conversation.
|
|
29
|
+
*/
|
|
30
|
+
handleToolCalls(options: {
|
|
31
|
+
readonly prompt: Prompt;
|
|
32
|
+
readonly start: string_date_iso8601;
|
|
33
|
+
readonly turnComplete: string_date_iso8601;
|
|
34
|
+
readonly rawPromptContent: string;
|
|
35
|
+
readonly responseMessage: OpenAI.Chat.Completions.ChatCompletionMessage;
|
|
36
|
+
readonly rawRequest: OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming;
|
|
37
|
+
readonly rawResponse: OpenAI.Chat.Completions.ChatCompletion;
|
|
38
|
+
readonly modelName: string;
|
|
39
|
+
readonly usage: Usage;
|
|
40
|
+
readonly toolCalls: Array<StreamedToolCall>;
|
|
41
|
+
readonly messages: Array<OpenAI.Chat.Completions.ChatCompletionMessageParam>;
|
|
42
|
+
readonly onProgress: (chunk: ChatPromptResult) => void;
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Executes one tool call requested by the chat response and appends the tool message.
|
|
46
|
+
*/
|
|
47
|
+
private executeToolCall;
|
|
48
|
+
/**
|
|
49
|
+
* Resolves the configured script tools for chat tool execution.
|
|
50
|
+
*/
|
|
51
|
+
private resolveScriptTools;
|
|
52
|
+
/**
|
|
53
|
+
* Executes the configured script tool for one chat-requested function call.
|
|
54
|
+
*/
|
|
55
|
+
private executeFunctionTool;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type express from 'express';
|
|
2
|
+
import type { ExecutionTask } from '../../execution/ExecutionTask';
|
|
3
|
+
import type { StartRemoteServerConfiguration } from './StartRemoteServerConfiguration';
|
|
4
|
+
/**
|
|
5
|
+
* Runtime state shared by HTTP and Socket.io handlers.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `startRemoteServer`
|
|
8
|
+
*/
|
|
9
|
+
export type RemoteServerRuntime<TCustomOptions> = {
|
|
10
|
+
readonly app: express.Express;
|
|
11
|
+
readonly configuration: StartRemoteServerConfiguration<TCustomOptions>;
|
|
12
|
+
readonly runningExecutionTasks: Array<ExecutionTask>;
|
|
13
|
+
readonly startupDate: Date;
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ApplicationRemoteServerOptions, RemoteServerOptions } from '../types/RemoteServerOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Normalized configuration shared by remote-server helpers.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `startRemoteServer`
|
|
6
|
+
*/
|
|
7
|
+
export type StartRemoteServerConfiguration<TCustomOptions> = {
|
|
8
|
+
readonly port: RemoteServerOptions<TCustomOptions>['port'];
|
|
9
|
+
readonly collection: ApplicationRemoteServerOptions<TCustomOptions>['collection'] | null;
|
|
10
|
+
readonly createExecutionTools: RemoteServerOptions<TCustomOptions>['createExecutionTools'];
|
|
11
|
+
readonly createLlmExecutionTools: ApplicationRemoteServerOptions<TCustomOptions>['createLlmExecutionTools'] | null;
|
|
12
|
+
readonly isAnonymousModeAllowed: boolean;
|
|
13
|
+
readonly isApplicationModeAllowed: boolean;
|
|
14
|
+
readonly isRichUi: boolean | undefined;
|
|
15
|
+
readonly isVerbose: boolean;
|
|
16
|
+
readonly login: ApplicationRemoteServerOptions<TCustomOptions>['login'] | null;
|
|
17
|
+
readonly startOptions: RemoteServerOptions<TCustomOptions>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import express from 'express';
|
|
3
|
+
import http from 'http';
|
|
4
|
+
import { Server } from 'socket.io';
|
|
5
|
+
import type { RemoteServer } from '../RemoteServer';
|
|
6
|
+
/**
|
|
7
|
+
* Creates the public RemoteServer handle with lazily exposed internals.
|
|
8
|
+
*
|
|
9
|
+
* @private internal utility of `startRemoteServer`
|
|
10
|
+
*/
|
|
11
|
+
export declare function createRemoteServerHandle(app: express.Express, httpServer: http.Server, server: Server): RemoteServer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import http from 'http';
|
|
3
|
+
import { Server } from 'socket.io';
|
|
4
|
+
/**
|
|
5
|
+
* Creates the Socket.io server with the existing transport and CORS settings.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `startRemoteServer`
|
|
8
|
+
*/
|
|
9
|
+
export declare function createSocketServer(httpServer: http.Server): Server;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ExecutionTools } from '../../execution/ExecutionTools';
|
|
2
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
3
|
+
import type { Identification } from '../socket-types/_subtypes/Identification';
|
|
4
|
+
import type { StartRemoteServerConfiguration } from './StartRemoteServerConfiguration';
|
|
5
|
+
/**
|
|
6
|
+
* Builds execution tools for a single incoming identification.
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `startRemoteServer`
|
|
9
|
+
*/
|
|
10
|
+
export declare function getExecutionToolsFromIdentification<TCustomOptions>(configuration: StartRemoteServerConfiguration<TCustomOptions>, identification: Identification<TCustomOptions> | null | undefined): Promise<ExecutionTools & {
|
|
11
|
+
llm: LlmExecutionTools;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
2
|
+
/**
|
|
3
|
+
* Registers book listing and book source download routes.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `startRemoteServer`
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerBookRoutes<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
2
|
+
/**
|
|
3
|
+
* Registers execution task listing, detail, and creation routes.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `startRemoteServer`
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerExecutionRoutes<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Socket } from 'socket.io';
|
|
2
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
3
|
+
/**
|
|
4
|
+
* Registers the socket list-models request handler.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `startRemoteServer`
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerListModelsSocketHandler<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>, socket: Socket): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
2
|
+
/**
|
|
3
|
+
* Registers the application-mode login endpoint.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `startRemoteServer`
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerLoginRoute<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>): void;
|
package/umd/src/remote-server/startRemoteServer/registerOpenAiCompatibleChatCompletionsRoute.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RemoteServerRuntime } from './RemoteServerRuntime';
|
|
2
|
+
/**
|
|
3
|
+
* Registers the OpenAI-compatible chat completions endpoint.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `startRemoteServer`
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerOpenAiCompatibleChatCompletionsRoute<TCustomOptions>(runtime: RemoteServerRuntime<TCustomOptions>): void;
|
|
@@ -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,7 @@ import type { string_color } from '../../types/string_person_fullname';
|
|
|
2
2
|
import type { string_url_image } from '../../types/string_url_image';
|
|
3
3
|
import type { WithTake } from '../take/interfaces/ITakeChain';
|
|
4
4
|
import { CSS_COLORS } from './css-colors';
|
|
5
|
+
import { ColorValue } from './ColorValue';
|
|
5
6
|
/**
|
|
6
7
|
* Color object represents an RGB color with alpha channel
|
|
7
8
|
*
|
|
@@ -9,11 +10,7 @@ import { CSS_COLORS } from './css-colors';
|
|
|
9
10
|
*
|
|
10
11
|
* @public exported from `@promptbook/color`
|
|
11
12
|
*/
|
|
12
|
-
export declare class Color {
|
|
13
|
-
readonly red: number;
|
|
14
|
-
readonly green: number;
|
|
15
|
-
readonly blue: number;
|
|
16
|
-
readonly alpha: number;
|
|
13
|
+
export declare class Color extends ColorValue {
|
|
17
14
|
/**
|
|
18
15
|
* Creates a new Color instance from miscellaneous formats
|
|
19
16
|
* - It can receive Color instance and just return the same instance
|
|
@@ -117,43 +114,6 @@ export declare class Color {
|
|
|
117
114
|
* @param alpha number from 0 (transparent) to 255 (opaque)
|
|
118
115
|
*/
|
|
119
116
|
private constructor();
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
* Number from 0 to 255
|
|
123
|
-
* @alias red
|
|
124
|
-
*/
|
|
125
|
-
get r(): number;
|
|
126
|
-
/**
|
|
127
|
-
* Shortcut for `green` property
|
|
128
|
-
* Number from 0 to 255
|
|
129
|
-
* @alias green
|
|
130
|
-
*/
|
|
131
|
-
get g(): number;
|
|
132
|
-
/**
|
|
133
|
-
* Shortcut for `blue` property
|
|
134
|
-
* Number from 0 to 255
|
|
135
|
-
* @alias blue
|
|
136
|
-
*/
|
|
137
|
-
get b(): number;
|
|
138
|
-
/**
|
|
139
|
-
* Shortcut for `alpha` property
|
|
140
|
-
* Number from 0 (transparent) to 255 (opaque)
|
|
141
|
-
* @alias alpha
|
|
142
|
-
*/
|
|
143
|
-
get a(): number;
|
|
144
|
-
/**
|
|
145
|
-
* Shortcut for `alpha` property
|
|
146
|
-
* Number from 0 (transparent) to 255 (opaque)
|
|
147
|
-
* @alias alpha
|
|
148
|
-
*/
|
|
149
|
-
get opacity(): number;
|
|
150
|
-
/**
|
|
151
|
-
* Shortcut for 1-`alpha` property
|
|
152
|
-
*/
|
|
153
|
-
get transparency(): number;
|
|
154
|
-
clone(): WithTake<Color>;
|
|
155
|
-
toString(): string_color;
|
|
156
|
-
toHex(): string_color;
|
|
157
|
-
toRgb(): string_color;
|
|
158
|
-
toHsl(): string_color;
|
|
117
|
+
protected createColor(red: number, green: number, blue: number, alpha: number): Color;
|
|
118
|
+
private static fromColorChannels;
|
|
159
119
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { string_color } from '../../types/string_person_fullname';
|
|
2
|
+
import type { WithTake } from '../take/interfaces/ITakeChain';
|
|
3
|
+
import type { Color } from './Color';
|
|
4
|
+
/**
|
|
5
|
+
* Shared immutable channel storage and serialization helpers for `Color`.
|
|
6
|
+
*
|
|
7
|
+
* @private base class of Color
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class ColorValue {
|
|
10
|
+
readonly red: number;
|
|
11
|
+
readonly green: number;
|
|
12
|
+
readonly blue: number;
|
|
13
|
+
readonly alpha: number;
|
|
14
|
+
protected constructor(red: number, green: number, blue: number, alpha?: number);
|
|
15
|
+
/**
|
|
16
|
+
* Shortcut for `red` property
|
|
17
|
+
* Number from 0 to 255
|
|
18
|
+
* @alias red
|
|
19
|
+
*/
|
|
20
|
+
get r(): number;
|
|
21
|
+
/**
|
|
22
|
+
* Shortcut for `green` property
|
|
23
|
+
* Number from 0 to 255
|
|
24
|
+
* @alias green
|
|
25
|
+
*/
|
|
26
|
+
get g(): number;
|
|
27
|
+
/**
|
|
28
|
+
* Shortcut for `blue` property
|
|
29
|
+
* Number from 0 to 255
|
|
30
|
+
* @alias blue
|
|
31
|
+
*/
|
|
32
|
+
get b(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Shortcut for `alpha` property
|
|
35
|
+
* Number from 0 (transparent) to 255 (opaque)
|
|
36
|
+
* @alias alpha
|
|
37
|
+
*/
|
|
38
|
+
get a(): number;
|
|
39
|
+
/**
|
|
40
|
+
* Shortcut for `alpha` property
|
|
41
|
+
* Number from 0 (transparent) to 255 (opaque)
|
|
42
|
+
* @alias alpha
|
|
43
|
+
*/
|
|
44
|
+
get opacity(): number;
|
|
45
|
+
/**
|
|
46
|
+
* Shortcut for 1-`alpha` property
|
|
47
|
+
*/
|
|
48
|
+
get transparency(): number;
|
|
49
|
+
clone(): WithTake<Color>;
|
|
50
|
+
toString(): string_color;
|
|
51
|
+
toHex(): string_color;
|
|
52
|
+
toRgb(): string_color;
|
|
53
|
+
toHsl(): string_color;
|
|
54
|
+
protected abstract createColor(red: number, green: number, blue: number, alpha: number): Color;
|
|
55
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { string_color } from '../../types/string_person_fullname';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the given value is a valid hex color string
|
|
4
|
+
*
|
|
5
|
+
* @param value - value to check
|
|
6
|
+
* @returns true if the value is a valid hex color string (e.g., `#009edd`, `#fff`, etc.)
|
|
7
|
+
*
|
|
8
|
+
* @private function of Color
|
|
9
|
+
*/
|
|
10
|
+
export declare function isHexColorString(value: unknown): value is string_color;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { string_color } from '../../types/string_person_fullname';
|
|
2
|
+
import type { ColorChannelSet } from './parsers/ColorChannelSet';
|
|
3
|
+
/**
|
|
4
|
+
* Parses a supported color string into RGBA channels.
|
|
5
|
+
*
|
|
6
|
+
* @param color as a string for example `#009edd`, `rgb(0,158,221)`, `rgb(0%,62%,86.7%)`, `hsl(197.1,100%,43.3%)`, `red`, `darkgrey`,...
|
|
7
|
+
* @returns RGBA channel values.
|
|
8
|
+
*
|
|
9
|
+
* @private function of Color
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseColorString(color: string_color): ColorChannelSet;
|
|
@@ -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/umd/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-78`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|