@promptbook/javascript 0.107.0-0 → 0.108.0-0
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/typings/src/_packages/markdown-utils.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +6 -0
- package/esm/typings/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +7 -0
- package/esm/typings/src/types/ToolCall.d.ts +63 -0
- package/esm/typings/src/utils/markdown/humanizeAiTextSources.d.ts +13 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
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.
|
|
21
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.108.0-0';
|
|
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
|
|
@@ -21,6 +21,7 @@ import { humanizeAiText } from '../utils/markdown/humanizeAiText';
|
|
|
21
21
|
import { humanizeAiTextEllipsis } from '../utils/markdown/humanizeAiTextEllipsis';
|
|
22
22
|
import { humanizeAiTextEmdashed } from '../utils/markdown/humanizeAiTextEmdashed';
|
|
23
23
|
import { humanizeAiTextQuotes } from '../utils/markdown/humanizeAiTextQuotes';
|
|
24
|
+
import { humanizeAiTextSources } from '../utils/markdown/humanizeAiTextSources';
|
|
24
25
|
import { humanizeAiTextWhitespace } from '../utils/markdown/humanizeAiTextWhitespace';
|
|
25
26
|
import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection';
|
|
26
27
|
import { parseMarkdownSection } from '../utils/markdown/parseMarkdownSection';
|
|
@@ -54,6 +55,7 @@ export { humanizeAiText };
|
|
|
54
55
|
export { humanizeAiTextEllipsis };
|
|
55
56
|
export { humanizeAiTextEmdashed };
|
|
56
57
|
export { humanizeAiTextQuotes };
|
|
58
|
+
export { humanizeAiTextSources };
|
|
57
59
|
export { humanizeAiTextWhitespace };
|
|
58
60
|
export type { MarkdownSection };
|
|
59
61
|
export { parseMarkdownSection };
|
|
@@ -230,6 +230,9 @@ import type { SpeechRecognitionState } from '../types/SpeechRecognition';
|
|
|
230
230
|
import type { SpeechRecognitionEvent } from '../types/SpeechRecognition';
|
|
231
231
|
import type { TaskType } from '../types/TaskType';
|
|
232
232
|
import type { ToolCall } from '../types/ToolCall';
|
|
233
|
+
import type { SelfLearningCommitmentTypeCounts } from '../types/ToolCall';
|
|
234
|
+
import type { SelfLearningTeacherSummary } from '../types/ToolCall';
|
|
235
|
+
import type { SelfLearningToolCallResult } from '../types/ToolCall';
|
|
233
236
|
import type { ASSISTANT_PREPARATION_TOOL_CALL_NAME } from '../types/ToolCall';
|
|
234
237
|
import type { isAssistantPreparationToolCall } from '../types/ToolCall';
|
|
235
238
|
import type { string_char_emoji } from '../types/typeAliasEmoji';
|
|
@@ -629,6 +632,9 @@ export type { SpeechRecognitionState };
|
|
|
629
632
|
export type { SpeechRecognitionEvent };
|
|
630
633
|
export type { TaskType };
|
|
631
634
|
export type { ToolCall };
|
|
635
|
+
export type { SelfLearningCommitmentTypeCounts };
|
|
636
|
+
export type { SelfLearningTeacherSummary };
|
|
637
|
+
export type { SelfLearningToolCallResult };
|
|
632
638
|
export type { ASSISTANT_PREPARATION_TOOL_CALL_NAME };
|
|
633
639
|
export type { isAssistantPreparationToolCall };
|
|
634
640
|
export type { string_char_emoji };
|
|
@@ -15,6 +15,12 @@ export type ToolCallChipletInfo = {
|
|
|
15
15
|
* Agent data for team tools (if applicable)
|
|
16
16
|
*/
|
|
17
17
|
agentData?: AgentChipData;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to wrap the chip text in brackets when rendering.
|
|
20
|
+
*
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
wrapInBrackets?: boolean;
|
|
18
24
|
};
|
|
19
25
|
/**
|
|
20
26
|
* Technical to user-friendly tool names and emojis
|
|
@@ -24,6 +30,7 @@ export type ToolCallChipletInfo = {
|
|
|
24
30
|
export declare const TOOL_TITLES: Record<string, {
|
|
25
31
|
title: string;
|
|
26
32
|
emoji: string;
|
|
33
|
+
wrapInBrackets?: boolean;
|
|
27
34
|
}>;
|
|
28
35
|
/**
|
|
29
36
|
* Gets the chiplet information including text and agent data (for team tools).
|
|
@@ -35,6 +35,69 @@ export type ToolCall = {
|
|
|
35
35
|
*/
|
|
36
36
|
readonly warnings?: ReadonlyArray<TODO_any>;
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Breakdown of teacher-learned commitment categories for self-learning.
|
|
40
|
+
*/
|
|
41
|
+
export type SelfLearningCommitmentTypeCounts = {
|
|
42
|
+
/**
|
|
43
|
+
* Total number of learned commitments.
|
|
44
|
+
*/
|
|
45
|
+
readonly total: number;
|
|
46
|
+
/**
|
|
47
|
+
* Count of knowledge commitments.
|
|
48
|
+
*/
|
|
49
|
+
readonly knowledge: number;
|
|
50
|
+
/**
|
|
51
|
+
* Count of rule commitments.
|
|
52
|
+
*/
|
|
53
|
+
readonly rule: number;
|
|
54
|
+
/**
|
|
55
|
+
* Count of persona commitments.
|
|
56
|
+
*/
|
|
57
|
+
readonly persona: number;
|
|
58
|
+
/**
|
|
59
|
+
* Count of other commitment types.
|
|
60
|
+
*/
|
|
61
|
+
readonly other: number;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Summary of the teacher review step during self-learning.
|
|
65
|
+
*/
|
|
66
|
+
export type SelfLearningTeacherSummary = {
|
|
67
|
+
/**
|
|
68
|
+
* Indicates whether the teacher step was used.
|
|
69
|
+
*/
|
|
70
|
+
readonly used: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Commitment breakdown produced by the teacher step.
|
|
73
|
+
*/
|
|
74
|
+
readonly commitmentTypes: SelfLearningCommitmentTypeCounts;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Result payload for the self-learning tool call.
|
|
78
|
+
*/
|
|
79
|
+
export type SelfLearningToolCallResult = {
|
|
80
|
+
/**
|
|
81
|
+
* Indicates whether self-learning completed successfully.
|
|
82
|
+
*/
|
|
83
|
+
readonly success: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Timestamp for when self-learning started.
|
|
86
|
+
*/
|
|
87
|
+
readonly startedAt?: string_date_iso8601;
|
|
88
|
+
/**
|
|
89
|
+
* Timestamp for when self-learning finished.
|
|
90
|
+
*/
|
|
91
|
+
readonly completedAt?: string_date_iso8601;
|
|
92
|
+
/**
|
|
93
|
+
* Number of conversation examples saved from this turn.
|
|
94
|
+
*/
|
|
95
|
+
readonly samplesAdded?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Summary of the teacher review step.
|
|
98
|
+
*/
|
|
99
|
+
readonly teacher?: SelfLearningTeacherSummary;
|
|
100
|
+
};
|
|
38
101
|
/**
|
|
39
102
|
* Tool call name emitted while preparing a GPT assistant for an agent.
|
|
40
103
|
*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { string_markdown } from '../../types/typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Remove bracketed source citation artifacts like `\u30105:1\u2020source\u3011`.
|
|
4
|
+
*
|
|
5
|
+
* Note: [??] This function is idempotent.
|
|
6
|
+
* Tip: If you want to do the full cleanup, look for `humanizeAiText` exported `@promptbook/markdown-utils`
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
9
|
+
*/
|
|
10
|
+
export declare function humanizeAiTextSources(aiText: string_markdown): string_markdown;
|
|
11
|
+
/**
|
|
12
|
+
* Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
13
|
+
*/
|
|
@@ -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.
|
|
18
|
+
* It follows semantic versioning (e.g., `0.107.0-0`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/javascript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.108.0-0",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"module": "./esm/index.es.js",
|
|
95
95
|
"typings": "./esm/typings/src/_packages/javascript.index.d.ts",
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@promptbook/core": "0.
|
|
97
|
+
"@promptbook/core": "0.108.0-0"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"crypto": "1.0.1",
|
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.
|
|
25
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.108.0-0';
|
|
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
|