@promptbook/remote-client 0.104.0-9 → 0.105.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 +20 -10
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/components.index.d.ts +0 -6
- package/esm/typings/src/_packages/core.index.d.ts +10 -6
- package/esm/typings/src/_packages/types.index.d.ts +8 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +24 -0
- package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +16 -2
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirements.tools.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +23 -3
- package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +5 -1
- package/esm/typings/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +5 -1
- package/esm/typings/src/book-components/icons/AboutIcon.d.ts +5 -1
- package/esm/typings/src/book-components/icons/AttachmentIcon.d.ts +6 -2
- package/esm/typings/src/book-components/icons/CameraIcon.d.ts +6 -2
- package/esm/typings/src/book-components/icons/DownloadIcon.d.ts +5 -1
- package/esm/typings/src/book-components/icons/MenuIcon.d.ts +5 -1
- package/esm/typings/src/book-components/icons/SaveIcon.d.ts +6 -2
- package/esm/typings/src/collection/agent-collection/AgentCollection.d.ts +1 -1
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +9 -7
- package/esm/typings/src/commands/_common/types/Command.d.ts +1 -1
- package/esm/typings/src/commitments/IMPORT/IMPORT.d.ts +34 -0
- package/esm/typings/src/commitments/META/META_DESCRIPTION.d.ts +41 -0
- package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +2 -2
- package/esm/typings/src/commitments/_base/BookCommitment.d.ts +1 -1
- package/esm/typings/src/commitments/index.d.ts +2 -1
- package/esm/typings/src/config.d.ts +14 -1
- package/esm/typings/src/errors/utils/deserializeError.d.ts +1 -1
- package/esm/typings/src/execution/PromptResult.d.ts +24 -1
- package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +8 -4
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +1 -1
- package/esm/typings/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +12 -8
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +7 -1
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +5 -0
- package/esm/typings/src/llm-providers/openai/utils/mapToolsToOpenAi.d.ts +8 -0
- package/esm/typings/src/remote-server/ui/ServerApp.d.ts +5 -1
- package/esm/typings/src/scrapers/_common/utils/promptbookFetch.test.d.ts +1 -0
- package/esm/typings/src/search-engines/SearchEngine.d.ts +9 -0
- package/esm/typings/src/search-engines/SearchResult.d.ts +18 -0
- package/esm/typings/src/search-engines/bing/BingSearchEngine.d.ts +15 -0
- package/esm/typings/src/search-engines/dummy/DummySearchEngine.d.ts +15 -0
- package/esm/typings/src/types/LlmToolDefinition.d.ts +27 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +13 -0
- package/esm/typings/src/types/Prompt.d.ts +13 -0
- package/esm/typings/src/types/typeAliasEmoji.d.ts +2 -2
- package/esm/typings/src/utils/misc/parseNumber.d.ts +1 -1
- package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +7 -2
- package/esm/typings/src/utils/random/$randomItem.d.ts +1 -1
- package/esm/typings/src/utils/random/$randomSeed.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isValidAgentUrl.d.ts +16 -0
- package/esm/typings/src/utils/validators/url/isValidAgentUrl.test.d.ts +1 -0
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -1
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +4 -3
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +20 -10
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/servers.d.ts +0 -50
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import type { string_persona_description } from '../../types/typeAliases';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* Generates a random agent persona description.
|
|
3
4
|
*
|
|
5
|
+
* This function selects a random personality profile from a predefined pool
|
|
6
|
+
* of common AI agent characteristics (e.g., friendly, professional, creative).
|
|
7
|
+
*
|
|
8
|
+
* @returns A string describing the agent's persona
|
|
4
9
|
* @private internal helper function
|
|
5
10
|
*/
|
|
6
|
-
export declare function $randomAgentPersona():
|
|
11
|
+
export declare function $randomAgentPersona(): string_persona_description;
|
|
7
12
|
/**
|
|
8
13
|
* TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
|
9
14
|
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { string_agent_url } from '../../../types/typeAliases';
|
|
2
|
+
import type { really_unknown } from '../../organization/really_unknown';
|
|
3
|
+
/**
|
|
4
|
+
* Tests if given string is valid agent URL
|
|
5
|
+
*
|
|
6
|
+
* Note: There are few similar functions:
|
|
7
|
+
* - `isValidUrl` which tests any URL
|
|
8
|
+
* - `isValidAgentUrl` *(this one)* which tests just agent URL
|
|
9
|
+
* - `isValidPipelineUrl` which tests just pipeline URL
|
|
10
|
+
*
|
|
11
|
+
* @public exported from `@promptbook/utils`
|
|
12
|
+
*/
|
|
13
|
+
export declare function isValidAgentUrl(url: really_unknown): url is string_agent_url;
|
|
14
|
+
/**
|
|
15
|
+
* TODO: [🐠] Maybe more info why the URL is invalid
|
|
16
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,8 +3,9 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
3
3
|
/**
|
|
4
4
|
* Tests if given string is valid pipeline URL URL.
|
|
5
5
|
*
|
|
6
|
-
* Note: There are
|
|
6
|
+
* Note: There are few similar functions:
|
|
7
7
|
* - `isValidUrl` which tests any URL
|
|
8
|
+
* - `isValidAgentUrl` which tests just agent URL
|
|
8
9
|
* - `isValidPipelineUrl` *(this one)* which tests just pipeline URL
|
|
9
10
|
*
|
|
10
11
|
* @public exported from `@promptbook/utils`
|
|
@@ -5,9 +5,10 @@ import type { really_unknown } from '../../organization/really_unknown';
|
|
|
5
5
|
*
|
|
6
6
|
* Note: [🔂] This function is idempotent.
|
|
7
7
|
* Note: Dataurl are considered perfectly valid.
|
|
8
|
-
* Note: There are
|
|
9
|
-
* - `isValidUrl` which tests any URL
|
|
10
|
-
* - `
|
|
8
|
+
* Note: There are few similar functions:
|
|
9
|
+
* - `isValidUrl` *(this one)* which tests any URL
|
|
10
|
+
* - `isValidAgentUrl` which tests just agent URL
|
|
11
|
+
* - `isValidPipelineUrl` which tests just pipeline URL
|
|
11
12
|
*
|
|
12
13
|
* @public exported from `@promptbook/utils`
|
|
13
14
|
*/
|
|
@@ -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.104.0
|
|
18
|
+
* It follows semantic versioning (e.g., `0.104.0`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.105.0-0",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"module": "./esm/index.es.js",
|
|
101
101
|
"typings": "./esm/typings/src/_packages/remote-client.index.d.ts",
|
|
102
102
|
"peerDependencies": {
|
|
103
|
-
"@promptbook/core": "0.
|
|
103
|
+
"@promptbook/core": "0.105.0-0"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"crypto": "1.0.1",
|
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-0';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1492,7 +1492,7 @@
|
|
|
1492
1492
|
*
|
|
1493
1493
|
* @public exported from `@promptbook/utils`
|
|
1494
1494
|
*/
|
|
1495
|
-
function deserializeError(error) {
|
|
1495
|
+
function deserializeError(error, isStackAddedToMessage = true) {
|
|
1496
1496
|
const { name, stack, id } = error; // Added id
|
|
1497
1497
|
let { message } = error;
|
|
1498
1498
|
let ErrorClass = ALL_ERRORS[error.name];
|
|
@@ -1500,7 +1500,7 @@
|
|
|
1500
1500
|
ErrorClass = Error;
|
|
1501
1501
|
message = `${name}: ${message}`;
|
|
1502
1502
|
}
|
|
1503
|
-
if (stack !== undefined && stack !== '') {
|
|
1503
|
+
if (isStackAddedToMessage && stack !== undefined && stack !== '') {
|
|
1504
1504
|
message = spaceTrim__default["default"]((block) => `
|
|
1505
1505
|
${block(message)}
|
|
1506
1506
|
|
|
@@ -1518,9 +1518,10 @@
|
|
|
1518
1518
|
*
|
|
1519
1519
|
* Note: [🔂] This function is idempotent.
|
|
1520
1520
|
* Note: Dataurl are considered perfectly valid.
|
|
1521
|
-
* Note: There are
|
|
1522
|
-
* - `isValidUrl` which tests any URL
|
|
1523
|
-
* - `
|
|
1521
|
+
* Note: There are few similar functions:
|
|
1522
|
+
* - `isValidUrl` *(this one)* which tests any URL
|
|
1523
|
+
* - `isValidAgentUrl` which tests just agent URL
|
|
1524
|
+
* - `isValidPipelineUrl` which tests just pipeline URL
|
|
1524
1525
|
*
|
|
1525
1526
|
* @public exported from `@promptbook/utils`
|
|
1526
1527
|
*/
|
|
@@ -1972,8 +1973,8 @@
|
|
|
1972
1973
|
*/
|
|
1973
1974
|
function removeDiacritics(input) {
|
|
1974
1975
|
/*eslint no-control-regex: "off"*/
|
|
1975
|
-
return input.replace(/[^\u0000-\u007E]/g, (
|
|
1976
|
-
return DIACRITIC_VARIANTS_LETTERS[
|
|
1976
|
+
return input.replace(/[^\u0000-\u007E]/g, (character) => {
|
|
1977
|
+
return DIACRITIC_VARIANTS_LETTERS[character] || character;
|
|
1977
1978
|
});
|
|
1978
1979
|
}
|
|
1979
1980
|
/**
|
|
@@ -2600,6 +2601,9 @@
|
|
|
2600
2601
|
* @public exported from `@promptbook/utils`
|
|
2601
2602
|
*/
|
|
2602
2603
|
function parseNumber(value) {
|
|
2604
|
+
if (value === null || value === undefined) {
|
|
2605
|
+
return 0;
|
|
2606
|
+
}
|
|
2603
2607
|
const originalValue = value;
|
|
2604
2608
|
if (typeof value === 'number') {
|
|
2605
2609
|
value = value.toString(); // <- TODO: Maybe more efficient way to do this
|
|
@@ -4311,7 +4315,12 @@
|
|
|
4311
4315
|
* @see {@link ModelVariant}
|
|
4312
4316
|
* @public exported from `@promptbook/core`
|
|
4313
4317
|
*/
|
|
4314
|
-
const MODEL_VARIANTS = [
|
|
4318
|
+
const MODEL_VARIANTS = [
|
|
4319
|
+
'COMPLETION',
|
|
4320
|
+
'CHAT',
|
|
4321
|
+
'IMAGE_GENERATION',
|
|
4322
|
+
'EMBEDDING' /* <- TODO [🏳] */ /* <- [🤖] */,
|
|
4323
|
+
];
|
|
4315
4324
|
|
|
4316
4325
|
/**
|
|
4317
4326
|
* Parses the model command
|
|
@@ -4830,8 +4839,9 @@
|
|
|
4830
4839
|
/**
|
|
4831
4840
|
* Tests if given string is valid pipeline URL URL.
|
|
4832
4841
|
*
|
|
4833
|
-
* Note: There are
|
|
4842
|
+
* Note: There are few similar functions:
|
|
4834
4843
|
* - `isValidUrl` which tests any URL
|
|
4844
|
+
* - `isValidAgentUrl` which tests just agent URL
|
|
4835
4845
|
* - `isValidPipelineUrl` *(this one)* which tests just pipeline URL
|
|
4836
4846
|
*
|
|
4837
4847
|
* @public exported from `@promptbook/utils`
|