@promptbook/cli 0.112.0-65 → 0.112.0-66
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 +1233 -298
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-messages/ui/buildAgentRunInitialsVisual.d.ts +4 -0
- package/esm/scripts/run-agent-messages/ui/buildAgentRunUiFrame.d.ts +5 -0
- package/esm/scripts/run-agent-messages/ui/loadAgentRunUiMetadata.d.ts +16 -0
- package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +1 -0
- package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +49 -0
- package/esm/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +4 -1
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/esm/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/esm/src/config.d.ts +3 -3
- package/esm/src/utils/files/getPromptbookTempPath.d.ts +24 -0
- package/esm/src/utils/files/getPromptbookTempPath.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +1232 -297
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-messages/ui/buildAgentRunInitialsVisual.d.ts +4 -0
- package/umd/scripts/run-agent-messages/ui/buildAgentRunUiFrame.d.ts +5 -0
- package/umd/scripts/run-agent-messages/ui/loadAgentRunUiMetadata.d.ts +16 -0
- package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +1 -0
- package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +49 -0
- package/umd/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +4 -1
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/umd/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/umd/src/config.d.ts +3 -3
- package/umd/src/utils/files/getPromptbookTempPath.d.ts +24 -0
- package/umd/src/utils/files/getPromptbookTempPath.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BuildCoderRunUiFrameOptions } from '../../run-codex-prompts/ui/buildCoderRunUiFrame';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the complete boxed terminal frame for the rich `ptbk agent run` UI.
|
|
4
|
+
*/
|
|
5
|
+
export declare function buildAgentRunUiFrame(options: BuildCoderRunUiFrameOptions): string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AgentMessageFile } from '../messages/AgentMessageFile';
|
|
2
|
+
/**
|
|
3
|
+
* Local metadata rendered in the rich `ptbk agent run` dashboard.
|
|
4
|
+
*/
|
|
5
|
+
export type AgentRunUiMetadata = {
|
|
6
|
+
readonly localAgentName: string;
|
|
7
|
+
readonly latestUserMessageLines: readonly string[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Reads the local agent title and latest queued user message for the rich agent dashboard.
|
|
11
|
+
*/
|
|
12
|
+
export declare function loadAgentRunUiMetadata(projectPath: string, queuedMessage: AgentMessageFile): Promise<AgentRunUiMetadata>;
|
|
13
|
+
/**
|
|
14
|
+
* Extracts the latest `MESSAGE @User` block while preserving the original line breaks.
|
|
15
|
+
*/
|
|
16
|
+
export declare function extractLatestUserMessageLines(messageContent: string): readonly string[];
|
|
@@ -16,6 +16,7 @@ export type CoderRunPhase = 'initializing' | 'loading' | 'running' | 'verifying'
|
|
|
16
16
|
*/
|
|
17
17
|
export type CoderRunConfig = {
|
|
18
18
|
readonly agentName: string;
|
|
19
|
+
readonly localAgentName?: string;
|
|
19
20
|
readonly modelName?: string;
|
|
20
21
|
readonly thinkingLevel?: string;
|
|
21
22
|
readonly context?: string;
|
|
@@ -42,6 +43,7 @@ export declare class CoderRunUiState extends EventEmitter {
|
|
|
42
43
|
currentAttempt: number;
|
|
43
44
|
maxAttempts: number;
|
|
44
45
|
detailLines: string[];
|
|
46
|
+
messagePreviewLines: string[];
|
|
45
47
|
pendingEnterLabel: string | undefined;
|
|
46
48
|
agentOutputLines: string[];
|
|
47
49
|
phase: CoderRunPhase;
|
|
@@ -95,6 +97,10 @@ export declare class CoderRunUiState extends EventEmitter {
|
|
|
95
97
|
* Replaces the contextual detail lines shown beneath the current prompt status.
|
|
96
98
|
*/
|
|
97
99
|
setDetailLines(detailLines: string[]): void;
|
|
100
|
+
/**
|
|
101
|
+
* Replaces the exact user-message preview lines shown in agent-specific panels.
|
|
102
|
+
*/
|
|
103
|
+
setMessagePreviewLines(messagePreviewLines: string[]): void;
|
|
98
104
|
/**
|
|
99
105
|
* Sets or clears the Enter-key action label shown in the controls panel.
|
|
100
106
|
*/
|
|
@@ -19,6 +19,7 @@ export type BuildCoderRunUiFrameOptions = {
|
|
|
19
19
|
readonly maxAttempts: number;
|
|
20
20
|
readonly statusMessage: string;
|
|
21
21
|
readonly detailLines: readonly string[];
|
|
22
|
+
readonly messagePreviewLines?: readonly string[];
|
|
22
23
|
readonly pendingEnterLabel?: string;
|
|
23
24
|
readonly agentOutputLines: readonly string[];
|
|
24
25
|
readonly errors: readonly string[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { CoderRunPauseState } from '../common/waitForPause';
|
|
2
|
+
import type { CoderRunPhase } from './CoderRunUiState';
|
|
3
|
+
/**
|
|
4
|
+
* Maximum number of output lines reserved for agent output in the UI.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MAX_VISIBLE_OUTPUT_LINES = 8;
|
|
7
|
+
/**
|
|
8
|
+
* Visible width reserved for aligned labels in the session box.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SESSION_LABEL_WIDTH = 8;
|
|
11
|
+
/**
|
|
12
|
+
* One structured row rendered inside the session box.
|
|
13
|
+
*/
|
|
14
|
+
export type SessionRow = {
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly value: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Shared copy and colors derived from the current pause lifecycle state.
|
|
20
|
+
*/
|
|
21
|
+
export type PausePresentation = {
|
|
22
|
+
readonly badge: string;
|
|
23
|
+
readonly stateMessage: string;
|
|
24
|
+
readonly pauseControl: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Builds the fixed-height live output section so streaming updates do not keep resizing the frame.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildVisibleOutputLines(agentOutputLines: readonly string[]): readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* Renders a framed box with a colored title and padded body lines.
|
|
32
|
+
*/
|
|
33
|
+
export declare function renderBox(title: string, lines: readonly string[], totalWidth: number, colorizeTitle: (text: string) => string): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Builds one aligned labeled line inside the session box.
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildLabeledSessionLine(label: string, value: string, bodyWidth: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* Builds the colored phase badge shown in the session box.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildPausePresentation(phase: CoderRunPhase, pauseState: CoderRunPauseState, statusMessage: string): PausePresentation;
|
|
42
|
+
/**
|
|
43
|
+
* Builds the progress bar shown in the session box.
|
|
44
|
+
*/
|
|
45
|
+
export declare function buildProgressBar(percentage: number, availableWidth: number, label: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Builds the control pills shown in the footer box.
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildControlPills(pauseControl: string, pendingEnterLabel: string | undefined): readonly string[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
|
+
import { type BuildCoderRunUiFrameOptions } from './buildCoderRunUiFrame';
|
|
2
3
|
import { CoderRunUiState } from './CoderRunUiState';
|
|
3
4
|
/**
|
|
4
5
|
* Handle returned by `renderCoderRunUi` that exposes the state and lifecycle controls.
|
|
@@ -30,4 +31,6 @@ export type CoderRunUiHandle = {
|
|
|
30
31
|
*
|
|
31
32
|
* @private internal entry point of coder run UI
|
|
32
33
|
*/
|
|
33
|
-
export declare function renderCoderRunUi(startTime: moment.Moment
|
|
34
|
+
export declare function renderCoderRunUi(startTime: moment.Moment, options?: {
|
|
35
|
+
readonly buildFrameLines?: (options: BuildCoderRunUiFrameOptions) => string[];
|
|
36
|
+
}): CoderRunUiHandle;
|
|
@@ -6,7 +6,7 @@ import type { AvatarDefinition } from './AvatarDefinition';
|
|
|
6
6
|
*
|
|
7
7
|
* @private shared contract for the avatar rendering system
|
|
8
8
|
*/
|
|
9
|
-
export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'ascii-octopus' | 'minecraft' | 'fractal' | 'orb';
|
|
9
|
+
export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
|
|
10
10
|
/**
|
|
11
11
|
* Derived color palette used by avatar visuals.
|
|
12
12
|
*
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AvatarPalette } from '../types/AvatarVisualDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* One Minecraft-style pixel texture sampled on a cuboid face.
|
|
4
|
+
*
|
|
5
|
+
* @private helper of the Minecraft avatar visuals
|
|
6
|
+
*/
|
|
7
|
+
export type MinecraftTexture = ReadonlyArray<ReadonlyArray<string>>;
|
|
8
|
+
/**
|
|
9
|
+
* Full six-face texture pack for one rendered cuboid.
|
|
10
|
+
*
|
|
11
|
+
* @private helper of the Minecraft avatar visuals
|
|
12
|
+
*/
|
|
13
|
+
export type MinecraftCuboidTextures = {
|
|
14
|
+
readonly front: MinecraftTexture;
|
|
15
|
+
readonly back: MinecraftTexture;
|
|
16
|
+
readonly left: MinecraftTexture;
|
|
17
|
+
readonly right: MinecraftTexture;
|
|
18
|
+
readonly top: MinecraftTexture;
|
|
19
|
+
readonly bottom: MinecraftTexture;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Shared subset of avatar colors used by the Minecraft avatar helpers.
|
|
23
|
+
*
|
|
24
|
+
* @private helper of the Minecraft avatar visuals
|
|
25
|
+
*/
|
|
26
|
+
type MinecraftTexturePalette = Pick<AvatarPalette, 'primary' | 'secondary' | 'accent' | 'highlight' | 'ink' | 'shadow'>;
|
|
27
|
+
/**
|
|
28
|
+
* Builds the seeded six-face texture pack used by the Minecraft-style head cuboid.
|
|
29
|
+
*
|
|
30
|
+
* @param random Seeded random generator.
|
|
31
|
+
* @param palette Derived avatar palette.
|
|
32
|
+
* @param hasHeadband Whether the generated avatar should include a colored headband.
|
|
33
|
+
* @returns Head cuboid textures.
|
|
34
|
+
*
|
|
35
|
+
* @private helper of the Minecraft avatar visuals
|
|
36
|
+
*/
|
|
37
|
+
export declare function createMinecraftHeadTextures(random: () => number, palette: MinecraftTexturePalette, hasHeadband: boolean): MinecraftCuboidTextures;
|
|
38
|
+
/**
|
|
39
|
+
* Builds the seeded six-face texture pack used by the Minecraft-style torso cuboid.
|
|
40
|
+
*
|
|
41
|
+
* @param random Seeded random generator.
|
|
42
|
+
* @param palette Derived avatar palette.
|
|
43
|
+
* @returns Torso cuboid textures.
|
|
44
|
+
*
|
|
45
|
+
* @private helper of the Minecraft avatar visuals
|
|
46
|
+
*/
|
|
47
|
+
export declare function createMinecraftTorsoTextures(random: () => number, palette: MinecraftTexturePalette): MinecraftCuboidTextures;
|
|
48
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InitializationStatus } from './boilerplateTemplates';
|
|
2
2
|
/**
|
|
3
|
-
* Ensures `.gitignore` contains the
|
|
3
|
+
* Ensures `.gitignore` contains the shared Promptbook working-directory entry.
|
|
4
4
|
*
|
|
5
5
|
* @private function of `initializeCoderProjectConfiguration`
|
|
6
6
|
*/
|
package/umd/src/config.d.ts
CHANGED
|
@@ -270,7 +270,7 @@ export declare const DEFAULT_AGENTS_DIRNAME = "./agents";
|
|
|
270
270
|
*
|
|
271
271
|
* @public exported from `@promptbook/core`
|
|
272
272
|
*/
|
|
273
|
-
export declare const DEFAULT_DOWNLOAD_CACHE_DIRNAME
|
|
273
|
+
export declare const DEFAULT_DOWNLOAD_CACHE_DIRNAME: string;
|
|
274
274
|
/**
|
|
275
275
|
* Where to store the cache of executions for promptbook CLI
|
|
276
276
|
*
|
|
@@ -278,7 +278,7 @@ export declare const DEFAULT_DOWNLOAD_CACHE_DIRNAME = "./.promptbook/download-ca
|
|
|
278
278
|
*
|
|
279
279
|
* @public exported from `@promptbook/core`
|
|
280
280
|
*/
|
|
281
|
-
export declare const DEFAULT_EXECUTION_CACHE_DIRNAME
|
|
281
|
+
export declare const DEFAULT_EXECUTION_CACHE_DIRNAME: string;
|
|
282
282
|
/**
|
|
283
283
|
* Where to store the scrape cache
|
|
284
284
|
*
|
|
@@ -286,7 +286,7 @@ export declare const DEFAULT_EXECUTION_CACHE_DIRNAME = "./.promptbook/execution-
|
|
|
286
286
|
*
|
|
287
287
|
* @public exported from `@promptbook/core`
|
|
288
288
|
*/
|
|
289
|
-
export declare const DEFAULT_SCRAPE_CACHE_DIRNAME
|
|
289
|
+
export declare const DEFAULT_SCRAPE_CACHE_DIRNAME: string;
|
|
290
290
|
/**
|
|
291
291
|
* Id of application for the CLI when using remote server
|
|
292
292
|
*
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds one project-relative path inside the shared Promptbook working directory.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility for Promptbook-owned temp files
|
|
5
|
+
*/
|
|
6
|
+
export declare function getPromptbookTempPath(...pathSegments: ReadonlyArray<string>): string;
|
|
7
|
+
/**
|
|
8
|
+
* Builds one absolute filesystem path inside the shared Promptbook working directory for a project root.
|
|
9
|
+
*
|
|
10
|
+
* @private internal utility for Promptbook-owned temp files
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolvePromptbookTempPath(projectPath: string, ...pathSegments: ReadonlyArray<string>): string;
|
|
13
|
+
/**
|
|
14
|
+
* Builds one POSIX path fragment inside the shared Promptbook working directory for globs and generated text files.
|
|
15
|
+
*
|
|
16
|
+
* @private internal utility for Promptbook-owned temp files
|
|
17
|
+
*/
|
|
18
|
+
export declare function getPromptbookTempPosixPath(...pathSegments: ReadonlyArray<string>): string;
|
|
19
|
+
/**
|
|
20
|
+
* Builds one rooted `.gitignore` rule targeting a path inside the shared Promptbook working directory.
|
|
21
|
+
*
|
|
22
|
+
* @private internal utility for Promptbook-owned temp files
|
|
23
|
+
*/
|
|
24
|
+
export declare function getPromptbookTempGitignoreRule(...pathSegments: ReadonlyArray<string>): string;
|
|
@@ -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-65`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|