@promptbook/cli 0.112.0-64 → 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 +9635 -7910
- 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/servers.d.ts +59 -0
- package/esm/src/_packages/components.index.d.ts +0 -2
- package/esm/src/_packages/core.index.d.ts +2 -2
- package/esm/src/_packages/types.index.d.ts +0 -2
- 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/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +27 -0
- package/esm/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +25 -0
- package/esm/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +10 -0
- package/esm/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +14 -0
- package/esm/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +43 -0
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +0 -34
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/esm/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
- package/esm/src/config.d.ts +3 -3
- package/esm/src/formfactors/index.d.ts +2 -2
- package/esm/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +1 -1
- package/esm/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +0 -4
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +0 -9
- package/esm/src/utils/files/getPromptbookTempPath.d.ts +24 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -2
- package/umd/index.umd.js +9704 -7979
- 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/servers.d.ts +59 -0
- package/umd/src/_packages/components.index.d.ts +0 -2
- package/umd/src/_packages/core.index.d.ts +2 -2
- package/umd/src/_packages/types.index.d.ts +0 -2
- 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/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +27 -0
- package/umd/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +25 -0
- package/umd/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +10 -0
- package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +14 -0
- package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +43 -0
- package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts +1 -0
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +0 -34
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/umd/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
- package/umd/src/config.d.ts +3 -3
- package/umd/src/formfactors/index.d.ts +2 -2
- package/umd/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +1 -1
- package/umd/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +0 -4
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +0 -9
- 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
- /package/esm/src/{commitments/KNOWLEDGE/KNOWLEDGE.test.d.ts → book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts} +0 -0
- /package/{umd/src/commitments/KNOWLEDGE/KNOWLEDGE.test.d.ts → esm/src/utils/files/getPromptbookTempPath.test.d.ts} +0 -0
|
@@ -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;
|
package/esm/servers.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { string_legal_entity, string_promptbook_server_url, string_title } from './src/types/typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Open Promptbook server usable for public
|
|
4
|
+
*/
|
|
5
|
+
type ServerConfiguration = {
|
|
6
|
+
/**
|
|
7
|
+
* Basic name of the server
|
|
8
|
+
*/
|
|
9
|
+
title: string_title;
|
|
10
|
+
/**
|
|
11
|
+
* Who is the owner of the server
|
|
12
|
+
*/
|
|
13
|
+
owner: string_legal_entity;
|
|
14
|
+
/**
|
|
15
|
+
* Description of the server, link to registration, user agreement, privacy policy, etc.
|
|
16
|
+
*/
|
|
17
|
+
description: string;
|
|
18
|
+
/**
|
|
19
|
+
* URL of the server
|
|
20
|
+
*
|
|
21
|
+
Note: lising more for loadbalancing
|
|
22
|
+
*/
|
|
23
|
+
url: string_promptbook_server_url;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Core Promptbook server configuration
|
|
27
|
+
*
|
|
28
|
+
* Used for "Adam" agent which is built in as default ancestor for new agents and other well known agents
|
|
29
|
+
*
|
|
30
|
+
* @public exported from `@promptbook/core`
|
|
31
|
+
*/
|
|
32
|
+
export declare const CORE_AGENTS_SERVER: ServerConfiguration;
|
|
33
|
+
/**
|
|
34
|
+
* Names of well known agents hosted on Core Promptbook server
|
|
35
|
+
*
|
|
36
|
+
* - `Adam`: The default ancestor agent for new agents
|
|
37
|
+
* - `Teacher`: Agent that knows book syntax and can help with self-learning
|
|
38
|
+
*
|
|
39
|
+
* @public exported from `@promptbook/core`
|
|
40
|
+
*/
|
|
41
|
+
export declare const CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES: {
|
|
42
|
+
/**
|
|
43
|
+
* The default ancestor agent for new agents
|
|
44
|
+
*/
|
|
45
|
+
readonly ADAM: "adam";
|
|
46
|
+
/**
|
|
47
|
+
* Agent that knows book syntax and can help with self-learning
|
|
48
|
+
*/
|
|
49
|
+
readonly TEACHER: "teacher";
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Available agents servers for the Promptbook
|
|
53
|
+
*
|
|
54
|
+
* Tip: 💡 If you are running your own server, you can add it to this list by creating a pull request!
|
|
55
|
+
*
|
|
56
|
+
* @public exported from `@promptbook/core`
|
|
57
|
+
*/
|
|
58
|
+
export declare const PUBLIC_AGENTS_SERVERS: Array<ServerConfiguration>;
|
|
59
|
+
export {};
|
|
@@ -62,7 +62,6 @@ import { reactSaveFormatDefinition } from '../book-components/Chat/save/react/re
|
|
|
62
62
|
import { txtSaveFormatDefinition } from '../book-components/Chat/save/text/txtSaveFormatDefinition';
|
|
63
63
|
import type { ChatProgressItem } from '../book-components/Chat/types/ChatMessage';
|
|
64
64
|
import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage';
|
|
65
|
-
import type { ChatMessageSource } from '../book-components/Chat/types/ChatMessage';
|
|
66
65
|
import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
|
|
67
66
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
68
67
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
@@ -146,7 +145,6 @@ export { reactSaveFormatDefinition };
|
|
|
146
145
|
export { txtSaveFormatDefinition };
|
|
147
146
|
export type { ChatProgressItem };
|
|
148
147
|
export type { ChatProgressCard };
|
|
149
|
-
export type { ChatMessageSource };
|
|
150
148
|
export type { ChatMessageReplyingTo };
|
|
151
149
|
export type { ChatMessage };
|
|
152
150
|
export type { ChatParticipant };
|
|
@@ -11,6 +11,7 @@ import { parseParameters } from '../book-2.0/agent-source/parseParameters';
|
|
|
11
11
|
import { isValidBook } from '../book-2.0/agent-source/string_book';
|
|
12
12
|
import { validateBook } from '../book-2.0/agent-source/string_book';
|
|
13
13
|
import { DEFAULT_BOOK } from '../book-2.0/agent-source/string_book';
|
|
14
|
+
import { createStandaloneBookLanguageMarkdown } from '../book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown';
|
|
14
15
|
import { generatePlaceholderAgentProfileImageUrl } from '../book-2.0/utils/generatePlaceholderAgentProfileImageUrl';
|
|
15
16
|
import { AgentCollectionInSupabase } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase';
|
|
16
17
|
import { createPipelineCollectionFromJson } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromJson';
|
|
@@ -28,7 +29,6 @@ import { getAllCommitmentTypes } from '../commitments/_common/getAllCommitmentTy
|
|
|
28
29
|
import { getCommitmentDefinition } from '../commitments/_common/getCommitmentDefinition';
|
|
29
30
|
import { getGroupedCommitmentDefinitions } from '../commitments/_common/getGroupedCommitmentDefinitions';
|
|
30
31
|
import { isCommitmentSupported } from '../commitments/_common/isCommitmentSupported';
|
|
31
|
-
import { KNOWLEDGE_SEARCH_TOOL_NAME } from '../commitments/KNOWLEDGE/KNOWLEDGE';
|
|
32
32
|
import { NAME } from '../config';
|
|
33
33
|
import { ADMIN_EMAIL } from '../config';
|
|
34
34
|
import { PROMPTBOOK_LEGAL_ENTITY } from '../config';
|
|
@@ -236,6 +236,7 @@ export { parseParameters };
|
|
|
236
236
|
export { isValidBook };
|
|
237
237
|
export { validateBook };
|
|
238
238
|
export { DEFAULT_BOOK };
|
|
239
|
+
export { createStandaloneBookLanguageMarkdown };
|
|
239
240
|
export { generatePlaceholderAgentProfileImageUrl };
|
|
240
241
|
export { AgentCollectionInSupabase };
|
|
241
242
|
export { createPipelineCollectionFromJson };
|
|
@@ -253,7 +254,6 @@ export { getAllCommitmentTypes };
|
|
|
253
254
|
export { getCommitmentDefinition };
|
|
254
255
|
export { getGroupedCommitmentDefinitions };
|
|
255
256
|
export { isCommitmentSupported };
|
|
256
|
-
export { KNOWLEDGE_SEARCH_TOOL_NAME };
|
|
257
257
|
export { NAME };
|
|
258
258
|
export { ADMIN_EMAIL };
|
|
259
259
|
export { PROMPTBOOK_LEGAL_ENTITY };
|
|
@@ -44,7 +44,6 @@ import type { SourceChipProps } from '../book-components/Chat/SourceChip/SourceC
|
|
|
44
44
|
import type { ChatToolCall } from '../book-components/Chat/types/ChatMessage';
|
|
45
45
|
import type { ChatProgressItem } from '../book-components/Chat/types/ChatMessage';
|
|
46
46
|
import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage';
|
|
47
|
-
import type { ChatMessageSource } from '../book-components/Chat/types/ChatMessage';
|
|
48
47
|
import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
|
|
49
48
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
50
49
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
@@ -478,7 +477,6 @@ export type { SourceChipProps };
|
|
|
478
477
|
export type { ChatToolCall };
|
|
479
478
|
export type { ChatProgressItem };
|
|
480
479
|
export type { ChatProgressCard };
|
|
481
|
-
export type { ChatMessageSource };
|
|
482
480
|
export type { ChatMessageReplyingTo };
|
|
483
481
|
export type { ChatMessage };
|
|
484
482
|
export type { ChatParticipant };
|
|
@@ -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 {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One end-to-end Book language example used in standalone documentation.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility of `createStandaloneBookLanguageMarkdown`
|
|
5
|
+
*/
|
|
6
|
+
export type BookLanguageDocumentationExample = {
|
|
7
|
+
/**
|
|
8
|
+
* Stable identifier used for markdown anchors.
|
|
9
|
+
*/
|
|
10
|
+
readonly id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Human-readable example title.
|
|
13
|
+
*/
|
|
14
|
+
readonly title: string;
|
|
15
|
+
/**
|
|
16
|
+
* Goal of the example in one short sentence.
|
|
17
|
+
*/
|
|
18
|
+
readonly goal: string;
|
|
19
|
+
/**
|
|
20
|
+
* Full Book source shown to readers.
|
|
21
|
+
*/
|
|
22
|
+
readonly source: string;
|
|
23
|
+
/**
|
|
24
|
+
* Step-by-step walkthrough of how the source works.
|
|
25
|
+
*/
|
|
26
|
+
readonly walkthrough: ReadonlyArray<string>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One practical "don't vs do" pitfall item for Book language authoring.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility of `createStandaloneBookLanguageMarkdown`
|
|
5
|
+
*/
|
|
6
|
+
export type BookLanguageCommonPitfall = {
|
|
7
|
+
/**
|
|
8
|
+
* Short pitfall title.
|
|
9
|
+
*/
|
|
10
|
+
readonly title: string;
|
|
11
|
+
/**
|
|
12
|
+
* Description of what to avoid.
|
|
13
|
+
*/
|
|
14
|
+
readonly dont: string;
|
|
15
|
+
/**
|
|
16
|
+
* Practical corrective action.
|
|
17
|
+
*/
|
|
18
|
+
readonly doInstead: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Common anti-patterns with practical fixes.
|
|
22
|
+
*
|
|
23
|
+
* @private internal utility of `createStandaloneBookLanguageMarkdown`
|
|
24
|
+
*/
|
|
25
|
+
export declare const bookLanguageCommonPitfalls: ReadonlyArray<BookLanguageCommonPitfall>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BookLanguageDocumentationExample } from './BookLanguageDocumentationExample';
|
|
2
|
+
/**
|
|
3
|
+
* End-to-end examples used by the standalone Book language documentation.
|
|
4
|
+
*
|
|
5
|
+
* These are intentionally compact but complete, so they can be copy-pasted and
|
|
6
|
+
* used as practical starting points.
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `createStandaloneBookLanguageMarkdown`
|
|
9
|
+
*/
|
|
10
|
+
export declare const bookLanguageDocumentationExamples: ReadonlyArray<BookLanguageDocumentationExample>;
|
package/esm/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { string_markdown } from '../../types/string_markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Creates one standalone markdown guide for Book language (Book 2.0 / agent language).
|
|
4
|
+
*
|
|
5
|
+
* The output intentionally combines:
|
|
6
|
+
* - static conceptual building blocks maintained in this repository
|
|
7
|
+
* - dynamically generated commitment catalog from runtime commitment definitions
|
|
8
|
+
* so docs stay up-to-date by design.
|
|
9
|
+
*
|
|
10
|
+
* @returns Full standalone markdown document.
|
|
11
|
+
*
|
|
12
|
+
* @public exported from `@promptbook/core`
|
|
13
|
+
*/
|
|
14
|
+
export declare function createStandaloneBookLanguageMarkdown(): string_markdown;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal commitment shape used by documentation renderers.
|
|
3
|
+
*
|
|
4
|
+
* @private internal utility of `createStandaloneBookLanguageMarkdown`
|
|
5
|
+
*/
|
|
6
|
+
type CommitmentDocumentationSource = {
|
|
7
|
+
/**
|
|
8
|
+
* Canonical commitment keyword.
|
|
9
|
+
*/
|
|
10
|
+
readonly type: string;
|
|
11
|
+
/**
|
|
12
|
+
* Full markdown documentation block, including the top-level heading.
|
|
13
|
+
*/
|
|
14
|
+
readonly documentation: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Grouped commitment metadata consumed by the docs renderer.
|
|
18
|
+
*
|
|
19
|
+
* @private internal utility of `createStandaloneBookLanguageMarkdown`
|
|
20
|
+
*/
|
|
21
|
+
type GroupedCommitmentDocumentationSource = {
|
|
22
|
+
/**
|
|
23
|
+
* Primary commitment shown in the docs entry.
|
|
24
|
+
*/
|
|
25
|
+
readonly primary: CommitmentDocumentationSource;
|
|
26
|
+
/**
|
|
27
|
+
* Aliases grouped under the same docs entry.
|
|
28
|
+
*/
|
|
29
|
+
readonly aliases: ReadonlyArray<string>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Renders the documentation body for one grouped commitment entry.
|
|
33
|
+
*
|
|
34
|
+
* `OPEN` and `CLOSED` are intentionally rendered together so the documentation
|
|
35
|
+
* surfaces present them as one conceptual switch instead of two isolated pages.
|
|
36
|
+
*
|
|
37
|
+
* @param group - Grouped commitment metadata.
|
|
38
|
+
* @returns Markdown body for the docs page/catalog entry.
|
|
39
|
+
*
|
|
40
|
+
* @private internal utility of `createStandaloneBookLanguageMarkdown`
|
|
41
|
+
*/
|
|
42
|
+
export declare function renderGroupedCommitmentDocumentationMarkdown(group: GroupedCommitmentDocumentationSource): string;
|
|
43
|
+
export {};
|
|
@@ -58,36 +58,6 @@ export type ChatProgressCard = {
|
|
|
58
58
|
*/
|
|
59
59
|
readonly isVisible?: boolean;
|
|
60
60
|
};
|
|
61
|
-
/**
|
|
62
|
-
* Source used by an assistant message.
|
|
63
|
-
*
|
|
64
|
-
* This is used for knowledge-search results and other RAG systems that can
|
|
65
|
-
* attach structured source metadata independently of inline citation markers.
|
|
66
|
-
*
|
|
67
|
-
* @public exported from `@promptbook/components`
|
|
68
|
-
*/
|
|
69
|
-
export type ChatMessageSource = {
|
|
70
|
-
/**
|
|
71
|
-
* The unique identifier for the source citation (e.g., "0:0")
|
|
72
|
-
*/
|
|
73
|
-
readonly id: string;
|
|
74
|
-
/**
|
|
75
|
-
* The source document name (e.g., "document.pdf")
|
|
76
|
-
*/
|
|
77
|
-
readonly source: string;
|
|
78
|
-
/**
|
|
79
|
-
* Optional URL to the source document
|
|
80
|
-
*/
|
|
81
|
-
readonly url?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Optional preview/excerpt from the source
|
|
84
|
-
*/
|
|
85
|
-
readonly excerpt?: string;
|
|
86
|
-
/**
|
|
87
|
-
* Optional retrieval score.
|
|
88
|
-
*/
|
|
89
|
-
readonly score?: number;
|
|
90
|
-
};
|
|
91
61
|
/**
|
|
92
62
|
* Serialized reference to an earlier chat message quoted by a reply bubble.
|
|
93
63
|
*
|
|
@@ -285,10 +255,6 @@ export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'thread
|
|
|
285
255
|
*/
|
|
286
256
|
excerpt?: string;
|
|
287
257
|
}>;
|
|
288
|
-
/**
|
|
289
|
-
* Optional structured sources used to produce this message.
|
|
290
|
-
*/
|
|
291
|
-
readonly sources?: ReadonlyArray<ChatMessageSource>;
|
|
292
258
|
/**
|
|
293
259
|
* Optional structured progress-card payload shown while a response is still in progress.
|
|
294
260
|
*/
|
|
@@ -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
|
*/
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type { string_javascript_name } from '../../_packages/types.index';
|
|
2
1
|
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
3
2
|
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
4
|
-
/**
|
|
5
|
-
* Name of the tool used by agents to search configured `KNOWLEDGE` sources.
|
|
6
|
-
*
|
|
7
|
-
* @public exported from `@promptbook/core`
|
|
8
|
-
*/
|
|
9
|
-
export declare const KNOWLEDGE_SEARCH_TOOL_NAME: string;
|
|
10
3
|
/**
|
|
11
4
|
* KNOWLEDGE commitment definition
|
|
12
5
|
*
|
|
@@ -44,8 +37,4 @@ export declare class KnowledgeCommitmentDefinition extends BaseCommitmentDefinit
|
|
|
44
37
|
*/
|
|
45
38
|
get documentation(): string;
|
|
46
39
|
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
47
|
-
/**
|
|
48
|
-
* Gets human-readable titles for tool functions provided by this commitment.
|
|
49
|
-
*/
|
|
50
|
-
getToolTitles(): Record<string_javascript_name, string>;
|
|
51
40
|
}
|
|
@@ -98,12 +98,6 @@ export type ToolRuntimeContext = {
|
|
|
98
98
|
localServerUrl?: string;
|
|
99
99
|
teamInternalAccessToken?: string;
|
|
100
100
|
};
|
|
101
|
-
knowledge?: {
|
|
102
|
-
/**
|
|
103
|
-
* Final materialized knowledge sources available to the current agent.
|
|
104
|
-
*/
|
|
105
|
-
sources?: string[];
|
|
106
|
-
};
|
|
107
101
|
spawn?: {
|
|
108
102
|
depth?: number;
|
|
109
103
|
parentRunId?: string;
|
package/esm/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
|
*
|
|
@@ -52,7 +52,7 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
|
52
52
|
};
|
|
53
53
|
}, {
|
|
54
54
|
readonly name: "TRANSLATOR";
|
|
55
|
-
readonly description:
|
|
55
|
+
readonly description: string;
|
|
56
56
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/175";
|
|
57
57
|
readonly pipelineInterface: {
|
|
58
58
|
readonly inputParameters: readonly [{
|
|
@@ -89,7 +89,7 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
|
89
89
|
};
|
|
90
90
|
}, {
|
|
91
91
|
readonly name: "EXPERIMENTAL_MATCHER";
|
|
92
|
-
readonly description:
|
|
92
|
+
readonly description: string;
|
|
93
93
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/177";
|
|
94
94
|
readonly pipelineInterface: {
|
|
95
95
|
readonly inputParameters: readonly [{
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const MatcherFormfactorDefinition: {
|
|
9
9
|
readonly name: "EXPERIMENTAL_MATCHER";
|
|
10
|
-
readonly description:
|
|
10
|
+
readonly description: string;
|
|
11
11
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/177";
|
|
12
12
|
readonly pipelineInterface: {
|
|
13
13
|
readonly inputParameters: readonly [{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const TranslatorFormfactorDefinition: {
|
|
8
8
|
readonly name: "TRANSLATOR";
|
|
9
|
-
readonly description:
|
|
9
|
+
readonly description: string;
|
|
10
10
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/175";
|
|
11
11
|
readonly pipelineInterface: {
|
|
12
12
|
readonly inputParameters: readonly [{
|
|
@@ -178,10 +178,6 @@ export declare class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandl
|
|
|
178
178
|
* Returns AgentKit-specific options.
|
|
179
179
|
*/
|
|
180
180
|
private get agentKitOptions();
|
|
181
|
-
/**
|
|
182
|
-
* Returns true when hosted OpenAI vector-store search should back `knowledgeSources`.
|
|
183
|
-
*/
|
|
184
|
-
private get isNativeKnowledgeSearchEnabled();
|
|
185
181
|
/**
|
|
186
182
|
* Discriminant for type guards.
|
|
187
183
|
*/
|
|
@@ -12,13 +12,4 @@ export type OpenAiAgentKitExecutionToolsOptions = OpenAiVectorStoreHandlerOption
|
|
|
12
12
|
* @default gpt-5.2
|
|
13
13
|
*/
|
|
14
14
|
readonly agentKitModelName?: string_model_name;
|
|
15
|
-
/**
|
|
16
|
-
* Enables OpenAI hosted vector-store file search for `knowledgeSources`.
|
|
17
|
-
*
|
|
18
|
-
* Agents Server sets this to `false` because it uses a DB-backed LlamaIndex
|
|
19
|
-
* implementation exposed through the `knowledge_search` tool instead.
|
|
20
|
-
*
|
|
21
|
-
* @default true
|
|
22
|
-
*/
|
|
23
|
-
readonly isNativeKnowledgeSearchEnabled?: boolean;
|
|
24
15
|
};
|