@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
|
@@ -7,7 +7,7 @@ import type { AvatarDefinition } from './AvatarDefinition';
|
|
|
7
7
|
*
|
|
8
8
|
* @private shared contract for the avatar rendering system
|
|
9
9
|
*/
|
|
10
|
-
export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'octopus3d' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
|
|
10
|
+
export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'octopus3d' | 'octopus3d2' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
|
|
11
11
|
/**
|
|
12
12
|
* Derived color palette used by avatar visuals.
|
|
13
13
|
*
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AvatarPalette } from '../types/AvatarVisualDefinition';
|
|
2
|
+
import { type Point3D, type ProjectedPoint } from './avatar3dProjectionShared';
|
|
3
|
+
/**
|
|
4
|
+
* Eye-style knobs shared by the proper-3D octopus visuals.
|
|
5
|
+
*
|
|
6
|
+
* @private helper of the 3D octopus avatar visuals
|
|
7
|
+
*/
|
|
8
|
+
export type OctopusProjectedEyeStyle = {
|
|
9
|
+
readonly irisScale: number;
|
|
10
|
+
readonly pupilWidthScale: number;
|
|
11
|
+
readonly pupilHeightScale: number;
|
|
12
|
+
readonly upperLidArchRatio: number;
|
|
13
|
+
readonly upperLidInsetRatio: number;
|
|
14
|
+
readonly lowerLidOpacity: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Draws one projected eye on a rotated octopus surface.
|
|
18
|
+
*
|
|
19
|
+
* @private helper of the 3D octopus avatar visuals
|
|
20
|
+
*/
|
|
21
|
+
export declare function drawProjectedOrganicEye(context: CanvasRenderingContext2D, localCenter: Point3D, radiusX: number, radiusY: number, center: Point3D, rotationX: number, rotationY: number, sceneCenterX: number, sceneCenterY: number, size: number, palette: AvatarPalette, timeMs: number, phase: number, interaction: {
|
|
22
|
+
readonly gazeX: number;
|
|
23
|
+
readonly gazeY: number;
|
|
24
|
+
readonly intensity: number;
|
|
25
|
+
}, eyeStyle: OctopusProjectedEyeStyle): void;
|
|
26
|
+
/**
|
|
27
|
+
* Draws a subtle projected mouth arc across the front of a rotated octopus surface.
|
|
28
|
+
*
|
|
29
|
+
* @private helper of the 3D octopus avatar visuals
|
|
30
|
+
*/
|
|
31
|
+
export declare function drawProjectedOrganicMouth(context: CanvasRenderingContext2D, localPoints: readonly [Point3D, Point3D, Point3D], center: Point3D, rotationX: number, rotationY: number, sceneCenterX: number, sceneCenterY: number, palette: AvatarPalette, size: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Draws one filled projected quad.
|
|
34
|
+
*
|
|
35
|
+
* @private helper of the 3D octopus avatar visuals
|
|
36
|
+
*/
|
|
37
|
+
export declare function drawProjectedQuad(context: CanvasRenderingContext2D, corners: readonly [ProjectedPoint, ProjectedPoint, ProjectedPoint, ProjectedPoint], fillStyle: string): void;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ChatMessage } from '../../types/ChatMessage';
|
|
2
|
+
import type { ChatParticipant } from '../../types/ChatParticipant';
|
|
3
|
+
import type { ParsedCitation } from '../../utils/parseCitationsFromContent';
|
|
4
|
+
/**
|
|
5
|
+
* Minimal participant visuals needed by chat exports.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of chat save format definitions
|
|
8
|
+
*/
|
|
9
|
+
export type ChatExportParticipantVisuals = {
|
|
10
|
+
readonly displayName: string;
|
|
11
|
+
readonly accentColor: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* One numbered source collected from rendered chat message citations.
|
|
15
|
+
*
|
|
16
|
+
* @private internal utility of chat save format definitions
|
|
17
|
+
*/
|
|
18
|
+
export type ChatExportCitationFootnote = {
|
|
19
|
+
readonly number: number;
|
|
20
|
+
readonly citation: ParsedCitation;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Document-wide citation footnotes collected while rendering chat exports.
|
|
24
|
+
*
|
|
25
|
+
* @private internal utility of chat save format definitions
|
|
26
|
+
*/
|
|
27
|
+
export type ChatExportCitationFootnoteRegistry = {
|
|
28
|
+
readonly footnotes: Array<ChatExportCitationFootnote>;
|
|
29
|
+
readonly footnoteBySourceKey: Map<string, ChatExportCitationFootnote>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Render-ready chat message citation payload using document-wide footnote numbers.
|
|
33
|
+
*
|
|
34
|
+
* @private internal utility of chat save format definitions
|
|
35
|
+
*/
|
|
36
|
+
export type ChatExportCitationRenderModel = {
|
|
37
|
+
readonly content: ChatMessage['content'];
|
|
38
|
+
readonly footnotes: ReadonlyArray<ChatExportCitationFootnote>;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Formats exported timestamps into a compact human-readable label.
|
|
42
|
+
*
|
|
43
|
+
* @private internal utility of chat save format definitions
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatChatExportTimestamp(value?: string | Date): string;
|
|
46
|
+
/**
|
|
47
|
+
* Builds a participant lookup indexed by both raw and upper-cased names.
|
|
48
|
+
*
|
|
49
|
+
* @private internal utility of chat save format definitions
|
|
50
|
+
*/
|
|
51
|
+
export declare function buildChatExportParticipantMap(participants: ReadonlyArray<ChatParticipant>): ReadonlyMap<string, ChatParticipant>;
|
|
52
|
+
/**
|
|
53
|
+
* Resolves the display label and accent color for one message sender.
|
|
54
|
+
*
|
|
55
|
+
* @private internal utility of chat save format definitions
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveChatExportParticipantVisuals(participants: ReadonlyMap<string, ChatParticipant>, sender: string): ChatExportParticipantVisuals;
|
|
58
|
+
/**
|
|
59
|
+
* Creates an empty document-wide citation footnote registry.
|
|
60
|
+
*
|
|
61
|
+
* @private internal utility of chat save format definitions
|
|
62
|
+
*/
|
|
63
|
+
export declare function createChatExportCitationFootnoteRegistry(): ChatExportCitationFootnoteRegistry;
|
|
64
|
+
/**
|
|
65
|
+
* Converts one message to markdown content with document-wide numbered citation references.
|
|
66
|
+
*
|
|
67
|
+
* @private internal utility of chat save format definitions
|
|
68
|
+
*/
|
|
69
|
+
export declare function createChatExportCitationRenderModel(citationFootnotes: ChatExportCitationFootnoteRegistry, message: Pick<ChatMessage, 'content' | 'citations'>): ChatExportCitationRenderModel;
|
|
70
|
+
/**
|
|
71
|
+
* Creates a readable source label for one citation footnote.
|
|
72
|
+
*
|
|
73
|
+
* @private internal utility of chat save format definitions
|
|
74
|
+
*/
|
|
75
|
+
export declare function formatChatExportCitationFootnoteLabel(footnote: ChatExportCitationFootnote, href?: string): string;
|
|
@@ -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 {};
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { ChatMessage } from '../../types/ChatMessage';
|
|
2
2
|
import type { ChatParticipant } from '../../types/ChatParticipant';
|
|
3
|
+
/**
|
|
4
|
+
* Class name that gives the PDF renderer the same root styles as the standalone HTML document body.
|
|
5
|
+
*
|
|
6
|
+
* @private Internal helper shared by HTML and PDF chat exports.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CHAT_HTML_EXPORT_RENDER_ROOT_CLASS_NAME = "chat-html-export-render-root";
|
|
9
|
+
/**
|
|
10
|
+
* Builds the standalone HTML chat export document shared by HTML downloads and PDF rendering.
|
|
11
|
+
*
|
|
12
|
+
* @private Internal helper shared by HTML and PDF chat exports.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildChatHtml(title: string, messages: ReadonlyArray<ChatMessage>, participants: ReadonlyArray<ChatParticipant>): string;
|
|
3
15
|
/**
|
|
4
16
|
* HTML export plugin
|
|
5
17
|
*
|
|
@@ -7,7 +19,7 @@ import type { ChatParticipant } from '../../types/ChatParticipant';
|
|
|
7
19
|
*/
|
|
8
20
|
export declare const htmlSaveFormatDefinition: {
|
|
9
21
|
readonly formatName: "html";
|
|
10
|
-
readonly label: "
|
|
22
|
+
readonly label: "HTML";
|
|
11
23
|
readonly getContent: ({ title, messages, participants }: {
|
|
12
24
|
readonly title: string;
|
|
13
25
|
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: ({ title, 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,12 +55,12 @@ 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[];
|
|
63
|
-
}) => Uint8Array
|
|
63
|
+
}) => Promise<Uint8Array>;
|
|
64
64
|
readonly mimeType: "application/pdf";
|
|
65
65
|
readonly fileExtension: "pdf";
|
|
66
66
|
}];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ChatMessage } from '../../types/ChatMessage';
|
|
2
|
+
import type { ChatParticipant } from '../../types/ChatParticipant';
|
|
1
3
|
/**
|
|
2
4
|
* Markdown export plugin
|
|
3
5
|
*
|
|
@@ -6,10 +8,10 @@
|
|
|
6
8
|
export declare const mdSaveFormatDefinition: {
|
|
7
9
|
readonly formatName: "md";
|
|
8
10
|
readonly label: "Markdown";
|
|
9
|
-
readonly getContent: ({ messages }: {
|
|
11
|
+
readonly getContent: ({ title, messages, participants }: {
|
|
10
12
|
readonly title: string;
|
|
11
|
-
readonly messages: readonly
|
|
12
|
-
readonly participants: readonly
|
|
13
|
+
readonly messages: readonly ChatMessage[];
|
|
14
|
+
readonly participants: readonly ChatParticipant[];
|
|
13
15
|
}) => string;
|
|
14
16
|
readonly mimeType: "text/markdown";
|
|
15
17
|
readonly fileExtension: "md";
|
|
@@ -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 PDF from the same standalone HTML document used by the HTML chat download.
|
|
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
|
-
* @param participants -
|
|
8
|
+
* @param participants - Participant metadata used by the HTML chat export.
|
|
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
|
|
13
|
+
export declare function buildChatPdf(title: string, messages: ReadonlyArray<ChatMessage>, participants: ReadonlyArray<ChatParticipant>): Promise<Uint8Array>;
|
|
@@ -5,12 +5,12 @@
|
|
|
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[];
|
|
13
|
-
}) => Uint8Array
|
|
13
|
+
}) => Promise<Uint8Array>;
|
|
14
14
|
readonly mimeType: "application/pdf";
|
|
15
15
|
readonly fileExtension: "pdf";
|
|
16
16
|
};
|
|
@@ -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,6 +4,12 @@
|
|
|
4
4
|
* @private internal utility of `ptbk agent`
|
|
5
5
|
*/
|
|
6
6
|
export declare const AGENT_BOOK_FILE_PATH = "agent.book";
|
|
7
|
+
/**
|
|
8
|
+
* Relative path to local knowledge files initialized by `ptbk agent init`.
|
|
9
|
+
*
|
|
10
|
+
* @private internal utility of `ptbk agent`
|
|
11
|
+
*/
|
|
12
|
+
export declare const AGENT_KNOWLEDGE_DIRECTORY_PATH = "knowledge";
|
|
7
13
|
/**
|
|
8
14
|
* Relative path to the message queue root initialized by `ptbk agent init`.
|
|
9
15
|
*
|
|
@@ -23,19 +29,13 @@ export declare const AGENT_QUEUED_MESSAGES_DIRECTORY_PATH: string;
|
|
|
23
29
|
*/
|
|
24
30
|
export declare const AGENT_FINISHED_MESSAGES_DIRECTORY_PATH: string;
|
|
25
31
|
/**
|
|
26
|
-
* Relative path to local
|
|
27
|
-
*
|
|
28
|
-
* @private internal utility of `ptbk agent`
|
|
29
|
-
*/
|
|
30
|
-
export declare const AGENT_KNOWLEDGE_DIRECTORY_PATH = "knowledge";
|
|
31
|
-
/**
|
|
32
|
-
* Relative path to local agent documentation initialized by `ptbk agent init`.
|
|
32
|
+
* Relative path to generated local agent documentation initialized by `ptbk agent init`.
|
|
33
33
|
*
|
|
34
34
|
* @private internal utility of `ptbk agent`
|
|
35
35
|
*/
|
|
36
36
|
export declare const AGENT_DOCS_DIRECTORY_PATH = "docs";
|
|
37
37
|
/**
|
|
38
|
-
* Relative path to the local Book language manual
|
|
38
|
+
* Relative path to the local Book language manual initialized by `ptbk agent init`.
|
|
39
39
|
*
|
|
40
40
|
* @private internal utility of `ptbk agent`
|
|
41
41
|
*/
|
|
@@ -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 executionMode: 'once' | 'watch';
|
|
14
15
|
readonly configureCommand?: (command: Program) => void;
|
|
15
16
|
readonly loadExecutor: () => Promise<(runOptions: ReturnType<typeof createAgentRunOptionsFromCliOptions>) => Promise<unknown>>;
|
|
16
17
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Inputs controlling one cached Agents Server production build.
|
|
4
|
+
*
|
|
5
|
+
* @private internal type of `ptbk agents-server`
|
|
6
|
+
*/
|
|
7
|
+
type EnsureAgentsServerBuildOptions = {
|
|
8
|
+
readonly appPath?: string;
|
|
9
|
+
readonly environment?: NodeJS.ProcessEnv;
|
|
10
|
+
readonly isBuildForced?: boolean;
|
|
11
|
+
readonly onBuildEvent?: (event: string) => void;
|
|
12
|
+
readonly onBuildOutput?: (chunk: string) => void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Paths needed after the Agents Server production build is ready.
|
|
16
|
+
*
|
|
17
|
+
* @private internal type of `ptbk agents-server`
|
|
18
|
+
*/
|
|
19
|
+
export type AgentsServerBuildArtifacts = {
|
|
20
|
+
readonly appPath: string;
|
|
21
|
+
readonly nextCliPath: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Input paths required to validate or update the cached Agents Server build.
|
|
25
|
+
*
|
|
26
|
+
* @private internal type of `ptbk agents-server`
|
|
27
|
+
*/
|
|
28
|
+
type AgentsServerBuildCacheOptions = {
|
|
29
|
+
readonly appPath: string;
|
|
30
|
+
readonly environment?: NodeJS.ProcessEnv;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Ensures that the local Agents Server production build exists and matches its source fingerprint.
|
|
34
|
+
*
|
|
35
|
+
* @private internal utility of `ptbk agents-server`
|
|
36
|
+
*/
|
|
37
|
+
export declare function ensureAgentsServerBuild(options?: EnsureAgentsServerBuildOptions): Promise<AgentsServerBuildArtifacts>;
|
|
38
|
+
/**
|
|
39
|
+
* Returns true when the production build marker and source fingerprint still match.
|
|
40
|
+
*
|
|
41
|
+
* @private internal utility of `ptbk agents-server`
|
|
42
|
+
*/
|
|
43
|
+
export declare function isAgentsServerBuildCacheCurrent(options: AgentsServerBuildCacheOptions): Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Persists the source fingerprint for the just-created production build.
|
|
46
|
+
*
|
|
47
|
+
* @private internal utility of `ptbk agents-server`
|
|
48
|
+
*/
|
|
49
|
+
export declare function writeAgentsServerBuildCache(options: AgentsServerBuildCacheOptions): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Finds the Agents Server app in a source checkout or generated CLI package.
|
|
52
|
+
*
|
|
53
|
+
* @private internal utility of `ptbk agents-server`
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveAgentsServerAppPath(): Promise<string>;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type EnsureProjectEnvFileResult } from '../common/projectInitialization';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures `.env` contains all required Agents Server configuration entries.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `ptbk agents-server init`
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureAgentsServerEnvFile(projectPath: string): Promise<EnsureProjectEnvFileResult>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ProjectInitializationStatus } from '../common/projectInitialization';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures `.gitignore` excludes local Agents Server runtime artifacts.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `ptbk agents-server init`
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureAgentsServerGitignoreFile(projectPath: string): Promise<ProjectInitializationStatus>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
export { initializeAgentsServerProjectConfiguration } from './initializeAgentsServerProjectConfiguration';
|
|
4
|
+
/**
|
|
5
|
+
* Initializes `agents-server init` command for Promptbook CLI utilities.
|
|
6
|
+
*
|
|
7
|
+
* @private internal function of `promptbookCli`
|
|
8
|
+
*/
|
|
9
|
+
export declare function $initializeAgentsServerInitCommand(program: Program): $side_effect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/umd/src/cli/cli-commands/agents-server/initializeAgentsServerProjectConfiguration.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ProjectInitializationStatus } from '../common/projectInitialization';
|
|
2
|
+
/**
|
|
3
|
+
* Result summary returned after Agents Server configuration initialization.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `ptbk agents-server init`
|
|
6
|
+
*/
|
|
7
|
+
export type AgentsServerInitializationSummary = {
|
|
8
|
+
readonly envFileStatus: ProjectInitializationStatus;
|
|
9
|
+
readonly gitignoreFileStatus: ProjectInitializationStatus;
|
|
10
|
+
readonly initializedEnvVariableNames: ReadonlyArray<string>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Creates or updates local Agents Server configuration files in the current project.
|
|
14
|
+
*
|
|
15
|
+
* @private internal utility of `ptbk agents-server init`
|
|
16
|
+
*/
|
|
17
|
+
export declare function initializeAgentsServerProjectConfiguration(projectPath: string): Promise<AgentsServerInitializationSummary>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentsServerInitializationSummary } from './initializeAgentsServerProjectConfiguration';
|
|
2
|
+
/**
|
|
3
|
+
* Prints a readable summary of local Agents Server configuration initialization.
|
|
4
|
+
*
|
|
5
|
+
* @private internal utility of `ptbk agents-server init`
|
|
6
|
+
*/
|
|
7
|
+
export declare function printAgentsServerInitializationSummary(summary: AgentsServerInitializationSummary): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../../utils/organization/$side_effect';
|
|
3
|
+
/**
|
|
4
|
+
* Initializes `agents-server start` command for Promptbook CLI utilities.
|
|
5
|
+
*
|
|
6
|
+
* @private internal function of `promptbookCli`
|
|
7
|
+
*/
|
|
8
|
+
export declare function $initializeAgentsServerStartCommand(program: Program): $side_effect;
|
|
9
|
+
/**
|
|
10
|
+
* Initializes `agents-server build` command for Promptbook CLI utilities.
|
|
11
|
+
*
|
|
12
|
+
* @private internal function of `promptbookCli`
|
|
13
|
+
*/
|
|
14
|
+
export declare function $initializeAgentsServerBuildCommand(program: Program): $side_effect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ThinkingLevel } from '../coder/ThinkingLevel';
|
|
2
|
+
import type { PromptRunnerAgentName } from '../common/promptRunnerCliOptions';
|
|
3
|
+
import type { number_port } from '../../../types/number_positive';
|
|
4
|
+
/**
|
|
5
|
+
* Options required to start the foreground Agents Server service group.
|
|
6
|
+
*
|
|
7
|
+
* @private internal type of `ptbk agents-server`
|
|
8
|
+
*/
|
|
9
|
+
export type StartAgentsServerOptions = {
|
|
10
|
+
readonly port: number_port;
|
|
11
|
+
readonly agentName: PromptRunnerAgentName;
|
|
12
|
+
readonly model?: string;
|
|
13
|
+
readonly noUi: boolean;
|
|
14
|
+
readonly thinkingLevel?: ThinkingLevel;
|
|
15
|
+
readonly allowCredits: boolean;
|
|
16
|
+
readonly isBuildForced: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Starts the Agents Server web app and local coding-agent queue workers in the foreground.
|
|
20
|
+
*
|
|
21
|
+
* @private internal utility of `ptbk agents-server`
|
|
22
|
+
*/
|
|
23
|
+
export declare function startAgentsServer(options: StartAgentsServerOptions): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
import type { $side_effect } from '../../utils/organization/$side_effect';
|
|
3
|
+
/**
|
|
4
|
+
* Initializes `agents-server` command with subcommands for Promptbook CLI utilities.
|
|
5
|
+
*
|
|
6
|
+
* @private internal function of `promptbookCli`
|
|
7
|
+
*/
|
|
8
|
+
export declare function $initializeAgentsServerCommand(program: Program): $side_effect;
|
|
@@ -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,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File status returned by project configuration bootstrapping helpers.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility of Promptbook CLI project initialization
|
|
5
|
+
*/
|
|
6
|
+
export type ProjectInitializationStatus = 'created' | 'updated' | 'unchanged';
|
|
7
|
+
/**
|
|
8
|
+
* Minimal environment variable descriptor used for additive `.env` initialization.
|
|
9
|
+
*
|
|
10
|
+
* @private internal utility of Promptbook CLI project initialization
|
|
11
|
+
*/
|
|
12
|
+
export type ProjectEnvVariableDefinition = {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Result of one additive `.env` initialization attempt.
|
|
17
|
+
*
|
|
18
|
+
* @private internal utility of Promptbook CLI project initialization
|
|
19
|
+
*/
|
|
20
|
+
export type EnsureProjectEnvFileResult = {
|
|
21
|
+
readonly envFileStatus: ProjectInitializationStatus;
|
|
22
|
+
readonly initializedEnvVariableNames: ReadonlyArray<string>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Options required to append missing variables into a project `.env`.
|
|
26
|
+
*/
|
|
27
|
+
type EnsureProjectEnvFileOptions<TEnvVariable extends ProjectEnvVariableDefinition> = {
|
|
28
|
+
readonly projectPath: string;
|
|
29
|
+
readonly emptyFileContent: string;
|
|
30
|
+
readonly envVariables: ReadonlyArray<TEnvVariable>;
|
|
31
|
+
readonly buildMissingEnvVariablesBlock: (envVariables: ReadonlyArray<TEnvVariable>) => string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Options required to append missing rules into a project `.gitignore`.
|
|
35
|
+
*/
|
|
36
|
+
type EnsureProjectGitignoreFileOptions = {
|
|
37
|
+
readonly projectPath: string;
|
|
38
|
+
readonly blockHeader: string;
|
|
39
|
+
readonly rules: ReadonlyArray<string>;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Ensures `.env` exists and appends only still-missing variable definitions.
|
|
43
|
+
*
|
|
44
|
+
* @private internal utility of Promptbook CLI project initialization
|
|
45
|
+
*/
|
|
46
|
+
export declare function ensureProjectEnvFile<TEnvVariable extends ProjectEnvVariableDefinition>({ projectPath, emptyFileContent, envVariables, buildMissingEnvVariablesBlock, }: EnsureProjectEnvFileOptions<TEnvVariable>): Promise<EnsureProjectEnvFileResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Ensures `.gitignore` contains all required project initialization rules.
|
|
49
|
+
*
|
|
50
|
+
* @private internal utility of Promptbook CLI project initialization
|
|
51
|
+
*/
|
|
52
|
+
export declare function ensureProjectGitignoreFile({ projectPath, blockHeader, rules, }: EnsureProjectGitignoreFileOptions): Promise<ProjectInitializationStatus>;
|
|
53
|
+
/**
|
|
54
|
+
* Reads one text file when it exists, otherwise returns `undefined`.
|
|
55
|
+
*
|
|
56
|
+
* @private internal utility of Promptbook CLI project initialization
|
|
57
|
+
*/
|
|
58
|
+
export declare function readTextFileIfExists(path: string): Promise<string | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* Appends one text block to existing file content while preserving readable newlines.
|
|
61
|
+
*
|
|
62
|
+
* @private internal utility of Promptbook CLI project initialization
|
|
63
|
+
*/
|
|
64
|
+
export declare function appendBlock(currentContent: string, blockToAppend: string): string;
|
|
65
|
+
export {};
|