@promptbook/utils 0.112.0-63 → 0.112.0-65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.es.js +1 -1
- package/esm/src/_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/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/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
- 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/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +1 -1
- 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/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-components/Chat/types/ChatMessage.d.ts +0 -34
- package/umd/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
- 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/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 → book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts} +0 -0
package/esm/index.es.js
CHANGED
|
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
18
18
|
* @generated
|
|
19
19
|
* @see https://github.com/webgptorg/promptbook
|
|
20
20
|
*/
|
|
21
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
21
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-65';
|
|
22
22
|
/**
|
|
23
23
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
24
24
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -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 };
|
|
@@ -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,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;
|
|
@@ -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
|
};
|
package/esm/src/version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-64`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* @generated
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
25
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-65';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -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 };
|
|
@@ -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/umd/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,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;
|
|
@@ -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
|
};
|
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-64`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
|
File without changes
|