@promptbook/legacy-documents 0.105.0-8 → 0.105.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/README.md +0 -4
- package/esm/index.es.js +13 -13
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/browser.index.d.ts +2 -0
- package/esm/typings/src/_packages/components.index.d.ts +20 -0
- package/esm/typings/src/_packages/core.index.d.ts +21 -11
- package/esm/typings/src/_packages/node.index.d.ts +2 -0
- package/esm/typings/src/_packages/openai.index.d.ts +4 -0
- package/esm/typings/src/_packages/types.index.d.ts +32 -2
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +10 -1
- package/esm/typings/src/book-2.0/agent-source/parseTeamCommitment.d.ts +28 -0
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/AgentChat/AgentChatProps.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/AgentChip/AgentChip.d.ts +67 -0
- package/esm/typings/src/book-components/Chat/AgentChip/index.d.ts +2 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +33 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +87 -6
- package/esm/typings/src/book-components/Chat/Chat/ChatSoundToggle.d.ts +23 -0
- package/esm/typings/src/book-components/Chat/Chat/ClockIcon.d.ts +9 -0
- package/esm/typings/src/book-components/Chat/LlmChat/FriendlyErrorMessage.d.ts +20 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/SourceChip/SourceChip.d.ts +35 -0
- package/esm/typings/src/book-components/Chat/SourceChip/index.d.ts +2 -0
- package/esm/typings/src/book-components/Chat/effects/ChatEffectsSystem.d.ts +14 -0
- package/esm/typings/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +18 -0
- package/esm/typings/src/book-components/Chat/effects/components/HeartsEffect.d.ts +18 -0
- package/esm/typings/src/book-components/Chat/effects/configs/defaultEffectConfigs.d.ts +7 -0
- package/esm/typings/src/book-components/Chat/effects/index.d.ts +18 -0
- package/esm/typings/src/book-components/Chat/effects/types/ChatEffect.d.ts +20 -0
- package/esm/typings/src/book-components/Chat/effects/types/ChatEffectConfig.d.ts +21 -0
- package/esm/typings/src/book-components/Chat/effects/types/ChatEffectType.d.ts +6 -0
- package/esm/typings/src/book-components/Chat/effects/types/ChatEffectsSystemProps.d.ts +32 -0
- package/esm/typings/src/book-components/Chat/effects/utils/detectEffects.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +34 -6
- package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +8 -0
- package/esm/typings/src/book-components/Chat/utils/createTeamToolNameFromUrl.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/utils/getToolCallChipletText.d.ts +40 -0
- package/esm/typings/src/book-components/Chat/utils/loadAgentProfile.d.ts +69 -0
- package/esm/typings/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +53 -0
- package/esm/typings/src/book-components/Chat/utils/resolveCitationUrl.d.ts +11 -0
- package/esm/typings/src/book-components/Chat/utils/resolveCitationUrl.test.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/utils/toolCallParsing.d.ts +64 -0
- package/esm/typings/src/book-components/icons/EmailIcon.d.ts +15 -0
- package/esm/typings/src/commitments/TEAM/TEAM.d.ts +45 -0
- package/esm/typings/src/commitments/TEMPLATE/TEMPLATE.d.ts +44 -0
- package/esm/typings/src/commitments/TEMPLATE/TEMPLATE.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +19 -1
- package/esm/typings/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +22 -0
- package/esm/typings/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +13 -0
- package/esm/typings/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +48 -0
- package/esm/typings/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +11 -0
- package/esm/typings/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +18 -0
- package/esm/typings/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +46 -0
- package/esm/typings/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +5 -0
- package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.d.ts +6 -0
- package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +6 -0
- package/esm/typings/src/commitments/_base/CommitmentDefinition.d.ts +6 -0
- package/esm/typings/src/commitments/_base/formatOptionalInstructionBlock.d.ts +6 -0
- package/esm/typings/src/commitments/_common/commitmentToolFunctions.d.ts +26 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentDefinitions.d.ts +8 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentTypes.d.ts +8 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentsToolFunctionsForBrowser.d.ts +9 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +13 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentsToolTitles.d.ts +7 -0
- package/esm/typings/src/commitments/_common/getCommitmentDefinition.d.ts +10 -0
- package/esm/typings/src/commitments/_common/getGroupedCommitmentDefinitions.d.ts +17 -0
- package/esm/typings/src/commitments/_common/isCommitmentSupported.d.ts +9 -0
- package/esm/typings/src/commitments/index.d.ts +5 -58
- package/esm/typings/src/config.d.ts +6 -0
- package/esm/typings/src/constants.d.ts +129 -0
- package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -0
- package/esm/typings/src/execution/AvailableModel.d.ts +5 -4
- package/esm/typings/src/execution/PromptResult.d.ts +2 -19
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +1 -1
- package/esm/typings/src/execution/utils/$provideExecutionToolsForNode.d.ts +1 -0
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +15 -1
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +6 -1
- package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +5 -0
- package/esm/typings/src/llm-providers/google/createGoogleExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/OpenAiAgentExecutionTools.d.ts +43 -0
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +4 -2
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/createOpenAiAgentExecutionTools.d.ts +11 -0
- package/esm/typings/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +7 -0
- package/esm/typings/src/pipeline/prompt-notation.d.ts +27 -2
- package/esm/typings/src/pipeline/prompt-notation.test.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +1 -0
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -0
- package/esm/typings/src/scrapers/_common/register/$provideScriptingForNode.d.ts +1 -0
- package/esm/typings/src/search-engines/SearchEngine.d.ts +1 -1
- package/esm/typings/src/search-engines/bing/BingSearchEngine.d.ts +1 -1
- package/esm/typings/src/search-engines/dummy/DummySearchEngine.d.ts +1 -1
- package/esm/typings/src/search-engines/google/GoogleSearchEngine.d.ts +1 -1
- package/esm/typings/src/search-engines/serp/SerpSearchEngine.d.ts +1 -1
- package/esm/typings/src/speech-recognition/OpenAiSpeechRecognition.d.ts +3 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +6 -0
- package/esm/typings/src/types/Prompt.d.ts +12 -0
- package/esm/typings/src/types/ToolCall.d.ts +37 -0
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -2
- package/esm/typings/src/utils/markdown/humanizeAiTextEllipsis.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextEmdashed.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextWhitespace.d.ts +1 -1
- package/esm/typings/src/utils/markdown/parseMarkdownSection.d.ts +1 -3
- package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +1 -2
- package/esm/typings/src/utils/misc/linguisticHash.d.ts +4 -1
- package/esm/typings/src/utils/parameters/templateParameters.d.ts +1 -2
- package/esm/typings/src/version.d.ts +1 -1
- package/esm/typings/src/wizard/wizard.d.ts +1 -4
- package/package.json +2 -2
- package/umd/index.umd.js +13 -13
- package/umd/index.umd.js.map +1 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { string_markdown_section } from '../../types/typeAliases';
|
|
2
|
-
import type { string_markdown_section_content } from '../../types/typeAliases';
|
|
3
|
-
import type { string_markdown_text } from '../../types/typeAliases';
|
|
1
|
+
import type { string_markdown_section, string_markdown_section_content, string_markdown_text } from '../../types/typeAliases';
|
|
4
2
|
/**
|
|
5
3
|
* Parsed markdown section
|
|
6
4
|
*
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { string_markdown } from '../../types/typeAliases';
|
|
2
|
-
import type { string_markdown_section } from '../../types/typeAliases';
|
|
1
|
+
import type { string_markdown, string_markdown_section } from '../../types/typeAliases';
|
|
3
2
|
/**
|
|
4
3
|
* Splits the markdown into sections by headings
|
|
5
4
|
*
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Creates human-readable hash
|
|
2
|
+
* Creates a human-readable hash as a short story sentence.
|
|
3
3
|
*
|
|
4
4
|
* @public exported from `@promptbook/utils`
|
|
5
5
|
*/
|
|
6
6
|
export declare function linguisticHash(input: string): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* TODO: Prompt: Extract number constants and word list to a separate file for reuse.
|
|
9
|
+
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { string_parameter_name } from '../../types/typeAliases';
|
|
2
|
-
import type { string_template } from '../../types/typeAliases';
|
|
1
|
+
import type { string_parameter_name, string_template } from '../../types/typeAliases';
|
|
3
2
|
import type { really_unknown } from '../organization/really_unknown';
|
|
4
3
|
/**
|
|
5
4
|
* Replaces parameters in template with values from parameters object
|
|
@@ -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.105.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.105.0-32`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
|
@@ -2,10 +2,7 @@ import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
|
2
2
|
import type { PipelineExecutorResult } from '../execution/PipelineExecutorResult';
|
|
3
3
|
import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
|
|
4
4
|
import type { PipelineString } from '../pipeline/PipelineString';
|
|
5
|
-
import type { InputParameters } from '../types/typeAliases';
|
|
6
|
-
import type { string_filename } from '../types/typeAliases';
|
|
7
|
-
import type { string_parameter_value } from '../types/typeAliases';
|
|
8
|
-
import type { string_pipeline_url } from '../types/typeAliases';
|
|
5
|
+
import type { InputParameters, string_filename, string_parameter_value, string_pipeline_url } from '../types/typeAliases';
|
|
9
6
|
/**
|
|
10
7
|
* Options for wizard methods
|
|
11
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/legacy-documents",
|
|
3
|
-
"version": "0.105.0
|
|
3
|
+
"version": "0.105.0",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"module": "./esm/index.es.js",
|
|
96
96
|
"typings": "./esm/typings/src/_packages/legacy-documents.index.d.ts",
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@promptbook/core": "0.105.0
|
|
98
|
+
"@promptbook/core": "0.105.0"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.105.0
|
|
28
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1834,7 +1834,7 @@
|
|
|
1834
1834
|
if (typeof filename !== 'string') {
|
|
1835
1835
|
return false;
|
|
1836
1836
|
}
|
|
1837
|
-
if (filename.split(
|
|
1837
|
+
if (filename.split(/\r?\n/).length > 1) {
|
|
1838
1838
|
return false;
|
|
1839
1839
|
}
|
|
1840
1840
|
// Normalize slashes early so heuristics can detect path-like inputs
|
|
@@ -2036,7 +2036,7 @@
|
|
|
2036
2036
|
if (typeof email !== 'string') {
|
|
2037
2037
|
return false;
|
|
2038
2038
|
}
|
|
2039
|
-
if (email.split(
|
|
2039
|
+
if (email.split(/\r?\n/).length > 1) {
|
|
2040
2040
|
return false;
|
|
2041
2041
|
}
|
|
2042
2042
|
return /^.+@.+\..+$/.test(email);
|
|
@@ -4985,7 +4985,7 @@
|
|
|
4985
4985
|
|
|
4986
4986
|
The source:
|
|
4987
4987
|
${block(knowledgeSource.knowledgeSourceContent
|
|
4988
|
-
.split(
|
|
4988
|
+
.split(/\r?\n/)
|
|
4989
4989
|
.map((line) => `> ${line}`)
|
|
4990
4990
|
.join('\n'))}
|
|
4991
4991
|
|
|
@@ -5001,7 +5001,7 @@
|
|
|
5001
5001
|
|
|
5002
5002
|
The source:
|
|
5003
5003
|
> ${block(knowledgeSource.knowledgeSourceContent
|
|
5004
|
-
.split(
|
|
5004
|
+
.split(/\r?\n/)
|
|
5005
5005
|
.map((line) => `> ${line}`)
|
|
5006
5006
|
.join('\n'))}
|
|
5007
5007
|
|
|
@@ -5702,7 +5702,7 @@
|
|
|
5702
5702
|
subvalueName: 'LINE',
|
|
5703
5703
|
async mapValues(options) {
|
|
5704
5704
|
const { value, mapCallback, onProgress } = options;
|
|
5705
|
-
const lines = value.split(
|
|
5705
|
+
const lines = value.split(/\r?\n/);
|
|
5706
5706
|
const mappedLines = await Promise.all(lines.map((lineContent, lineNumber, array) =>
|
|
5707
5707
|
// TODO: [🧠] Maybe option to skip empty line
|
|
5708
5708
|
/* not await */ mapCallback({
|
|
@@ -5907,7 +5907,7 @@
|
|
|
5907
5907
|
parameterValue = parameterValue.replace(/[{}]/g, '\\$&');
|
|
5908
5908
|
if (parameterValue.includes('\n') && /^\s*\W{0,3}\s*$/.test(precol)) {
|
|
5909
5909
|
parameterValue = parameterValue
|
|
5910
|
-
.split(
|
|
5910
|
+
.split(/\r?\n/)
|
|
5911
5911
|
.map((line, index) => (index === 0 ? line : `${precol}${line}`))
|
|
5912
5912
|
.join('\n');
|
|
5913
5913
|
}
|
|
@@ -5943,7 +5943,7 @@
|
|
|
5943
5943
|
*/
|
|
5944
5944
|
function extractAllBlocksFromMarkdown(markdown) {
|
|
5945
5945
|
const codeBlocks = [];
|
|
5946
|
-
const lines = markdown.split(
|
|
5946
|
+
const lines = markdown.split(/\r?\n/);
|
|
5947
5947
|
// Note: [0] Ensure that the last block notated by gt > will be closed
|
|
5948
5948
|
lines.push('');
|
|
5949
5949
|
let currentCodeBlock = null;
|
|
@@ -6078,7 +6078,7 @@
|
|
|
6078
6078
|
}
|
|
6079
6079
|
text = text.replace('\r\n', '\n');
|
|
6080
6080
|
text = text.replace('\r', '\n');
|
|
6081
|
-
const lines = text.split(
|
|
6081
|
+
const lines = text.split(/\r?\n/);
|
|
6082
6082
|
return lines.reduce((count, line) => count + Math.max(Math.ceil(line.length / CHARACTERS_PER_STANDARD_LINE), 1), 0);
|
|
6083
6083
|
}
|
|
6084
6084
|
/**
|
|
@@ -6553,13 +6553,13 @@
|
|
|
6553
6553
|
return `
|
|
6554
6554
|
Attempt ${failure.attemptIndex + 1}:
|
|
6555
6555
|
Error ${((_a = failure.error) === null || _a === void 0 ? void 0 : _a.name) || ''}:
|
|
6556
|
-
${block((_b = failure.error) === null || _b === void 0 ? void 0 : _b.message.split(
|
|
6556
|
+
${block((_b = failure.error) === null || _b === void 0 ? void 0 : _b.message.split(/\r?\n/).map((line) => `> ${line}`).join('\n'))}
|
|
6557
6557
|
|
|
6558
6558
|
Result:
|
|
6559
6559
|
${block(failure.result === null
|
|
6560
6560
|
? 'null'
|
|
6561
6561
|
: spaceTrim$1.spaceTrim(failure.result)
|
|
6562
|
-
.split(
|
|
6562
|
+
.split(/\r?\n/)
|
|
6563
6563
|
.map((line) => `> ${line}`)
|
|
6564
6564
|
.join('\n'))}
|
|
6565
6565
|
`;
|
|
@@ -6574,7 +6574,7 @@
|
|
|
6574
6574
|
|
|
6575
6575
|
The Prompt:
|
|
6576
6576
|
${block((((_a = $ongoingTaskResult.$prompt) === null || _a === void 0 ? void 0 : _a.content) || '')
|
|
6577
|
-
.split(
|
|
6577
|
+
.split(/\r?\n/)
|
|
6578
6578
|
.map((line) => `> ${line}`)
|
|
6579
6579
|
.join('\n'))}
|
|
6580
6580
|
|
|
@@ -7245,7 +7245,7 @@
|
|
|
7245
7245
|
${block(pipelineIdentification)}
|
|
7246
7246
|
|
|
7247
7247
|
${block(JSON.stringify(newOngoingResult, null, 4)
|
|
7248
|
-
.split(
|
|
7248
|
+
.split(/\r?\n/)
|
|
7249
7249
|
.map((line) => `> ${line}`)
|
|
7250
7250
|
.join('\n'))}
|
|
7251
7251
|
`));
|